1. Get Admin token

The API supports updating product quantity on a specific source.

(plus) Select the source you want to update:

  • Navigate to Stores > Settings > Configuration > Catalog > Inventory.

(plus) Update product quantity

  • End Point: /V1/products/status/update (example: https://eztoro.com/rest/V1/products/status/update)
  • Method: POST
  • Authentication: Bearer Token
  • Parameters:
    • items: product listing
      • sku: product sku, using string.
      • qty: product quantity that needs to update, using numeric.

2. Api Response

  • success: Result of api request (true or false)
  • updated_successful_items: Number of successfully updated items
  • updated_fail_items: Number of unsuccessfully updated items
  • message: Message
  • failed_skus: List of unsuccessfully updated sku
  • failed_items: Input data or items is invalid 
  • errors: Detail of error messages

Note: Stock status and qty is two separate attributes of product, stock status can be In Stock event if qty is zero. Qty can greater than zero when stock status is Out of Stock

3. Exception Message

  • SKU_INVALID - One or more sku is invalid or not found
  • PRODUCT_TYPE_INVALID - One or more items cannot add quantity
  • INPUT_INVALID - Input data is invalid
  • INVALID_FIELD_RANGE - The %fieldName value of "%value" must be between %minValue and %maxValue
  • INVALID_FIELD_MIN_VALUE - The %fieldName value of "%value" must be greater than or equal to %minValue.
  • INVALID_FIELD_MAX_VALUE - The %fieldName value of "%value" must be less than or equal to %maxValue.
  • INVALID_FIELD_VALUE - Invalid value of "%value" provided for the %fieldName field.
  • REQUIRED_FIELD - "%fieldName" is required. Enter and try again.

  • No labels