1

I need to override my REST API endpoints to async and faced the issue that I don't understand the difference between asynchronous endpoints in

https://developer.adobe.com/commerce/webapi/rest/use-rest/asynchronous-web-endpoints/

and bulk endpoints in

https://developer.adobe.com/commerce/webapi/rest/use-rest/bulk-endpoints/

As I see they are working in the same way via a queue, could someone explain the difference or probably give a "right" way to create async endpoints from my REST API endpoints?

1 Answer 1

2

The right way depends on what you want to override, but to answer your difference query, asynchronous web endpoints takes a single object as a request payload, e.g.

{
  "product": {
    "price": 29
  }
}

Bulk endpoints takes multiple objects in an array as a request payload, e.g.

[
  {
    "product": {
      "sku": "TEST_1"
      "price": 29
    }
  }, {
    "product": {
      "sku": "TEST_2"
      "price": 39
    }
  }
]

Hope thats clears the difference for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.