This document shows how to pull order status from an O4 instance, using JSON. The Order Status API is only accessible to customers with the O4 Customer Portal.
Requirements:
- Users must have O4. To learn more about moving forward with O4, email OASIS Sales at sales@oasissalessoftware.com or 501-843-6750.
- Users must create bearer tokens in O4 to authorize the call in their external API software.
Security
Standard OASIS users have full access to all order status information. Contact logins that have granted access to O4 only have access to the customer information that the contact is assigned to.
Query Strings
There are three different methods to access the data:
- Explicit OASIS DBID and POID
- Customer PO number
- Relative date using “UpdatedAfter”
Using the explicit OASIS DBID and POID combination, the URL would look like:
https://example.example.com/OASIS/API?ajax=OrderStatus&DBID=MYDBID&POID=23252
The result would be a single PO returned using the format described below. Using the Customer PO number may return zero or more matches using the URL would look like:
https://example.example.com/OASIS/API?ajax=OrderStatus&PONumber=CUST-PO-NUMBER
The UpdatedAfter method has two general formats. One uses the last login information stored in OASIS to keep a timestamp to continue downloads after the last download. This would work fine for many implementations attempting to pull a reasonable data set periodically.
https://example.example.com/OASIS/API?ajax=OrderStatus&UpdatedAfter=LastLogin
The second format simply pulls order status for any order updated after the given date:
https://example.example.com/OASIS/API?ajax=OrderStatus&UpdatedAfter=02/20/2020
Definition and example JSON output
The output is JSON and is easiest to show by example:
{
"Orders": [{
"PONumber": "TEST2",
"ProjectName": "",
"DBID": "GENERAL-OCLOUD",
"EntryDate": "2019-05-14 00:00:00",
"BillTo": {
"Zip": "72023",
"State": "AR",
"City": "Cabot",
"Line1": "3065 highway 367 south Ship",
"Line2": "Suite 7",
"Name": "Customer3"
},
"ShipTo": {
"Zip": "72023",
"State": "AR",
"City": "Cabot",
"Line1": "3065 highway 367 south Ship",
"Line2": "Suite 7",
"Name": "Customer3"
},
"SoldTo": {
"Zip": "72023",
"State": "AR",
"City": "Cabot",
"Line1": "3022 Hwy 367 S",
"Line2": "",
"Name": "Customer1"
},
"POID": 129520,
"Lines": [{
"CatalogNumber": "BA111",
"ManufacturerID": "BA",
"Quantity": 10,
"FixtureType": "A",
"ReleaseQuantity": 10,
"Shipments": [{
"MFGWarehouseID": "CONSIGNMENT_WHSE",
"Tracking": "",
"SCAC": "",
"MFGSalesOrder": "BA2-1",
"Quantity": 10,
"ShipDate": "2019-05-14 00:00:00",
"DateType": "ACTUAL"
}]
}]
}, {
"PONumber": "KATE'S TEST FROM PROJECT",
"ProjectName": "Kate's test project",
"DBID": "GENERAL TEST",
"EntryDate": "2018-07-09 00:00:00",
"BillTo": {
"Zip": "72023",
"State": "AR",
"City": "Cabot",
"Line1": "3065 highway 367 south Ship",
"Line2": "Suite 7",
"Name": "Customer3"
},
"ShipTo": {
"Zip": "72120",
"State": "AR",
"City": "Sherwood",
"Line1": "123 Somewhere",
"Line2": "",
"Name": "Kate's Company"
},
"SoldTo": {
"Zip": "72023",
"State": "AR",
"City": "Cabot",
"Line1": "3022 Hwy 367 S",
"Line2": "",
"Name": "Customer1"
},
"POID": 129465,
"Lines": [{
"CatalogNumber": "EZ-2",
"ManufacturerID": "DUAL",
"Quantity": 4,
"FixtureType": "A",
"ReleaseQuantity": 4,
"Shipments": [{
"MFGWarehouseID": "little rock",
"Tracking": "yfudpauiodf",
"SCAC": "USPS",
"MFGSalesOrder": "SHIPMENT 2",
"Quantity": 1,
"ShipDate": "2018-07-10 00:00:00",
"DateType": "ACTUAL"
}, {
"MFGWarehouseID": "",
"SchedulDate": "2018-07-12 00:00:00",
"MFGSalesOrder": "SHIPMENT 1",
"Quantity": 1,
"DateType": "SCHEDULED"
}]
}, {
"CatalogNumber": "EZ-2-D",
"ManufacturerID": "DUAL",
"Quantity": 3,
"FixtureType": "B\"",
"ReleaseQuantity": 3,
"Shipments": [{
"MFGWarehouseID": "little rock",
"SchedulDate": "2019-07-13 00:00:00",
"MFGSalesOrder": "SHIPMENT 2",
"Quantity": 1,
"DateType": "SCHEDULED"
}]
}]
}]
}
Much of the information is just confirming the base order. This includes the addresses, PO number, and what was ordered (the order line). The key elements for order status are shown under the Shipments section. (Found in Orders[*].Lines[*].Shipments[*]).
Each shipment object will have one of three states:
- Date type “Acknowledged"- only the MFG sales order and quantity are required.
- Date type “Scheduled”- only the MFG sales order, schedule date, and quantity are required. Note: the MFG warehouse ID is optional.
- Date type “Shipped"- all above fields required plus the carrier SCAC, ship date and tracking information.
Comments
0 comments
Please sign in to leave a comment.