POST - Orders
The orders API allows orders to be placed and get an immediate confirmation.
Resource URL:
POST https://api.ssactivewear.com/v2/orders/
Order Object Definition:
| shippingAddress | Object | | customer | String | Customer Name (Default="") | | attn | String | Attention Line (Default="") | | address | String | Address Line | | city | String | City | | state | String | State | | zip | String | Zip (5 digits) | | residential | Boolean | Residential Address (Default=true) |
|
| shippingMethod | String | Select Shipping Method (Default="1")
Options: 1 = Ground (Carrier determined by S&S) 2 = UPS Next Day Air 3 = UPS 2nd Day Air 16 = UPS 3 Day Select 6 = Will Call / PickUp 8 = Messenger Pickup / PickUp 54 = Misc Cheapest (S&S will pick the most cost-effective ground between (USPS First Class, USPS Priority Mail, UPS Surepost, UPS Ground) 17 = UPS Next Day Air Early AM 21 = UPS Next Day Air Saver 19 = UPS Saturday 20 = UPS Saturday Early 22 = UPS 2nd Day Air AM 14 = FedEx Ground 27 = FedEx Next Day Standard 26 = FedEx Next Day Priority 40 = UPS Ground 48 = FedEx 2nd Day Air
Note: For orders exceeding the weight limit (1000 lbs.), the shipping method will return as Echo Logistics LTL. You will be contacted by S&S shipping staff to schedule details of the shipment.
Note: Freight terms and conditions are dynamically determined and may change based on order attributes (e.g., weight, dimensions, destination) and ongoing carrier performance. Returned Freight options reflect real-time evaluation and may vary as operational factors shift. |
| shipBlind | Boolean | When passed in, this setting will override the current customer settings. |
| poNumber | String | Customer PO Number (Default="") |
| emailConfirmation | String | Include an email address if you would like to receive an email confirmation. (Default="") |
| testOrder | Boolean | Test Orders will be created and cancelled (Default=false) |
| autoselectWarehouse | Boolean | If this is true, we will choose what warehouse we ship from. Each line may be split between multiple warehouses. The warehouseAbbr in the line detail will be ignored. (Default=false) |
| promotionCode | String | Promotion Code that applies to products on your order. |
| quoteNumber | String | S&S quote number to price this order against. Lines that match the quote are charged the quoted price when it is lower than your normal price. Cannot be combined with promotionCode. (Default="") |
| autoselectWarehouse_Warehouses | String | If you only want to order from selected warehouses, you can pass in a comma separated list of warehouseAbbr's to this field. Only warehouses contained in this list will be used. Example: "IL,KS,GA,NV,TX,OH,PA,DS,CC,CN,FO,MA" (Default="") |
| AutoSelectWarehouse_Preference | String | Equivalent of the Freight Optimizer selection at checkout. Options: “fewest” or “fastest” (Default=“fewest”) |
| AutoSelectWarehouse_Fewest_MaxDIT | Integer | The maximum number of days in transit for “fewest”. If days in transit is higher, selection is switched to “fastest”. (Default = 10) |
| rejectLineErrors | Boolean | If false: we will place an order(s) for all items that we can. The response body will contain both a list of Orders and LineErrors instead of the default Orders. (Default=true) |
| rejectLineErrors_Email | Boolean | For line items that we can not fill, an email will be sent to the "emailConfirmation" email address with the details. (Default=true) |
| paymentProfile | Object | This is used if you would like to pay via a saved credit card or bank account on your www.ssactivewear.com website account. | email | String | Email of the website user where the card is saved | | profileID | integer | ProfileID returned in GET - /V2/paymentprofile api call for the given profile |
|
| shipByDate | Date | Ship By Date, format (mm/dd/YYYY) |
| lines | List Of Object | | warehouseAbbr | String | Determines what warehouse to ship from. | | identifier | String | SkuID_Master, Sku, Gtin | | qty | Integer | Qty to order |
|
*Bold items are requiredExtended Description:
The Content-Type header field must be set to application/json or application/xml.
Quotes (quoteNumber):
- The quote must belong to your account, be approved and not be expired. A single-use quote is used up by the first order it saves money on.
- The order must include at least the minimum quantity of matching pieces set on the quote. Lines not on the quote are charged your normal price.
- If the order is split across warehouses, each order that saves money references the quote.
- Test orders (testOrder=true) are priced with the quote but do not use it up.
- If the quote can't be applied, the whole order is rejected with a 400 and an error on field "quoteNumber":
{
"code": "400",
"message": "Bad Request.",
"errors": [
{
"field": "quoteNumber",
"message": "Quote not found, expired, already used, or not available for this account."
}
]
}
Other messages: "Invalid. Must be a quote number.", "Quotes cannot be used in conjunction with a promotion code.", "No line on this order matches quote {n}.", "Quote {n} requires at least {x} matching pieces. This order has {y}."
Example Request:
POST https://api.ssactivewear.com/v2/orders/
POST Data
{
"shippingAddress": {
"customer": "Company ABC",
"attn": "John Doe",
"address": "123 Main St",
"city": "Bolingbrook",
"state": "IL",
"zip": "60440",
"residential": true
},
"shippingMethod": "1",
"shipBlind": false,
"poNumber": "Test",
"emailConfirmation": "",
"testOrder": false,
"autoselectWarehouse": true,
"lines": [
{
"identifier": "B00760003",
"qty": 2
}
]
}
|
Response:
Response is the same as a GET Orders response
*If you pass in products from multiple warehouses, you will get multiple order responses.Note: If you receive a 400 Bad Request response, please validate your json request at: https://jsonformatter.curiousconcept.com/
[
{
"guid": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"companyName": "S&S Activewear",
"warehouseAbbr": "IL",
"orderNumber": "12345678",
"invoiceNumber": "",
"poNumber": "12345678",
"customerNumber": "XXXXX",
"orderDate": "2021-09-28T14:30:22.05",
"expectedDeliveryDate": "2021-09-29T00:00:00",
"orderType": "API",
"terms": "Net",
"orderStatus": "In Progress",
"dropship": false,
"shippingCarrier": "UPS",
"shippingMethod": "UPS Ground",
"shipBlind": false,
"shippingCollectNumber": "",
"shippingAddress": {
"customer": "S&S Activewear",
"attn": "Recipient",
"address": "220 Remington Blvd",
"city": "Bolingbrook",
"state": "IL",
"zip": "60440"
},
"subtotal": XX.XX,
"shipping": XX.XX,
"cod": 0,
"tax": 0,
"smallOrderFee": 0,
"cuponDiscount": 0,
"sampleDiscount": 0,
"setUpFee": 0,
"restockFee": 0,
"debitCredit": 0,
"total": XX.XX,
"totalPieces": 0,
"totalLines": 0,
"totalWeight": 15.4,
"totalBoxes": 1,
"deliveryStatus": "",
"conveyorLane": "8",
"lines": [
{
"lineNumber": 1,
"type": "S",
"skuID": 1133166,
"sku": "B22060655",
"gtin": "00821780010012",
"yourSku": "",
"qtyOrdered": 12,
"price": XX.XX,
"brandName": "Gildan",
"styleName": "18500",
"title": "Heavy Blend™ Hooded Sweatshirt",
"colorName": "Navy",
"sizeName": "L",
"returnable": true
}
]
}
]