Chilkat Online Tools

ERROR!

------------------- GenerateCode ----------------------
ImpliedContentType: application/json
explicitContentType: application/json
---- begin chilkat script ----
// This example assumes the Chilkat API to have been previously unlocked.
// See {{-global_unlock:::Global Unlock Sample-}} for sample code.

new Http http;
ckbool success;

// Use this online tool to generate code from sample JSON: {{.https://tools.chilkat.io/jsonCreate|||Generate Code to Create JSON.}}

// The following JSON is sent in the request body.

// {
//   "carrier_ids": [
//     "{{stamps_com}}",
//     "{{fedex}}",
//     "{{ups}}"
//   ],
//   "from_country_code": "US",
//   "from_postal_code": "78756",
//   "to_country_code": "US",
//   "to_postal_code": "91521",
//   "weight": {
//     "value": 17,
//     "unit": "pound"
//   }
// }

new JsonObject json;
ignore = json.UpdateString("carrier_ids[0]","{{stamps_com}}");
ignore = json.UpdateString("carrier_ids[1]","{{fedex}}");
ignore = json.UpdateString("carrier_ids[2]","{{ups}}");
ignore = json.UpdateString("from_country_code","US");
ignore = json.UpdateString("from_postal_code","78756");
ignore = json.UpdateString("to_country_code","US");
ignore = json.UpdateString("to_postal_code","91521");
ignore = json.UpdateInt("weight.value",17);
ignore = json.UpdateString("weight.unit","pound");

call http.SetRequestHeader("API-Key","{{API_KEY}}");
call http.SetRequestHeader("Content-Type","application/json");

HttpResponse resp = http.PostJson3("https://api.shipengine.com/v1/rates/estimate","application/json",json);
if (http.LastMethodSuccess == ckfalse) {
    println http.LastErrorText;
    return;
}

new StringBuilder sbResponseBody;
ignore = resp.GetBodySb(sbResponseBody);

new JsonArray jarrResp;
call jarrResp.LoadSb(sbResponseBody);
jarrResp.EmitCompact = ckfalse;

println "Response Body:";
println jarrResp.Emit();

