Menu
Update Product Category Assignment
Update a category product assignment.
PATCH
/organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId}Use it in a workflow
- Add a step and choose the Salesforce Commerce Cloud connector.
- Pick the Update Product Category Assignment action (under Catalogs (Data API)).
- Fill in the fields below, then reference the result from later steps as
{{updateProductCategoryAssignment.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"catalogId": "apparel-catalog",
"categoryId": "mens",
"productId": "apple-ipod-classic",
"creationDate": 253402214400,
"lastModified": 253402214400,
"owningCatalogName": {},
"position": 2,
"product": {
"id": "apple-ipod-classic",
"assignedCategories": [
{
"catalogId": "apparel-catalog",
"categoryId": "mens"
}
],
"ats": 15,
"brand": "Apple",
"bundledProducts": [
{}
],
"classificationCategory": {
"catalogId": "apparel-catalog",
"categoryId": "mens"
},
"creationDate": 253402214400,
"defaultVariantId": "apple-ipod-classic-8gb-black",
"ean": "ksdf69w4",
"image": {
"path": "/images/apple-ipod-classic.jpg",
"absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
"alt": {
"en_US": "iPod"
},
"disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
"title": {
"en_US": "iPod"
}
},
"imageGroups": [
{
"images": [
{
"path": "/images/apple-ipod-classic.jpg",
"absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
"alt": {
"en_US": "iPod"
},
"disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
"title": {
"en_US": "iPod"
}
}
],
"viewType": "hi-res",
"variationAttributes": [
{
"attributeDefinitionId": "color",
"attributeDefinitionName": {
"en_US": "Color"
},
"defaultValue": "black",
"id": "color",
"name": {
"en_US": "Color"
},
"shared": false,
"slicing": true,
"values": [
null
],
"variationAttributeType": "string"
}
]
}
],
"inStock": true
},
"productName": {
"default": "Summer Bomber Jacket"
}
}
Response
Returns 200 with an object. Read it in later steps with {{updateProductCategoryAssignment.response.data.<field>}}.
{
"catalogId": "apparel-catalog",
"categoryId": "mens",
"productId": "apple-ipod-classic",
"creationDate": 253402214400,
"lastModified": 253402214400,
"owningCatalogName": {},
"position": 2,
"product": {
"id": "apple-ipod-classic",
"assignedCategories": [
{
"catalogId": "apparel-catalog",
"categoryId": "mens"
}
],
"ats": 15,
"brand": "Apple",
"bundledProducts": [
{}
],
"classificationCategory": {
"catalogId": "apparel-catalog",
"categoryId": "mens"
},
"creationDate": 253402214400,
"defaultVariantId": "apple-ipod-classic-8gb-black",
"ean": "ksdf69w4",
"image": {
"path": "/images/apple-ipod-classic.jpg",
"absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
"alt": {
"en_US": "iPod"
},
"disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
"title": {
"en_US": "iPod"
}
},
"imageGroups": [
{
"images": [
{
"path": "/images/apple-ipod-classic.jpg",
"absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
"alt": {
"en_US": "iPod"
},
"disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
"title": {
"en_US": "iPod"
}
}
],
"viewType": "hi-res",
"variationAttributes": [
{
"attributeDefinitionId": "color",
"attributeDefinitionName": {
"en_US": "Color"
},
"defaultValue": "black",
"id": "color",
"name": {
"en_US": "Color"
},
"shared": false,
"slicing": true,
"values": [
null
],
"variationAttributeType": "string"
}
]
}
],
"inStock": true
},
"productName": {
"default": "Summer Bomber Jacket"
}
}
Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.
Was this page helpful?