| Code | Description | 
|---|---|
| 404 | Resource Not Found | 
| 422 | Validation Error | 
| 500 | Internal Server Error | 
curl 'https://app.octopi.co/api/v1/service_orders' \
  -X 'POST' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token token=YOURTOKEN' \
  -d '{
    "service_order": {
      "order_number": "API_TEST_002",
      "cargo_type": "container",
      "due_at": "2024-05-20T00:00:00Z",
      "comment": "New SO",
      "container_ids": [
        4337700
      ],
      "service_ids": [
        "cleaning",
        721
      ]
    }
  }'
    {
  "id": 41,
  "order_number": "API_TEST_002",
  "due_at": "2024-05-19T20:00:00-04:00",
  "cargo_type": "container",
  "status": "pending",
  "comment": "New SO",
  "created_at": "2024-01-29T05:33:55-05:00",
  "ordered_by": "System",
  "service_order_items": [
    {
      "id": 74,
      "container_id": 4337700,
      "status": "pending",
      "container_number": "0317933",
      "service_type": "custom",
      "service_id": 721,
      "service_name": "Repainting"
    },
    {
      "id": 75,
      "container_id": 4337700,
      "status": "pending",
      "container_number": "0317933",
      "service_type": "default",
      "service_id": "cleaning",
      "service_name": "Cleaning (Default)"
    }
  ]
}
  | Param name | Description | 
|---|---|
| service_order optional | Validations: 
 | 
| service_order[order_number] required | The unique service order number given while creating one. Validations: 
 | 
| service_order[cargo_type] required | container or breakbulk Validations: 
 | 
| service_order[container_ids] required | Octopi IDs of containers. Validations: 
 | 
| service_order[service_ids] required | Array of default & custom service type IDs provided by Octopi. Validations: 
 | 
| service_order[due_at] optional | The date and time before which you want to fulfil the order, in ISO 8601 format (Eg. 2023-08-18T14:00:00Z) in UTC. Validations: 
 | 
| service_order[comment] optional | Comments for this order. Validations: 
 |