Create a tag
POST
/tags
const url = 'https://api.oletapp.com/your-store/v1/tags';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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/tags \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'The name is title-cased. Duplicate names (by slug) are refused with 409 CONFLICT.
Requires scope: catalog:write
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
name
required
string
Examplegenerated
{ "name": "example"}Responses
Section titled “Responses”Create a tag
Media typeapplication/json
object
data
required
object
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": { "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" }}