Method
client.purchaseOrder.sendPO(params: SendPOParams): Promise<any>
Submits a purchase order to the supplier with complete order details including line items, shipment information, and configuration.
Parameters
Type of order being submitted (e.g., “New”, “Change”, “Cancel”)
Unique order number for this purchase order
Date when the order was created
Timestamp of the last modification to this order
Total amount for the entire order
Indicates whether this is a rush order
Currency code for pricing (e.g., “USD”, “CAD”)
Digital proof requirements
Whether a digital proof is required
Array of email addresses for digital proof delivery
Type of address (e.g., “To”, “CC”, “BCC”)
Email address for proof delivery
Line item grouping identifier
Array of contact information for the order
Type of contact (e.g., “Buyer”, “Shipping”)
Attention line for the contact
Array of shipment information
Whether shipment consolidation is allowed
Whether this is a blind shipment
Whether a packing list is required
Freight carrier and service information
Whether customer will pick up
Shipping destination details
Unique shipment identifier
Third-party billing account information
Shipment reference information
Additional shipment comments
Array of line items in the purchase orderShow line item properties
Whether partial shipments are allowed
End customer sales order number
Customer’s product identifier
Line item grouping identifier
Product configuration and decoration details
Terms and conditions for the purchase order
Returns
Returns a Promise that resolves to the purchase order submission response.
Array of service messages indicating success or errors
Description of the response
Severity level (e.g., “Information”, “Error”, “Warning”)
Reference number assigned by the supplier for this purchase order
Example
import { PromoStandards } from 'promostandards-sdk-js';
const client = new PromoStandards.Client({
id: 'your_account_id',
password: 'your_password',
endpoints: [
{
type: 'PurchaseOrder',
version: '1.0.0',
url: 'https://supplier.com/purchaseOrder',
},
],
});
const poResponse = await client.purchaseOrder.sendPO({
orderType: 'New',
orderNumber: 'PO-12345',
orderDate: '2024-01-15',
totalAmount: 1500.00,
rush: false,
currency: 'USD',
shipments: [
{
allowConsolidation: true,
blindShip: false,
packingListRequired: true,
freightDetails: {
carrier: 'UPS',
service: 'Ground',
},
shipTo: {
shipmentId: '1',
companyName: 'ACME Corp',
address1: '123 Main St',
city: 'New York',
region: 'NY',
postalCode: '10001',
country: 'US',
},
shipReferences: 'REF-001',
},
],
lineItems: [
{
lineNumber: 1,
description: 'Custom T-Shirt',
lineType: 'New',
quantity: {
uom: 'EA',
value: 100,
},
toleranceDetails: {
tolerance: 5,
},
allowPartialShipments: false,
unitPrice: 12.50,
lineItemTotal: 1250.00,
productId: 'TSHIRT-001',
},
],
termsAndConditions: 'Standard terms and conditions apply',
});
console.log(poResponse);