Alternative API requests

As you may have noticed, many catalog API requests use VTEX IDs in order to create and update values. Fields like BrandId, FieldId, FieldValueId, GroupId and CategoryId.

While it is important to keep track of these IDs, there are some alternative endpoints that do not require them for performing some tasks.

Create product using brand name and category path

Create product API endpoint

Example body:

{
    "Name": "Test Product",
    "CategoryPath": "Storage/Hard Drive",
    "BrandName": "Sample Brand",
    "RefId": "310117069123",
    "Title": "Browser Title for this product",
    "LinkId": "test-product",
    "Description": "This is a cool product",
    "ReleaseDate": "2019-01-01T00:00:00",
    "IsVisible": true,
    "IsActive": true,
    "TaxCode": "",
    "MetaTagDescription": "tag test",
    "ShowWithoutStock": true,
    "Score": 1
}

Create product specification using field, group names

API request: Associate product specification using specification and group names

Example body

{
    "FieldName": "TesteAPI",
    "GroupName": "TestGroup",
    "RootLevelSpecification": true,
    "FieldValues": [
        "Value123"
        ]
}

Did this page help you?