Delete variant
DELETE
/listings/{id}/variants/{variant_id}
const url = 'https://acme.mykreezalid.com/api/v1/listings/1/variants/1';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://acme.mykreezalid.com/api/v1/listings/1/variants/1 \ --header 'Authorization: Basic <credentials>'Deletes a variant of a listing. The response has the HTTP status 200 whether or not the deletion succeeded: read success.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Listing’s unique identifier
variant_id
required
integer
Variant’s unique identifier
Responses
Section titled “Responses”Result of the deletion
Media typeapplication/json
object
success
boolean
message
string
Example
{ "success": true, "message": "Variant deleted"}No listing has this identifier, or the variant does not belong to the listing
Media typeapplication/json
Error body returned when the API refuses a request.
object
code
HTTP status code, repeated in the body.
integer
status
string
message
string
Example
{ "code": 400, "status": "error", "message": "Some parameters are not correct"}Missing or wrong API credentials, or variants are not enabled for your marketplace (then the body carries an error message)
Media typeapplication/json
object
error
string
Example generated
{ "error": "example"}