Supported Formats

json

GET /api/v1/service_orders/:order_number/service_order_items/:id.json
Returns information about the order item under the given service order.

Supported Formats

json

Errors

Code Description
404 Resource Not Found
422 Validation Error
500 Internal Server Error

Examples

curl 'https://app.octopi.co/api/v1/service_orders/ORDER_NUMBER/service_order_items/ORDER_ITEM_ID' \
  -X 'GET' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token token=YOURTOKEN'
{
  "order_number": "API_TEST_003",
  "id": 80,
  "status": "pending",
  "container_id": 4332804,
  "container_number": "BMOU9341910",
  "service_type": "default",
  "service_id": "reseal",
  "service_name": "Reseal (Default)"
}

Params

Param name Description
order_number
required

Octopi ID or the unique service order number given while creating one.

Validations:

  • Must be a String

id
required

Octopi ID of the service order item.

Validations:

  • Must be a Integer


POST /api/v1/service_orders/:order_number/service_order_items.json
Creates an order item under the given service order.

Supported Formats

json

Errors

Code Description
404 Resource Not Found
422 Validation Error
500 Internal Server Error

Examples

curl 'https://app.octopi.co/api/v1/service_orders/ORDER_NUMBER/service_order_items' \
  -X 'POST' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token token=YOURTOKEN' \
  -d '{
    "service_order_item": {
      "container_id": 4332804,
      "service_id": "reseal"
    }
  }'
{
  "order_number": "API_TEST_003",
  "id": 80,
  "status": "pending",
  "container_id": 4332804,
  "container_number": "BMOU9341910",
  "service_type": "default",
  "service_id": "reseal",
  "service_name": "Reseal (Default)"
}

Params

Param name Description
order_number
required

Octopi ID or the unique service order number given while creating one.

Validations:

  • Must be a String

service_order_item
optional

Validations:

  • Must be a Hash

service_order_item[container_id]
required

Octopi ID of any container or breakbulk.

Validations:

  • Must be a Integer

service_order_item[service_id]
required

default or custom service IDs provided by Octopi.

Validations:

  • Must be a String


PUT /api/v1/service_orders/:order_number/service_order_items/:id.json
Updates an existing service order item.

Supported Formats

json

Errors

Code Description
404 Resource Not Found
422 Validation Error
500 Internal Server Error

Examples

curl 'https://app.octopi.co/api/v1/service_orders/ORDER_NUMBER/service_order_items/ORDER_ITEM_ID' \
  -X 'PUT' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token token=YOURTOKEN' \
  -d '{
    "service_order_item": {
      "container_id": 4337700,
      "service_id": "inspection"
    }
  }'
{
  "order_number": "API_TEST_003",
  "id": 80,
  "status": "pending",
  "container_id": 4337700,
  "container_number": "0317933",
  "service_type": "default",
  "service_id": "inspection",
  "service_name": "Inspection (Default)"
}

Params

Param name Description
order_number
required

Octopi ID or the unique service order number given while creating one.

Validations:

  • Must be a String

id
required

Octopi ID of the service order item.

Validations:

  • Must be a Integer

service_order_item
optional

Validations:

  • Must be a Hash

service_order_item[container_id]
required

Octopi ID of any container or breakbulk.

Validations:

  • Must be a Integer

service_order_item[service_id]
required

default or custom service IDs provided by Octopi.

Validations:

  • Must be a String


DELETE /api/v1/service_orders/:order_number/service_order_items/:id.json
Deletes an existing service order item.

Supported Formats

json

Errors

Code Description
404 Resource Not Found
422 Validation Error
500 Internal Server Error

Examples

curl 'https://app.octopi.co/api/v1/service_orders/ORDER_NUMBER/service_order_items/ORDER_ITEM_ID' \
  -X 'DELETE' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token token=YOURTOKEN'
{
  "order_number": "API_TEST_003",
  "id": 79,
  "status": "pending",
  "container_id": 4337700,
  "container_number": "0317933",
  "service_type": "default",
  "service_id": "cleaning",
  "service_name": "Cleaning (Default)"
}

Params

Param name Description
order_number
required

Octopi ID or the unique service order number given while creating one.

Validations:

  • Must be a String

id
required

Octopi ID of the service order item.

Validations:

  • Must be a Integer