Chilkat Online Tools

autoit / ShipEngine Walkthrough / Get previously-quoted rates for a shipment

Back to Collection Items

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

$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess

$oHttp.SetRequestHeader "API-Key","{{API_KEY}}"

$oSbResponseBody = ObjCreate("Chilkat.StringBuilder")
$bSuccess = $oHttp.QuickGetSb("https://api.shipengine.com/v1/shipments/se-123456/rates",$oSbResponseBody)
If ($bSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

$oJarrResp = ObjCreate("Chilkat.JsonArray")
$oJarrResp.LoadSb($oSbResponseBody)
$oJarrResp.EmitCompact = False

ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oJarrResp.Emit() & @CRLF)

Local $iRespStatusCode = $oHttp.LastStatus
ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode >= 400) Then
    ConsoleWrite("Response Header:" & @CRLF)
    ConsoleWrite($oHttp.LastHeader & @CRLF)
    ConsoleWrite("Failed." & @CRLF)
    Exit
EndIf

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

; [
;   {
;     "rates": [
;       {
;         "rate_id": "se-12445217",
;         "rate_type": "shipment",
;         "carrier_id": "se-121862",
;         "shipping_amount": {
;           "currency": "usd",
;           "amount": 65.58
;         },
;         "insurance_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "confirmation_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "other_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "zone": null,
;         "package_type": null,
;         "delivery_days": 4,
;         "guaranteed_service": true,
;         "estimated_delivery_date": "2019-09-23T23:00:00Z",
;         "carrier_delivery_days": "Monday 9/23 by 11:00 PM",
;         "ship_date": "2019-09-17T00:00:00Z",
;         "negotiated_rate": false,
;         "service_type": "UPSĀ® Ground",
;         "service_code": "ups_ground",
;         "trackable": true,
;         "carrier_code": "ups",
;         "carrier_nickname": "ShipEngine Test Account - UPS",
;         "carrier_friendly_name": "UPS",
;         "validation_status": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445218",
;         "rate_type": "shipment",
;         "carrier_id": "se-121861",
;         "shipping_amount": {
;           "currency": "usd",
;           "amount": 98.14
;         },
;         "insurance_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "confirmation_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "other_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "zone": 7,
;         "package_type": "package",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445219",
;         "rate_type": "shipment",
;         "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": 7,
;         "package_type": "medium_flat_rate_box",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445220",
;         "rate_type": "shipment",
;         "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": 7,
;         "package_type": "small_flat_rate_box",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445221",
;         "rate_type": "shipment",
;         "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": 7,
;         "package_type": "large_flat_rate_box",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445222",
;         "rate_type": "shipment",
;         "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": 7,
;         "package_type": "flat_rate_envelope",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "has_warnings",
;         "warning_messages": [
;           "Heads up! You've included custom dimensions for a package type with a standardized size. For more accurate rates, consider removing the dimensions for this shipment."
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445223",
;         "rate_type": "shipment",
;         "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": 7,
;         "package_type": "flat_rate_padded_envelope",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445224",
;         "rate_type": "shipment",
;         "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": 7,
;         "package_type": "flat_rate_legal_envelope",
;         "delivery_days": 2,
;         "guaranteed_service": false,
;         "estimated_delivery_date": "2019-09-19T00:00:00Z",
;         "carrier_delivery_days": "2",
;         "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": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       },
;       {
;         "rate_id": "se-12445225",
;         "rate_type": "shipment",
;         "carrier_id": "se-121863",
;         "shipping_amount": {
;           "currency": "usd",
;           "amount": 58.37
;         },
;         "insurance_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "confirmation_amount": {
;           "currency": "usd",
;           "amount": 0
;         },
;         "other_amount": {
;           "currency": "usd",
;           "amount": 4.09
;         },
;         "zone": null,
;         "package_type": null,
;         "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": "FedEx GroundĀ®",
;         "service_code": "fedex_ground",
;         "trackable": true,
;         "carrier_code": "fedex",
;         "carrier_nickname": "ShipEngine Test Account - FedEx",
;         "carrier_friendly_name": "FedEx",
;         "validation_status": "valid",
;         "warning_messages": [
;         ],
;         "error_messages": [
;         ]
;       }
;     ],
;     "invalid_rates": [
;     ],
;     "rate_request_id": "se-1426444",
;     "shipment_id": "se-4134507",
;     "created_at": "2019-09-17T18:39:23.03Z",
;     "status": "completed",
;     "errors": [
;     ]
;   }
; ]

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

Local $oJson
Local $sRate_request_id
Local $shipment_id
Local $sCreated_at
Local $status
Local $iJ
Local $iCount_j
Local $sRate_id
Local $sRate_type
Local $sCarrier_id
Local $sV_Currency
Local $sAmount
Local $sInsurance_amountCurrency
Local $insurance_amountAmount
Local $sConfirmation_amountCurrency
Local $iConfirmation_amountAmount
Local $sOther_amountCurrency
Local $iOther_amountAmount
Local $sZone
Local $sPackage_type
Local $iDelivery_days
Local $bGuaranteed_service
Local $sEstimated_delivery_date
Local $sCarrier_delivery_days
Local $ship_date
Local $bNegotiated_rate
Local $service_type
Local $service_code
Local $bTrackable
Local $sCarrier_code
Local $sCarrier_nickname
Local $sCarrier_friendly_name
Local $sValidation_status
Local $iK
Local $iCount_k
Local $strVal

