GET Bookings by context, contextId

Overview

Retrieve bookings by Agent ID

Request

GET /[context]/[contextId]/Bookings

Request Information

Request Parameters

Name
Type
Requirement
Description
context
String
Mandatory
Context of the request here is Agents
contextId
Integer
Mandatory
Context Id is Agent Code

Response Information

Response Properties

Name
Type
Description
bookings
List<Booking>
Booking list
pagination
Pagination
Pagination

Pagination

Name
Type
Description
self
String
URI of current page
first
String
URI of first page
next
String
URI of next page
last
String
URI of last page
limit
Integer
Record limit per page
start
Integer
Start record
totalPages
Integer
Total pages in the result
totalRecords
Integer
Total records in the result
resultMessage
String
Result Message

Bookings

Name
Type
Description
status
String
Status of booking: 
•	incomplete
 Booking has not yet been finalised prior to departure 
•	complete
 Booking has been finalised prior to departure 
•	cancelled 
 Booking and all of its components have been cancelled
emailAddress
String
Web access email for booking
currency
String
Currency
depositAmount
Decimal
Deposit amount
depositDueDate
String
Deposit due date (if this exceeds the outstanding balance due date, then outstanding balance due date will be returned)
commission
Decimal
Commission paid by Intrepid to buying agent
totalOriginalAmount
Decimal
Total cost without any adjustments
totalGrossAmount
Decimal
Total cost paid by purchaser for booking
totalNetAmount
Decimal
Total gross amount minus commission paid to the buying agent
outstandingBalance
Decimal
Outstanding net balance amount
grossOutstandingBalance
Decimal
Outstanding gross balance amount
netOutstandingBalance
Decimal
Outstanding net balance amount
amountPaid
Decimal
Amount paid
totalDiscountAmount
Decimal
Booking adjustment (discount amount) will be deducted from the original price.
totalFeeAmount
Decimal
Booking adjustment (fee amount) will be added to the original price.
outstandingBalanceDueDate
String
Outstanding balance due date
dateOfFirstTravel
String
Date of first travel
customers
HrefWrapper
URI used to retrieve all customers on booking
trips
HrefWrapper
URI used to retrieve all trips on booking
accommodation
HrefWrapper
URI used to retrieve all accommodation on booking
transfers
HrefWrapper
URI used to retrieve all transfers on booking
sightseeing
HrefWrapper
URI used to retrieve all sightseeing on booking
additionalServices
HrefWrapper
URI used to retrieve all additional services on booking
leadPaxName
String
Lead Pax Name
travelConsultantName
String
Travel Consultant Name
lastTravelDate
String
Date of last travel
paxCount
Integer
Number of customers in Booking
invoices
HrefWrapper
URI to get the latest Invoice for the booking
payments
HrefWrapper
URI to get the list of payments for the booking or the customer
flights
HrefWrapper
URI to get the latest Flight for the booking
lastUpdatedDate
String
Last updated date
travelConsultantFirstName
String
Travel Consultant First Name
travelConsultantSurname
String
Travel Consultant Surname
buyingAgent
HrefWrapper
URI to get the buying agent in the booking
buyingAgentName
String
Buying Agent Name
storeAgentName
String
Store Agent Name (only applicable for wholesale transactions)
agentReferenceNumber
String
Agent's reference number
groupPaymentFlag
Boolean
Group Payments enabled for the booking
insurance
HrefWrapper
URI to get the latest insurance for the booking
starshipItineraryNotesAvailable
Boolean
Check Starship notes are available
starshipItineraryNotes
HrefWrapper
URI to get the starship itinerary notes for the booking
elementsItineraryNotesAvailable
Boolean
Check Elements notes are available
elementsItineraryNotes
HrefWrapper
URI to get the elements itinerary notes for the booking
id
Integer
ID of the resource
href
String
URI of the resource
sequence
Int64
Sequence of product

Customers

Name
Type
Description
href
String
URI of the resource

Trips

Name
Type
Description
href
String
URI of the resource

Accommodation

Name
Type
Description
href
String
URI of the resource

Transfers

Name
Type
Description
href
String
URI of the resource

Sightseeing

Name
Type
Description
href
String
URI of the resource

Additionalservices

Name
Type
Description
href
String
URI of the resource

Invoices

Name
Type
Description
href
String
URI of the resource

Payments

Name
Type
Description
href
String
URI of the resource

Flights

Name
Type
Description
href
String
URI of the resource

Buyingagent

Name
Type
Description
href
String
URI of the resource

Insurance

Name
Type
Description
href
String
URI of the resource

Starshipitinerarynotes

Name
Type
Description
href
String
URI of the resource

Elementsitinerarynotes

Name
Type
Description
href
String
URI of the resource

Response Codes

HTTP status code
Description
200 OK
The resource was retrieved successfully
400 Bad Request
The resource was malformed
401 Unauthorized
Missing or invalid API key
404 Not Found
The specified resource was not found
500 Internal Server Error
An unexpected error occurred on the API server

Response Example

