Packages
This page provides comprehensive information and documentation on a set of API methods specifically designed to handle packages and packages items.
Packages
A package is a collection of order items that are ready to be shipped together. Packages are created automatically when an order is placed.
Schema
{
"id": "uuid",
"order": "uuid (Ref: Order ID)",
"number": "string",
"shipping_method": "uuid (Ref: Shipping Method ID)",
"waybill_number": "string",
"tracking_number": "string",
"tracking_url": "string",
"shipment_date": "datetime",
"delivery_date": "datetime",
"status": "enum(Cancelled > 1, Preparing > 2, Ready to Ship > 3, Shipped > 4, Delivered > 5, Delivery Failed > 6)",
"invoice_date": "datetime",
"invoice_number": "string",
"invoice_data": "string",
"invoice_data_type": "enum(URL, HTML, Base64, Text)",
"created_at": "datetime",
"updated_at": "datetime"
}
Retrieve ORI04
curl -X GET "https://example.com/api/i1/packages/" \
-H "Content-Type: application/json" \
-H "Authentication: Bearer {TOKEN}"
Example Response:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "8415ffaf-c196-411c-900a-6a4d4c5e3149",
"order": "e819386c-b406-43dc-86c9-212ff633afe2",
"number": "2286604509911564",
"shipping_method": "b2018d0e-755e-449f-b60b-b29ab27b42ba",
"waybill_number": "5c0095dab3c087befe04c0d5a0155d3e",
"tracking_number": "5c0095dab3c087befe04c0d5a0155d3e",
"tracking_url": "https://akinon.com/?q=5c0095dab3c087befe04c0d5a0155d3e",
"shipment_date": "2019-01-01T00:00:00Z",
"delivery_date": null,
"status": 4,
"invoice_date": null,
"invoice_number": null,
"invoice_data": null,
"invoice_data_type": null,
"created_at": "2019-01-01T00:00:00Z",
"updated_at": "2019-01-01T00:00:00Z"
}
]
}
Available Query Parameters
Key | Type |
---|---|
created_at__gte | datetime |
created_at__gt | datetime |
created_at__lte | datetime |
created_at__lt | datetime |
updated_at__gte | datetime |
updated_at__gt | datetime |
updated_at__lte | datetime |
updated_at__lt | datetime |
Possible HTTP Status Codes
- 200 OK: Packages retrieved successfully.
- 401 Unauthorized: Invalid authentication header (missing, invalid value, etc.).
- 415 Unsupported Media Type: Invalid content-type header (missing, invalid format, etc.).
- 500 Internal Server Error: Unexpected server error.
Package Items
A package item represents an order item that is part of a package. Package items are created automatically when an order is placed.
Schema
{
"id": "a35f6655-d52a-43a1-b8aa-b12ec668ac9b",
"order_item": "uuid (Ref: Order Item ID)",
"package": "uuid (Ref: Package ID)",
"created_at": "2019-01-01T00:00:00Z",
"updated_at": "2019-01-01T00:00:00Z"
}
Retrieve ORI05
curl -X GET "https://example.com/api/i1/package-items/" \
-H "Content-Type: application/json" \
-H "Authentication: Bearer {TOKEN}"
Example Response:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "a35f6655-d52a-43a1-b8aa-b12ec668ac9b",
"order_item": "33a11761-43bc-41d4-8f7f-1e860028367b",
"package": "8415ffaf-c196-411c-900a-6a4d4c5e3149",
"created_at": "2019-01-01T00:00:00Z",
"updated_at": "2019-01-01T00:00:00Z"
}
]
}
Available Query Parameters
Key | Type |
---|---|
created_at__gte | datetime |
created_at__gt | datetime |
created_at__lte | datetime |
created_at__lt | datetime |
updated_at__gte | datetime |
updated_at__gt | datetime |
updated_at__lte | datetime |
updated_at__lt | datetime |
Possible HTTP Status Codes
- 200 OK: Package items retrieved successfully.
- 401 Unauthorized: Invalid authentication header (missing, invalid value, etc.).
- 415 Unsupported Media Type: Invalid content-type header (missing, invalid format, etc.).
- 500 Internal Server Error: Unexpected server error.