Update products in catalog

POST /catalog/product/

Allows batch updates of products in the catalog, including SKU, price, quantity, and currency information.

application/json

Body Required

A list of products to update.

  • sku string Required

    Stock Keeping Unit identifier for the product.

    Minimum length is 1.

  • price number

    The price of the product in specified currency.

    Minimum value is 0, maximum value is 1000000.0.

  • quantity integer

    The quantity available in stock.

    Minimum value is 0, maximum value is 1000000.0.

  • currency string

    Currency in ISO 4217 format.

    Minimum length is 3, maximum length is 3.

Responses

  • 200 application/json

    Successfully updated products in catalog.

    Hide headers attributes Show headers attributes
    Hide response attribute Show response attribute object
    • updated integer Required

      The count of products successfully updated.

  • 400 application/json

    Bad request

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • code string Required

      An error code that identifies the type of error that occurred.

    • message string Required

      A message that describes the error condition in a human-readable form.

    • data object Required

      Additional information that can help the caller understand or fix the issue.

      Additional properties are allowed.

  • 404 application/json

    Command is not found

    Hide response attributes Show response attributes object
    • code string Required

      An error code that identifies the type of error that occurred.

    • message string Required

      A message that describes the error condition in a human-readable form.

    • data object Required

      Additional information that can help the caller understand or fix the issue.

      Additional properties are allowed.

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • code string Required

      An error code that identifies the type of error that occurred.

    • message string Required

      A message that describes the error condition in a human-readable form.

    • data object Required

      Additional information that can help the caller understand or fix the issue.

      Additional properties are allowed.

  • 429 application/json

    Too many requests

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • code string Required

      An error code that identifies the type of error that occurred.

    • message string Required

      A message that describes the error condition in a human-readable form.

    • data object Required

      Additional information that can help the caller understand or fix the issue.

      Additional properties are allowed.

  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • code string Required

      An error code that identifies the type of error that occurred.

    • message string Required

      A message that describes the error condition in a human-readable form.

    • data object Required

      Additional information that can help the caller understand or fix the issue.

      Additional properties are allowed.

POST /catalog/product/
curl \
 -X POST https://m2e.cloud/api/v1/api/catalog/product/ \
 -H "Content-Type: application/json" \
 -d '[{"sku":"test-product-SKU","price":99.99,"quantity":17,"currency":"USD"}]'
Request examples
[
  {
    "sku": "test-product-SKU",
    "price": 99.99,
    "quantity": 17,
    "currency": "USD"
  }
]
Response examples (200)
# Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 90
X-RateLimit-Retry-After: 2022-11-04T13:43:28Z

# Payload
{
  "updated": 10
}
Response examples (400)
# Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 90
X-RateLimit-Retry-After: 2022-11-04T13:43:28Z

# Payload
[
  {
    "code": 404,
    "message": "Not found.",
    "data": {}
  }
]
Response examples (404)
[
  {
    "code": 404,
    "message": "Not found.",
    "data": {}
  }
]
Response examples (401)
[
  {
    "code": 404,
    "message": "Not found.",
    "data": {}
  }
]
Response examples (429)
# Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 90
X-RateLimit-Retry-After: 2022-11-04T13:43:28Z

# Payload
[
  {
    "code": 404,
    "message": "Not found.",
    "data": {}
  }
]
Response examples (500)
[
  {
    "code": 404,
    "message": "Not found.",
    "data": {}
  }
]