This is a snippet of the JSON response. I need to read the quotes. There are more quotes than displayed in the snippet.
Code: Select all
{
"AllPickupLocationHaveCoverage": true,
"Quote": "1149005634",
"TotalNetCharge": {
"Value": 86.3413,
"Unit": "USD"
},
"OrderReferenceId": "POSOrderID12345",
"Warnings": [
"Error Code 9100: The freight class indicated doesn't match the one calculated for this shipment. Consider using the suggested freight class."
],
"SuggestedFreightClasses": {
"SKU12345": 50.0
},
"CompositeRateQuote": [
{
"Quotes": [
{
"QuoteNumber": 1149005571,
"NetCharge": 943.622400,
"ServiceLevel": 351,
"Weight": 100.0,
"ServiceLevelDescription": "Back of Truck (No Liftgate)",
"ShipMethodCode": "Outside",
"CarrierName": "FragilePAK",
"CarrierLogo": "https://stgapi.freightclub.com/Content/Images/Logos/280.png",
"CarrierScacCode": "PBID",
"CarrierDescription": "short desc",
"ShipMethodName": "Back of Truck (No Liftgate)",
"ShipMethodShortDesc": "Basic Home Delivery",
"ShipMethodDescription": "short desc",
"TransitTime": "12 Business Day(s)",
"TransitDays": 12.0,
"PickUpTime": "Average pick-up timeframe is 3-5 business days from Ready Date",
"ProfileCarrierAccountId": null,
"TransitTimeInfo": "Time from booking to pick-up can vary, on average it is 2-Days. Estimated Transit times start from time of pick-up.",
"PickUpTimeInfo": "This is an estimate on how many days typically will be needed for the carrier to pick up from your origin point.",
"CarrierId": 280,
"BrokerId": 280,
"BrokerSCAC": "FCC",
"FinalMileCarrierScacCode": null,
"ClientContractServiceOptionType": null,
"InsuranceInfo": "Insurance removed by request.",
"CarrierWarning": null,
"TransitTimeSort": 12,
"ServiceGroup": null,
"ExtraServices": null,
"Warnings": [],
"MinPickupDate": "2022-04-08T00:00:00",
"MaxPickupDate": "2022-04-15T00:00:00",
"IsParcel": false
},
{
"QuoteNumber": 1149005515,
"NetCharge": 241.440528,
"ServiceLevel": 351,
"Weight": 100.0,
"ServiceLevelDescription": "Back of Truck (No Liftgate)",
"ShipMethodCode": "CURBSID",
"CarrierName": "Pilot Freight Services",
"CarrierLogo": "https://stgapi.freightclub.com/Content/Images/Logos/33.png",
"CarrierScacCode": "PILOT",
"CarrierDescription": "<p>Specializes in furniture and other commodities. Faster transit times due to their national coverage.</p>",
"ShipMethodName": "Back of Truck (No Liftgate)",
"ShipMethodShortDesc": "Delivery to the Dock",
"ShipMethodDescription": "short desc",
"TransitTime": "7 Business Day(s)",
"TransitDays": 7.0,
"PickUpTime": "Estimated average pick up timeframe is within 1-3 days of ready date.",
"ProfileCarrierAccountId": null,
"TransitTimeInfo": "Time from booking to pick-up can vary, on average it is 2-Days. Estimated Transit times start from time of pick-up.",
"PickUpTimeInfo": "This is an estimate on how many days typically will be needed for the carrier to pick up from your origin point.",
"CarrierId": 33,
"BrokerId": 33,
"BrokerSCAC": "FCC",
"FinalMileCarrierScacCode": null,
"ClientContractServiceOptionType": null,
"InsuranceInfo": "Insurance removed by request.",
"CarrierWarning": null,
"TransitTimeSort": 7,
"ServiceGroup": null,
"ExtraServices": null,
"Warnings": [],
"MinPickupDate": "2022-04-08T00:00:00",
"MaxPickupDate": "2022-04-13T00:00:00",
"IsParcel": false
This is snippet of my code
Code: Select all
list = YAJL_object_find(docNode: 'CompositeRateQuote');
i = 0;
dow YAJL_ARRAY_LOOP( list: i: node );
val = YAJL_object_find(node: 'QuoteNumber');
stringValue = yajl_get_string(val);
Quot17 = %xlate(lw:up:(%xlate(NonDisplay:space:stringValue)));
enddo;
HELP