Reservation management
Getting startedReservation management

Using the sandbox to test your implementation

A sandbox is a controlled and isolated environment designed for developers to safely discover, test, and interact with an API without affecting production data. A sandbox environment can be used

  • As a playground to learn about our connectivity APIs
  • As an integrated testing environment when developing and testing their own API integrations
  • As the environment for API certification purposes

To test your implementation of the reservation management, the following is provided:

  • The Sandbox Data Management API, which enables you to set up test data
  • A sandbox version of the Lodging Supply GraphQL API so you can exercise queries and mutations in the sandbox environment

The following workflows provide an overview of how you can use the sandbox environment to test reservations management (where you need reservations to be uploaded to your connectivity system).

Setting up sandbox data

To take advantage of the sandbox environment, you need to obtain sandbox credentials and set up sandbox data. You may want to review the Sandbox Data Management API's implementation details before beginning.

  1. Obtain an access token so that you can run queries and mutations in the sandbox environment. Follow these instructions.

  2. Create and configure a callback configuration in the sandbox environment so that you receive webhook notifications after creating sandbox reservations:

    • Create and configure a callback configuration.

      Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

      Mutation: createNotificationCallbackConfig

      1mutation {
      2 createNotificationCallbackConfig (
      3 input: {
      4 callbackUrl : "https://api.dev.testcallbackurl.com/vrbo/reservations/cancel",
      5 apiKey : "436132d7-21b0-467b-baa8-59fd8588a292",
      6 contactEmail: "partner@email.com",
      7 requestTimeoutSeconds: 10
      8 }
      9 ) {
      10 callbackConfig {
      11 id
      12 callbackUrl
      13 secretExpirationDateTime
      14 requestTimeoutSeconds
      15 }
      16 secret
      17 }
      18}
    • Subscribe to the ReservationNotificationEvent event type:

      Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

      Mutation: subscribeNotificationEventType

      1mutation {
      2 subscribeNotificationEventType (
      3 input: {
      4 eventType: "ReservationNotificationEvent",
      5 callbackConfigId: "1969081f-8380-4dbd-9a19-c26fc1747b06"
      6 })
      7 {
      8 eventType
      9 callbackConfig {
      10 id
      11 callbackUrl
      12 requestTimeoutSeconds
      13 secretExpirationDateTime
      14 contactEmail
      15 }
      16 }
      17}
    • Add the following IP range to your allow list: 35.82.59.192/26. Otherwise, your system may block notifications.

    This page provides complete details on enabling notifications.

  3. Create one or more sandbox properties, which will be used when creating reservations in the sandbox:

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutation: createProperty

    1mutation {
    2 createProperty(
    3 input: {
    4 name: "TestProperty1",
    5 clientMutationId: "7809989",
    6 }
    7 ) {
    8 clientMutationId
    9 property {
    10 id
    11 name
    12 }
    13 }
    14}
  4. Create one or more reservations in the sandbox environment. Be sure to include sendNotification: true in the input so that a webhook notification is sent.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutation: createReservation

    1mutation {
    2 createReservation(
    3 input: {
    4 propertyId: "64250",
    5 checkInDate: "2025-09-06",
    6 checkOutDate: "2025-09-10",
    7 businessModel: EXPEDIA_COLLECT,
    8 paymentInstrumentType: EXPEDIA_VIRTUAL_CARD,
    9 source: "Expedia",
    10 adultCount: 5,
    11 accessibilityText: [],
    12 childCount: 3,
    13 childAges: null,
    14 multiRoomText: null,
    15 smokingType: "NONSMOKING",
    16 status: BOOKED,
    17 remittanceType: GROSS,
    18 sendNotification: true
    19 }
    20 ) {
    21 reservation {
    22 id
    23 }
    24 }
    25}

    After each reservation is created and saved in the sandbox environment, a webhook notification is sent (if sendNotification: true). Here is an example for the first reservation created above.

    1{
    2 "event_name": "ReservationNotificationEvent",
    3 "creation_time": "2025-03-27T15:05:00.000Z",
    4 "notification_id": "cef812c0-2ec6-478e-a3c1-474c5c59c333",
    5 "payload": {
    6 "property_id": "64250",
    7 "reservation_id": "54019572",
    8 "action_type": "BOOKED",
    9 "confirmation_token": "dtd1RGhFa4khwEwaveO+3K7MyVoI4fkOwxJUsHzC0FhDaV4Bsu3k5BohMjiaZJDFnTg=",
    10 "property_source": "EXPEDIA_GROUP"
    11 }
    12}

New reservations

