I am integrating Google Express with Magento but the Create charge invoices API is failing for me. I tried to create the invoice from the "Try this API" option of Google merchant but it's throwing the following error:
{
"error": {
"errors": [
{
"domain": "content.ContentErrorDomain",
"reason": "invalid_transition",
"message": "The requested order is not supported by orderinvoices service"
}
],
"code": 400,
"message": "The requested order is not supported by orderinvoices service"
}
}
createchargeinvoice API doc: https://developers.google.com/shopping-content/v2/reference/v2/orderinvoices/createchargeinvoice
My request body:
{
"invoiceId": "invoice1",
"operationId": "charge1",
"shipmentGroupId": "shipmentgroup1",
"lineItemInvoices": [
{
"productId": "online:en:US:d3k3245",
"shipmentUnitIds": [
"2"
],
"unitInvoice": {
"unitPricePretax": {
"value": "140",
"currency": "USD"
},
"unitPriceTaxes": [
{
"taxType": "sales",
"taxAmount": {
"value": "14",
"currency": "USD"
}
}
],
"promotions": [
{
"promotionId": "111",
"promotionAmount": {
"tax": {
"currency": "USD",
"value": "0"
},
"pretax": {
"currency": "USD",
"value": "0"
}
}
}
],
"additionalCharges": [
{
"additionalChargeAmount": {
"pretax": {
"currency": "USD",
"value": "0"
},
"tax": {
"currency": "USD",
"value": "0"
}
},
"additionalChargePromotions": [
{
"promotionAmount": {
"pretax": {
"currency": "USD",
"value": "0"
},
"tax": {
"currency": "USD",
"value": "0"
}
},
"promotionId": "111"
}
],
"type": "shipping"
}
]
}
}
],
"invoiceSummary": {
"productTotal": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"additionalChargeSummaries": [
{
"totalAmount": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"type": "shipping"
}
],
"promotionSummaries": [
{
"promotionAmount": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"promotionId": "111"
}
],
"merchantBalance": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"customerBalance": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
}
}
}
Has anyone faced this issue?
As per the google document (that you've shared), there are around 40 "Required" fields for the request body. In the current shared request body, you've less than half of the required fields.
Required fields:
invoiceId
operationId
shipmentGroupId
lineItemInvoices[]
lineItemInvoices[].shipmentUnitIds[]
lineItemInvoices[].unitInvoice
lineItemInvoices[].unitInvoice.unitPricePretax
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxType
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxAmount
lineItemInvoices[].unitInvoice.promotions[].promotionId
lineItemInvoices[].unitInvoice.promotions[].promotionAmount
lineItemInvoices[].unitInvoice.promotions[].promotionAmount.pretax
lineItemInvoices[].unitInvoice.promotions[].promotionAmount.tax
lineItemInvoices[].unitInvoice.additionalCharges[].type
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.pretax
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.tax
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargePromotions[].promotionId
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargePromotions[].promotionAmount
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargePromotions[].promotionAmount.pretax
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargePromotions[].promotionAmount.tax
invoiceSummary
invoiceSummary.productTotal
invoiceSummary.productTotal.pretax
invoiceSummary.productTotal.tax
invoiceSummary.additionalChargeSummaries[].type
invoiceSummary.additionalChargeSummaries[].totalAmount
invoiceSummary.additionalChargeSummaries[].totalAmount.pretax
invoiceSummary.additionalChargeSummaries[].totalAmount.tax
invoiceSummary.promotionSummaries[].promotionId
invoiceSummary.promotionSummaries[].promotionAmount
invoiceSummary.promotionSummaries[].promotionAmount.pretax
invoiceSummary.promotionSummaries[].promotionAmount.tax
invoiceSummary.merchantBalance.pretax
invoiceSummary.merchantBalance.tax
invoiceSummary.customerBalance.pretax
invoiceSummary.customerBalance.tax
invoiceSummary.googleBalance.pretax
invoiceSummary.googleBalance.tax
Related
I have got a PayPal Advanced Checkout Sandbox set up and capturing the order using the API call below:
/v2/checkout/orders/{{order_id}}/capture
Below are the transaction details I send to create the order:
{
"intent": "CAPTURE",
"payer": {
"address": {
"admin_area_2": "Downton",
"postal_code": "SP5",
"country_code": "GB"
}
},
"purchase_units": [
{
"description": "Test Item",
"custom_id": "12345",
"soft_descriptor": "Purchase Descriptior",
"amount": {
"currency_code": "USD",
"value": "58.80",
"breakdown": {
"item_total": {
"currency_code": "USD",
"value": "49.00"
},
"tax_total": {
"currency_code": "USD",
"value": "9.80"
}
}
},
"items": [
{
"name": "Test Item",
"unit_amount": {
"currency_code": "USD",
"value": "49.00"
},
"tax": {
"currency_code": "USD",
"value": "9.80"
},
"quantity": 1,
"category": "PHYSICAL_GOODS"
}
],
"shipping": {}
}
]
}
And then once it has been paid with a sandbox personal account the order capture response is below:
{
"id": "4FS9138999682320N",
"status": "COMPLETED",
"payment_source": {
"paypal": {
"email_address": "sb-bdd43g21513704#personal.example.com",
"account_id": "V7ZN4NEJRLGZA",
"name": {
"given_name": "John",
"surname": "Doe"
},
"address": {
"country_code": "GB"
}
}
},
"purchase_units": [
{
"reference_id": "default",
"shipping": {
"name": {
"full_name": "John Doe"
},
"address": {
"address_line_1": "Whittaker House",
"address_line_2": "2 Whittaker Avenue",
"admin_area_2": "Richmond",
"admin_area_1": "Surrey",
"postal_code": "TW9 1EH",
"country_code": "GB"
}
},
"payments": {
"captures": [
{
"id": "40V95236PS9814847",
"status": "COMPLETED",
"amount": {
"currency_code": "USD",
"value": "58.80"
},
"final_capture": true,
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"ITEM_NOT_RECEIVED",
"UNAUTHORIZED_TRANSACTION"
]
},
"seller_receivable_breakdown": {
"gross_amount": {
"currency_code": "USD",
"value": "58.80"
},
"paypal_fee": {
"currency_code": "USD",
"value": "2.30"
},
"net_amount": {
"currency_code": "USD",
"value": "56.50"
}
},
"custom_id": "12345",
"links": [
{
"href": "https://api.sandbox.paypal.com/v2/payments/captures/40V95236PS9814847",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v2/payments/captures/40V95236PS9814847/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/4FS9138999682320N",
"rel": "up",
"method": "GET"
}
],
"create_time": "2022-10-31T16:42:07Z",
"update_time": "2022-10-31T16:42:07Z"
}
]
}
}
],
"payer": {
"name": {
"given_name": "John",
"surname": "Doe"
},
"email_address": "sb-bdd43g21513704#personal.example.com",
"payer_id": "V7ZN4NEJRLGZA",
"address": {
"country_code": "GB"
}
},
"links": [
{
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/4FS9138999682320N",
"rel": "self",
"method": "GET"
}
]
}
I get a status: COMPLETED as the response but it is not returning the exchange_rate value even though the payer currency is different to the payee currency.
Does anyone know why this is?
The example is a USD transaction, the payee account received USD.
If the payer used a funding source of a different currency to fund the transaction, this will not be visible to the receiver or API facilitator. Any such sender currency conversion is between the payer and PayPal; all you know (and all you need to know) is you received the requested USD amount via PayPal.
Using PayPal's current API I've created a simple Product:
{
"id" : "A-001",
"name": "A Service",
"description": "Video streaming service",
"type": "SERVICE",
"category": "SOFTWARE"
}
Also created a Plan, which is tiered based on Quantity
{
"product_id" : "A-001",
"name": "Default Plan",
"description": "Plan with regular and trial payment definitions.",
"quantity_supported" : true,
"billing_cycles": [
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 12,
"pricing_scheme": {
"pricing_model" : "TIERED",
"version" : 1,
"tiers": [{
"starting_quantity": 1,
"ending_quantity": 499,
"amount": { "currency_code":"USD", "value":0.55}
},
{
"starting_quantity": 500,
"ending_quantity": 999,
"amount": { "currency_code":"USD", "value":0.5}
},
{
"starting_quantity": 1000,
"ending_quantity": 2499,
"amount": { "currency_code":"USD", "value":0.46}
},
{
"starting_quantity": 2500,
"amount": { "currency_code":"USD", "value":0.37}
}
]
}
}
],
"payment_preferences": {
"auto_bill_outstanding": true,
"setup_fee": {
"value": "10",
"currency_code": "USD"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3
},
"taxes": {
"percentage": "10",
"inclusive": false
}
}
Now, I try to create a Subscription to the Plan:
{
"plan_id": "P-16786052YT8021220MAMUCDY",
"start_time": "2021-03-01T00:00:00Z",
"quantity": "20",
"shipping_amount": {
"currency_code": "USD",
"value": "0.00"
},
"subscriber": {
"name": {
"given_name": "John",
"surname": "Doe"
},
"email_address": "customer#example.com",
"shipping_address": {
"name": {
"full_name": "John Doe"
},
"address": {
"address_line_1": "2211 N First Street",
"address_line_2": "Building 17",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
}
},
"application_context": {
"brand_name": "walmart",
"locale": "en-US",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"user_action": "SUBSCRIBE_NOW",
"payment_method": {
"payer_selected": "PAYPAL",
"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
},
"return_url": "https://example.com/returnUrl",
"cancel_url": "https://example.com/cancelUrl"
}
}
But I get an Error response:
{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "658174d246c0b",
"details": [
{
"issue": "SUBSCRIPTION_CANNOT_HAVE_QUANTITY",
"description": "Subscription can't have quantity as the plan does not support quantity."
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY",
"rel": "information_link",
"method": "GET"
}
]
}
Why do I get this error when my Plan clearly states "quantity_supported" : true, ?
In my case I had forgotten to modify the PayPal-Request-Id from a previous Plan creation (which didn't allow Quantity), so the Plan with details above wasn't being created
PayPal Checkout
Set up the transaction
allow to set parameters like mount.value: '0.01 and other things like so
<script>
paypal.Buttons({
createOrder: function(data, actions) {
// Set up the transaction
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
}
}).render('#paypal-button-container');
</script>
But I need to set up the shipping address and shipping amount. How can I do it?
PS
I found Orders API Integration Guide for Express Checkout. It has all the options
like details.shipping = 0.00 ...
and shipping_address, but it does not work with PayPal Checkout example. Is it because I'm testing in the sendbox?
Below is the full list of parameters you can set over:
{
"intent": "AUTHORIZE",
"application_context": {
"return_url": "https://example.com",
"cancel_url": "https://example.com",
"brand_name": "EXAMPLE INC",
"locale": "en-US",
"landing_page": "BILLING",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"user_action": "CONTINUE"
},
"purchase_units": [
{
"reference_id": "PUHF",
"description": "Sporting Goods",
"custom_id": "CUST-HighFashions",
"soft_descriptor": "HighFashions",
"amount": {
"currency_code": "USD",
"value": "230.00",
"breakdown": {
"item_total": {
"currency_code": "USD",
"value": "180.00"
},
"shipping": {
"currency_code": "USD",
"value": "30.00"
},
"handling": {
"currency_code": "USD",
"value": "10.00"
},
"tax_total": {
"currency_code": "USD",
"value": "20.00"
},
"shipping_discount": {
"currency_code": "USD",
"value": "10"
}
}
},
"items": [
{
"name": "T-Shirt",
"description": "Green XL",
"sku": "sku01",
"unit_amount": {
"currency_code": "USD",
"value": "90.00"
},
"tax": {
"currency_code": "USD",
"value": "10.00"
},
"quantity": "1",
"category": "PHYSICAL_GOODS"
},
{
"name": "Shoes",
"description": "Running, Size 10.5",
"sku": "sku02",
"unit_amount": {
"currency_code": "USD",
"value": "45.00"
},
"tax": {
"currency_code": "USD",
"value": "5.00"
},
"quantity": "2",
"category": "PHYSICAL_GOODS"
}
],
"shipping": {
"method": "United States Postal Service",
"address": {
"name": {
"give_name":"John",
"surname":"Doe"
},
"address_line_1": "123 Townsend St",
"address_line_2": "Floor 6",
"admin_area_2": "San Francisco",
"admin_area_1": "CA",
"postal_code": "94107",
"country_code": "US"
}
}
}
]
}
basically, the whole idea of placing these details into <script> was a mistake. It should all go from server to server and html should only reflect the reference code.
for PHP users, look into
use PayPalCheckoutSdk\Core\PayPalHttpClient;
use PayPalCheckoutSdk\Core\PayPalEnvironment;
use PayPalCheckoutSdk\Orders\OrdersCreateRequest;
I am trying to test the payouts API using the Node.js SDK for paypal and the example they have provided on Github. Here is the code for the same:
"use strict";
let paypal = require('paypal-rest-sdk');
const bluebird = require('bluebird');
paypal.configure({
mode: process.env.PAYPAL_MODE, //sandbox or live
client_id: process.env.PAYPAL_CLIENT_ID,
client_secret: process.env.PAYPAL_CLIENT_SECRET
});
bluebird.promisifyAll(paypal.payment);
bluebird.promisifyAll(paypal.payout);
function sendMoneyToParticipant () {
const sender_batch_id = Math.random().toString(36).substring(9);
let create_payout_json = {
"sender_batch_header": {
"sender_batch_id": sender_batch_id,
"email_subject": "You have a payment"
},
"items": [
{
"recipient_type": "EMAIL",
"amount": {
"value": 0.90,
"currency": "USD"
},
"receiver": "redacted-email-address",
"note": "Thank you.",
"sender_item_id": "item_3"
}
]
};
const sync_mode = 'true';
return paypal.payout.createAsync(create_payout_json, sync_mode)
}
PaypalAPI.sendMoneyToParticipant().then(result => {
console.log(JSON.stringify(result, null, 2))
}).catch(console.error)
I created the sandbox account myself and added $1000 during account creation step. However, I am still getting following as the response
{
"batch_header": {
"payout_batch_id": "78AMS3QCSQTBE",
"batch_status": "DENIED",
"time_created": "2017-05-28T07:38:51Z",
"time_completed": "2017-05-28T07:38:52Z",
"sender_batch_header": {
"email_subject": "You have a payment",
"sender_batch_id": "618ak0vozjwwhilik9"
},
"amount": {
"currency": "USD",
"value": "0.9"
},
"fees": {
"currency": "USD",
"value": "0.25"
}
},
"items": [
{
"payout_item_id": "F2XACBBTKRXK2",
"transaction_status": "FAILED",
"payout_item_fee": {
"currency": "USD",
"value": "0.25"
},
"payout_batch_id": "78AMS3QCSQTBE",
"payout_item": {
"amount": {
"currency": "USD",
"value": "0.9"
},
"note": "Thank you.",
"receiver": "mandeep.s.gulati#gmail.com",
"recipient_type": "EMAIL",
"sender_item_id": "item_3"
},
"errors": {
"name": "INSUFFICIENT_FUNDS",
"message": "Sender has insufficient funds",
"information_link": "https://developer.paypal.com/docs/api/payments.payouts-batch/#errors"
},
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/F2XACBBTKRXK2",
"rel": "item",
"method": "GET"
}
]
}
],
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/78AMS3QCSQTBE",
"rel": "self",
"method": "GET"
}
],
"httpStatusCode": 201
}
The below attached warnings and error occurred while testing Booking seat.
There is no any proper documentation of Create Passenger Name Record REST API Call, the description and schema are meaning less. In description there are 266 parameters are required true to send a request.
Do you have any proper documentation where i can get all the required parameters detailed information? Like What is SegmentNumber how can i get?
Working flow( For Single trip) :
Get the origin, destination, date, number of seats required.
Send all required parms to Bargain Finder Max, get the response
Send Require params to book a seat. Create Passenger Name Record
Request
{
"CreatePassengerNameRecordRQ": {
"targetCity": "3QND",
"Profile": {
"UniqueID": {
"ID": "ABCD1EF"
}
},
"AirBook": {
"OriginDestinationInformation": {
"FlightSegment": [{
"ArrivalDateTime": "2017-04-30",
"DepartureDateTime": "2017-04-30T13:55",
"FlightNumber": "309",
"NumberInParty": "1",
"ResBookDesigCode": "V",
"Status": "NN",
"DestinationLocation": {
"LocationCode": "KHI"
},
"MarketingAirline": {
"Code": "PK",
"FlightNumber": "309"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "ISB"
}
}]
}
},
"AirPrice": {
"PriceRequestInformation": {
"OptionalQualifiers": {
"MiscQualifiers": {
"TourCode": {
"Text": "TEST1212"
}
},
"PricingQualifiers": {
"PassengerType": [{
"Code": "CNN",
"Quantity": "1"
}]
}
}
}
},
"MiscSegment": {
"DepartureDateTime": "2017-04-30",
"NumberInParty": 1,
"Status": "NN",
"Type": "OTH",
"OriginLocation": {
"LocationCode": "ISB"
},
"Text": "TEST",
"VendorPrefs": {
"Airline": {
"Code": "PK"
}
}
},
"SpecialReqDetails": {
"AddRemark": {
"RemarkInfo": {
"FOP_Remark": {
"Type": "CHECK",
"CC_Info": {
"Suppress": true,
"PaymentCard": {
"AirlineCode": "PK",
"CardSecurityCode": "1234",
"Code": "VI",
"ExpireDate": "2012-12",
"ExtendedPayment": "12",
"ManualApprovalCode": "123456",
"Number": "4123412341234123",
"SuppressApprovalCode": true
}
}
},
"FutureQueuePlaceRemark": {
"Date": "12-21",
"PrefatoryInstructionCode": "11",
"PseudoCityCode": "IPCC1",
"QueueIdentifier": "499",
"Time": "06:00"
},
"Remark": [{
"Type": "Historical",
"Text": "TEST HISTORICAL REMARK"
},
{
"Type": "Invoice",
"Text": "TEST INVOICE REMARK"
},
{
"Type": "Itinerary",
"Text": "TEST ITINERARY REMARK"
},
{
"Type": "Hidden",
"Text": "TEST HIDDEN REMARK"
}]
}
},
"AirSeat": {
"Seats": {
"Seat": [{
"NameNumber": "1.1",
"Preference": "AN",
"SegmentNumber": "0"
},
{
"NameNumber": "2.1",
"Preference": "AN",
"SegmentNumber": "1"
},
{
"NameNumber": "3.1",
"Preference": "AN",
"SegmentNumber": "1"
}]
}
},
"SpecialService": {
"SpecialServiceInfo": {
"Service": [{
"SSR_Code": "OSI",
"PersonName": {
"NameNumber": "testing"
#},
"Text": "TEST1",
"VendorPrefs": {
"Airline": {
"Code": "PK"
}
}
}]
}
}
},
"PostProcessing": {
"RedisplayReservation": true,
"ARUNK": "",
"QueuePlace": {
"QueueInfo": {
"QueueIdentifier": [{
"Number": "100",
"PrefatoryInstructionCode": "11"
}]
}
},
"EndTransaction": {
"Source": {
"ReceivedFrom": "SWS TEST"
}
}
}
}
}
Response:
{
"CreatePassengerNameRecordRS": {
"ApplicationResults": {
"status": "NotProcessed",
"Error": [
{
"type": "Application",
"timeStamp": "2017-03-08T04:10:41.317-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "ERR.SP.BUSINESS_ERROR",
"content": "PNR has not been created successfully, see remaining messages for details"
}
]
}
]
}
],
"Warning": [
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:40.628-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SP.PROVIDER_ERROR",
"content": "NO PROFILE FOUND FOR NAME"
}
]
}
]
},
{
"type": "Validation",
"timeStamp": "2017-03-08T04:10:40.655-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.CLIENT.VALIDATION_FAILED",
"content": "Request contains incorrect values: Wrong dateTime format"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:40.919-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "FORMAT, CHECK SEGMENT NUMBER-0003"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.024-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": ".DTE.NOT ENT BGNG WITH"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.062-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "\u0087ND NAMES\u0087"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.096-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "\u0087ND NAMES\u0087"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.129-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "\u0087ND NAMES\u0087"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.166-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "NO ARNK INSERTED"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.229-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "NEED PHONE FIELD - USE 9"
}
]
}
]
}
]
},
"TravelItineraryRead": {
"TravelItinerary": {
"CustomerInfo": {
},
"ItineraryInfo": {
"ReservationItems": {
"Item": [
{
"RPH": "1",
"MiscSegment": {
"DayOfWeekInd": "7",
"DepartureDateTime": "04-30",
"NumberInParty": "01",
"SegmentNumber": "0001",
"Status": "NN",
"Type": "OTH",
"IsPast": false,
"OriginLocation": {
"LocationCode": "ISB"
},
"Text": [
"TEST"
],
"Vendor": {
"Code": "PK"
}
}
}
]
}
},
"ItineraryRef": {
"AirExtras": false,
"InhibitCode": "U",
"PartitionID": "AA",
"PrimeHostID": "1B",
"Header": [
"CURRENTLY DISPLAYING A PNR OWNED BY THE SABRE PRIME HOST",
"RULES AND FUNCTIONALITY FOR THAT PRIME HOST WILL APPLY"
],
"Source": {
"PseudoCityCode": "3QND",
"ReceivedFrom": "SWS TEST"
}
},
"SpecialServiceInfo": [
{
"RPH": "001",
"Type": "GFX",
"Service": {
"SSR_Code": "OSI",
"Airline": {
"Code": "PK"
},
"Text": [
"TEST1-TESTING"
]
}
}
]
}
}
},
"Links": [
{
"rel": "self",
"href": "https:\/\/api.sabre.com\/v1.0.0\/passenger\/records?mode=create"
},
{
"rel": "linkTemplate",
"href": "https:\/\/api.sabre.com\/\/passenger\/records?mode="
}
]
}
Please avoid posting the same questions. Here's an answer I just posted regarding the required elements: https://stackoverflow.com/a/42671412/3701641
About the segment number, they represent the itinerary segments, you are adding one flight segment, so the segment number associated with that would be 1.