Create Listing Statuses
You call thislisting:self
POST
/v1/listing/status
const url = 'https://api.zentail.com/v1/listing/status';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"statuses":[{"listing_id":"example","sku":"example","status":"PUBLISHED","channel_variant_id":"example","channel_status":"example","listing_url":"example","buyable":true,"errors":[{"severity":"NOTICE","classification":"inventory","affected_attributes":["example"],"error":"missing_value","message":"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.zentail.com/v1/listing/status \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "statuses": [ { "listing_id": "example", "sku": "example", "status": "PUBLISHED", "channel_variant_id": "example", "channel_status": "example", "listing_url": "example", "buyable": true, "errors": [ { "severity": "NOTICE", "classification": "inventory", "affected_attributes": [ "example" ], "error": "missing_value", "message": "example" } ] } ] }'This endpoint is restricted to developers who have registered an application with Zentail. Please refer to our guide on building a sales channel integration to learn more about the registration process and how to use the listing endpoint.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
statuses
required
Array<object>
object
listing_id
The listing status Id
string
sku
required
The product sku
string
status
required
The status of the listing must be one of [‘PUBLISHED’, ‘UNPUBLISHED’, ‘SUPPRESSED’, ‘RETIRED’]
string
channel_variant_id
A unique identifier for this variant on the channel
string
channel_status
The raw status of the listing as reported by the channel
string
listing_url
Location of the listing
string
buyable
required
Whether the listing is buyable. This means it has inventory available and can be purchased on the channel.
boolean
errors
required
Any errors to display to the user
Array<object>
object
severity
required
string
classification
string
affected_attributes
required
Array<string>
error
string
message
required
string
Responses
Section titled “ Responses ”Success
Media type*/*
object
errors
Array<object>
object
listing_id
string
sku
string
messages
Array<string>
Bad Request
Media type*/*
object
errorCode
number
Example
400errorMessages
Array<string>
referenceId
string format: uuid
Permission Denied
Media type*/*
object
errorCode
number
Example
403errorMessages
Array<string>
referenceId
string format: uuid
Not Found
Media type*/*
object
errorCode
number
Example
404errorMessages
Array<string>
referenceId
string format: uuid
Zentail Error
Media type*/*
object
errorCode
number
Example
500errorMessages
Array<string>
referenceId
string format: uuid
errorMessage
string
Zentail Error
Media type*/*
object
errorCode
number
Example
503errorMessages
Array<string>
referenceId
string format: uuid