Skip to main content

Batch Request

POST your batch requests to the /api/v3/_bulk endpoint.

API REQUEST
POST /api/v3/_bulk
API REQUEST BODY
[
{
"request_method": "GET",
"uri": "\/api\/v3\/customer\/2",
"payload": null
},
{
"request_method": "POST",
"uri": "\/api\/v3\/customer",
"payload": {
"company": "My new bulk customer 928"
}
},
{
"request_method": "POST",
"uri": "\/api\/v3\/customer",
"payload": {
"company": "Test Company 464",
"external_key": "abcd1234"
}
}
]
API RESPONSE BODY
{
"code": 200,
"status": "OK",
"message": "",
"response": {
"_bulk": [
{
"code": 200,
"status": "OK",
"message": "",
"response": {
"customer_id": 2,
"superuser_id": 349,
"external_key": null,
"token": "e6218b7c7b91a0121875a27a3a0ef9c5",
"company": "Test Customer 2",
... (truncated for brevity) ...
}
},
{
"code": 201,
"status": "OK",
"message": "",
"response": {
"id": 14
}
},
{
"code": 400,
"status": "Error",
"message": "A customer already exists with the external_key value \"abcd1234\"",
"response": false
}
]
}
}