POST Create order
Introduction
Create a new order in the YMS system. This API allows you to submit order information including customer, carrier, equipment details, item lines, appointment data, and dynamic field values. The order will be registered and assigned a unique identifier upon successful creation.
POST /order/create
Body Request Parameters
{
"orderId": "string",
"customerId": "string",
"poNo": "string",
"referenceNo": "string",
"retailer": "string",
"shipFrom": "string",
"shipTo": "string",
"totalPalletQty": 0,
"totalCartonQty": 0,
"itemInfos": [
{
"itemId": "string",
"itemName": "string",
"itemQty": "string",
"palletQty": "string",
"itemSpecDesc": "string",
"itemSpecName": "string",
"uomId": "string",
"qty": "string"
}
],
"dynamicFieldValues": [
{
"fieldCode": "string",
"value": "string",
"values": [
"string"
]
}
]
}Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| X-Tenant-ID | header | string | No | none |
| X-Yard-ID | header | string | No | none |
| Item-Time-Zone | header | string | No | none |
| Authorization | header | string | No | none |
| Item-Bam-Client | header | string | No | none |
| x-facility-id | header | string | No | none |
| body | body | object | No | none |
| » orderId | body | string | No | Client-provided order identifier |
| » customerId | body | string | Yes | Customer identifier |
| » poNo | body | string | Yes | Purchase order number |
| » referenceNo | body | string | Yes | Reference number provided by customer or external system |
| » retailer | body | string | No | Retailer name |
| » shipFrom | body | string | No | Ship-from location (name or code) |
| » shipTo | body | string | No | Ship-to location (name or code) |
| » totalPalletQty | body | integer | No | Total number of pallets |
| » totalCartonQty | body | integer | No | Total number of cartons |
| » itemInfos | body | [ItemInfo] | No | Items included in the order |
| »» itemId | body | string | No | Item identifier |
| »» itemName | body | string | No | Item name |
| »» itemQty | body | string | No | Item quantity |
| »» palletQty | body | string | No | Item pallet Qty |
| »» itemSpecDesc | body | string | No | Item spec desc |
| »» itemSpecName | body | string | No | Item spec name |
| »» uomId | body | string | No | item uomId |
| »» qty | body | string | No | qty |
| » dynamicFieldValues | body | [object] | No | Dynamic field values for custom attributes |
| »» fieldCode | body | string | Yes | Field code |
| »» value | body | string | No | none |
| »» values | body | [string] | No | 多选值列表,优先于 value 使用 |
Response Example
{
"code": 0,
"msg": "",
"success": false,
"data": {
"id": 0,
"orderId": "",
"orderStatus": "",
"customerId": "",
"poNo": "",
"referenceNo": "",
"retailer": "",
"shipFrom": "",
"shipTo": "",
"totalPalletQty": 0,
"totalCartonQty": 0,
"itemInfos": [
{
"itemId": "",
"itemName": "",
"itemQty": "",
"palletQty": "",
"itemSpecDesc": "",
"itemSpecName": "",
"uomId": "",
"qty": ""
}
],
"customerName": "",
"carrierName": "",
"shipToAddress": {
"id": "",
"name": "",
"country": "",
"state": "",
"city": "",
"zipCode": "",
"fax": "",
"address1": "",
"address2": "",
"contact": "",
"phone": "",
"extension": "",
"email": "",
"orgId": "",
"orgName": "",
"referenceNo": "",
"batchCode": "",
"storeNo": "",
"shorthand": "",
"toHome": false,
"tags": [
""
],
"latitude": "",
"longitude": "",
"crmAddressId": ""
},
"shipFromAddress": {
"id": "",
"name": "",
"country": "",
"state": "",
"city": "",
"zipCode": "",
"fax": "",
"address1": "",
"address2": "",
"contact": "",
"phone": "",
"extension": "",
"email": "",
"orgId": "",
"orgName": "",
"referenceNo": "",
"batchCode": "",
"storeNo": "",
"shorthand": "",
"toHome": false,
"tags": [
""
],
"latitude": "",
"longitude": "",
"crmAddressId": ""
},
"appointmentTime": "",
"dynamicFieldValues": [
{
"entityId": "",
"entityType": "",
"fieldCode": "",
"value": "",
"fieldName": "",
"longValue": "",
"shortValue": ""
}
],
"proNos": [
""
],
"invoicePros": [
""
],
"doNos": [
""
],
"tripNo": "",
"shippedTime": ""
}
}{
"code": 0,
"msg": "",
"success": false,
"data": {
"id": 0,
"orderId": "",
"orderStatus": "",
"customerId": "",
"poNo": "",
"referenceNo": "",
"retailer": "",
"shipFrom": "",
"shipTo": "",
"totalPalletQty": 0,
"totalCartonQty": 0,
"itemInfos": [
{
"itemId": "",
"itemName": "",
"itemQty": "",
"palletQty": "",
"itemSpecDesc": "",
"itemSpecName": "",
"uomId": "",
"qty": ""
}
],
"customerName": "",
"carrierName": "",
"shipToAddress": {
"id": "",
"name": "",
"country": "",
"state": "",
"city": "",
"zipCode": "",
"fax": "",
"address1": "",
"address2": "",
"contact": "",
"phone": "",
"extension": "",
"email": "",
"orgId": "",
"orgName": "",
"referenceNo": "",
"batchCode": "",
"storeNo": "",
"shorthand": "",
"toHome": false,
"tags": [
""
],
"latitude": "",
"longitude": "",
"crmAddressId": ""
},
"shipFromAddress": {
"id": "",
"name": "",
"country": "",
"state": "",
"city": "",
"zipCode": "",
"fax": "",
"address1": "",
"address2": "",
"contact": "",
"phone": "",
"extension": "",
"email": "",
"orgId": "",
"orgName": "",
"referenceNo": "",
"batchCode": "",
"storeNo": "",
"shorthand": "",
"toHome": false,
"tags": [
""
],
"latitude": "",
"longitude": "",
"crmAddressId": ""
},
"appointmentTime": "",
"dynamicFieldValues": [
{
"entityId": "",
"entityType": "",
"fieldCode": "",
"value": "",
"values": [
""
],
"fieldName": "",
"longValue": "",
"shortValue": "",
"valueType": "",
"optionsType": "",
"options": [
""
]
}
],
"proNos": [
""
],
"invoicePros": [
""
],
"doNos": [
""
],
"tripNo": "",
"shippedTime": ""
}
}Response
| Status Code | Definition | Description | Data Model |
|---|---|---|---|
| 200 | OK (opens in a new tab) | none | ROrderView |