创建订单
Atlas API 创建订单端点参考,用于提交旅客、联系人和附加服务数据以建立待支付订单。
使用此端点在验证后创建预订。
它使用当前的 sessionId,并返回 pay.do 和订单后续操作使用的 orderNo。
联程航班的行李
Atlas 可能按航段返回行李选项。
对于同一方向的联程航班,请在所有连接的航段上保持行李选择一致。
如果去程连接航段使用不同的行李选择,或回程连接航段使用不同的行李选择,订单创建可能失败并返回 307。
去程和回程仍可使用不同的行李选择。
使用验证作为 bookingRequirement 和当前 sessionId 的权威来源。
OTA 随单行李加购
OTA 可在创建机票订单时传入已售行李。
在请求体根级增加可选的 passengerBaggages 数组。
不传该字段时,订单按标准流程处理。
Atlas 使用 OTA 传入的规格和售价创建订单。
Atlas 不会用内部行李报价替换这些值。
字段结构
passengerBaggages 按乘机人、航段和行李规格嵌套:
passengerName:订单中的乘机人姓名。baggages[].flight:航班号。Atlas 仅使用此字段匹配航段。baggages[].baggagePrices:该航段的行李规格与 OTA 售价。
bookSalePrice
Decimal
是
OTA 向旅客收取的当前航段行李价格。
bookSaleCurrency
String
是
售价币种,例如 USD。
pkgNumber
Integer
是
计重制传 -1。计件制传正整数。不要传 0。
weight
Integer
是
收费行李总重量,单位为 kg。
baggageType
Integer
否
0 为托运行李,也是默认值。1 为手提行李。
cabin、depTime、fromAirport 和 toAirport 为兼容字段。
它们不参与航段匹配或校验。
请求示例
航司校验与确认
航司在履约时校验实际可购买的行李规格与价格。
航司实际价格不高于 OTA 售价时,Atlas 自动加购并出票。
309 表示该 OTA 随单行李规格不符合航司要求。
3011 表示航司实际价格高于 OTA 售价。
收到 3011 后,请在 30 分钟内取消订单或确认亏出。
可调用 POST /confirmBaggageLoss.do,并传入 orderNo 完成确认。
超时未确认的订单会自动取消。
请参阅 OTA 随单行李加购,了解通知、结算和完整确认流程。
Dependency: Verify function should be called in prior to this call.
The booking requirements need to be read from the "bookingRequirement" array in the "verify.do" response. The "Booking Requirements" can be different at the route level. Alternatively, you can add all the details but please note that all the fields should have actual data and not fictitious information. Please follow this approach.
Endpoint: https://sandbox.atriptech.com/order.do
OTA Baggage: Optionally provide passengerBaggages when the client has already sold baggage to the passenger. Atlas uses the submitted baggage specification and sale price for fulfillment; it does not replace the request with an internal Atlas baggage product.
The baggage is matched to the booked passenger by passengerName and to the flight segment by flight. Do not submit OTA baggage when one order contains multiple segments with the same flight number.
application/jsonapplication/jsongzip<YOUR_CLIENT_ID><YOUR_CLIENT_SECRET>sessionIdreturned by verify response. If you got offer by verify api, then this parameter is required.
offerIDreturned by get offer response. If you got offer by "get offer" api, then this parameter is required.
The tag denoting whether to use Atlas email id for contact information.
true: Use Atlas email as contact email.false: It is determined according to the strategy agreed upon with the customer or the default strategy of the system.
Please refer to the terms and conditions for usage of Atlas email.
falseThe tag to identify which channel does this traffic come from. For example: SkyScanner,Google,Oganic search,etc…
Configuration of ordering when the seat is occupied.
- SIMILAR_SEAT: Select a similar seat automatically
- STOP_SEAT: Stop seat and continue ticketing
- STOP_TICKET: Stop ticketing and cancel the order
The default value is
SIMILAR_SEAT.
The country and language environment preferences of the ticket purchaser/contact person. This information may be useful for certain airlines. For example, airlines will use this information to communicate with users in appropriate languages (e.g., via emails). We have prepared the language environments supported by each airline for your reference: Locale
- 301: Session does not exist or timed out. Description: The "sessionID" has a validity of 2 hrs. If the “sessionID” is used after this time period, then this error is displayed
- 302: The target flight is no longer available. Description: In the period between verify and book, the flight has been sold out. This can also be due to the number of passengers booked. The number of pax when booking and the number of pax when verifying may be different. When create a booking, the price is verified based on the actual number of pax booked
- 303: Airline closed. Description: Airline has either ceased to exist or not operational.
- 304: Verify failed. Description: In some uncontrollable situations, such as network issues, upgrades, and restarts, 304 error may occur, but not many. If there are many 304 errors, it is possible that the airline is not available or some technical issue at Atlas' end. Contact your account manager if this error keeps on repeating.
- 305: Invalid routing. Description: When generating an order, the system found that the flight was no longer sold for various reasons, such as 1) L2B 2) The system has identified that there may be a risk of the flight being sold out 3) The airline's sales have been closed
- 307: Illegal booking request parameters. Description: Some request parameters have problem. Please check the message.
- 308: Price changed. Description: The price has changed between the price verification and order. Please verify the price again and generate the order.
- 309: Ancillary not found. Description: Incorrect ancillary product code has been entered. Check and enter the correct ancillary product code.
- 310: Infant not allowed. Description: The offer does not support infant. Create a new booking without infant passenger type.
- 312: Too many seats booked. Description: The number of pax booked exceeds the remaining (or allowed) seats on the current flight.
- 313: Fare family sold out. Description: Selected offer is no longer available. Conduct the search again and rebook.
- 315: Not enough seats. Description: Seats have been sold out
- 316: Timed out. Description: There is a time-out error at the airline’s end
- 317: Booking unsuccessful with Airline. Description: An error has happened at the airline’s end.
- 318: Check if a booking with the same passenger details and flight numbers exists. After confirming, ignore this booking.
- 319: Flight information has changed. Description: Re-verify the price (query the latest flight information) and generate the order.
- 320: The requested seats were not found or they are already occupied. Description: Rebook seats and submit a new order.
- 321:
- 322: Seat price changed. Description: Seat price changed. Re-query the seat map and select seats
- 323: The format of the e-mail in the contact information is incorrect
- 324: Airline system issues. Description: Retry after some time. If the issue persists, please contact our operations team.
- 325: The airline has deemed the passenger unserviceable
- 326: Your account balance on the airline side is insufficient(BYOA scenario)
- 327: Passenger information does not meet the requirements. Description: Check and correct the passenger information according to the error message
- 328: Selected seat is no longer available. Description: The selected seat has been occupied.
- 329: No payment method is available. Description: No payment method is available. Please check whether the quotation currency or account configuration is correct.
- 330: operation is in progress. Description: operation is in progress
- 407: Some mandatory element for the passenger has not been submitted.. Description: Check the information and correct the same and resubmit.
- 408: Passenger can not board alone. Description: Create a new order and add an adult passenger with the child passenger
- 409: Additional baggage does not match the flight segment. Description: Luggage purchased for each segment of a connecting flight must be the same.
- 410: The contact information is not in the correct format.. Description: Check the contact information and confirm that it matches the required format.
It serves as an additional description of the response result. Especially when the interface reports an error (status !=0), it is usually a human-readable error message. Note: Do not use this field in any programming scenarios. For example, do not judge whether the interface responds successfully based on this field. Instead, you should only determine it by checking whether the status is equal to0at any time.
Echo thesessionIdin the request parameters.
Echo theofferIdin the request parameters.
Order number of the created order.
The pnrCode is the single reference for the booking. This is the Atlas PNR, not airline's.
Total price(not including service fee) of this order in the currency TheAtlas settled with you
Total technical fees for this order in the currency TheAtlas settled with you.
The currency TheAtlas settled with you.
Total price of this order in the vendor's currency, reference for you to generate the specific credit card.
Vendor's currency.
Payment deadline for this order. This time will be displayed in SGT (GMT +8). The fromat is:yyyy-MM-dd HH:mm:ss.
If the api returns error code318(duplicate booking), then the list will contain duplicate order numbers.
POST /order.do HTTP/1.1
Accept: text
Accept-Encoding: text
x-atlas-client-id: text
x-atlas-client-secret: text
Content-Type: application/json
Content-Length: 633
{
"sessionId": "a39fc063-3192-4058-b179-998ebfb2fed8",
"offerId": "",
"passengers": [
{
"name": "For/Test",
"passengerType": 0,
"gender": "M",
"birthday": "19900101",
"cardType": "PP",
"cardNum": "636940383",
"cardIssuePlace": "PT",
"cardExpired": "20250101",
"nationality": "US",
"ffpCardNo": null,
"ffpCarrier": null,
"ancillaries": [
{
"productCode": "SCI_BAG_1PC_15KG",
"segmentIndex": 1
},
{
"productCode": "SCI_BAG_1PC_15KG",
"segmentIndex": 2
}
]
}
],
"contact": {
"name": "For/Test",
"address": "For test",
"postcode": "",
"email": "for-test@example.com",
"mobile": "0001-12345678900"
},
"useAtlasMailForContact": false,
"locale": "",
"requestSource": "",
"ifSeatOccupied": "",
"payment": null
}{
"status": 0,
"msg": null,
"sessionId": "a39fc063-3192-4058-b179-998ebfb2fed8",
"offerId": "",
"orderNo": "TESTA20250816160804096",
"pnrCode": "MDQZ7U",
"totalPrice": 300.35,
"totalTransactionFee": 2,
"currency": "USD",
"vendorTotalPrice": 221.19,
"vendorCurrency": "GBP",
"tktLimitTime": "2025-08-16 16:58:04",
"paxTicketInfos": [
{
"name": "For/Test",
"passengerType": 0,
"birthday": "19900101",
"gender": "M",
"cardNum": "636940383",
"cardType": "NATIONAL_ID_CARD",
"cardIssuePlace": "PT",
"cardExpired": "20250101",
"nationality": "US",
"ticketNos": [],
"airlinePNRs": [],
"contactEmails": [
"for-test@example.com"
],
"contactPhones": [
"0001-12345678900"
],
"ancillaries": [
{
"productCode": "SCI_BAG_1PC_15KG",
"segmentIndex": 1,
"currency": "USD",
"ancillaryPrice": 27.12,
"auxBaggageElement": {
"piece": 1,
"weight": 15,
"isAllWeight": true,
"size": ""
},
"vendorPrice": null,
"vendorCurrency": null
},
{
"productCode": "SCI_BAG_1PC_15KG",
"segmentIndex": 2,
"currency": "USD",
"ancillaryPrice": 31.09,
"auxBaggageElement": {
"piece": 1,
"weight": 15,
"isAllWeight": true,
"size": ""
},
"vendorPrice": null,
"vendorCurrency": null
}
]
}
],
"routing": {
"routingIdentifier": "TE9OX1BBUl8yXzIwMjUwODE4XzIwMjUwODIwXzFfMF8wfHR2aWluNjU0Mjh8MXwyNDIuMTRfMjQyLjE0XzY0LjE3XzIuMDBfNTUwLjQ1X1VTRHxMT05fUEFSXzFfMjAyNTA4MThfMjAyNTA4MjBfMV8wXzBeTEdXLVUyODQwNS0tQ0RHLTIwMjUwODE4MTY0MC0yMDI1MDgxODE4NTUtU3RhbmRhcmQtMS0jQ0RHLVUyODQxMC0tTEdXLTIwMjUwODIwMTkxMC0yMDI1MDgyMDE5MjAtU3RhbmRhcmQtMi1eMjQyLjE0XzI0Mi4xNF82NC4xN18yLjAwXzU1MC40NV5BRUNBRVVSX0FFQ15eQUVDMkxPTlBBUjIwMDIwMjUwODE4MjAyNTA4MjBeR0JQXjE3OC4zMl4xNzguMzJeNDcuMjVeMHwwfDIwMjUwODE2MTU1NzQ1fDB8MTc1NTMzMTA2NTU0MkJOYm1HfHx8fHwyLjAwfDN8MHx8bm9ybWFsfGZhbHNl.5FDcOQsu5zTUOBN/jPsM23gT5WuaPAs7g8AmH8q/m0U=",
"supportCreditTransPayment": "0",
"supportPaymentMethods": [
1,
5
],
"currency": "USD",
"adultPrice": 242.14,
"adultTax": 0,
"adultDetails": [
{
"code": "farePrice",
"type": "base",
"amount": 242.14,
"description": ""
},
{
"code": "tax",
"type": "tax",
"amount": 0,
"description": ""
}
],
"childPrice": 242.14,
"childTax": 0,
"childDetails": [
{
"code": "farePrice",
"type": "base",
"amount": 242.14,
"description": ""
},
{
"code": "tax",
"type": "tax",
"amount": 0,
"description": ""
}
],
"infantPrice": 64.17,
"infantTax": 0,
"infantDetails": [
{
"code": "farePrice",
"type": "base",
"amount": 64.17,
"description": ""
},
{
"code": "tax",
"type": "tax",
"amount": 0,
"description": ""
}
],
"infantAllowed": true,
"childMandatorySeatingFee": null,
"transactionFeePerPax": 2,
"transactionFee": 2,
"transactionFeeMode": "PER_PAX",
"fromSegments": [
{
"segmentIndex": 1,
"carrier": "U2",
"flightNumber": "U28405",
"depAirport": "LGW",
"depTime": "202508181640",
"arrAirport": "CDG",
"arrTime": "202508181855",
"stopCities": null,
"duration": 75,
"codeShare": false,
"cabin": "",
"cabinClass": 1,
"seatCount": 9,
"aircraftCode": "",
"depTerminal": "",
"arrTerminal": "",
"operatingCarrier": "",
"operatingFlightnumber": "",
"fareFamily": "Standard"
}
],
"retSegments": [
{
"segmentIndex": 2,
"carrier": "U2",
"flightNumber": "U28410",
"depAirport": "CDG",
"depTime": "202508201910",
"arrAirport": "LGW",
"arrTime": "202508201920",
"stopCities": null,
"duration": 70,
"codeShare": false,
"cabin": "",
"cabinClass": 1,
"seatCount": 9,
"aircraftCode": "",
"depTerminal": "",
"arrTerminal": "",
"operatingCarrier": "",
"operatingFlightnumber": "",
"fareFamily": "Standard"
}
],
"rule": {
"hasBaggage": 1,
"baggageElements": [
{
"segmentNo": 1,
"baggageType": "CabinBaggageUnderSeat",
"passengerType": 0,
"baggagePiece": 1,
"baggageWeight": 15,
"baggageSize": "45*36*20cm"
},
{
"segmentNo": 1,
"baggageType": "StandardCheckInBaggage",
"passengerType": 0,
"baggagePiece": 0,
"baggageWeight": 0,
"baggageSize": ""
},
{
"segmentNo": 2,
"baggageType": "CabinBaggageUnderSeat",
"passengerType": 0,
"baggagePiece": 1,
"baggageWeight": 15,
"baggageSize": "45*36*20cm"
},
{
"segmentNo": 2,
"baggageType": "StandardCheckInBaggage",
"passengerType": 0,
"baggagePiece": 0,
"baggageWeight": 0,
"baggageSize": ""
}
],
"refundRules": [
{
"refundType": 0,
"refundStatus": "T",
"refundMethod": "CASH_BACK_TO_ORIGINAL_PAYMENT",
"refundFee": 0,
"currency": "GBP",
"refNoshow": "T",
"refNoShowCondition": 0,
"refNoshowFee": 0,
"ruleDetailList": [
{
"status": "T",
"refundMethod": "CashBackToOriginalPayment",
"startMinute": 525600,
"endMinute": 0,
"amount": 0,
"currency": "GBP"
},
{
"status": "T",
"refundMethod": "CashBackToOriginalPayment",
"startMinute": 0,
"endMinute": -525600,
"amount": 0,
"currency": "GBP"
}
]
},
{
"refundType": 0,
"refundStatus": "T",
"refundMethod": "CASH_BACK_TO_ORIGINAL_PAYMENT",
"refundFee": 0,
"currency": "GBP",
"refNoshow": "T",
"refNoShowCondition": 0,
"refNoshowFee": 0,
"ruleDetailList": [
{
"status": "T",
"refundMethod": "CashBackToOriginalPayment",
"startMinute": 525600,
"endMinute": 0,
"amount": 0,
"currency": "GBP"
},
{
"status": "T",
"refundMethod": "CashBackToOriginalPayment",
"startMinute": 0,
"endMinute": -525600,
"amount": 0,
"currency": "GBP"
}
]
}
],
"changesRules": [
{
"changesType": 0,
"changesStatus": "T",
"changesFee": 0,
"currency": "GBP",
"revNoshow": "T",
"revNoShowCondition": 0,
"revNoshowFee": 0,
"ruleDetailList": [
{
"status": "H",
"startMinute": 525600,
"endMinute": 86400,
"amount": 30,
"currency": "GBP"
},
{
"status": "H",
"startMinute": 86400,
"endMinute": 120,
"amount": 49,
"currency": "GBP"
},
{
"status": "T",
"startMinute": 120,
"endMinute": 0,
"amount": 0,
"currency": "GBP"
},
{
"status": "T",
"startMinute": 0,
"endMinute": -525600,
"amount": 0,
"currency": "GBP"
}
]
},
{
"changesType": 0,
"changesStatus": "T",
"changesFee": 0,
"currency": "GBP",
"revNoshow": "T",
"revNoShowCondition": 0,
"revNoshowFee": 0,
"ruleDetailList": [
{
"status": "H",
"startMinute": 525600,
"endMinute": 86400,
"amount": 30,
"currency": "GBP"
},
{
"status": "H",
"startMinute": 86400,
"endMinute": 120,
"amount": 49,
"currency": "GBP"
},
{
"status": "T",
"startMinute": 120,
"endMinute": 0,
"amount": 0,
"currency": "GBP"
},
{
"status": "T",
"startMinute": 0,
"endMinute": -525600,
"amount": 0,
"currency": "GBP"
}
]
}
],
"serviceElements": [
{
"hasFreeSeat": 0,
"hasFreeMeal": 0
},
{
"hasFreeSeat": 0,
"hasFreeMeal": 0
}
]
},
"ancillaryProductElements": [
{
"ancillaryCode": "CBOL_1PC_15KG_MAXIMUM SIZE 56 X 45 X 25 CM",
"auxBaggageElement": {
"piece": 1,
"weight": 15,
"isAllWeight": true,
"size": "Maximum Size 56 x 45 x 25 cm"
},
"canPurchaseWithTicket": 1,
"canPurchasePostTicket": 0,
"categoryCode": "CabinBaggageOverheadLocker",
"clientTechnicalServiceFee": 0,
"currency": "USD",
"maxQty": 1,
"minQty": 1,
"price": 26.57,
"productCode": "CBOL_1PC_15KG_MAXIMUM SIZE 56 X 45 X 25 CM",
"segmentIndex": 1,
"vendorPrice": 19.56,
"vendorCurrency": "GBP"
},
{
"segmentIndex": 1,
"productCode": "SCI_BAG_1PC_15KG",
"canPurchaseWithTicket": 1,
"canPurchasePostTicket": 0,
"price": 27.12,
"currency": "USD",
"vendorPrice": 19.97,
"vendorCurrency": "GBP",
"clientTechnicalServiceFee": 0,
"auxBaggageElement": {
"piece": 1,
"weight": 15,
"isAllWeight": true,
"size": ""
},
"maxQty": 1,
"minQty": 1,
"categoryCode": "StandardCheckInBaggage",
"ancillaryCode": "SCI_BAG_1PC_15KG"
},
{
"segmentIndex": 1,
"productCode": "SCI_BAG_2PC_30KG",
"canPurchaseWithTicket": 1,
"canPurchasePostTicket": 0,
"price": 39.95,
"currency": "USD",
"vendorPrice": 29.42,
"vendorCurrency": "GBP",
"clientTechnicalServiceFee": 0,
"auxBaggageElement": {
"piece": 2,
"weight": 30,
"isAllWeight": true,
"size": ""
},
"maxQty": 1,
"minQty": 1,
"categoryCode": "StandardCheckInBaggage",
"ancillaryCode": "SCI_BAG_2PC_30KG"
},
{
"segmentIndex": 2,
"productCode": "CBOL_1PC_15KG_MAXIMUM SIZE 56 X 45 X 25 CM",
"canPurchaseWithTicket": 1,
"canPurchasePostTicket": 0,
"price": 41.67,
"currency": "USD",
"vendorPrice": 30.69,
"vendorCurrency": "GBP",
"clientTechnicalServiceFee": 0,
"auxBaggageElement": {
"piece": 1,
"weight": 15,
"isAllWeight": true,
"size": "Maximum Size 56 x 45 x 25 cm"
},
"maxQty": 1,
"minQty": 1,
"categoryCode": "CabinBaggageOverheadLocker",
"ancillaryCode": "CBOL_1PC_15KG_MAXIMUM SIZE 56 X 45 X 25 CM"
},
{
"segmentIndex": 2,
"productCode": "SCI_BAG_1PC_15KG",
"canPurchaseWithTicket": 1,
"canPurchasePostTicket": 0,
"price": 31.09,
"currency": "USD",
"vendorPrice": 22.9,
"vendorCurrency": "GBP",
"clientTechnicalServiceFee": 0,
"auxBaggageElement": {
"piece": 1,
"weight": 15,
"isAllWeight": true,
"size": ""
},
"maxQty": 1,
"minQty": 1,
"categoryCode": "StandardCheckInBaggage",
"ancillaryCode": "SCI_BAG_1PC_15KG"
},
{
"segmentIndex": 2,
"productCode": "SCI_BAG_2PC_30KG",
"canPurchaseWithTicket": 1,
"canPurchasePostTicket": 0,
"price": 74.57,
"currency": "USD",
"vendorPrice": 54.91,
"vendorCurrency": "GBP",
"clientTechnicalServiceFee": 0,
"auxBaggageElement": {
"piece": 2,
"weight": 30,
"isAllWeight": true,
"size": ""
},
"maxQty": 1,
"minQty": 1,
"categoryCode": "StandardCheckInBaggage",
"ancillaryCode": "SCI_BAG_2PC_30KG"
}
],
"vendorFare": null,
"links": [],
"separateBookings": false,
"refreshTime": null,
"expireTime": null,
"ancillarySupported": [
"seat",
"luggage"
],
"cardChargeList": [
{
"cardType": "Visa",
"percentage": 0.03,
"charge": null,
"currency": ""
},
{
"cardType": "MasterCard",
"percentage": 0.03,
"charge": null,
"currency": ""
}
]
},
"duplicateOrders": null,
"paymentOptions": [
{
"paymentMethod": 1,
"serviceFee": {
"amount": 2,
"currency": "USD",
"deductFrom": "DEPOSIT"
},
"ticketFare": {
"amount": 300.35,
"currency": "USD",
"deductFrom": "DEPOSIT"
},
"paymentFee": {
"amount": 0,
"currency": "USD",
"deductFrom": "CARD"
},
"cardType": null
}
]
}Last updated
Was this helpful?

