# EXPENSE_PNR_V1

Endpoint: POST EXPENSE_PNR_V1
Version: v2
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer

## Request fields (application/json):

  - `event_type` (string)
    EXPENSE_PNR_V1
    Example: EXPENSE_PNR_V1

  - `operationSummary` (object)
    Operation summary for webhook payload

  - `operationSummary.ticketsIssued` (array)
    The tickets issued

  - `operationSummary.ticketsVoided` (array)
    The tickets voided

  - `operationSummary.ticketsRefunded` (array)
    The tickets refunded

  - `operation` (string)
    Pnr and trip details operation types
    Enum: "BOOKING_CREATED", "BOOKING_OTHER_UPDATE", "TRIP_UPDATED", "BOOKING_UPDATED", "BOOKING_CANCELED_BY_TRAVELER", "BOOKING_CANCELED_BY_VENDOR", "BOOKING_REBOOKED", "BOOKING_TICKETED", "TICKET_VOIDED", "TICKET_REFUNDED", "FLIGHT_SCHEDULE_CHANGE_PENDING", "FLIGHT_SCHEDULE_CHANGE_CLOSED", "FLIGHT_CABIN_CHANGED", "FLIGHT_SEAT_CANCELLED", "FLIGHT_SEAT_CONFIRMED", "FLIGHT_SEAT_CHANGED", "PAYMENT_DECLINED", "FLIGHT_CANCELLED", "SPLIT_PNR_CREATED", "REFUND", "EXCHANGE", "FLIGHT_CHANGED", "INVOICE_GENERATED"

  - `payload` (object)
    Pnr data with all information about a single booking containing one of Air, Hotel,
Car, Rail, Limo or Miscellaneous PNR.

  - `payload.pnrId` (string)
    Spotnana PNR ID
    Example: 123456789

  - `payload.tripId` (string)
    Spotnana trip ID to which the PNR belongs to
    Example: 123456789

  - `payload.version` (integer)
    Current PNR version. This field is used for handling conflicts in case of concurrent 
