Confirm Order quantities

POST REST API request for suppliers, requiring a JSON body and an authorization token, to confirm quantities for each item of an order. For each item, it is necessary to pass the warehouseAddressId.

Request

HTTP MethodPOST
URLStagehttps://api.stage.ananastest.com/ws-inventory/api/v1/supplier-integration/order/{orderId}/confirmation
Productionhttps://api.ananas.rs/ws-inventory/api/v1/supplier-integration/order/{orderId}/confirmation
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}

Request Body:

Fields nameTypeDescription
productsList<OrderItemConfirmationDetails>List of products with confirmation details

OrderItemConfirmationDetails

Fields nameTypeDescription
idLongProduct id
warehouseQuantitiesList<WarehouseQuantityDetails>List of warehouse quantity details

WarehouseQuantityDetails

Fields nameTypeDescription
warehouseIdIntegerWarehouse address id
quantityIntegerQuantity (min 0)

Example of the request:

Click to copy
Success!
{
  "products": [
    {
      "id": 197208,
      "warehouseQuantities": [
        {
          "warehouseId": 4755,
          "quantity": 2
        }
      ]
    }
  ]
}

Response

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

  • If order does not exist, or if it does not belong to the supplier - 404
  • If order is already cancelled, confirmed or partially confirmed - 400
  • If wrong product is specified in the list of order items - 400
  • If wrong warehouse (does not belong to the supplier) is specified in the list of warehouse quantities for an item - 400
  • If confirmed quantity of an item is greater than ordered quantity - 400

User can specify all quantities of items to be 0, in which case the order will be CANCELLED. If order was confirmed, the response will be newly created Shipment. If order was cancelled, response will be in format of a Shipment, except all values but orderId and status will be non null.

Response Body:

Field NameTypeDescription
shipmentIdStringUnique shipment identifier
orderIdStringUnique order identifier
createdDateLocalDateTimeCreated date of shipment in UTC
statusStringShipment status. Possible values:
  • PARTIALLY_CONFIRMED
  • PENDING
  • CONFIRMED
  • PARTIALLY_PACKED
  • TRANSPORT_INITIATED
  • PACKED
  • ON_DELIVERY
  • DELIVERED
  • CANCELLED
  • NOT_DELIVERED
  • FAILED_DELIVERY
weightBigDecimalTotal weight of order items
numberOfBoxesIntegerNumber of boxes in which order will be packed
totalPriceBigDecimalTotal purchase price of an order
confirmedQuantityBigDecimalTotal confirmed quantity of items of an order
packedQuantityBigDecimalTotal packed quantity of items of an order
warehouseIdIntegerWarehouse id
warehouseNameStringWarehouse name
carrierNameStringName of carrier
deliveryPromiseFromLocalDateEarliest date for shipment to be delivered
deliveryPromiseToLocalDateLatest date for shipment to be delivered
itemsList<ItemDetails>List of items

ItemDetails

Field NameTypeDescription
productIdLongUnique item identifier - id of product
productEanStringEuropean Article Number
productSkuStringStock Keeping Unit of product
productNameStringProduct name
orderedQuantityIntegerOrdered quantity of an item
confirmedQuantityIntegerConfirmed quantity of an item
packedQuantityIntegerPacked quantity of an item
unitPriceBigDecimalPurchase price of an item unit - Represents price that product was purchased from supplier
totalPriceBigDecimalTotal purchase price of an item

Example of response:

JSON:

Click to copy
Success!
{
    "shipmentId": "A28DD-FEUGN-DS-1",
    "orderId": "A28DD-FEUGN",
    "createdDate": "2024-11-19T11:34:36.734848",
    "status": "DELIVERED",
    "weight": 6.00,
    "numberOfBoxes": 2,
    "totalPrice": 3000.00,
    "confirmedQuantity": 6,
    "packedQuantity": 6,
    "warehouseId": 4755,
    "warehouseName": "AVTERA SR DOO BEOGRAD Avtera Primary Pickup",
    "carrierName": "Gebruder Weiss",
    "deliveryPromiseFrom": "2024-11-25",
    "deliveryPromiseTo": "2024-11-28",
    "items": [
        {
            "productId": 197208,
            "productEan": "8801643206772",
            "productSku": "Azxxcn415",
            "productName": "SAMSUNG Usisivač VCC4320S3A/BOL",
            "orderedQuantity": 6,
            "confirmedQuantity": 6,
            "packedQuantity": 6,
            "unitPrice": 500.00,
            "totalPrice": 3000.00
        }
    ]
}
Copyright © Ananas 2023. All right reserved.