{
  "bookings": [
    {
      "status": "Incompelete",
      "emailAddress": "sample@sample.com",
      "currency": "aud",
      "depositAmount": 12.5,
      "depositDueDate": "2017-08-25",
      "commission": 10,
      "totalOriginalAmount": 200.0,
      "totalGrossAmount": 2400.5,
      "totalNetAmount": 200.0,
      "outstandingBalance": 10,
      "grossOutstandingBalance": 10,
      "netOutstandingBalance": 10,
      "amountPaid": 3,
      "totalDiscountAmount": 200.0,
      "totalFeeAmount": 640.0,
      "outstandingBalanceDueDate": "2018-07-12",
      "dateOfFirstTravel": "2017-08-29",
      "customers": {
        "href": "/bookings/5057123/customers"
      },
      "trips": {
        "href": "/bookings/5057123/trips"
      },
      "accommodation": {
        "href": "/bookings/5057123/accommodation"
      },
      "transfers": {
        "href": "/bookings/5057123/transfers"
      },
      "sightseeing": {
        "href": "/bookings/5057123/sightseeing"
      },
      "additionalServices": {
        "href": "/bookings/5057123/additonalservices"
      },
      "leadPaxName": "Homer Simpson",
      "travelConsultantName": "Phil Maye",
      "lastTravelDate": "2017-09-10",
      "paxCount": 3,
      "invoices": {
        "href": "/bookings/5057123/invoices"
      },
      "payments": {
        "href": "/bookings/5057123/payments"
      },
      "flights": {
        "href": "/bookings/5057123/flights"
      },
      "lastUpdatedDate": "2017-08-25",
      "travelConsultantFirstName": "Phil",
      "travelConsultantSurname": "Maye",
      "buyingAgent": {
        "href": "/agent/67416620"
      },
      "buyingAgentName": "Test Buying Agent",
      "storeAgentName": "Test Store Agent",
      "agentReferenceNumber": "ABC123",
      "groupPaymentFlag": "true",
      "insurance": {
        "href": "/bookings/5057123/insurance"
      },
      "starshipItineraryNotesAvailable": "true",
      "starshipItineraryNotes": {
        "href": "/Bookings/7482881/Note?AllItineraryNotes=true"
      },
      "elementsItineraryNotesAvailable": "true",
      "elementsItineraryNotes": {
        "href": "/Bookings/7482881/Note?AllElementsItineraryNotes=true"
      },
      "id": 887124,
      "href": "context/contextid/bookings/887124",
      "sequence": "202403312359580000"
    },
    {
      "status": "Incompelete",
      "emailAddress": "sample@sample.com",
      "currency": "aud",
      "depositAmount": 12.5,
      "depositDueDate": "2017-08-25",
      "commission": 10,
      "totalOriginalAmount": 200.0,
      "totalGrossAmount": 2400.5,
      "totalNetAmount": 200.0,
      "outstandingBalance": 10,
      "grossOutstandingBalance": 10,
      "netOutstandingBalance": 10,
      "amountPaid": 3,
      "totalDiscountAmount": 200.0,
      "totalFeeAmount": 640.0,
      "outstandingBalanceDueDate": "2018-07-12",
      "dateOfFirstTravel": "2017-08-29",
      "customers": {
        "href": "/bookings/5057123/customers"
      },
      "trips": {
        "href": "/bookings/5057123/trips"
      },
      "accommodation": {
        "href": "/bookings/5057123/accommodation"
      },
      "transfers": {
        "href": "/bookings/5057123/transfers"
      },
      "sightseeing": {
        "href": "/bookings/5057123/sightseeing"
      },
      "additionalServices": {
        "href": "/bookings/5057123/additonalservices"
      },
      "leadPaxName": "Homer Simpson",
      "travelConsultantName": "Phil Maye",
      "lastTravelDate": "2017-09-10",
      "paxCount": 3,
      "invoices": {
        "href": "/bookings/5057123/invoices"
      },
      "payments": {
        "href": "/bookings/5057123/payments"
      },
      "flights": {
        "href": "/bookings/5057123/flights"
      },
      "lastUpdatedDate": "2017-08-25",
      "travelConsultantFirstName": "Phil",
      "travelConsultantSurname": "Maye",
      "buyingAgent": {
        "href": "/agent/67416620"
      },
      "buyingAgentName": "Test Buying Agent",
      "storeAgentName": "Test Store Agent",
      "agentReferenceNumber": "ABC123",
      "groupPaymentFlag": "true",
      "insurance": {
        "href": "/bookings/5057123/insurance"
      },
      "starshipItineraryNotesAvailable": "true",
      "starshipItineraryNotes": {
        "href": "/Bookings/7482881/Note?AllItineraryNotes=true"
      },
      "elementsItineraryNotesAvailable": "true",
      "elementsItineraryNotes": {
        "href": "/Bookings/7482881/Note?AllElementsItineraryNotes=true"
      },
      "id": 887124,
      "href": "context/contextid/bookings/887124",
      "sequence": "202403312359580000"
    }
  ],
  "pagination": {
    "self": "/bookings?DateOfBookingStart=2017-01-01&start=1&limit=50&dateOfFirstTravelEnd=2017-01-10&customerFirstName=jhon",
    "first": "/bookings?DateOfBookingStart=2017-01-01&start=1&limit=50&dateOfFirstTravelEnd=2017-01-10&customerFirstName=jhon",
    "next": "/bookings?DateOfBookingStart=2017-01-01&Start=101&Limit=100&dateOfFirstTravelEnd=2017-01-10&customerFirstName=jhon",
    "last": "/bookings?DateOfBookingStart=2017-01-01&Start=301&Limit=100&dateOfFirstTravelEnd=2017-01-10&customerFirstName=jhon",
    "limit": 100,
    "start": 1,
    "totalPages": 4,
    "totalRecords": 381,
    "resultMessage": "Maximum value for Limit is 100"
  }
}