updates. This should be sent unmodified in update request.
    Example: 1

  - `payload.bookingStatus` (string)
    User facing booking status
    Enum: "UNKNOWN_STATUS", "PENDING_STATUS", "CONFIRMED_STATUS", "ACTIVE_STATUS", "COMPLETED_STATUS", "CANCELLED_STATUS", "REFUNDED_STATUS", "VOIDED_STATUS", "PROCESSING_STATUS", "UNCONFIRMED_STATUS", "AIRLINE_CONTROL_STATUS", "PAYMENT_DECLINED_STATUS", "SCHEDULE_CHANGE_STATUS", "HOLD_STATUS", "APPROVAL_REQUESTED_STATUS", "APPROVAL_DENIED_STATUS", "CANCELLATION_IN_PROGRESS_STATUS", "INOPERATIVE_STATUS", "FLIGHT_UNCONFIRMED_STATUS"

  - `payload.invoiceDelayedBooking` (boolean)
    True if the billing is delayed
    Example: false

  - `payload.createdAt` (object)
    ISO8601 UTC Date Time

  - `payload.createdAt.iso8601` (string, required)
    Example: 2017-07-21T17:32Z

  - `payload.dkNumber` (string)
    DK number attached to the PNR.
    Example: 123456789

  - `payload.basicTripInfo` (object)
    Basic trip info

  - `payload.basicTripInfo.tripName` (string, required)
    Name of the trip
    Example: JFK SFO Trip

  - `payload.basicTripInfo.tripDescription` (string)
    Trip description
    Example: JFK SFO Business Trip

  - `payload.pnrTravelers` (array)
    List of travelers on this pnr and their information. This is a required field.

  - `payload.pnrTravelers.userId` (object, required)
    User identifier

  - `payload.pnrTravelers.userId.id` (string, required)

  - `payload.pnrTravelers.personalInfo` (object)
    User details.

  - `payload.pnrTravelers.personalInfo.email` (string)
    Example: example@email.com

  - `payload.pnrTravelers.personalInfo.name` (object)
    Full name containing first, middle, last (family) names, and suffix.

  - `payload.pnrTravelers.personalInfo.name.family1` (string, required)
    Last (family) name.
    Example: Gandas

  - `payload.pnrTravelers.personalInfo.name.family2` (string)
    Example: FamilyTwo

  - `payload.pnrTravelers.personalInfo.name.given` (string, required)
    First (given) name.
    Example: Vichitr

  - `payload.pnrTravelers.personalInfo.name.middle` (string)
    Middle name.
    Example: Kumar

  - `payload.pnrTravelers.personalInfo.name.suffix` (string)
    Suffix for name
    Enum: "NAME_SUFFIX_UNKNOWN", "SR", "JR", "MD", "PHD", "II", "III", "IV", "DO", "ATTY", "V", "VI", "ESQ", "DC", "DDS", "VM", "JD", "SECOND", "THIRD"

  - `payload.pnrTravelers.personalInfo.name.preferred` (string)
    Informal preferred name added by traveler. This is not used on any PNR or tickets
    Example: Don

  - `payload.pnrTravelers.businessInfo` (object)
    Business information of the traveler

  - `payload.pnrTravelers.businessInfo.employeeId` (string)
    Employee id of the user
    Example: 1234

  - `payload.pnrTravelers.businessInfo.accountingCode` (string)
    Code used for accounting.
    Example: 123

  - `payload.pnrTravelers.businessInfo.department` (object)
    Department details.

  - `payload.pnrTravelers.businessInfo.department.id` (string, required)

  - `payload.pnrTravelers.businessInfo.department.name` (string, required)
    Name of the department
    Example: IT Department

  - `payload.pnrTravelers.businessInfo.department.externalId` (string)
    External id of the department
    Example: department-ext-id

  - `payload.pnrTravelers.businessInfo.userCostCenter` (object)
    Cost center details.

  - `payload.pnrTravelers.businessInfo.userCostCenter.id` (object, required)

  - `payload.pnrTravelers.businessInfo.userCostCenter.id.id` (string, required)
    Example: 731ccbca-0415-6fe1-d235-c324dfbe7423

  - `payload.pnrTravelers.businessInfo.userCostCenter.name` (string, required)
    Example: CostCenter

  - `payload.pnrTravelers.businessInfo.userCostCenter.externalId` (string)
    Example: external-id

  - `payload.pnrTravelers.businessInfo.grade` (object)
    Grade details.

  - `payload.pnrTravelers.businessInfo.grade.employeeCount` (integer)
    Count of employees in the grade
    Example: 75

  - `payload.pnrTravelers.businessInfo.grade.id` (object, required)
    Grade id.

  - `payload.pnrTravelers.businessInfo.grade.id.id` (string, required)
    Example: 831ccbcb-1416-7fe2-e236-d324dfbe7424

  - `payload.pnrTravelers.businessInfo.grade.name` (string, required)
    Example: Grade

  - `payload.pnrTravelers.businessInfo.workerType` (string)
    The type of worker.
    Enum: "EMPLOYEE", "CONTINGENT", "SEASONAL", "INTERN", "GUEST"

  - `payload.pnrTravelers.businessInfo.office` (object)
    Office details.

  - `payload.pnrTravelers.businessInfo.office.address` (object)
    Postal Address Details

  - `payload.pnrTravelers.businessInfo.office.address.addressLines` (array, required)
    Address lines

  - `payload.pnrTravelers.businessInfo.office.address.administrativeArea` (string)
    Code of administrative area. For example: DL for Delhi, India.
Highest administrative subdivision which is used for postal
addresses of a country or region.
For example, this can be a state, a province, an oblast, or a prefecture.
Specifically, for Spain this is the province and not the autonomous
community (e.g. "Barcelona" and not "Catalonia").
Many countries don't use an administrative area in postal addresses. E.g.
in Switzerland this should be left unpopulated.
    Example: CA

  - `payload.pnrTravelers.businessInfo.office.address.administrativeAreaName` (string)
    Name of administrative area. This is full name corresponding to administrativeArea. 
Like Delhi for DL area code. For some places, code and name maybe same as well like Tokyo.
    Example: California

  - `payload.pnrTravelers.businessInfo.office.address.description` (string)
    Address description
    Example: San Francisco Home

  - `payload.pnrTravelers.businessInfo.office.address.isDefault` (boolean)
    Whether this address is default address in case multiple addresses are specified.
    Example: true

  - `payload.pnrTravelers.businessInfo.office.address.languageCode` (string)
    BCP-47 language code of the contents of this address (if known). This is often the UI 
