How to get order shipment notifications
Video: PromoStandards webinar
“Order Shipment Notification Deep Dive 2.0.0”, PromoStandards, March 2023. It covers OSN 2.0.0. This guide uses the 1.0.0 endpoint, so some fields in the video differ from the responses below.
Function getOrderShipmentNotification
In order to get order shipment notifications for a given supplier we need to use Order Shipment Notification Service(OSN). Our API allows easy access by a GET request to our order-shipment-notifications endpoint.
An order can have shipment notifications once they reach the following statuses:
- Partially Shipped
- Shipped
- Complete
Hence, it doesn’t make any sense to query by PO or SO search to orders in other statuses.
Query Types
| query_type | Short Name | PSRESTful | Description |
|---|---|---|---|
| 1 | PO Search | PO_SEARCH | Query based on customer provided purchase order number. |
| 2 | SO Search | SO_SEARCH | Query based on vendor assigned sales order number. |
| 3 | ShipDate Search | SHIP_DATE_SEARCH | Query based on all shipments with a shipment date greater than the value specified in shipmentDateTimeStamp. |
HTTP VERB: GET
URL: https://api.psrestful.com/v1.0.0/suppliers/{SUPPLIER_CODE}/order-shipment-notifications
Example Request
curl -X GET "https://api.psrestful.com/v1.0.0/suppliers/PCNA/order-shipment-notifications?query_type=PO_SEARCH&reference_number=50" \
-H "X-API-Key: your-api-key"Example Response:
This is the response from calling with:
supplier_code = PCNA
query_type = PO_SEARCH
reference_number = 50
COMPLETE URL:
https://api.psrestful.com/v1.0.0/suppliers/PCNA/order-shipment-notifications?query_type=PO_SEARCH&reference_number=50Error Response Example
{
"OrderShipmentNotificationArray": null,
"ErrorMessage": {
"code": 301,
"description": "referenceNumber not found"
}
}Another Error Response Example
{
"OrderShipmentNotificationArray": null,
"ErrorMessage": {
"code": 999,
"description": "Invalid SOAP params passed. The earliest date that can searched can be no longer than 7 days."
}
}