ReferenceDeposit API

Error handling

Error messaging in Deposit API helps you understand why a read, create, or update request is denied. This section addresses the most common errors and technical difficulties that may be encountered when trying to connect to or develop for Deposit API.

Expedia Group recommends a robust retry strategy when resolving errors. Details about self-testing will be provided by your Integration Specialist.

Connectivity errors

These errors are reported when communication disruption occurs between Expedia Group and your software.

Possible scenarios include the following:

Connection Cannot Be Established

If the problem is:

  • Connection timeout (before establishing connection)
  • Cannot resolve host name
  • Cannot establish connection

Before looking for assistance, you should:

  1. Verify the URL used to connect to the API and make sure the address starts with https://.
  2. Verify the domain name, and make sure that the address you are using is the right one for the environment you are targeting. Do not try to send QA information to production, or vice-versa.
  3. If your system is behind a firewall, make sure that port 443 is opened for connection to Expedia's production environment.
  4. Retry. If additional assistance is required, contact us.

SSL Certificate Validation Problems

To avoid issues with certificate signing authorities, anyone developing in Java should use version 1.4.2_13 or newer.

If you prefer to use an older version of Java or an in-house SSL library, you will need to import the Entrust CA certificate.

  • Entrust CA common name CN = Entrust.net Certification Authority (2048).
  • To manually import the Entrust.net Certification Authority (2048) Certificate, download the CA certificate.

Authentication errors

Errors related to authentication issues and what you should do if they occur. If you receive an authentication error, stop sending retrieval requests until the issue is resolved and contact your administrator to verify your system configuration and contact Expedia Group.

Errors in read (GET) responses

Here's an example of how the Deposit API returns errors to customers. If you provide an invalid propertyId:

GET https://services.expediapartnercentral.com/properties/123/depositPolicy

Accept: application/json

An error is returned:

1{
2 "errors": [
3 {
4 "code": 1000,
5 "message": "Access denied: your account is not authorized to manage this property."
6 }
7 ]
8}

Entity and errors

Entity and errors are in the same wrapper because most frameworks will de-serialize responses automatically, but require a target type to which the response will be deserialized.

Both successful and unsuccessful responses are returned by the same Data Transfer Object (DTO), but can have either entity or errors, never both.

A Java implementation to handle this, using Spring’s RestTemplate, could look like this:

ResponseEntity<ResponseWrapperDTO<DepositDTO>> response =
restTemplate.exchange(
"url",
HttpMethod.POST,
entity,
new ParameterizedTypeReference<ResponseWrapperDTO<DepositDTO>>() {});

Error codes

HTTP Status Code

Error Code

Error Description

Explanation and Recommended Action

Retry?

401

1001

Unauthorized

Missing or Invalid Username or Password.

Verify username or password and retry

403

1003

Forbidden

Access to this API with a non-API account is forbidden. Please use an API account.

Verify username or password and retry

403

1000

Forbidden

Access denied: your account is not authorized to manage this property.

Verify the property is connected to your system and retry

404

2404

Not Found

Resource not found: the server has not found anything matching the Request-URI.

Verify and retry

400

2003

Bad Request

The domain value in JSON is not supported by the model.

Fix input and retry

400

2004

Bad Request

The JSON is missing the required element.

Fix input and retry

400

2005

Bad Request

Duplicate concurrent property policy creation request sent.

Fix input and retry

400

2006

Bad Request

Duplicate concurrent property policy update request sent.

Fix input and retry

400

2405

Bad Request

Method not allowed: the method specified in the Request-Line is not allowed for the resource identified by the Request-URI. Allowed method(s): [methods].

Fix input and retry

400

2406

Bad Request

Requested response media type unsupported: the resource identified by the request is unable to generate response entities of the media type requested by the Accept header attribute in the request.

Fix input and retry

400

2415

Bad Request

Request media type unsupported: the server is refusing to service the request because the media type specified in request under the Content-Type header attribute is not supported by the requested resource for the requested method.

Fix input and retry

400

2425

Bad Request

Invalid CORS request.

Fix input and retry

404

3000

Not Found

The property '[propertyId]' has no associated policy.

