Create orders in batch
1 min
POST
https://{domain}/app/logisticsorders/v1/api/orders/batch
Header Parameters
- X-COREOS-REQUEST-IDstringrequiredDescription
- X-COREOS-TIDstringrequiredDescription
- X-COREOS-ACCESSstringrequiredDescription
- X-COREOS-USERINFOstringrequiredDescription
- X-COREOS-CALLBACK-SECRETstringDescription
Body Parameters
- bodyCreateBatchOrderEntityRequestrequired
- ordersOrderEntity[]
- dropDetailsDropDetailsrequired
- DropDetailsUpdateRequest
- contactContact
- UniqueId
- ContactDetails
- Max depth limit reached
- locationLocation
- UniqueId
- LocationDetails
- Max depth limit reached
- orderSummaryOrderSummary
- invoiceNumberstringDescription
- orderDescriptionstringDescription
- totalWeightTotalOrderWeightDescription
- valuenumberrequired
- totalVolumeTotalOrderVolumeDescription
- valuenumberrequired
- totalItemsnumberDescription
- totalOrderCostTotalOrderCostDescription
- costnumberrequiredDescription
- currencyCodestringDescription
- minorUnitnumberDescription
- totalInvoiceInvoiceDescription
- valueintegerDescription
- currencyCodestringDescription
- minorUnitintegerDescription
- clientDetailsClientDetailsrequiredDescription
- clientNamestring
- clientIdUniqueIdDescription
- clientOrderIdUniqueIdrequiredDescription
- mpsMps
- MpsUpdateRequest
- groupIdstringDescription
- groupSizenumberDescription
- isEnabledbooleanDescription
- isPartialbooleanDescription
- eWaybillAttributeseWaybillAttributes
- eWaybillAttributesRequest
- is_valid_ewaybillbooleanDescription
- ewaybillsstring[]Description
- productTypeProductTyperequiredDescription
- planningModePlanningModeDescription
- modeOfTransportModeOfTransportDescription
- speedOfTransportSpeedOfTransportDescription
- shipmentFlowShipmentFlowrequiredDescription
- pickupDetailsPickupDetailsrequired
- PickupDetailsUpdateRequest
- contactContact
- UniqueId
- ContactDetails
- Max depth limit reached
- locationLocation
- UniqueId
- LocationDetails
- Max depth limit reached
- pickupSlotTimeSlotDescription
- frominteger<int64>
- tointeger<int64>
- serviceTimeintegerDescription
- instructionstringDescription
- paymentInformationPaymentInformationDescription
- paymentTypePaymentTypeDescription
- paymentOptionPaymentOptionDescription
- deliveryDetailsDeliveryDetailsDescription
- promisedDeliveryDatestring
- deliverySlotTimeSlotDescription
- frominteger<int64>
- tointeger<int64>
- serviceTimeintegerDescription
- instructionstringDescription
- actionsDoorstepActionsDescription
- qcValidationActionRequired
- isRequiredbooleanrequired
- requiredAtstring<PICKUP | DROP | BOTH>
- qcValidationChecklistobjectDescription
- kycVerificationActionRequired
- isRequiredbooleanrequired
- requiredAtstring<PICKUP | DROP | BOTH>
- otpVerificationActionRequired
- isRequiredbooleanrequired
- requiredAtstring<PICKUP | DROP | BOTH>
- signatureCollectionActionRequired
- isRequiredbooleanrequired
- requiredAtstring<PICKUP | DROP | BOTH>
- notificationDetailsNotificationDetailsDescription
- notificationTypeNotificationTypeDescription
- notificationModeNotificationModeDescription
- returnDetailsReturnDetailsDescription
- contactContact
- UniqueId
- ContactDetails
- namestringrequiredDescription
- phonePhoneDescription
- Max depth limit reached
- emailMultipleEmail
- Email
- Max depth limit reached
- AdditionalEmail
- Max depth limit reached
- additionalPhonePhone[]Description
- Max depth limit reached
- additionalEmailAdditionalEmail[]
- Max depth limit reached
- locationLocation
- UniqueId
- LocationDetails
- locationInfoobject
- addressAddressrequiredDescription
- Max depth limit reached
- geolocationGeoCodeExample
{ "lat": "30.3752° N", "long": "76.7821° E" }- Max depth limit reached
- returnSlotTimeSlotDescription
- frominteger<int64>
- tointeger<int64>
- serviceTimeintegerDescription
- prioritynumberDescription
- maxAttemptsnumberDescriptionDefault3
- teamIdstringrequiredDescription
- seqNonumberDescription
- routeTagstringDescription
- vehicleModelstringDescription
- readyToProcessbooleanDescriptionDefaulttrue
- containersContainerDetails[]Description
- containerTypestringrequiredDescriptionDefaultShipment
- scannableIdstringrequiredDescription
- trackingDetailsTrackingDetailsDescription
- operatorstringrequiredDescription
- trackingIdstringrequiredDescription
- isPrimarybooleanDescription
- attributesmap<string, string>
- dimensionsDimensionsDescription
- weightnumberDescription
- volumenumberDescription
- callbackCallback
- urlstring<uri>Example
- metaobject
Responses
202
- RequestProcessedBatchSuccessResponse
- object
- dataobject
- batchIdstring
400
- BatchValidationErrorResponse
- errorobjectrequiredDescription
- codestringDescription
- descriptionstringDescription
- additionalInfoobjectDescription
- errorsobject[]Description
- clientOrderIdstringDescription
- errorsErrorEntity[]Description
- MESSAGEstringExampleDescription
- LABELstringExampleDescription
- CODEstringExampleDescription
- METAobjectDescription
401
- UnauthorizedErrorResponse
- errorErrorrequiredDescription
- codestringDescription
- descriptionstringDescription
- additionalInfoobjectDescription
- requestAuthRequestAttributerequired
- uristringrequiredDescription
- methodstringDescription
- queryStringstringDescription
curl
curl --request POST \
--url https://{domain}/app/logisticsorders/v1/api/orders/batch \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-coreos-request-id: string' \
--header 'x-coreos-tid: string' \
--header 'x-coreos-access: string' \
--header 'x-coreos-userinfo: string' \
--data '{
"orders": [
{
"dropDetails": {
"contact": {},
"location": {}
},
"orderSummary": {
"totalWeight": {
"value": ""
},
"totalVolume": {
"value": ""
},
"totalOrderCost": {
"cost": ""
}
},
"clientDetails": {
"clientOrderId": ""
},
"mps": {},
"eWaybillAttributes": {},
"productType": "",
"shipmentFlow": "",
"pickupDetails": {
"contact": {},
"location": {}
},
"actions": {
"qcValidation": {
"isRequired": ""
},
"kycVerification": {
"isRequired": ""
},
"otpVerification": {
"isRequired": ""
},
"signatureCollection": {
"isRequired": ""
}
},
"maxAttempts": 3,
"teamId": "",
"readyToProcess": true,
"containers": [
{
"containerType": "Shipment",
"scannableId": "",
"trackingDetails": {
"operator": "",
"trackingId": ""
}
}
]
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-coreos-request-id", "string");
myHeaders.append("x-coreos-tid", "string");
myHeaders.append("x-coreos-access", "string");
myHeaders.append("x-coreos-userinfo", "string");
var raw = JSON.stringify({
"orders": [
{
"dropDetails": {
"contact": {},
"location": {}
},
"orderSummary": {
"totalWeight": {
"value": ""
},
"totalVolume": {
"value": ""
},
"totalOrderCost": {
"cost": ""
}
},
"clientDetails": {
"clientOrderId": ""
},
"mps": {},
"eWaybillAttributes": {},
"productType": "",
"shipmentFlow": "",
"pickupDetails": {
"contact": {},
"location": {}
},
"actions": {
"qcValidation": {
"isRequired": ""
},
"kycVerification": {
"isRequired": ""
},
"otpVerification": {
"isRequired": ""
},
"signatureCollection": {
"isRequired": ""
}
},
"maxAttempts": 3,
"teamId": "",
"readyToProcess": true,
"containers": [
{
"containerType": "Shipment",
"scannableId": "",
"trackingDetails": {
"operator": "",
"trackingId": ""
}
}
]
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://{domain}/app/logisticsorders/v1/api/orders/batch", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://{domain}/app/logisticsorders/v1/api/orders/batch")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-coreos-request-id"] = "string"
request["x-coreos-tid"] = "string"
request["x-coreos-access"] = "string"
request["x-coreos-userinfo"] = "string"
request.body = JSON.dump({
"orders": [
{
"dropDetails": {
"contact": {},
"location": {}
},
"orderSummary": {
"totalWeight": {
"value": ""
},
"totalVolume": {
"value": ""
},
"totalOrderCost": {
"cost": ""
}
},
"clientDetails": {
"clientOrderId": ""
},
"mps": {},
"eWaybillAttributes": {},
"productType": "",
"shipmentFlow": "",
"pickupDetails": {
"contact": {},
"location": {}
},
"actions": {
"qcValidation": {
"isRequired": ""
},
"kycVerification": {
"isRequired": ""
},
"otpVerification": {
"isRequired": ""
},
"signatureCollection": {
"isRequired": ""
}
},
"maxAttempts": 3,
"teamId": "",
"readyToProcess": true,
"containers": [
{
"containerType": "Shipment",
"scannableId": "",
"trackingDetails": {
"operator": "",
"trackingId": ""
}
}
]
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://{domain}/app/logisticsorders/v1/api/orders/batch"
payload = json.dumps({
"orders": [
{
"dropDetails": {
"contact": {},
"location": {}
},
"orderSummary": {
"totalWeight": {
"value": ""
},
"totalVolume": {
"value": ""
},
"totalOrderCost": {
"cost": ""
}
},
"clientDetails": {
"clientOrderId": ""
},
"mps": {},
"eWaybillAttributes": {},
"productType": "",
"shipmentFlow": "",
"pickupDetails": {
"contact": {},
"location": {}
},
"actions": {
"qcValidation": {
"isRequired": ""
},
"kycVerification": {
"isRequired": ""
},
"otpVerification": {
"isRequired": ""
},
"signatureCollection": {
"isRequired": ""
}
},
"maxAttempts": 3,
"teamId": "",
"readyToProcess": True,
"containers": [
{
"containerType": "Shipment",
"scannableId": "",
"trackingDetails": {
"operator": "",
"trackingId": ""
}
}
]
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-coreos-request-id': 'string',
'x-coreos-tid': 'string',
'x-coreos-access': 'string',
'x-coreos-userinfo': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
202
// Accepted
{
"data": {
"batchId": ""
}
}400
// Validation Error Occurred
{
"error": {
"code": "",
"description": "",
"additionalInfo": {
"errors": [
{
"clientOrderId": "",
"errors": [
{
"MESSAGE": "returnSlot from must be greater than current timestamp in milliseconds",
"LABEL": "returnDetails.returnSlot.from",
"CODE": "F-A2137-E4012",
"META": {}
}
]
}
]
}
}
}401
// Error Occurred
{
"error": {
"code": "",
"description": "",
"additionalInfo": {}
},
"request": {
"uri": "",
"method": "",
"queryString": ""
}
}Create orders in batch