Pricing & booking

Create and manage a trip: add or remove items and set travelers

Creates or edits a trip without starting pricing. A new item has no price until it is successfully quoted. Call POST /v1/checkout to start pricing and wait for a checkout result. Polling GET /v1/trip/{trip_id} after creation does not start pricing.

post/v1/trip

Request

  • Base URL
    https://api.gojinko.com
  • URL
    https://api.gojinko.com/v1/trip
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Request body

trip_idstring
hotel_room_guestsHotelRoomGuests

Optional primary adult room-contact overrides keyed by the returned hotel item_id/product_id. Each product array is non-empty and occupancy_number values are unique positive room slots; omitted slots use persisted adult travelers in order with the trip contact email. The trip must already exist because the keys refer to its items.

Example request

{
  "trip_id": "trip_1048576",
  "add_item": {
    "trip_item_token": "htl_2d67a7441c60e5de",
    "special_requests": [
      "Expected arrival around 11:30 PM.",
      "A quiet room on a high floor, if available."
    ]
  }
}

Response

The trip

trip_idstring required
status'draft' | 'quoting' | 'quoted' | 'fulfillment_prepared' | 'fulfilling' | 'fulfilled' | 'partially_fulfilled' | 'failed' | 'cancelled' | 'expired'

Where the trip is in its lifecycle, as one value for the whole trip. The booking’s progress after payment is booking_state (GET /v1/trip/{trip_id}); the four booking values below (fulfilling, fulfilled, partially_fulfilled, failed) are deprecated in favour of it and still sent. draft: being built or priced, nothing paid. fulfilling: payment was submitted and booking started. Then exactly one outcome: fulfilled (booking_state completed), partially_fulfilled (partial) or failed (failed). cancelled: replaced by a new trip when it was re-shopped. expired is the 24-hour lapse: it is evaluated LAZILY, on the read that first observes it, so this call is where a dead trip becomes visible. Once a trip is expired, adding items, setting travelers and checkout are refused with TRIP_EXPIRED; any other state that refuses a write answers TRIP_STATE_CONFLICT and names the state here. Start a new trip — a lapsed one cannot be revived. quoting, quoted and fulfillment_prepared are reserved and not currently set; quote progress is in quote.status.

actions_performedstring[]
hotel_room_guestsHotelRoomGuests

Optional primary adult room-contact overrides keyed by the returned hotel item_id/product_id. Each product array is non-empty and occupancy_number values are unique positive room slots; omitted slots use persisted adult travelers in order with the trip contact email. The trip must already exist because the keys refer to its items.

Example response

{
  "trip_id": "trip_1048576",
  "status": "draft",
  "actions_performed": [
    "created",
    "add_item"
  ],
  "items": [
    {
      "item_id": "itm_4b91c2",
      "kind": "flight",
      "type": "flight",
      "offer_id": "htl_2d67a7441c60e5de",
      "trip_item_token": "of_9c1d2e:FARE_ABC",
      "hotel_id": "lp1f2c3",
      "booking_scope": "room_bundle",
      "num_rooms": 1,
      "rooms": [
        {
          "occupancy_number": 1,
          "room_name": "Superior Double",
          "board_type": "BB",
          "board_name": "Breakfast Included",
          "taxes_and_fees": [
            {
              "amount": 164.49,
              "currency": "EUR",
              "amount_money": {
                "value": 41250,
                "currency": "USD",
                "decimal_places": 2,
                "display": "USD 412.50"
              },
              "description": "19, VAT National taxes on accommodation",
              "included": true,
              "display": "EUR 164.49"
            }
          ],
          "policies": [
            {
              "fee_amount_money": {
                "value": 41250,
                "currency": "USD",
                "decimal_places": 2,
                "display": "USD 412.50"
              }
            }
          ],
          "cancellation_policy": [
            {
              "cancel_time": "2026-08-18T10:00:00+02:00",
              "amount": 606.13,
              "currency": "EUR",
              "type": "amount",
              "display": "EUR 606.13",
              "amount_money": {
                "value": 41250,
                "currency": "USD",
                "decimal_places": 2,
                "display": "USD 412.50"
              },
              "percent": 50,
              "nights": 1
            }
          ],
          "payment_types": [
            "pay_now"
          ]
        }
      ],
      "price": 545.55,
      "currency": "EUR",
      "price_display": "EUR 545.55",
      "price_money": {
        "value": 41250,
        "currency": "USD",
        "decimal_places": 2,
        "display": "USD 412.50"
      }
    }
  ],
  "travelers": [
    {
      "traveler_ref": "pax_1",
      "pax_ref_id": "pax_1",
      "first_name": "John",
      "last_name": "Doe",
      "date_of_birth": "1990-01-15",
      "gender": "MALE",
      "traveler_type": "adult",
      "passenger_type": "ADULT",
      "identity_documents": {
        "passport": {
          "status": "saved",
          "invalid_fields": [
            "passport_expiry"
          ]
        },
        "known_traveler_number": {
          "status": "saved",
          "invalid_fields": [
            "passport_expiry"
          ]
        },
        "redress_number": {
          "status": "saved",
          "invalid_fields": [
            "passport_expiry"
          ]
        }
      }
    }
  ],
  "totals": {
    "currency": "USD",
    "total": 318.4
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.