v1

latestOpenAPI 3.0.12026-07-247756110.6 KB
Orders

List a buyer's orders

Get a list of trip orders for a buyer

get/trips/{trip_uuid}/bookings/{buyer_id}

Path parameters

trip_uuidstring required

Trip Uuid

buyer_idstring required

Id of the buyer

Query parameters

departure_datestring date

Departure date

Response

Get a list of trip orders for a buyer

buyer_idinteger

Unique ID of the buyer

Example response

{
  "buyer_id": 1,
  "buyer": {
    "email": "john+doe@wetravel.com",
    "first_name": "John",
    "last_name": "Doe"
  },
  "orders": [
    {
      "paid_amount": 200000,
      "refunded_amount": 100000,
      "total_amount": 100000,
      "buyer_id": 1,
      "trip_length": 8,
      "departure_date": "2021-08-14T00:00:00.000Z",
      "currency": "EUR",
      "overpaid_amount": 100000,
      "already_paid": 200000,
      "has_payment_plan": true,
      "allow_partial_payment": true,
      "active_participants_count": 1,
      "created_at": "2021-07-30T09:55:46.000Z",
      "esign_document": {
        "document_id": 3126680263958200300,
        "signed_at": "2021-07-30T09:55:46.000Z"
      },
      "options": [
        {
          "trip_option_id": "2354579505229986943",
          "price": 100000,
          "name": "Gold package",
          "type": "package",
          "active_count": 1,
          "deposit_amount": 5000,
          "has_deposit": true,
          "participants": [
            {
              "email": "max.smith@wetravel.com",
              "first_name": "Max",
              "last_name": "Smith"
            }
          ]
        }
      ],
      "donations": [
        {
          "price": 100000,
          "name": "Carbon Offset",
          "type": "Carbon Offset",
          "active_count": 1,
          "amount": 5000
        }
      ],
      "installments": [
        {
          "type": "installment",
          "total": 5000,
          "previous_payment": 5000,
          "paid": true,
          "date": "2021-06-25T00:00:00.000Z"
        }
      ]
    }
  ]
}