language of the input form or is expected to match one of the languages used in the 
address' country/region, or their transliterated equivalents.
This can affect formatting in certain countries, but is not critical to the correctness 
of the data and will never affect any validation or other non-formatting related operations.
Examples: "zh-Hant", "ja", "ja-Latn", "en".
    Example: en

  - `payload.pnrTravelers.businessInfo.office.address.locality` (string)
    Generally refers to the city/town portion of the address.
    Example: San Francisco

  - `payload.pnrTravelers.businessInfo.office.address.locationCode` (string)
    IATA 3-letter location code. See https://www.iata.org/en/services/codes.
    Example: LAX

  - `payload.pnrTravelers.businessInfo.office.address.organization` (string)
    The name of the organization at the address.
    Example: Spotnana

  - `payload.pnrTravelers.businessInfo.office.address.postalCode` (string)
    Postal code of the address. This is a required field when setting for a user/legal entity/company etc.
    Example: 94130

  - `payload.pnrTravelers.businessInfo.office.address.continentCode` (string)
    2 letter continent code of the continent this address falls in.
    Example: AF

  - `payload.pnrTravelers.businessInfo.office.address.recipients` (array)
    The recipient at the address.

  - `payload.pnrTravelers.businessInfo.office.address.regionCode` (string, required)
    Region code of the country/region of the address.
    Example: US

  - `payload.pnrTravelers.businessInfo.office.address.regionName` (string)
    Region name of the country/region of the address.
    Example: America

  - `payload.pnrTravelers.businessInfo.office.address.revision` (integer)
    Example: 1

  - `payload.pnrTravelers.businessInfo.office.address.sortingCode` (string)
    Additional, country-specific, sorting code. This is not used
