Creates a new catalog
POSThttps://euwest.api.elasticpath.com/catalogs
Before you create a catalog, you must define the following resources:
- Hierarchies - hierarchies and nodes to categorize the products.
- Products - product information, associated assets, and links to hierarchy nodes.
- Price Books - prices for the products associated with the hierarchies. You can create multiple price books for different scenarios, such as seasonal sales, business versus retail customer pricing, and reward programs. When creating a catalog, you can specify up to five price books. You must configure a priority for your price books. Product prices are displayed in the catalog according to the priority of the price books. Priority is a number and the price book with the highest number has the highest priority.
Request
- application/json
Body
required
Creates a catalog with the following attributes.
data objectrequired
Responses
- 201
- default
The created catalog
- application/json
- Schema
- Example (from schema)
Schema
data objectrequired
links object
{
"data": {
"id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"attributes": {
"name": "catalog-123",
"description": "Catalog for Store 123",
"hierarchy_ids": [
"string"
],
"pricebook_id": "string",
"pricebook_ids": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"priority": 0
}
],
"locales": {},
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"owner": "store"
},
"relationships": {
"rules": {
"links": {
"related": "string"
}
},
"releases": {
"links": {
"related": "string"
},
"meta": {
"count": 0
}
}
},
"type": "catalog"
},
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://euwest.api.elasticpath.com/catalogs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"attributes": {
"name": "catalog-123",
"description": "Catalog for Store 123",
"hierarchy_ids": [
"string"
],
"pricebook_id": "string",
"pricebook_ids": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"priority": 0
}
],
"locales": {}
},
"type": "catalog"
}
}'
ResponseClear