Cancel

Cancel Request

Used to cancel email requests. Must be an HTTP DELETE request and include a request_id or partner_request_id in the URL or an array of each as the body of the request. Cannot undo cancel request.

  • request_ids - array
    [Optional] An array of Tripadvisor email request IDs to cancel.
  • partner_request_ids - array
    [Optional] An array of partner email request IDs to cancel. Must have been previously included as partner_request_id when creating request.

Example Request

DELETE
https://api.tripadvisor.com/api/partner/1.0/email_requests/{request_id}

or

https://api.tripadvisor.com/api/partner/1.0/email_requests/?partner_request_id={partner_request_id}

 

Batch form:

https://api.tripadvisor.com/api/partner/1.0/email_requests
BODY
{
  request_ids: [5, 9],
  partner_request_ids: ["D70510E1-2B83-4B45-BFFC-B699AC5FC398"]
}

Cancel Response

Return value from canceling email requests. An array of the following parameters.

  • request_id - integer
    Tripadvisor ID for the email request. May be used in subsequent update or to cancel calls.
  • partner_request_id - string(64)
    [Optional] Partner-defined ID for the email request, e.g. a booking ID. May be used instead of the request_id field (the Tripadvisor email request ID as returned by this call) to cancel or update the request in future calls.
  • status - string(10)
    Status of the email request — will always be "queued". For a new request, may be "sent" or "canceled" when listing requests.
  • error - string
    [Optional] Error if cancel not allowed or request already sent.

Example Response

BODY
[
  {
    "request_id": 5
    "partner_request_id": "D70510E1-2B83-4B45-BFFC-B699AC5FC398",
    "canceled": 1
  },
  {
    "request_id": 9,
    "partner_request_id": null,
    "canceled": 1
  }
]