The following workflow describes how to retrieve reservations in the sandbox environment that can then be used to test your reservations management implementation.

  1. Retrieve reservation details from the sandbox environment, including a token that can then be used to access the Payments API. Issue the request against your sandbox credentials.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Query: reservations

    1query {
    2 property (
    3 id: "64250"
    4 ) {
    5 id
    6 name
    7 reservations(pageSize: 10) {
    8 totalCount
    9 edges {
    10 node {
    11 id
    12 checkInDate
    13 checkOutDate
    14 status
    15 payment {
    16 instrument {
    17 type
    18 token {
    19 value
    20 expirationDateTime
    21 }
    22 }
    23 }
    24 }
    25 }
    26 }
    27 }
    28}
  2. Retrieve credit card and virtual card information for the reservation.

    Endpoint: https://api.sandbox.expediagroup.com/supply/payments/graphql

    Query: paymentInstrument

    1query {
    2 paymentInstrument (token: "token_from_res_query") {
    3 ...on BankIssuedCard {
    4 customer {
    5 address {
    6 addressLines
    7 locality
    8 administrativeArea
    9 postalCode
    10 countryCode
    11 }
    12 fullName
    13 }
    14 expirationDate
    15 activationDate
    16 issuerName
    17 number
    18 type
    19 verificationNumber
    20 }
    21 }
    22}
  3. Confirm the notification.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Mutation: confirmReservationNotification

    1mutation {
    2 confirmReservationNotification(
    3 input: {
    4 clientMutationId: "liaj8a500ad",
    5 propertyId: "64250",
    6 reservationId: "54019572",
    7 confirmationToken: "LPtu3SI+ZovWJincjJrv9+GZUpln8ofYfrKhAaWQOBM=",
    8 confirmationCode: "59aoi9alje",
    9 actionType: "BOOKED"
    10 }
    11 ) {
    12 clientMutationId
    13 reservation {
    14 id
    15 }
    16 }
    17}
  4. Test your reservation management implementation by issuing query and mutation requests against the sandbox data.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Note that all reservation queries and mutations are supported as documented, except for the property query. Only the id and name fields are available on the Property type.

  5. Cleanup (delete) test data (properties and reservations) in the sandbox environment, as necessary.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutations: deleteProperty and deletePropertyReservations

Modified reservations

This workflow assumes that the steps in New reservations above have been completed. In particular, if notifications are not confirmed, additional notifications are not sent when a reservation is modified.

  1. Update one or more sandbox reservations, as necessary. Be sure to include sendNotification: true in the input so that a webhook notification is sent.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutation: updateReservation

    After updating a reservation, a webhook notification (ReservationNotificationEvent) is sent to the sandbox callback URL, which includes the reservation ID and a confirmation token.

    1{
    2 "event_name":"ReservationNotificationEvent",
    3 "creation_time":"2024-07-10T09:49:00.000Z",
    4 "notification_id":"e85b23f3-5d13-412a-8a63-9a974373d0899",
    5 "payload": {
    6 "property_id": "64250",
    7 "reservation_id": "54019572",
    8 "confirmation_token": "tL9tLTvSXLiIcjWWb2W0h1PIytNTUHkpxtkvwNbrdLk=",
    9 "action_type": "MODIFIED",
    10 "property_source": "EXPEDIA_GROUP"
    11 }
    12}
  2. Retrieve reservations from the sandbox environment. Be sure to use the sandbox’s access token.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Query: reservations

    1query {
    2 property(id: "64250") {
    3 id
    4 name
    5 reservations(pageSize: 10) {
    6 totalCount
    7 edges {
    8 node {
    9 id
    10 checkInDate
    11 checkOutDate
    12 status
    13 }
    14 }
    15 }
    16 }
    17}
  3. Confirm the notification.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Mutation: confirmReservationNotification

    1mutation {
    2 confirmReservationNotification(
    3 input: {
    4 clientMutationId: "liaj8a500ad",
    5 propertyId: "64250",
    6 reservationId: "54019572",
    7 confirmationToken: "tL9tLTvSXLiIcjWWb2W0h1PIytNTUHkpxtkvwNbrdLk=",
    8 confirmationCode: "689oi9isakadl",
    9 actionType: "MODIFIED"
    10 }
    11 ) {
    12 clientMutationId
    13 reservation {
    14 id
    15 }
    16 }
    17}
  4. Cleanup (delete) test data (properties and reservations) in the sandbox environment, as necessary.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutations: deleteProperty and deletePropertyReservations

Credit card validation and recapture

This workflow assumes that the steps in Setting up sandbox data above were completed to create a Hotel Collect reservation.

If the reservation is created with a valid credit card

