| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not found. |
| 500 | Server crashed for some reason. |
This API endpoint allows you to report a damage for a Container.
curl "https://app.octopi.co/api/v1/containers/:container_number/damages" -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Token token=YOUR TOKEN HERE" \
-d '{
"damage": {
"remarks": "Big hole in the side.",
"damaged_at": null,
"needs_repair": true
}
}'
{
"damage": {
"id": 133535,
"remarks": "Big hole in the side.",
"reported_by": "System",
"reported_at": "2022-06-22T15:40:05Z",
"needs_repair": true,
"repair": {
"status": "waiting"
}
}
}
| Param name | Description |
|---|---|
|
container_number required |
Allows you to search Containers by number. Validations:
|
|
damage required |
Validations:
|
|
damage[remarks] required |
Validations:
|
|
damage[damaged_at] optional |
Validations:
|
|
damage[needs_repair] optional |
Validations:
|