int respStatusCode = resp.StatusCode;
println "Response Status Code = ",respStatusCode;
if (respStatusCode >= 400) {
    println "Response Header:";
    println resp.Header;
    println "Failed.";
    delete resp;
    return;
}
delete resp;

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// [
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 11.07
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 7,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-24T00:00:00Z",
//     "carrier_delivery_days": "6",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Media Mail",
//     "service_code": "usps_media_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 38.98
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 7,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-24T00:00:00Z",
//     "carrier_delivery_days": "6",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Parcel Select Ground",
//     "service_code": "usps_parcel_select",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 39.23
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 12.72
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "medium_flat_rate_box",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 6.98
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "small_flat_rate_box",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 17.47
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "large_flat_rate_box",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 6.48
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_envelope",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 7.03
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_padded_envelope",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 16.1
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "regional_rate_box_b",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 6.78
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_legal_envelope",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 103.04
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 22.68
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_envelope",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 23.18
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_padded_envelope",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 22.8
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_legal_envelope",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   }
// ]

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: {{.https://tools.chilkat.io/jsonParse|||Generate JSON Parsing Code.}}

#ifdef IS_C_CPP
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
#undef IS_C_CPP

JsonObject json;
string rate_type;
string carrier_id;
string v_Currency;
string Amount;
string insurance_amountCurrency;
int insurance_amountAmount;
string confirmation_amountCurrency;
int confirmation_amountAmount;
string other_amountCurrency;
int other_amountAmount;
int zone;
string package_type;
int delivery_days;
ckbool guaranteed_service;
string estimated_delivery_date;
string carrier_delivery_days;
string ship_date;
ckbool negotiated_rate;
string service_type;
string service_code;
ckbool trackable;
string carrier_code;
string carrier_nickname;
string carrier_friendly_name;
string validation_status;
int j;
int count_j;

int i = 0;
int count_i = jarrResp.Size;
while i < count_i {
    json = jarrResp.ObjectAt(i);
    rate_type = json.StringOf("rate_type");
    carrier_id = json.StringOf("carrier_id");
    v_Currency = json.StringOf("shipping_amount.currency");
    Amount = json.StringOf("shipping_amount.amount");
    insurance_amountCurrency = json.StringOf("insurance_amount.currency");
    insurance_amountAmount = json.IntOf("insurance_amount.amount");
    confirmation_amountCurrency = json.StringOf("confirmation_amount.currency");
    confirmation_amountAmount = json.IntOf("confirmation_amount.amount");
    other_amountCurrency = json.StringOf("other_amount.currency");
    other_amountAmount = json.IntOf("other_amount.amount");
    zone = json.IntOf("zone");
    package_type = json.StringOf("package_type");
    delivery_days = json.IntOf("delivery_days");
    guaranteed_service = json.BoolOf("guaranteed_service");
    estimated_delivery_date = json.StringOf("estimated_delivery_date");
    carrier_delivery_days = json.StringOf("carrier_delivery_days");
    ship_date = json.StringOf("ship_date");
    negotiated_rate = json.BoolOf("negotiated_rate");
    service_type = json.StringOf("service_type");
    service_code = json.StringOf("service_code");
    trackable = json.BoolOf("trackable");
    carrier_code = json.StringOf("carrier_code");
    carrier_nickname = json.StringOf("carrier_nickname");
    carrier_friendly_name = json.StringOf("carrier_friendly_name");
    validation_status = json.StringOf("validation_status");
    j = 0;
    count_j = json.SizeOfArray("warning_messages");
    while j < count_j {
        json.J = j;
        j = j + 1;
    }
    j = 0;
    count_j = json.SizeOfArray("error_messages");
    while j < count_j {
        json.J = j;
        j = j + 1;
    }
    delete json;
    i = i + 1;
}



---- end chilkat script ----

delphiAx / ShipEngine Walkthrough / Get rate estimates (minimal)

Back to Collection Items

var
http: TChilkatHttp;
success: Integer;
json: TChilkatJsonObject;
resp: IChilkatHttpResponse;
sbResponseBody: TChilkatStringBuilder;
jarrResp: TChilkatJsonArray;
respStatusCode: Integer;
json: IChilkatJsonObject;
rate_type: WideString;
carrier_id: WideString;
v_Currency: WideString;
Amount: WideString;
insurance_amountCurrency: WideString;
insurance_amountAmount: Integer;
confirmation_amountCurrency: WideString;
confirmation_amountAmount: Integer;
other_amountCurrency: WideString;
other_amountAmount: Integer;
zone: Integer;
package_type: WideString;
delivery_days: Integer;
guaranteed_service: Integer;
estimated_delivery_date: WideString;
carrier_delivery_days: WideString;
ship_date: WideString;
negotiated_rate: Integer;
service_type: WideString;
service_code: WideString;
trackable: Integer;
carrier_code: WideString;
carrier_nickname: WideString;
carrier_friendly_name: WideString;
validation_status: WideString;
j: Integer;
count_j: Integer;
i: Integer;
count_i: Integer;

begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

http := TChilkatHttp.Create(Self);

// Use this online tool to generate code from sample JSON: Generate Code to Create JSON

// The following JSON is sent in the request body.

// {
//   "carrier_ids": [
//     "{{stamps_com}}",
//     "{{fedex}}",
//     "{{ups}}"
//   ],
//   "from_country_code": "US",
//   "from_postal_code": "78756",
//   "to_country_code": "US",
//   "to_postal_code": "91521",
//   "weight": {
//     "value": 17,
//     "unit": "pound"
//   }
// }

json := TChilkatJsonObject.Create(Self);
json.UpdateString('carrier_ids[0]','{{stamps_com}}');
json.UpdateString('carrier_ids[1]','{{fedex}}');
json.UpdateString('carrier_ids[2]','{{ups}}');
json.UpdateString('from_country_code','US');
json.UpdateString('from_postal_code','78756');
json.UpdateString('to_country_code','US');
json.UpdateString('to_postal_code','91521');
json.UpdateInt('weight.value',17);
json.UpdateString('weight.unit','pound');

http.SetRequestHeader('API-Key','{{API_KEY}}');
http.SetRequestHeader('Content-Type','application/json');

resp := http.PostJson3('https://api.shipengine.com/v1/rates/estimate','application/json',json.ControlInterface);
if (http.LastMethodSuccess = 0) then
  begin
    Memo1.Lines.Add(http.LastErrorText);
    Exit;
  end;

sbResponseBody := TChilkatStringBuilder.Create(Self);
resp.GetBodySb(sbResponseBody.ControlInterface);

jarrResp := TChilkatJsonArray.Create(Self);
jarrResp.LoadSb(sbResponseBody.ControlInterface);
jarrResp.EmitCompact := 0;

Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(jarrResp.Emit());

respStatusCode := resp.StatusCode;
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(resp.Header);
    Memo1.Lines.Add('Failed.');

    Exit;
  end;

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// [
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 11.07
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 7,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-24T00:00:00Z",
//     "carrier_delivery_days": "6",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Media Mail",
//     "service_code": "usps_media_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 38.98
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 7,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-24T00:00:00Z",
//     "carrier_delivery_days": "6",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Parcel Select Ground",
//     "service_code": "usps_parcel_select",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 39.23
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 12.72
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "medium_flat_rate_box",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 6.98
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "small_flat_rate_box",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 17.47
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "large_flat_rate_box",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 6.48
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_envelope",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 7.03
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_padded_envelope",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 16.1
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "regional_rate_box_b",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 6.78
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_legal_envelope",
//     "delivery_days": 3,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-20T00:00:00Z",
//     "carrier_delivery_days": "3",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail",
//     "service_code": "usps_priority_mail",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 103.04
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "package",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 22.68
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_envelope",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 23.18
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_padded_envelope",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   },
//   {
//     "rate_type": "check",
//     "carrier_id": "se-121861",
//     "shipping_amount": {
//       "currency": "usd",
//       "amount": 22.8
//     },
//     "insurance_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "confirmation_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "other_amount": {
//       "currency": "usd",
//       "amount": 0
//     },
//     "zone": 6,
//     "package_type": "flat_rate_legal_envelope",
//     "delivery_days": 2,
//     "guaranteed_service": false,
//     "estimated_delivery_date": "2019-09-19T00:00:00Z",
//     "carrier_delivery_days": "1-2",
//     "ship_date": "2019-09-17T00:00:00Z",
//     "negotiated_rate": false,
//     "service_type": "USPS Priority Mail Express",
//     "service_code": "usps_priority_mail_express",
//     "trackable": true,
//     "carrier_code": "stamps_com",
//     "carrier_nickname": "ShipEngine Test Account - Stamps.com",
//     "carrier_friendly_name": "Stamps.com",
//     "validation_status": "unknown",
//     "warning_messages": [
//     ],
//     "error_messages": [
//     ]
//   }
// ]

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

ERROR: Var already declared: json

i := 0;
count_i := jarrResp.Size;
while i < count_i do
  begin
    json := jarrResp.ObjectAt(i);
    rate_type := json.StringOf('rate_type');
    carrier_id := json.StringOf('carrier_id');
    v_Currency := json.StringOf('shipping_amount.currency');
    Amount := json.StringOf('shipping_amount.amount');
    insurance_amountCurrency := json.StringOf('insurance_amount.currency');
    insurance_amountAmount := json.IntOf('insurance_amount.amount');
    confirmation_amountCurrency := json.StringOf('confirmation_amount.currency');
    confirmation_amountAmount := json.IntOf('confirmation_amount.amount');
    other_amountCurrency := json.StringOf('other_amount.currency');
    other_amountAmount := json.IntOf('other_amount.amount');
    zone := json.IntOf('zone');
    package_type := json.StringOf('package_type');
    delivery_days := json.IntOf('delivery_days');
    guaranteed_service := json.BoolOf('guaranteed_service');
    estimated_delivery_date := json.StringOf('estimated_delivery_date');
    carrier_delivery_days := json.StringOf('carrier_delivery_days');
    ship_date := json.StringOf('ship_date');
    negotiated_rate := json.BoolOf('negotiated_rate');
    service_type := json.StringOf('service_type');
    service_code := json.StringOf('service_code');
    trackable := json.BoolOf('trackable');
    carrier_code := json.StringOf('carrier_code');
    carrier_nickname := json.StringOf('carrier_nickname');
    carrier_friendly_name := json.StringOf('carrier_friendly_name');
    validation_status := json.StringOf('validation_status');
    j := 0;
    count_j := json.SizeOfArray('warning_messages');
    while j < count_j do
      begin
        json.J := j;
        j := j + 1;
      end;

    j := 0;
    count_j := json.SizeOfArray('error_messages');
    while j < count_j do
      begin
        json.J := j;
        j := j + 1;
      end;

    i := i + 1;
  end;

Curl Command

curl -X POST
	-H "API-Key: {{API_KEY}}"
	-H "Content-Type: application/json"
	-d '{
	"carrier_ids": [
		"{{stamps_com}}",
		"{{fedex}}",
		"{{ups}}"
	],
	"from_country_code": "US",
	"from_postal_code": "78756",
	"to_country_code": "US",
	"to_postal_code": "91521",
	"weight": {
		"value": 17,
		"unit": "pound"
	}
}'
https://api.shipengine.com/v1/rates/estimate

Postman Collection Item JSON

{
  "name": "Get rate estimates (minimal)",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "name": "Content-Type",
        "value": "application/json",
        "type": "text"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n\t\"carrier_ids\": [\n\t\t\"{{stamps_com}}\",\n\t\t\"{{fedex}}\",\n\t\t\"{{ups}}\"\n\t],\n\t\"from_country_code\": \"US\",\n\t\"from_postal_code\": \"78756\",\n\t\"to_country_code\": \"US\",\n\t\"to_postal_code\": \"91521\",\n\t\"weight\": {\n\t\t\"value\": 17,\n\t\t\"unit\": \"pound\"\n\t}\n}"
    },
    "url": {
      "raw": "https://api.shipengine.com/v1/rates/estimate",
      "protocol": "https",
      "host": [
        "api",
        "shipengine",
        "com"
      ],
      "path": [
        "v1",
        "rates",
        "estimate"
      ]
    },
    "description": "This request shows you how to get rate estimates when you don't know the full delivery address yet."
  },
  "response": [
    {
      "name": "Get rate estimates (minimal)",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "name": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"carrier_id\": \"{{stamps_com}}\",\n\t\"from_country_code\": \"US\",\n\t\"from_postal_code\": \"78756\",\n\t\"to_country_code\": \"US\",\n\t\"to_postal_code\": \"91521\",\n\t\"weight\": {\n\t\t\"value\": 17,\n\t\t\"unit\": \"pound\"\n\t}\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.shipengine.com/v1/rates/estimate",
          "protocol": "https",
          "host": [
            "api",
            "shipengine",
            "com"
          ],
          "path": [
            "v1",
            "rates",
            "estimate"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Tue, 17 Sep 2019 17:48:57 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json; charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "14422"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Access-Control-Allow-Origin",
          "value": "https://www.shipengine.com"
        },
        {
          "key": "Vary",
          "value": "Origin"
        },
        {
          "key": "x-shipengine-requestid",
          "value": "a0122561-502b-4e6e-93d1-f1498bf6a0b3"
        }
      ],
      "cookie": [
      ],
      "body": "[\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 11.07\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"package\",\n        \"delivery_days\": 7,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-24T00:00:00Z\",\n        \"carrier_delivery_days\": \"6\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Media Mail\",\n        \"service_code\": \"usps_media_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 38.98\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"package\",\n        \"delivery_days\": 7,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-24T00:00:00Z\",\n        \"carrier_delivery_days\": \"6\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Parcel Select Ground\",\n        \"service_code\": \"usps_parcel_select\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 39.23\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"package\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 12.72\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"medium_flat_rate_box\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 6.98\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"small_flat_rate_box\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 17.47\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"large_flat_rate_box\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 6.48\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"flat_rate_envelope\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 7.03\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"flat_rate_padded_envelope\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 16.1\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"regional_rate_box_b\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 6.78\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"flat_rate_legal_envelope\",\n        \"delivery_days\": 3,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-20T00:00:00Z\",\n        \"carrier_delivery_days\": \"3\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail\",\n        \"service_code\": \"usps_priority_mail\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 103.04\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"package\",\n        \"delivery_days\": 2,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n        \"carrier_delivery_days\": \"1-2\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail Express\",\n        \"service_code\": \"usps_priority_mail_express\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 22.68\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"flat_rate_envelope\",\n        \"delivery_days\": 2,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n        \"carrier_delivery_days\": \"1-2\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail Express\",\n        \"service_code\": \"usps_priority_mail_express\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 23.18\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"flat_rate_padded_envelope\",\n        \"delivery_days\": 2,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n        \"carrier_delivery_days\": \"1-2\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail Express\",\n        \"service_code\": \"usps_priority_mail_express\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    },\n    {\n        \"rate_type\": \"check\",\n        \"carrier_id\": \"se-121861\",\n        \"shipping_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 22.8\n        },\n        \"insurance_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"confirmation_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"other_amount\": {\n            \"currency\": \"usd\",\n            \"amount\": 0\n        },\n        \"zone\": 6,\n        \"package_type\": \"flat_rate_legal_envelope\",\n        \"delivery_days\": 2,\n        \"guaranteed_service\": false,\n        \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n        \"carrier_delivery_days\": \"1-2\",\n        \"ship_date\": \"2019-09-17T00:00:00Z\",\n        \"negotiated_rate\": false,\n        \"service_type\": \"USPS Priority Mail Express\",\n        \"service_code\": \"usps_priority_mail_express\",\n        \"trackable\": true,\n        \"carrier_code\": \"stamps_com\",\n        \"carrier_nickname\": \"ShipEngine Test Account - Stamps.com\",\n        \"carrier_friendly_name\": \"Stamps.com\",\n        \"validation_status\": \"unknown\",\n        \"warning_messages\": [],\n        \"error_messages\": []\n    }\n]"
    }
  ]
}