Create a catalog

/data/v2/projects/{projectToken}/catalogs

Creates a new catalog.

Use when you want to create a new catalog in your project.

Definition

Authorization

In this API call you must use the following authorization access and permissions:

Available access typePermissions needed
Private accessCatalogs > Create catalog

Read more about:

Path parameters

ParameterTypeDescriptionRequired
projectTokenstringThe ID of your project.Required

Body Parameters

ParameterTypeDescriptionRequired
namestringThe name for the new catalog.Required
fieldsarray of objectsA list of columns of the new catalog.Required
is_product_catalogbooleanMarks this catalog as product catalog that can be mapped in the Data manager for better user experience.Optional, default false

Fields object parameters

ParameterTypeDescriptionRequired
namestringName of catalog column (item field).Required
typestring; possible values are: "string", "long text", "number", "boolean", "date", "datetime", "duration", "list", "url", "json"Type of a catalog column.

Used for parsing values and for optimal performance of catalogs.
Optional, default "string"
searchablebooleanIf a column should be indexed and searchable. This is required for filtering in recommendations.Optional, default false

Header

ParameterTypeDescriptionRequired
authorizationstringUsed for authentication. Read more in the Authentication section.Required
Content-typestringapplication/jsonRequired

Response description

AttributeTypeDescription
idstringID of newly created catalog.
successbooleanResult status

Additional payload and response examples

{
    "name": "catalog_name",
    "is_product_catalog": true,
    "fields": [
        {
            "name": "field_text",
            "type": "string",
            "searchable": true
        },
        {
            "name": "field_date",
            "type": "date",
            "searchable": true
        },
        {
            "name": "field_number",
            "type": "number",
            "searchable": true
        }
    ]
}
{
    "id": "60758be36518b58d8077ba66",
    "success": true
}

Limitations

Catalog, item and field names have a max length of 255 characters.

Language
Click Try It! to start a request and see the response here!