This workflow assumes that the reservation was created with a valid credit card (invalidateCreditCard: false is set as part of the createReservation mutation’s input arguments).

  1. Retrieve reservation details to see current payment validation status of the sandbox reservation; the status field in paymentInstrumentDetails should return VALID. Issue the request against your sandbox credentials.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Query: reservations

    1query {
    2 property(id: 64250 idSource: EXPEDIA) {
    3 reservations(pageSize: 10) {
    4 edges {
    5 node {
    6 payment {
    7 instrument {
    8 type
    9 paymentInstrumentDetails {
    10 ...on GuestCreditCardDetails {
    11 status
    12 }
    13 }
    14 }
    15 }
    16 cancellationEligibility {
    17 scenario
    18 eligibleActors
    19 ineligibilities {
    20 actor
    21 reasons {
    22 reason
    23 expiry
    24 }
    25 }
    26 }
    27 }
    28 }
    29 }
    30 }
    31}
  2. Report the credit card on the reservation as invalid using the markGuestCreditCardAsInvalid mutation. Issue the request against your sandbox credentials.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Mutation: markGuestCreditCardAsInvalid

    1mutation {
    2 markGuestCreditCardAsInvalid(
    3 input: {
    4 clientMutationId: "myPartnerMutationId",
    5 propertyId: "64250",
    6 reservationId: "54019572",
    7 reason: INCORRECT_VERIFICATION_NUMBER
    8 }
    9 ) {
    10 clientMutationId
    11 reservationId
    12 }
    13}
  3. Simulate the payment instrument validation flow for the reservation using the simulatePaymentValidationFlow mutation in the sandbox. This mutation emulates the guest response and sets a new credit card, generates the webhook notification, and changes the status of the reservation.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutation: simulatePaymentValidationFlow

    1mutation {
    2 simulatePaymentValidationFlow(
    3 input: {
    4 reservationId: "54019572",
    5 clientMutationId: "client-123",
    6 status: INVALID,
    7 updateDateTime: "2025-07-15T14:30:00.000Z",
    8 ineligibilityWindowEnd: "2025-07-20T14:30:00.000Z"
    9 }
    10 ) {
    11 reservationId
    12 clientMutationId
    13 }
    14}

    Valid values for the status field are VALID, PENDING, and INVALID.

  4. Monitor reservation status changes by retrieving reservation details using the reservations query. After marking a card as invalid, the status will change to VALID during the recapture window.

  5. Receive notifications. A ReservationNotificationEvent notification is generated with the action_type: Modified after the payment method is updated.

If the reservation is created with an invalid credit card

This workflow assumes that the reservation was created with an invalid credit card (invalidateCreditCard: true is set as part of the createReservation mutation’s input arguments). If necessary, return to the sandbox setup steps to create another reservation.

  1. Retrieve reservation details to see current payment validation status of the sandbox reservation; the status field in paymentInstrumentDetails should return PENDING. Issue the request against your sandbox credentials.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Query: reservations

    1query {
    2 property(id: 64250 idSource: EXPEDIA) {
    3 reservations(pageSize: 10) {
    4 edges {
    5 node {
    6 payment {
    7 instrument {
    8 type
    9 paymentInstrumentDetails {
    10 ...on GuestCreditCardDetails {
    11 status
    12 }
    13 }
    14 }
    15 }
    16 cancellationEligibility {
    17 scenario
    18 eligibleActors
    19 ineligibilities {
    20 actor
    21 reasons {
    22 reason
    23 expiry
    24 }
    25 }
    26 }
    27 }
    28 }
    29 }
    30 }
    31}
  2. If you want to test cancelling the reservation after 24 hours, use the cancelReservation mutation. Issue the request against your sandbox credentials.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging/graphql

    Mutation: cancelReservation

  3. If you want to emulate a guest response and simulate the payment instrument validation flow, use the simulatePaymentValidationFlow mutation. This mutation also sets a new credit card, generates the webhook notification, and changes the status of the reservation.

    Endpoint: https://api.sandbox.expediagroup.com/supply/lodging-sandbox/graphql

    Mutation: simulatePaymentValidationFlow

    1mutation {
    2 simulatePaymentValidationFlow(
    3 input: {
    4 reservationId: "54019572",
    5 clientMutationId: "client-123",
    6 status: INVALID,
    7 updateDateTime: "2025-07-15T14:30:00.000Z",
    8 ineligibilityWindowEnd: "2025-07-20T14:30:00.000Z"
    9 }
    10 ) {
    11 reservationId
    12 clientMutationId
    13 }
    14}

    Valid values for the status field are VALID, PENDING, and INVALID.

  4. Monitor reservation status changes by retrieving reservation details using the reservations query. After marking a card as invalid, the status will change to VALID during the recapture window.

  5. Receive notifications. A ReservationNotificationEvent notification is generated with the action_type: Modified after the payment method is updated.