in most regions. Where it is used, the value is either a string like
"CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
alone, representing the "sector code" (Jamaica), "delivery area indicator"
(Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
    Example: Jamaica

  - `payload.pnrTravelers.businessInfo.office.address.sublocality` (string)
    Sublocality of the address. This can be neighborhoods, boroughs, districts.

  - `payload.pnrTravelers.businessInfo.office.address.timezone` (string)
    Time zone of the address.
    Example: America/Los_Angeles

  - `payload.pnrTravelers.businessInfo.office.address.coordinates` (object)
    Latitude and Longitude for a Location

  - `payload.pnrTravelers.businessInfo.office.address.coordinates.latitude` (number, required)
    Latitude of the Location
    Example: 77.1025

  - `payload.pnrTravelers.businessInfo.office.address.coordinates.longitude` (number, required)
    Longitude of the Location
    Example: 28.7041

  - `payload.pnrTravelers.businessInfo.office.id` (object, required)
    The unique ID of the office.

  - `payload.pnrTravelers.businessInfo.office.id.id` (string, required)
    The value of the unique ID for the office.
    Example: 531ccbce-8413-4fe9-b233-a324dfbe7421

  - `payload.pnrTravelers.businessInfo.office.name` (string, required)
    Example: Office

  - `payload.pnrTravelers.businessInfo.office.taxId` (string)
    Example: 133232

  - `payload.pnrTravelers.businessInfo.companyInfo` (object)
    Company information of the traveler

  - `payload.pnrTravelers.businessInfo.companyInfo.id` (object)
    Company ID

  - `payload.pnrTravelers.businessInfo.companyInfo.id.id` (string, required)
    Example: f49d00fe-1eda-4304-ba79-a980f565281d

  - `payload.pnrTravelers.businessInfo.companyInfo.name` (string)
    Name of the company
    Example: Spotnana

  - `payload.pnrTravelers.businessInfo.companyInfo.externalId` (string)
    External Id of the company
    Example: abcd

  - `payload.pnrTravelers.businessInfo.legalEntity` (object)
    Legal entity of the traveler

  - `payload.pnrTravelers.businessInfo.legalEntity.id` (string)
    Legal entity ID

  - `payload.pnrTravelers.businessInfo.legalEntity.name` (string)
    Name of the legal entity
    Example: Spotnana India

  - `payload.pnrTravelers.businessInfo.legalEntity.ein` (string)
    EIN of the traveler

  - `payload.pnrTravelers.businessInfo.legalEntity.externalId` (string)
    External Id of the legal entity
    Example: abcd

  - `payload.pnrTravelers.businessInfo.legalEntity.companySpecifiedAttributes` (array)

  - `payload.pnrTravelers.businessInfo.legalEntity.companySpecifiedAttributes.fieldName` (string, required)
    Field name of the attribute
    Example: businessId

  - `payload.pnrTravelers.businessInfo.legalEntity.companySpecifiedAttributes.value` (string, required)
    Field value of the attribute
    Example: ABCD

  - `payload.pnrTravelers.businessInfo.legalEntity.countryCode` (string)
    2-letter ISO country code of the legal entity
    Example: IN

  - `payload.pnrTravelers.businessInfo.legalEntity.billingCurrency` (string)
    Billing currency for the legal entity.
    Example: USD

  - `payload.pnrTravelers.businessInfo.legalEntity.registeredName` (string)
    The official name of this legal entity as registered with local tax authorities.
    Example: Spotnana India Private Limited

  - `payload.pnrTravelers.businessInfo.legalEntity.registeredEmail` (string)
    The primary email (or alias) used for the "Registered name" of this legal entity.
Used for official communications, including regulatory, compliance, and invoicing
purposes.
    Example: contact@spotnana.in

  - `payload.pnrTravelers.originalBusinessInfo` (object)
    Business information of the traveler

  - `payload.pnrTravelers.originalBusinessInfo.employeeId` (string)
    Employee id of the user
    Example: 1234

  - `payload.pnrTravelers.originalBusinessInfo.accountingCode` (string)
    Code used for accounting.
    Example: 123

  - `payload.policyInfo` (object)
    Policy related info for this booking

  - `payload.policyInfo.outOfPolicy` (boolean, required)
    True if the booking is out of policy, else false
    Example: false

  - `payload.policyInfo.isPersonalUpgrade` (boolean)
    Indicates that this booking exceeded the allowed policy budget with the extra amount being charged on the traveler.
    Example: false

  - `payload.totalFare` (object)
    Money object containing details such as the amount, the currency code, and the converted amount.

  - `payload.totalFare.amount` (number, required)
    The numeric value for the amount of money.
    Example: 510

  - `payload.totalFare.currencyCode` (string, required)
    The 3-letter currency code for the money amount (defined using ISO 4217 standard).
    Example: GBP

  - `payload.totalFare.convertedAmount` (number)
    The converted currency and amount that has been converted (if a currency conversion has been requested).
For example, if the call requests that money be sent in a specified currency (because the frontend requested
the backend to send money in the user's preferred currency).
    Example: 715.42

  - `payload.totalFare.convertedCurrency` (string)
    The 3-letter currency code for the converted currency (defined using ISO 4217 standard).
    Example: USD

  - `payload.totalFare.otherCoinage` (array)
    List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

  - `payload.totalFare.otherCoinage.coinageCode` (string)
    Payment method
    Enum: "PAYMENT_METHOD_UNKNOWN", "CREDIT_CARD", "BREX_POINTS", "CASH", "QANTAS_POINTS", "VENDOR_PROGRAM_PAYMENT", "DELAYED_INVOICING", "FLIGHT_CREDITS", "QANTAS_TRAVEL_FUND", "CUSTOM_VIRTUAL_PAYMENT", "FLIGHT_PASS", "MISCELLANEOUS_CREDIT_ORDER", "NO_PREPAYMENT", "DELAYED_PAYMENT"

  - `payload.totalFare.otherCoinage.amount` (number)
    Example: 1000

  - `payload.totalFare.otherCoinage.conversionRate` (number)
    1 coin in this system equals to how many currency value
    Example: 0.01

  - `payload.totalFare.otherCoinage.preferredCurrencyConversionRate` (number)
    1 coin in this system equals to how many currency value
    Example: 0.01

  - `payload.totalFare.otherCoinage.otherCoinageMetadata` (any)
    Metadata to store additional information related to the payment method

  - `payload.totalFare.otherCoinage.otherCoinageMetadata.metadataType` (string)
    Discriminator field for polymorphic deserialization
    Enum: "FlightPassPaymentMetadata"

  - `payload.totalFare.otherCoinage.otherCoinageMetadata.flightPassMetadata` (object, required)
    Metadata specific to Flight Pass payment method in OtherCoinage.

  - `payload.totalFare.otherCoinage.otherCoinageMetadata.flightPassMetadata.flightPassNumber` (string)
    Flight pass number
    Example: FP123456789

  - `payload.totalFare.otherCoinage.otherCoinageMetadata.flightPassMetadata.flightPassAmounts` (object)
    Fare breakdown for the flight pass booking.

  - `payload.totalFare.otherCoinage.otherCoinageMetadata.flightPassMetadata.flightPassAmounts.taxBreakdown` (array)
    Breakdown of taxes by code (e.g. GST_HST, QST, OTHER).

  - `payload.totalFare.otherCoinage.otherCoinageMetadata.flightPassMetadata.flightPassAmounts.taxBreakdown.code` (string)
    Tax code identifier (e.g. GST_HST, QST, OTHER).
    Example: GST_HST

  - `payload.totalFareAmount` (object)
    Fare amount including base fare and tax.

  - `payload.totalFareAmount.taxBreakdown` (array)

  - `payload.totalFareAmount.taxBreakdown.taxCode` (string)
    Tax code
    Example: VAT

  - `payload.totalFareAmount.taxBreakdown.percentage` (number)
    Tax amount to total amount
    Example: 9

  - `payload.totalFareAmount.taxBreakdown.description` (string)
    Tax name or Tax Description
    Example: AIR TRAVELLERS SECURITY CHARGE

  - `payload.additionalFareAmounts` (array)
    Additional fare amounts of the PNR defining components like flight pass additional amount, change fee etc.

  - `payload.additionalFareAmounts.type` (string, required)
    Type of additional fare amount
    Enum: "TYPE_UNKNOWN", "FLIGHT_PASS_AMOUNT", "CHANGE_FEE", "CANCELLATION_FEE", "PENALTY", "AIRLINE_FEE", "SEAT", "BAGGAGE"

  - `payload.additionalFareAmounts.isIncludedInFareAmount` (boolean)
    Whether this additional fare amount is included in the ticket fare or not
    Example: false

  - `payload.invoiceInfos` (array)
    Invoice related information for the PNR

  - `payload.invoiceInfos.invoiceNumber` (string, required)
    The invoice number for an invoice
    Example: SPOT-0001

  - `payload.invoiceInfos.invoiceId` (string, required)
    Unique ID of the invoice.
    Example: 2a5c0a73-1306-47f2-8210-7dfc812f4d0e

  - `payload.invoiceInfos.productType` (string, required)
    Type of product being invoiced
    Enum: "PNR", "SERVICE_FEE"

  - `payload.invoiceData` (array)
    Buyer and seller invoice information for this PNR

  - `payload.invoiceData.type` (string)
    The type of entity this buyer/seller info is associated with
    Enum: "PNR"

  - `payload.invoiceData.buyer` (object)
    Buyer of items mentioned in the invoice.

  - `payload.invoiceData.buyer.name` (string, required)
    Name of buyer, usually a traveler.
    Example: John Doe

  - `payload.invoiceData.buyer.address` (string, required)
    Address of buyer. Could be office, legal entity or org address.
    Example: 115 Broadway Suite 04-101,
New York, NY 10006

  - `payload.invoiceData.buyer.idInfo` (array)
    The seller ID information.

  - `payload.invoiceData.buyer.idInfo.idType` (string, required)
    The type of Id.
    Enum: "TAX_ID", "VAT_ID", "VAT_REG_NO", "GST_NO", "ABN", "GSTIN", "SIRET", "BUSINESS_REG_NO", "UID", "CVR_NO", "EIN"

  - `payload.invoiceData.buyer.idInfo.value` (string, required)
    Value of the Id.
    Example: TXG239023092

  - `payload.invoiceData.seller` (object)
    Entity that sold the items mentioned in the invoice.

  - `payload.invoiceData.seller.name` (string, required)
    Name of seller, usually a TMC Legal Entity.
    Example: Spotnana India Pvt. Ltd.

  - `payload.invoiceData.seller.address` (string, required)
    Address of seller.
    Example: 115 Broadway Suite 04-101,
New York, NY 10006

  - `payload.invoiceData.seller.idInfo` (array)
    The seller ID information.

  - `payload.customFieldsV3Responses` (array)
    List of all the Custom Fields responses associated with this Pnr.

  - `payload.customFieldsV3Responses.entity` (object, required)
    The entity.

  - `payload.customFieldsV3Responses.entity.type` (string, required)
    The type at which the field will be stored.
    Enum: "PNR", "TICKET"

  - `payload.customFieldsV3Responses.entity.id` (string, required)
    Identifier of the entity

  - `payload.customFieldsV3Responses.selectedResponses` (array, required)
    The list of responses that are selected by user or auto populated.

  - `payload.customFieldsV3Responses.selectedResponses.fieldId` (string, required)
    Custom field id

  - `payload.customFieldsV3Responses.selectedResponses.fieldName` (string)
    Name of the custom field

  - `payload.customFieldsV3Responses.selectedResponses.selectedOptions` (array, required)
    The list of options that are selected by user or auto populated.

  - `payload.customFieldsV3Responses.selectedResponses.selectedOptions.name` (string, required)
    Value of the selection

  - `payload.customFieldsV3Responses.selectedResponses.selectedOptions.additionalUserInput` (string)
    Additional user input

  - `timestamp` (string)
    Timestamp when the event was published

  - `audience` (object)
    Audience for whom this webhook payload is intended

  - `audience.organizationId` (string)
    Organization ID

  - `audience.contractingTmcId` (string)
    Contracting TMC ID

  - `audience.bookingTmcId` (string)
    Booking TMC ID

  - `payloadMetadata` (object)
    Metadata about the webhook payload processing

  - `payloadMetadata.piiMaskingStatus` (string)
    PII masking status for the payload. APPLIED if PII fields were masked, PARTIAL if masking encountered an error and some fields may be unmasked. Absent when no masking was requested.
    Enum: "APPLIED", "PARTIAL"

## Response 200:

  - `200` (unknown)
    OK

