Orders

Set custom prices for multiple orders

Set custom price for array of orders (if there is a payment plan for this order, the amounts of its payments will be adjusted automatically)

put/orders/batch/set_custom_price

Request

  • Base URL
    https://api.wetravel.com/v2/bookings
  • URL
    https://api.wetravel.com/v2/bookings/orders/batch/set_custom_price
  • Auth
    HTTP bearer

Request body

Example request

{
  "batches": [
    {
      "order_id": "1476668027184349184",
      "option_id": 1476668027184349200,
      "price": 100000,
      "notification_message": "Hello, this is a notification message"
    }
  ]
}

Response

Get Trip Order

successful_countinteger
failed_countinteger

Example response

{
  "successful_count": 1,
  "data": [
    {
      "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": "maksym+local@wetravel.com",
              "first_name": "Maks",
              "last_name": "Local",
              "survey": [
                {
                  "question_id": "1157591197",
                  "question": "T-Shirt size",
                  "type": "checkbox",
                  "answers": [
                    "L"
                  ],
                  "files": [
                    {
                      "handle": "4d9uMXxpRpqcDVA8mUMk",
                      "filename": "Id.png",
                      "url": "https://cdn.filestackcontent.com/1d9uMtxpapqcDVA8mlMk"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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"
        }
      ]
    }
  ]
}

Changes

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