Update catalog
Use /catalogs/update
to update an existing catalog.
Updates an existing catalog.
The unique project key, identifying a project on the Batch platform
project_0664hxvwffvbpn278gxdyhsadddqgna6
Identifier of the catalog to update.
products
Request accepted for asynchronous processing
The request is malformed
The Rest API Key is not valid for this project
Too Many Requests
Unexpected error
Batch's services are under maintenance. Please try again later
POST /2.6/catalogs/update HTTP/1.1
Host: api.batch.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-Batch-Project: text
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"name": "products",
"fields": [
{
"action": "add",
"name": "price",
"type": "string"
}
]
}
{}
Request structure
Route
The Catalog API exposes a POST endpoint that allows to update an existing catalog:
/catalogs/update
A catalog can have up to 25 fields.
Headers and authentication
See Overview → Using Project APIs.
Post data
The body of the request must contain a valid JSON payload describing the operations to be executed on the audience.
Here is a how a complete JSON payload looks like:
{
"name": "MOVIES",
"fields": [
{
"action": "add",
"name": "director",
"type": "string"
},
{
"action": "remove",
"name": "duration"
}
]
}
Responses
Success
If the call to the API endpoint is successful you will receive an HTTP 202 confirmation.
Failure
If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at support@batch.com if you need further support.
Last updated