Update

Update Request

Used to update existing requests. Must be an HTTP PUT request and include the following parameters. All optional parameters will replace the parameters in the identified email request. May be a batch request with multiple sets of parameters. For a batch request, omit the request_id from the URL and include it with each set of 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.
  • recipient - string(128)
    Recipient for the email request. Must contain an @ symbol and at least one period. Must not end in a period. Only a short form email address like mme.toutlemonde@example.fr will be accepted — "Madame Toutlemonde" <mme.toutlemonde@example.fr> would not be accepted.
  • checkout - string(10)
    Check-out date for related booking or reservation. The Review Express email will be sent to the guest email address 2 days after this date. Must be in ISO-8601 YYYY-MM-DD format. The Review Express API will accept a request at any time prior to the day after the check-out date; a request with a check-out date earlier than yesterday will be rejected, as the email queue for that day will already have been processed.

Example Request

PUT
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}
BODY
{
  id: 7
  "recipient": "fred@example.com"
  /* changed recipient to fred@example.com */
}

 

Batch form:

https://api.tripadvisor.com/api/partner/1.0/email_requests             
BODY
[
  {
    "request_id": 7,
    "recipient": "fred@example.com"
    /* changed recipient to fred@example.com */
  },
  {
    "partner_request_id": "745C6BFF-F0C7-401F-A691-4407F78DC96C",
    "recipient": "mme.toutlemonde@example.fr",
    "checkin": "2013-11-07",
    "checkout": "2013-11-15",
    "language": "fr",
    "country": "FR"
    /* updated checkout date, n.b. unchanged fields do not need to be repeated, but will be accepted. */
  }
]

Update Response

Return value from updating new email requests.

  • request_id - integer
    Tripadvisor ID for the email request. May be used in subsequent update or 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.
  • errors - array of errors
    [Optional] Array of errors.

Example Response

BODY
[
  {
    "request_id": 7
    "partner_request_id": null,
    "updated": 1
  },
  {
    "request_id": 8,
    "partner_request_id": "745C6BFF-F0C7-401F-A691-4407F78DC96C",
    "updated": 1
  }
]