Create an order item
POST /v2/orders/<orderRef>/orderItems
Creates an order item.
In the response, ref
contains the order item reference.
RequestResponse
curl -X POST '<baseURL>/v2/orders/0840ff0d-685a-41c8-8f29-4dd9fa2e3245/orderItems' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '{
"type": "FLIGHT",
"productId": "DUB-LAS",
"orderedAt": "2024-07-23T16:17:16.000Z",
"quantity": 1,
"price": 100.00,
"currencyCode": "EUR",
"originalPrice": 112.00,
"originalCurrencyCode": "USD",
"referenceId": "B94TXY-1",
"status": "PURCHASED",
"name": "Flight DUB-LAS",
"description": "Flight DUB-LAS",
"vendor": "unknown",
"channel": "WEB",
"language": "EN",
"passengerTypeCode": "ADT",
"flightSegments": [{
"id": "1234",
"origin": "DUB",
"destination": "LHR",
"originDestination": "DUB-LHR",
"departureDateTime": "2024-08-15T16:00:00.000Z",
"arrivalDateTime": "2024-08-15T17:30:00.000Z",
"fareClass": "Economy",
"fareFamily": "Plus",
"bookingClass": "Y",
"carrier": "BX",
"flightNumber": "459",
"operatingCarrier": "BX",
"operatingFlightNumber": "1459"
},
{
"id": "1235",
"origin": "LHR",
"destination": "LAS",
"originDestination": "LHR-LAS",
"departureDateTime": "2024-08-15T19:00:00.000Z",
"arrivalDateTime": "2024-08-15T21:30:00.000Z",
"fareClass": "Economy",
"fareFamily": "Plus",
"bookingClass": "Y",
"carrier": "BX",
"flightNumber": "460",
"operatingCarrier": "BX",
"operatingFlightNumber": "1460"
}]
}'
RequestResponse
{
"type": "FLIGHT",
"href": "<baseURL>/v2/orderItems/7737242c-1ec4-4644-b4be-ca8a3882fba9",
"ref": "7737242c-1ec4-4644-b4be-ca8a3882fba9",
"order": {
"href": "<baseURL>/v2/orders/0840ff0d-685a-41c8-8f29-4dd9fa2e3245"
},
"createdAt": "2024-11-08T22:00:37.075Z",
"modifiedAt": "2024-11-08T22:00:37.075Z",
"orderedAt": "2024-07-15T16:00:00.000Z",
"productId": "DUB-LAS",
"price": 100,
"currencyCode": "EUR",
"originalPrice": 112,
"originalCurrencyCode": "USD",
"referenceId": "B94TXY-1",
"vendor": "unknown",
"status": "PURCHASED",
"language": "EN",
"name": "Flight DUB-LAS",
"description": "Flight DUB-LAS",
"quantity": 1,
"channel": "WEB",
"flightSegments": [
{
"id": "1234",
"origin": "DUB",
"destination": "LHR",
"departureDateTime": "2024-08-15T16:00:00.000Z",
"arrivalDateTime": "2024-08-15T17:30:00.000Z",
"flightNumber": "459",
"fareClass": "Economy",
"fareFamily": "Plus",
"carrier": "BX",
"originDestination": "DUB-LHR",
"bookingClass": "Y",
"operatingCarrier": "BX"
},
{
"id": "1235",
"origin": "LHR",
"destination": "LAS",
"departureDateTime": "2024-08-15T19:00:00.000Z",
"arrivalDateTime": "2024-08-15T21:30:00.000Z",
"flightNumber": "460",
"fareClass": "Economy",
"fareFamily": "Plus",
"carrier": "BX",
"originDestination": "LHR-LAS",
"bookingClass": "Y",
"operatingCarrier": "BX"
}
],
"passengerTypeCode": "ADT",
"consumerTypeCode": "ADT",
"sku": "DUB-LAS"
}