> ## Documentation Index
> Fetch the complete documentation index at: https://mcp.theoryofevolution.com.au/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit an Order

> Submit an order with products, customers, and booking details.

## Custom booking fields (optionalFields)

Many products define custom booking fields the supplier needs at check-in — driver note, mobile number, flight number, accommodation, dietary requirements, age, and similar. Discover the fields for a fareprice via [`GET /apiv1/bookingdetails/{productPricesDetailsId}`](#get-apiv1bookingdetails-productpricesdetailsid); each entry returns an `optionalFieldId`, `title`, `type`, and `mandatory` flag.

Submit the customer's answers on `redeemer.products.bookings.optionalFields` as `{ optionalFieldId, fieldText }`:

```json
"optionalFields": [
  { "optionalFieldId": 811109, "fieldText": "2:35" },
  { "optionalFieldId": "MobilePhone", "fieldText": "0412 000 000" }
]
```

> **The value key must be `fieldText`.** TDMS silently ignores unknown keys such as `fieldValue` or `optionalFieldValue` — the order still succeeds, but the booking arrives at the supplier with an empty `additionalFields` array and the operator never sees the customer's answer. If a booking is reaching the supplier with no custom field data, inspect the outbound payload and confirm the key name first.



## OpenAPI

````yaml /openapi/agent-reseller-api.mintlify.json post /apiv1/order
openapi: 3.0.0
info:
  title: TravelDesk Agent API
  contact:
    name: API Support
    email: api@websitetravel.com
  version: '1.0'
  description: >-
    TravelDesk Agent (Reseller) API.


    ## Rate limiting


    The quota is applied **per Agent Branch key** — the per-branch client
    id/secret pair — not per account, per host, or per integration. Standard
    branches get **200 calls per minute**; upgraded branches get **900**. That
    budget is shared across everything the branch does: availability refreshes,
    background sweeps, customer-facing pricing, and quote or booking creation.


    Two consequences worth designing around:


    - A background sweep can starve customer-facing traffic for the same branch.
    Give live requests priority over refresh work, and cap the concurrency of
    any bulk job.

    - Cooldowns after a `429` must be keyed per branch. Keying them by host
    throttles every branch at once, because they all share
    `tdms.websitetravel.com`.


    Prefer endpoints that answer for a whole product in one request —
    `/apiv1/checkAvailabilityProduct` over one `/apiv1/checkavailabilityrange`
    call per fareprice — since the saving is measured against this quota.


    ## Dates


    Most endpoints take and return `DD-MON-YYYY` (`29-JUL-2026`).
    `/apiv1/checkAvailabilityProduct` returns ISO `YYYY-MM-DD` keys in `dates`.
    Parse both.


    ## Pricing


    Accommodation is dynamically priced — rates move between individual dates,
    not just between seasons — so never cache one rate per fareprice and reuse
    it across a range. Nett tracks RRP at a fixed commission ratio per
    fareprice, because changing commission requires a new
    `productPricesDetailsId`; that makes nett safe to derive from RRP rather
    than store.
servers:
  - url: https://tdms.websitetravel.com
    description: Production Server
  - url: https://tdmstest03.websitetravel.com
    description: Test Server
  - url: http://tdms.localhost
    description: Development Server
security: []
tags:
  - name: Authentication
  - name: Products
  - name: Availability and Pricing - Booking system based Live Availability
  - name: Availability and Pricing - Siteminder Live Availability
  - name: Availability and Pricing - Cached Availability and Live pricing
  - name: Availability and Pricing - Package Availability
  - name: Availability and Pricing - Check Availability via mail to supplier
  - name: Order Placement
  - name: Post Order Management
  - name: Accommodation
  - name: Reports
paths:
  /apiv1/order:
    post:
      tags:
        - Order Placement
      summary: Submit an Order
      description: >-
        Submit an order with products, customers, and booking details.


        ## Custom booking fields (optionalFields)


        Many products define custom booking fields the supplier needs at
        check-in — driver note, mobile number, flight number, accommodation,
        dietary requirements, age, and similar. Discover the fields for a
        fareprice via [`GET
        /apiv1/bookingdetails/{productPricesDetailsId}`](#get-apiv1bookingdetails-productpricesdetailsid);
        each entry returns an `optionalFieldId`, `title`, `type`, and
        `mandatory` flag.


        Submit the customer's answers on
        `redeemer.products.bookings.optionalFields` as `{ optionalFieldId,
        fieldText }`:


        ```json

        "optionalFields": [
          { "optionalFieldId": 811109, "fieldText": "2:35" },
          { "optionalFieldId": "MobilePhone", "fieldText": "0412 000 000" }
        ]

        ```


        > **The value key must be `fieldText`.** TDMS silently ignores unknown
        keys such as `fieldValue` or `optionalFieldValue` — the order still
        succeeds, but the booking arrives at the supplier with an empty
        `additionalFields` array and the operator never sees the customer's
        answer. If a booking is reaching the supplier with no custom field data,
        inspect the outbound payload and confirm the key name first.
      operationId: step5_submitOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                bookingReference:
                  description: >-
                    If no booking reference is supplied (by calling `POST
                    /apiv1/bookingreference` prior), then, one will be created.
                  type: string
                agentReference:
                  type: string
                paymentMethod:
                  type: string
                emailVouchers:
                  type: boolean
                totalCharged:
                  type: number
                  format: float
                creditCardFee:
                  type: number
                  format: float
                processAsQuote:
                  type: boolean
                referralSourceId:
                  type: integer
                products:
                  type: array
                  items:
                    properties:
                      productPricesDetailsId:
                        type: integer
                      qty:
                        type: integer
                      packageId:
                        type: integer
                      apiProviderId:
                        type: integer
                      datePriceCacheId:
                        type: integer
                      priceOverRidden:
                        type: boolean
                        description: >-
                          **When `true`, both `discountClaimReason` and
                          `staffContactName` are required.** Sending
                          `priceOverRidden` without them makes `POST
                          /apiv1/order` fail with HTTP 500 and no field-level
                          detail. `POST /apiv1/validateCart` accepts the same
                          body, so the problem does not appear until the order
                          is submitted.
                      agentRRP:
                        type: number
                        format: float
                      adjustedAgentNR:
                        type: number
                        format: float
                      discountClaimReason:
                        type: string
                        description: >-
                          **Required when `priceOverRidden` is `true`.** See
                          [Override a price on an
                          order](/api-reference/agent-reseller-price-overrides).
                      staffContactName:
                        type: string
                        description: >-
                          **Required when `priceOverRidden` is `true`.** See
                          [Override a price on an
                          order](/api-reference/agent-reseller-price-overrides).
                      rateDetails:
                        type: array
                        items:
                          properties:
                            commissionable:
                              type: boolean
                            gross:
                              type: number
                              format: float
                            net:
                              type: number
                              format: float
                            datePriceCacheId:
                              type: integer
                            allocatedRevenueGroup:
                              type: string
                            name:
                              type: string
                          type: object
                    type: object
                payments:
                  type: array
                  items:
                    properties:
                      amount:
                        type: number
                        format: float
                      journalAccountId:
                        type: integer
                      paymentMethod:
                        type: string
                      reference:
                        type: string
                    type: object
                redeemers:
                  type: array
                  items:
                    properties:
                      emailAddress:
                        type: string
                      firstName:
                        type: string
                      lastName:
                        type: string
                      phone:
                        type: string
                      redeemerCountry:
                        type: integer
                      dateOfBirth:
                        type: string
                        format: date
                      title:
                        type: string
                      products:
                        type: array
                        items:
                          properties:
                            productPricesDetailsId:
                              type: integer
                            redeemerQty:
                              type: integer
                            bookWithFirstRedeemer:
                              type: boolean
                            bookings:
                              type: array
                              items:
                                properties:
                                  bookingComment:
                                    type: string
                                  travelDate:
                                    type: string
                                  datePriceCacheId:
                                    type: integer
                                  timeId:
                                    type: string
                                  pickupId:
                                    type: string
                                  commences:
                                    type: string
                                  pickupTime:
                                    type: string
                                  pickupLocation:
                                    type: string
                                  dropoffId:
                                    type: string
                                  dropoffLocation:
                                    type: string
                                  dropoffTime:
                                    type: string
                                  bookingDetailsComment:
                                    type: string
                                  optionalFields:
                                    description: >-
                                      Custom booking field answers for this
                                      redeemer and product. Discover the
                                      available fields via GET
                                      /apiv1/bookingdetails/{productPricesDetailsId}.
                                      Each item must be {optionalFieldId,
                                      fieldText}. TDMS silently ignores unknown
                                      value keys such as fieldValue or
                                      optionalFieldValue — using the wrong key
                                      means the order still succeeds but the
                                      booking arrives with additionalFields
                                      empty on the supplier side.
                                    type: array
                                    items:
                                      properties:
                                        optionalFieldId:
                                          type: integer
                                          description: >-
                                            Optional field ID returned by GET
                                            /apiv1/bookingdetails/{productPricesDetailsId}.
                                        fieldText:
                                          type: string
                                          description: >-
                                            Value for the optional field, such as a
                                            mobile number, flight number,
                                            accommodation name, arrival time, or
                                            driver note.
                                      type: object
                                type: object
                          type: object
                    type: object
              type: object
      responses:
        '200':
          description: Order successfully created or quote generated
          content:
            application/json:
              schema:
                properties:
                  id:
                    description: ID of the created Order
                    type: integer
                  hasCreditCardPayment:
                    description: Indicates if order has credit card payment
                    type: boolean
                  eBookings:
                    description: eBookings object with booking results
                    type: object
                  vouchers:
                    description: Vouchers object with PDF/HTML URLs
                    type: object
                  messages:
                    description: Array of non-critical advisory messages
                    type: array
                    items:
                      type: string
                  bookingReference:
                    description: Booking reference for the order
                    type: string
                  quoteUrl:
                    description: Quote URL (only for quotes)
                    type: string
                type: object
        '400':
          description: Returned when there is an issue with the data provided.
        '403':
          description: Returned when the user is not authorized.
        '404':
          description: >-
            Returned when there is no match for the bookingReference id
            supplied.
        '409':
          description: >-
            Returned when the bookingReference id has already been used or is
            related to an order that is currently being processed.
        '500':
          description: Returned when fatal order processing issues are encountered.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.