Update a period
Update a period in your company. Before making a PUT request to update a period in your company, you might find it useful to look at the list of available companies.
PUT periods/:id
Request details
The put request will contain all the required information to update a period in your company.
Request properties
Property | Type | Description | Optional |
---|---|---|---|
PeriodId | Guid | Unique identifier of the period. | No |
Request | Period request object | The period request to update. | No |
For period update request object properties see details.
Example periods request
{ "externalId":"1234", "company":{ "companyId":"00000000-0000-0000-0000-000000000000" }, "year":2017, "number":1, "startDate":"2017-01-01", "endDate":"2017-01-31", "isOpen":true }
Response
Upon successful update of a period in the Basecone system, a 204 http status code will be returned. If something goes wrong, an error message with failure details will be given together with a suitable http error status code.
Possible error responses
Status code | Error code | Details |
---|---|---|
400 | invalid_request_payload | Update period request cannot be null |
400 | invalid_request_payload | Period id cannot be empty |
400 | invalid_request_payload | Company id cannot be empty |
400 | invalid_request_payload | The company provided does not exist. |
400 | user_credentials_invalid | Invalid credentials. |
400 | invalid_request_payload | The period externalId provided is already in use by another period. |
400 | validation_error | One or more validation errors occurred. |
403 | unauthorized | User does not have access to the company provided. |
400 | concurrent_request | The operation failed because the period you are trying to change has just been modified by another concurrent request. |