Order Items

Create Order Item

POST https://api.vidi.cc/api/v2/orders/2924/order_items

This endpoint allows you to create order items. Example: { "order_item": { "variant_id": 1, "price_cents": 2000, "date": "2018-09-14", "age_bands": [ { "age_band_id": 1, "count": 3 }, { "age_band_id": 2, "count": 1 } ] } }

Path Parameters

Name
Type
Description

order_id

number

ID of the order

Headers

Name
Type
Description

Authentication

string

Authentication token to track down who is emptying our stocks

Request Body

Name
Type
Description

date

string

e.g "2018-09-14"

order_item

object

Root object

variant_id

integer

price_cents

integer

age_bands

array

{
  "data": {
    "id": "68",
    "type": "order_item",
    "attributes": {
      "id": 68,
      "date": "2018-09-14",
      "price_groups": [
        {
          "age_band_id": 1,
          "count": 2
        },
        {
          "age_band_id": 2,
          "count": 2
        }
      ],
      "contact_detail": {},
      "price": {
        "in_subunit": "2000",
        "in_unit": "20.00",
        "in_format": "$20.00",
        "currency_id": "usd",
        "currency_disambiguate_symbol": "US$",
        "currency_exponent": 2
      }
    }
  }
}

Update Order Item

PATCH https://api.vidi.cc/api/v2/orders/:order_id/order_items/:id

Update an order item. Example: { "order_item": { "variant_id": 1, "price_cents": 0, "date": "2018-09-14", "age_bands": [ { "age_band_id": 1, "count": 2 }, { "age_band_id": 2, "count": 1 } ], "contact_detail": { "first_name": "John", "last_name": "Doe", "country_code": "+60", "phone_number": "123456789", "email": "[email protected]" }, "booking_answers": [ { "booking_question_id": 1, "answer": "My Answer" } ], "pickup_location": "My backyard", "pax_information": [ { "first_name": "John", "last_name": "Doe", "age_band_id": 1, "lead_traveller": true }, { "first_name": "Trim", "last_name": "Coop", "age_band_id": 3, "lead_traveller": false } ] } }

Path Parameters

Name
Type
Description

order_id

string

id

integer

ID of Order Item

Request Body

Name
Type
Description

pax_information

array

phone_number

string

e.g "1234567"

country_code

string

e.g "+60"

pickup_location

string

booking_answers

array

date

string

e.g "2018-09-14"

variant_id

integer

price_cents

integer

age_bands

array

contact_detail

object

Root key for Contact Detail

Last updated