Skip to main content

Package Item Services

This document covers all services related to package items, requests, and responses for these services.

Status Codes

The following status codes returns in the response message body of the request.

  • 200 OK: The request was successful and the requested resource is returned in the response.
  • 204 No Content: The request was successful and there is no content to be returned.
  • 400 Bad Request: The request was malformed or missing, false given required parameters.
  • 401 Unauthorized: The requested user is not authorized to access the requested resource.
  • 403 Forbidden: The server understands the request, but the client is not authorized to access the requested resource.
  • 406 Not Acceptable: The server cannot produce a response matching the list of acceptable values defined in the request's headers.
  • 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
  • 500 Internal Server Error: An unexpected error occurred on the server.

GET Package Item List

Returns the detailed information of a single package item with pk (ID).

Path: /api/v1/package-item/{pk}/

Request

  • Headers: -
  • Authorization: Token
  • Content-Type: application/json
  • Request Body: None

Response (200 OK)

{
"id": 1,
"state": {
"id": 23,
"created_date": "2023-03-07T09:45:51.923174Z",
"modified_date": "2023-03-07T09:45:51.923183Z",
"translations": null,
"name": "Waiting",
"config": {},
"enum_class": "PackageItemStatus",
"enum_value": "100",
"content_type": 2
},
"discrepancy_reason": null,
"denial_reason": null,
"created_date": "2023-04-27T10:16:22.529889Z",
"modified_date": "2023-04-27T10:16:22.529899Z",
"selected_barcode": null,
"serial_no": null,
"unit_weight": null,
"package": 203,
"order_item": 1,
"unit_type": "quantity"
}

Response Description:

Properties of the package item, including their status, are transmitted in the message body.

GET Package Item Simple List

Returns the simple list of package items with no nested relationships.

Path: /api/v1/oms/package-item/list-simple/

Request

  • Headers: -
  • Authorization: Token
  • Body Parameters: None
  • Request Body: None

Response (200 OK)

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"created_date": "2023-04-27T10:16:22.529889Z",
"modified_date": "2023-04-27T10:16:22.529899Z",
"selected_barcode": null,
"serial_no": null,
"unit_weight": null,
"state": 23,
"package": 203,
"order_item": 1,
"denial_reason": null
}
]
}

Response Description:

A simple list of package items with a paginated response and no nested relationships are transmitted in the message body.