Skip to content

Delete variant

DELETE
/listings/{id}/variants/{variant_id}
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.

id
required
integer

Listing’s unique identifier

variant_id
required
integer

Variant’s unique identifier

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"
}