Pack shipment

POST REST API request for suppliers, requiring a JSON body and an authorization token, in order to confirm packing is completed and that a shipment should be created.

Request

HTTP MethodPOST
URLStagehttps://api.stage.ananastest.com/order/api/v1/supplier-integration/shipment/{shipmentId}/pack
Productionhttps://api.ananas.rs/order/api/v1/supplier-integration/shipment/{shipmentId}/pack
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}

Request Body:

Fields nameTypeDescription
numberOfBoxesIntegerNumber of boxes (min 0)
productsList<ShipmentItemPackingDetails>List of products with packing details

ShipmentItemPackingDetails

Fields nameTypeDescription
idLongProduct id
quantityIntegerQuantity (min 0)

Example of the request:

Click to copy
Success!
{
  "numberOfBoxes": 2,
  "products": [
    {
        "id": 197208,
        "quantity": 2
    },
    {
        "id": 196253,
        "quantity": 1
    }
  ]
}

Error Response

There are several scenarios where the endpoint will return a status of 4xx:

  • If shipment does not exist, or if it does not belong to the supplier - 404
  • If shipment is already processed it cannot be packed - 400
  • If not all products of orders are specified for packing (if product of order is missing for packing) - 400
  • If packed quantity of an item is greater than ordered or confirmed quantity - 400

Success Response

The endpoint will return status 204 - No Content.

Copyright © Ananas 2023. All right reserved.