Local $i = 0
Local $iCount_i = $oJarrResp.Size
While $i < $iCount_i
    $oJson = $oJarrResp.ObjectAt($i)
    $sRate_request_id = $oJson.StringOf("rate_request_id")
    $shipment_id = $oJson.StringOf("shipment_id")
    $sCreated_at = $oJson.StringOf("created_at")
    $status = $oJson.StringOf("status")
    $iJ = 0
    $iCount_j = $oJson.SizeOfArray("rates")
    While $iJ < $iCount_j
        $oJson.J = $iJ
        $sRate_id = $oJson.StringOf("rates[j].rate_id")
        $sRate_type = $oJson.StringOf("rates[j].rate_type")
        $sCarrier_id = $oJson.StringOf("rates[j].carrier_id")
        $sV_Currency = $oJson.StringOf("rates[j].shipping_amount.currency")
        $sAmount = $oJson.StringOf("rates[j].shipping_amount.amount")
        $sInsurance_amountCurrency = $oJson.StringOf("rates[j].insurance_amount.currency")
        $insurance_amountAmount = $oJson.IntOf("rates[j].insurance_amount.amount")
        $sConfirmation_amountCurrency = $oJson.StringOf("rates[j].confirmation_amount.currency")
        $iConfirmation_amountAmount = $oJson.IntOf("rates[j].confirmation_amount.amount")
        $sOther_amountCurrency = $oJson.StringOf("rates[j].other_amount.currency")
        $iOther_amountAmount = $oJson.IntOf("rates[j].other_amount.amount")
        $sZone = $oJson.StringOf("rates[j].zone")
        $sPackage_type = $oJson.StringOf("rates[j].package_type")
        $iDelivery_days = $oJson.IntOf("rates[j].delivery_days")
        $bGuaranteed_service = $oJson.BoolOf("rates[j].guaranteed_service")
        $sEstimated_delivery_date = $oJson.StringOf("rates[j].estimated_delivery_date")
        $sCarrier_delivery_days = $oJson.StringOf("rates[j].carrier_delivery_days")
        $ship_date = $oJson.StringOf("rates[j].ship_date")
        $bNegotiated_rate = $oJson.BoolOf("rates[j].negotiated_rate")
        $service_type = $oJson.StringOf("rates[j].service_type")
        $service_code = $oJson.StringOf("rates[j].service_code")
        $bTrackable = $oJson.BoolOf("rates[j].trackable")
        $sCarrier_code = $oJson.StringOf("rates[j].carrier_code")
        $sCarrier_nickname = $oJson.StringOf("rates[j].carrier_nickname")
        $sCarrier_friendly_name = $oJson.StringOf("rates[j].carrier_friendly_name")
        $sValidation_status = $oJson.StringOf("rates[j].validation_status")
        $iK = 0
        $iCount_k = $oJson.SizeOfArray("rates[j].warning_messages")
        While $iK < $iCount_k
            $oJson.K = $iK
            $strVal = $oJson.StringOf("rates[j].warning_messages[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJson.SizeOfArray("rates[j].error_messages")
        While $iK < $iCount_k
            $oJson.K = $iK
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJson.SizeOfArray("invalid_rates")
    While $iJ < $iCount_j
        $oJson.J = $iJ
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJson.SizeOfArray("errors")
    While $iJ < $iCount_j
        $oJson.J = $iJ
        $iJ = $iJ + 1
    Wend

    $i = $i + 1
Wend

Curl Command

curl -X GET
	-H "API-Key: {{API_KEY}}"
https://api.shipengine.com/v1/shipments/se-123456/rates

Postman Collection Item JSON

{
  "name": "Get previously-quoted rates for a shipment",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          "let response = pm.response.json();",
          "",
          "if (response[0].rates.length > 0) {",
          "    pm.collectionVariables.set(\"rate_id\", response[0].rates[0].rate_id);",
          "}"
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://api.shipengine.com/v1/shipments/{{shipment_id}}/rates",
      "protocol": "https",
      "host": [
        "api",
        "shipengine",
        "com"
      ],
      "path": [
        "v1",
        "shipments",
        "{{shipment_id}}",
        "rates"
      ]
    },
    "description": "ShipEngine keeps a record of all quoted rates for a shipment.  This request shows you how to retrieve those previously-quoted rates."
  },
  "response": [
    {
      "name": "Get previously-quoted rates for a shipment",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "https://api.shipengine.com/v1/shipments/{{shipment_id}}/rates",
          "protocol": "https",
          "host": [
            "api",
            "shipengine",
            "com"
          ],
          "path": [
            "v1",
            "shipments",
            "{{shipment_id}}",
            "rates"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Tue, 17 Sep 2019 18:39:29 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json; charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "11277"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Access-Control-Allow-Origin",
          "value": "https://www.shipengine.com"
        },
        {
          "key": "Vary",
          "value": "Origin"
        },
        {
          "key": "server",
          "value": "Microsoft-IIS/8.0"
        },
        {
          "key": "x-newrelic-app-data",
          "value": "PxQGVFZXCgITVVZbAwMCV1YGFB9AMQYAZBBZDEtZV0ZaCldOZgRRIzR/GDIOCkheVQoVERh2UhI2UEJWESAMEGMKURJVXVpGEUkJTwFNAUxWDgZRVlUNBBxJUE4VBgBXVQYPACZWVSFzI3lbexoYVFIJSgRs"
        },
        {
          "key": "x-powered-by",
          "value": "ASP.NET"
        },
        {
          "key": "x-shipengine-environment",
          "value": "j"
        },
        {
          "key": "x-shipengine-requestid",
          "value": "d42d0c3b-99d2-45ac-a03a-c9e1bb7bbfd6"
        },
        {
          "key": "x-shipengine-server",
          "value": "SS-J-WEB01"
        }
      ],
      "cookie": [
      ],
      "body": "[\n    {\n        \"rates\": [\n            {\n                \"rate_id\": \"se-12445217\",\n                \"rate_type\": \"shipment\",\n                \"carrier_id\": \"se-121862\",\n                \"shipping_amount\": {\n                    \"currency\": \"usd\",\n                    \"amount\": 65.58\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\": null,\n                \"package_type\": null,\n                \"delivery_days\": 4,\n                \"guaranteed_service\": true,\n                \"estimated_delivery_date\": \"2019-09-23T23:00:00Z\",\n                \"carrier_delivery_days\": \"Monday 9/23 by 11:00 PM\",\n                \"ship_date\": \"2019-09-17T00:00:00Z\",\n                \"negotiated_rate\": false,\n                \"service_type\": \"UPS® Ground\",\n                \"service_code\": \"ups_ground\",\n                \"trackable\": true,\n                \"carrier_code\": \"ups\",\n                \"carrier_nickname\": \"ShipEngine Test Account - UPS\",\n                \"carrier_friendly_name\": \"UPS\",\n                \"validation_status\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445218\",\n                \"rate_type\": \"shipment\",\n                \"carrier_id\": \"se-121861\",\n                \"shipping_amount\": {\n                    \"currency\": \"usd\",\n                    \"amount\": 98.14\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\": 7,\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\": \"2\",\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\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445219\",\n                \"rate_type\": \"shipment\",\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\": 7,\n                \"package_type\": \"medium_flat_rate_box\",\n                \"delivery_days\": 2,\n                \"guaranteed_service\": false,\n                \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n                \"carrier_delivery_days\": \"2\",\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\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445220\",\n                \"rate_type\": \"shipment\",\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\": 7,\n                \"package_type\": \"small_flat_rate_box\",\n                \"delivery_days\": 2,\n                \"guaranteed_service\": false,\n                \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n                \"carrier_delivery_days\": \"2\",\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\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445221\",\n                \"rate_type\": \"shipment\",\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\": 7,\n                \"package_type\": \"large_flat_rate_box\",\n                \"delivery_days\": 2,\n                \"guaranteed_service\": false,\n                \"estimated_delivery_date\": \"2019-09-19T00:00:00Z\",\n                \"carrier_delivery_days\": \"2\",\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\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445222\",\n                \"rate_type\": \"shipment\",\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\": 7,\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\": \"2\",\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\": \"has_warnings\",\n                \"warning_messages\": [\n                    \"Heads up! You've included custom dimensions for a package type with a standardized size. For more accurate rates, consider removing the dimensions for this shipment.\"\n                ],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445223\",\n                \"rate_type\": \"shipment\",\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\": 7,\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\": \"2\",\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\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445224\",\n                \"rate_type\": \"shipment\",\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\": 7,\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\": \"2\",\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\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            },\n            {\n                \"rate_id\": \"se-12445225\",\n                \"rate_type\": \"shipment\",\n                \"carrier_id\": \"se-121863\",\n                \"shipping_amount\": {\n                    \"currency\": \"usd\",\n                    \"amount\": 58.37\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\": 4.09\n                },\n                \"zone\": null,\n                \"package_type\": null,\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\": \"FedEx Ground®\",\n                \"service_code\": \"fedex_ground\",\n                \"trackable\": true,\n                \"carrier_code\": \"fedex\",\n                \"carrier_nickname\": \"ShipEngine Test Account - FedEx\",\n                \"carrier_friendly_name\": \"FedEx\",\n                \"validation_status\": \"valid\",\n                \"warning_messages\": [],\n                \"error_messages\": []\n            }\n        ],\n        \"invalid_rates\": [],\n        \"rate_request_id\": \"se-1426444\",\n        \"shipment_id\": \"se-4134507\",\n        \"created_at\": \"2019-09-17T18:39:23.03Z\",\n        \"status\": \"completed\",\n        \"errors\": []\n    }\n]"
    }
  ]
}