Skip to content

Update category mapping by ID

Request

Update a category mapping by its unique ID within the organization.

Security
sessionAuth
Path
orgIdstringrequired

The ID of the organization.

idstringrequired

The unique ID of the category mapping.

Bodyapplication/jsonrequired

The category mapping object to be updated. Note - the "template" field is ignored even if provided.

codestring

The code of the category.

Example:"SampleCategory"
mappingArray of numbers

An array of category mappings to other categories.

Example:
[ 1, 2, 3 ]
archiveboolean

Indicates whether the category is archived.

Example:false
mapping_codeArray of strings

An array of mapping codes.

Example:
[ "code1", "code2", "code3" ]
sales_idArray of strings

An array of sales IDs.

Example:
[ "sale1", "sale2", "sale3" ]
x_org_idstring

The organization ID.

Example:"org123"
created_bystring

The user who created the category.

Example:"user123"
modified_bystring

The user who last modified the category.

Example:"user456"
templatestring, (uuid)

The ID of the associated template.

Example:"5f4b8c60d46df3841d86a551"
curl -i -X PATCH \
  'https://api.aipim.fynd.com/service/panel/templates/v1.0/org/{orgId}/category/mapping/{id}' \
  -H 'Content-Type: application/json' \
  -b cc.session=YOUR_API_KEY_HERE \
  -d '{
    "code": "SampleCategory",
    "mapping": [
      1,
      2,
      3
    ],
    "archive": false,
    "mapping_code": [
      "code1",
      "code2",
      "code3"
    ],
    "sales_id": [
      "sale1",
      "sale2",
      "sale3"
    ],
    "x_org_id": "org123",
    "created_by": "user123",
    "modified_by": "user456",
    "template": "5f4b8c60d46df3841d86a551"
  }'

Responses

Category mapping updated successfully.

Bodyapplication/json
codestring

The code of the category.

mappingArray of objects(Category)

An array of category mappings to other categories.

archiveboolean

Indicates whether the category is archived.

mapping_codeArray of strings

An array of mapping codes.

sales_idArray of objects

An array of sales tree nodes with their mappings.

x_org_idstring

The organization ID.

created_bystring

The user who created the category.

modified_bystring

The user who last modified the category.

templatestring, (uuid)

The ID of the associated template.

Response
{ "code": "string", "mapping": [ { … } ], "archive": true, "mapping_code": [ "string" ], "sales_id": [ { … } ], "x_org_id": "string", "created_by": "string", "modified_by": "string", "template": "060ce75e-87d6-4677-b330-eaee58e54138" }