Documentation
Feedback
Guides
API Reference

Guides
Catalog
Updating SKU Specifications with Catalog API

In our Catalog, specifications are created in the category level. Products and SKUs inherit their specifications from the category they are placed in and all its parent categories. This may lead to some confusion when using our API to create and update SKUs.

In this article, we share a few tips to help you update an SKU Specification.

SKU and its Specification

First, you need to select an SKU and its Specification to update. If you don’t know the Specifications of the SKU, use the Get SKU Specifications endpoint. It will retrieve all Specifications indexed on the SKU.

In the example below, we show what the response would look like if your SKU had two specifications to fill in:

  • Color ("FieldId": 271)
  • Size ("FieldId": 40)

If needed, you would be able to get more information about each specification using the Get Specification Field endpoint.


_16
[
_16
{
_16
"Id": 472,
_16
"SkuId": 17784,
_16
"FieldId": 271,
_16
"FieldValueId": null,
_16
"Text": ""
_16
},
_16
{
_16
"Id": 528,
_16
"SkuId": 17784,
_16
"FieldId": 40,
_16
"FieldValueId": 147,
_16
"Text": "L"
_16
}
_16
]

Notice that the response body from this endpoint is an array but you can’t update all at once. You can update only one SKU Specification at a time.

Knowing the FieldValueId

After selecting the one Specification to update, use the Get Specifications Values By Field Id endpoint. It allows you to know all the possible values from this Specification as you can only update the FieldValueId from an SKU Specification.

In the example below, we show what the response would look like if your specification had three possible values:

  • S ("FieldValueId": 144)
  • M ("FieldValueId": 145)
  • L ("FieldValueId": 146)

_20
[
_20
{
_20
"FieldValueId": 144,
_20
"Value": "S",
_20
"IsActive": true,
_20
"Position": 1
_20
},
_20
{
_20
"FieldValueId": 145,
_20
"Value": "M",
_20
"IsActive": true,
_20
"Position": 2
_20
},
_20
{
_20
"FieldValueId": 147,
_20
"Value": "L",
_20
"IsActive": true,
_20
"Position": 3
_20
}
_20
]

Updating the SKU Specification FieldValueId

Finally, use the Update SKU Specification endpoint to change the FieldValueId from the SKU Specification to the desired new value.

SKU Specifications can only have the FieldType as 5(Combo) or 6(Radio). You cannot change the Text field without updating the FieldValueId. After this update, the Text field will be automatically modified.

Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page