400

3001

Bad Request

Request must contain a default policy or an exception policy.

Fix input and retry

400

3002

Bad Request

Too many exception policies. At most 4 exception policies are allowed.

Fix input and retry

400

3003

Bad Request

Policy start date is mandatory.

Fix input and retry

400

3004

Bad Request

Policy end date is mandatory.

Fix input and retry

400

3005

Bad Request

Policy end date must be after the start date.

Fix input and retry

400

3006

Bad Request

Days of the weeks must be unique within the date range.

Fix input and retry

400

3007

Bad Request

At least one date range must be defined per policy.

Fix input and retry

400

3008

Bad Request

A policy contained too many date ranges. At most 15 date ranges are allowed.

Fix input and retry

400

3010

Bad Request

A policy must define at least one payment type.

Fix input and retry

400

3011

Bad Request

Payment type must be specified.

Fix input and retry

400

3012

Bad Request

A remainder type may not have a value field.

Fix input and retry

400

3013

Bad Request

A payment type that was not a remainder was missing a value field.

Fix input and retry

400

3014

Bad Request

Amount, percent or night payment value must be positive.

Fix input and retry

400

3015

Bad Request

Only an Amount payment type may contain a decimal value.

Fix input and retry

400

3016

Bad Request

A policy was missing a collection time.

Fix input and retry

400

3017

Bad Request

"Days prior to arrival" must have a positive value.

Fix input and retry

400

3018

Bad Request

Only the "Days prior to arrival" collection type may specify a value field.

Fix input and retry

400

3019

Bad Request

There must be at least one payment type before the remainder payment type.

Fix input and retry

400

3020

Bad Request

No payment allowed after a remainder payment type.

Fix input and retry

400

3021

Bad Request

An exception policy contains too many payments. At most 4 payment types are allowed.

Fix input and retry

400

3022

Bad Request

The sum of all payments exceeded 100%.

Fix input and retry

400

3023

Bad Request

A policy may only contain a single NIGHT payment type.

Fix input and retry

400

3024

Bad Request

Payments must be specified in chronological order: UPON_BOOKING followed by DAYS_PRIOR followed by UPON_ARRIVAL.

Fix input and retry

400

3025

Bad Request

The first payment may not be of type UPON_ARRIVAL.

Fix input and retry

400

3026

Bad Request

If the client specifies four percentage payments, their sum must equal to 100%.

Fix input and retry

400

3027

Bad Request

Payment amounts may not contain more than 2 decimal places.

Fix input and retry

400

3028

Bad Request

This property has rate plans requiring deposits. To remove the deposit policy, first update all rate plans to not require a deposit.

Fix input and retry

400

3029

Bad Request

Deposit Policies cannot be set on properties with ExpediaCollect-only business model.

Fix input and retry

400

3032

Bad Request

Deposit percentage taken at time of booking cannot exceed 50% for Expedia Traveler Preference properties.

Fix input and retry

500

4100

Internal Server Error

Internal System Error. Do not retry this request. Our support team was notified of the problem.

Contact Expedia Support. Do not retry

503

4000

Service Unavailable

Internal system error, please try again in a few minutes.

Retry

HTTP status codes

The API will leverage HTTP status codes as defined by RFC 2616, Section 10. Users should expect HTTP status codes from the API as indicated in the table below.

Status Code

Meaning

Action

200

Success for read and update operations

No subsequent action needed

201

Success for create operations

No subsequent action needed

204

Success for delete operations

No subsequent action needed

400

Errors due to user due to incorrect input

Partner to fix input and retry

401

Authentication error

Verify username or password and retry

403

Authorization error

Partner to verify and retry

404

Invalid resource

Partner to verify and retry

405

Invalid/unsupported method on resource

Verify method and retry

406

Unsupported media type for response (only application/json is supported)

Verify media type in “Accept” header and retry

415

Unsupported media type for requests (only application/json is supported)

Verify media type in “Content-Type” header and retry

500

Internal system error (should not be retried)

Contact Expedia Support. Do not retry

503

Temporary internal system error (should be retried)

Retry

504

Timeout error (should be retried)

Retry