Code | Description |
---|---|
400 | Bad Request. |
404 | Not found. |
500 | Server crashed for some reason. |
This API endpoint allows you to start and complete repairs for a damage.
curl --location --request PATCH 'https://app.octopi.co/api/v1/containers/:container_number/damages/:id' \ --header "Authorization: Token token=YOUR TOKEN HERE" \ --header 'Content-Type: application/json' \ --data-raw '{ "repair": { "status_changed_at": null, "status": "started" } }'
{ "damage": { "id": 133535, "remarks": "Big hole in the side.", "reported_by": "System", "reported_at": "2022-06-22T15:40:05Z", "needs_repair": true, "repair": { "status": "started", "started_at": "2022-06-22T17:58:05Z" } } }
Param name | Description |
---|---|
container_number required |
Allows you to search Containers by number. Validations:
|
id required |
Allows you to search Container Damages by ID. Validations:
|
repair required |
Validations:
|
repair[status] required |
The status of the repair. Can be ‘started’ or ‘completed’. Validations:
|
repair[status_changed_at] optional |
The date and time the status was changed. Defaults to the current time. Validations:
|
repair[notes] optional |
Validations:
|