v1

latestOpenAPI 3.0.12026-07-242871595.3 MB
INVENTORY

Create or delete associations between items and categories

Creates or removes the association between a category (or subcategory) and an item.

Important: To fully move an item from a parent category to a subcategory, you must send two separate API requests:

  • Send a request with delete=true and the parent category ID to remove the current association.
  • Send a second request with delete=false and the subcategory ID to create the new association.
post/v3/merchants/{mId}/category_items

Path parameters

mIdstring required

Merchant identifier.

Query parameters

expandstring

Expandable fields to display additional nested information: [items]

deleteboolean

Use to view, create, or remove an association between items and categories in the request body. Values: True - Set to true to remove the association. False - Set to false to create an association.

Headers

User-Agentstring required

Identifies the application, operating system, vendor, and/or version of the requesting user agent. Format: <AppName>/<Version> <Comment>

Request body

Example request

{
  "elements": [
    {
      "category": {
        "id": "{categoryId}"
      },
      "item": {
        "id": "{item1Id}"
      }
    },
    {
      "category": {
        "id": "{categoryId}"
      },
      "item": {
        "id": "{item2Id}"
      }
    }
  ]
}

Response

Successful response. Association created or deleted.