Bulk operation status endpoints

Magento generates a bulk_uuid each time it executes an asynchronous API request. You can track the status of an asynchronous operation with the following endpoints:

  • GET /V1/bulk/:bulkUuid/status
  • GET /V1/bulk/:bulkUuid/detailed-status

Get the status summary

The GET /V1/bulk/:bulkUuid/status endpoint returns the abbreviated status of the specified operation:

Field name Data type Description
operations_list Object An array containing information about each operation in a bulk or asynchronous request.
id Integer Identifies the bulk or asynchronous request.
status Integer The operation status
* 1 = Complete
* 2 = The operation failed, but you can try to perform it again
* 3 = The operation failed. You must change something to retry it.
* 4 = Open
* 5 = Rejected
result_message String Describes the result of the operation. If successful, the value contains the string Service execution success as well as the method that executed the operation.
error_code Integer If applicable, an error code associated with the operation.
extension_attributes Object Lists extension attributes.
bulk_id String UUID generated by an asynchronous API request or Bulk API request.
description String Contains the message queue topic.
start_time String The time that a bulk or asynchronous operation started.
user_id Integer The user ID that executed the request.
operation_count Integer The number of operations processed in the request.

Response

{
  "operations_list": [
    {
      "id": 12,
      "status": 1,
      "result_message": "Service execution success Magento\\Catalog\\Model\\ProductRepository\\Interceptor::save",
      "error_code": null
    }
  ],
  "bulk_id": "fbfca270-7a90-4c4e-9f32-d6cf3728cdc7",
  "description": "Topic async.V1.products.sku.PUT",
  "start_time": "2018-07-12 16:07:53",
  "user_id": null,
  "operation_count": 1
}

Get the detailed status

The GET /V1/bulk/:bulkUuid/detailed-status endpoint returns detailed information about status of a specified operation. It is similar to the GET /V1/bulk/:bulkUuid/status endpoint, except that the operations_list array also contains the message queue topic name and serialized data for each operation.

GET /V1/bulk/:bulkUuid/detailed-status
Field name Data type Description
operations_list Object An array containing information about each operation in a bulk or asynchronous request.
id Integer Identifies the bulk or asynchronous request.
bulk_uuid String UUID generated by an asynchronous API request or Bulk API request.
topic_name String The message queue topic.
serialized_data String An array of serialized input data. It contains serialized JSON with the following keys: entity_id - null, entity_link - an empty string, meta_info - the body of the API request that was executed.
result_serialized_data String Contains serialized output of the corresponding synchronous API call. For example, if you call POST /async/V1/products, this field contains serialized response from POST /V1/products.
status Integer The operation status
* 1 = Complete
* 2 = The operation failed, but you can try to perform it again
* 3 = The operation failed. You must change something to retry it.
* 4 = Open
* 5 = Rejected
result_message String Describes the result of the operation. If successful, the value contains the string Service execution success as well as the method that executed the operation.
error_code Integer If applicable, an error code associated with the operation.
`extension_attributes Object Lists extension attributes.
bulk_id String UUID generated by an asynchronous API request or Bulk API request.
description String Contains the message queue topic.
start_time String The time that a bulk or asynchronous operation started.
user_id Integer The user ID that executed the request.
operation_count Integer The number of operations processed in the request.

Response

{
  "operations_list": [
    {
      "id": 4,
      "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
      "topic_name": "async.V1.customers.POST",
      "serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"mshaw@example.com\\\",\\\"firstname\\\":\\\"Melanie Shaw\\\",\\\"lastname\\\":\\\"Doe\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
      "result_serialized_data": null,
      "status": 3,
      "result_message": "A customer with the same email address already exists in an associated website.",
      "error_code": 0
    },
    {
      "id": 5,
      "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
      "topic_name": "async.V1.customers.POST",
      "serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"bmartin@example.com\\\",\\\"firstname\\\":\\\"Bryce\\\",\\\"lastname\\\":\\\"Martin\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
      "result_serialized_data": null,
      "status": 3,
      "result_message": "A customer with the same email address already exists in an associated website.",
      "error_code": 0
    },
    {
      "id": 6,
      "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
      "topic_name": "async.V1.customers.POST",
      "serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"bmartin@example.com\\\",\\\"firstname\\\":\\\"Bryce\\\",\\\"lastname\\\":\\\"Martin\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
      "result_serialized_data": null,
      "status": 3,
      "result_message": "A customer with the same email address already exists in an associated website.",
      "error_code": 0
    },
    {
      "id": 7,
      "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
      "topic_name": "async.V1.customers.POST",
      "serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"tgomez@example.com\\\",\\\"firstname\\\":\\\"Teresa\\\",\\\"lastname\\\":\\\"Gomez\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
      "result_serialized_data": null,
      "status": 3,
      "result_message": "A customer with the same email address already exists in an associated website.",
      "error_code": 0
    }
  ],
  "bulk_id": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
  "description": "Topic async.V1.customers.POST",
  "start_time": "2018-07-11 20:07:14",
  "user_id": null,
  "operation_count": 4
}