The PromoStandards SDK provides comprehensive order management capabilities including purchase order submission, status tracking, shipment notifications, and invoice retrieval. This guide covers all order-related services.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/manishrc/promostandards-sdk-js/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The SDK provides four order-related services:- PurchaseOrder - Submit purchase orders to suppliers
- OrderStatus - Track order status and details
- OrderShipmentNotification - Receive shipment updates
- Invoice - Retrieve invoices for completed orders
Setup
Configure your client with the necessary order endpoints:Submitting Purchase Orders
The purchase order structure is complex. Refer to the templates.ts:403 for the complete structure.
Tracking Order Status
Getting Order Status Types
First, retrieve the available status types from the supplier:Checking Order Status Details
Track a specific order’s status:Query Types
| Query Type | Description |
|---|---|
| 1 | Query by Purchase Order Number |
| 2 | Query by Customer Order Number |
| 3 | Query by Tracking Number |
| 4 | Query by all orders since timestamp |
Retrieving Shipment Notifications
Get shipment tracking information:Query by Timestamp
Retrieve all shipments since a specific date:Retrieving Invoices
Get invoice information for orders:Invoice Query Types
| Query Type | Description |
|---|---|
| 1 | Query by Purchase Order Number |
| 2 | Query by Invoice Date |
| 3 | Query by Timestamp |
Complete Order Workflow
Here’s a complete example that places an order and tracks it through fulfillment:Order Contact Types
When submitting purchase orders, you can include multiple contact types:Digital Proofs
Request digital proofs for decorated products:Method Reference
sendPO
See templates.ts:403 for the complete purchase order structure. Key parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
orderType | string | Yes | Regular, Sample, etc. |
orderNumber | string | Yes | Your PO number |
orderDate | string | Yes | ISO 8601 timestamp |
totalAmount | number | Yes | Order total amount |
currency | string | Yes | Currency code |
shipments | array | Yes | Shipment details array |
lineItems | array | Yes | Line items array |
getOrderStatusDetails
| Parameter | Type | Required | Description |
|---|---|---|---|
queryType | number | Yes | Query type (1-4) |
statusTimeStamp | string | Yes | ISO 8601 timestamp |
referenceNumber | string | No | PO or order number |
getOrderShipmentNotification
| Parameter | Type | Required | Description |
|---|---|---|---|
queryType | number | Yes | 1=PO number, 2=timestamp |
referenceNumber | string | No | PO number |
shipmentDateTimeStamp | string | No | ISO 8601 timestamp |
getInvoices
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | Product identifier |
queryType | number | Yes | Query type (1-3) |
referenceNumber | string | No | PO number |
requestedDate | string | No | Date for query type 2 |
availableTimeStamp | string | No | Timestamp for query type 3 |
Best Practices
Handle errors gracefully
Purchase order submission can fail for many reasons. Implement retry logic and user notifications.
Next Steps
Pricing and Configuration
Get pricing before placing orders
Managing Inventory
Validate stock before orders