Skip to content

Latest commit

 

History

History
271 lines (181 loc) · 8.26 KB

supply-client.md

File metadata and controls

271 lines (181 loc) · 8.26 KB

Supply Client

SupplyClient gives you access to the reservations capabilities in lodging connectivity APIs.

Note

Supporting more capabilities like Promotions, Messaging, Reviews, etc... is work-in-progress at the moment and will be added soon to this client.

API Endpoint

This client is connected with https://api.expediagroup.com/supply/lodging/graphql endpoint by default.

You can refer to the configuration document to explore the full configuration options.

Initialize the Client

const config: ClientConfiguration = {
   key: 'YOUR_API_KEY',
   secret: 'YOUR_API_SECRET'
};

const supplyClient = new SupplyClient(config);

Set the Environment (Optional)

SupplyClient can be configured to work in different environments, below is a list of the supported environments by this client:

Environment Corresponding API Endpoint
ClientEnvironment.PROD https://api.expediagroup.com/supply/lodging/graphql
ClientEnvironment.TEST https://test-api.expediagroup.com/supply/lodging/graphql
ClientEnvironment.SANDBOX_PROD https://api.sandbox.expediagroup.com/supply/lodging/graphql
ClientEnvironment.SANDBOX_TEST https://test-api.sandbox.expediagroup.com/supply/lodging/graphql

Configuration with Environment Example

const config: ClientConfiguration = {
   key: 'YOUR_API_KEY',
   secret: 'YOUR_API_SECRET',
   environment: ClientEnvironment.SANDBOX_PROD
};

Execute the operation

const propertyReservationsResponse = await supplyClient.query({
    query: PropertyReservationsDocument,
    variables: {
      propertyId: 'your_property_id',
      pageSize: 10
    }
});

Available Operations

The SDK offers a set of queries & mutations you can execute using the SupplyClient. Below is an overview list of the available operations.


SupplyClient - Queries


PropertyReservations

Operation Name: PropertyReservationsDocument

Operation Inputs:

Name Type Required
propertyId String! Yes
idSource IdSource No (default: EXPEDIA)
pageSize Int! Yes
cursor String No
filter ReservationFilterInput No
checkOutDate CheckOutDateFilter No
includePaymentInstrumentToken Boolean No (default: false)
includeSupplierAmount Boolean No (default: false)

Resources


PropertyReservationsSummary

Operation Name: PropertyReservationsSummaryDocument

Operation Inputs:

Name Type Required
propertyId String! Yes
idSource IdSource No (default: EXPEDIA)
pageSize Int! Yes
cursor String No
filter ReservationFilterInput No
checkOutDate CheckOutDateFilter No

Resources




SupplyClient - Mutations


CancelReservation

Operation Name: CancelReservationDocument

Operation Inputs:

Name Type Required
input CancelReservationInput! Yes

Resources


CancelReservationReconciliation

Operation Name: CancelReservationReconciliationDocument

Operation Inputs:

Name Type Required
input CancelReservationReconciliationInput! Yes

Resources


CancelVrboReservation

Operation Name: CancelVrboReservationDocument

Operation Inputs:

Name Type Required
input CancelVrboReservationInput! Yes

Resources


ChangeReservationReconciliation

Operation Name: ChangeReservationReconciliationDocument

Operation Inputs:

Name Type Required
input ChangeReservationReconciliationInput! Yes

Resources


ConfirmReservationNotification

Operation Name: ConfirmReservationNotificationDocument

Operation Inputs:

Name Type Required
input ConfirmReservationNotificationInput! Yes

Resources


RefundReservation

Operation Name: RefundReservationDocument

Operation Inputs:

Name Type Required
input RefundReservationInput! Yes

Resources