curl --location --request "DELETE 'https://api.travtus.com/listings/listing-id-1/'" \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"inactive_date": "2012-01-23"
}'
{
"success": true,
"listing_id": "listing-id-1"
}
This endpoint delets a listing with the provided ID.
curl --location --request "DELETE 'https://api.travtus.com/listings/listing-id-1/'" \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"inactive_date": "2012-01-23"
}'
{
"success": true,
"listing_id": "listing-id-1"
}
{
"error": {
"type": "missing_authorization",
"message": "Your request does not include an 'Authorization' header with a bearer token for your account."
}
}
{
"error": {
"type": "expired_token",
"message": "The bearer token you have provided in the 'Authorization' header has expired. Please obtain a new one."
}
}
{
"error": {
"type": "invalid_authorization",
"message": "The bearer token you have provided in the 'Authorization' header is invalid."
}
}
{
"error": {
"type": "not_authorized",
"message": "The user you have authenticated as is not authorized to delete the listing you are attempting to delete."
}
}
curl --location --request "DELETE 'https://api.travtus.com/listings/listing-id-1/'" \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"inactive_date": "2012-01-23"
}'
{
"success": true,
"listing_id": "listing-id-1"
}