post https://api.exponea.com/data/v2/projects//catalogs
/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 type | Permissions needed |
|---|---|
| Private access | Catalogs > Create catalog |
Read more about:
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| projectToken | string | The ID of your project. | Required |
Body Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| name | string | The name for the new catalog. | Required |
| fields | array of objects | A list of columns of the new catalog. | Required |
| is_product_catalog | boolean | Marks this catalog as product catalog that can be mapped in the Data manager for better user experience. | Optional, default false |
Fields object parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| name | string | Name of catalog column (item field). | Required |
| type | string; 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" |
| searchable | boolean | If a column should be indexed and searchable. This is required for filtering in recommendations. | Optional, default false |
Header
| Parameter | Type | Description | Required |
|---|---|---|---|
| authorization | string | Used for authentication. Read more in the Authentication section. | Required |
| Content-type | string | application/json | Required |
Response description
| Attribute | Type | Description |
|---|---|---|
| id | string | ID of newly created catalog. |
| success | boolean | Result 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.
