Create a brand
POST
/brands
const url = 'https://api.oletapp.com/your-store/v1/brands';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"description":"example","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.oletapp.com/your-store/v1/brands \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "name": "example" }'Duplicate names (by slug) are refused with 409 CONFLICT. An empty-slug name (no letters or numbers) is refused with 400 VALIDATION_FAILED.
Requires scope: catalog:write
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Responses
Section titled “Responses”Create a brand
Media typeapplication/json
object
data
required
object
description
required
string | null
id
required
string format: uuid
name
required
string
version
required
Opaque delta-sync version. Increases with every change; use it to detect updates.
string
Examplegenerated
{ "data": { "description": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "version": "example" }}default
Section titled “default”An error response.
Media typeapplication/json
object
error
required
object
code
required
A machine-readable error code, e.g. VALIDATION_FAILED.
string
fields
Array<object>
object
field
required
string
message
required
string
message
required
A plain-English sentence describing what went wrong.
string
Example
{ "error": { "code": "UNAUTHORIZED" }}