Chilkat Online Tools

SQL Server / ShipEngine Walkthrough / Get previously-quoted rates for a shipment

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'API-Key', '{{API_KEY}}'

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @http, 'QuickGetSb', @success OUT, 'https://api.shipengine.com/v1/shipments/se-123456/rates', @sbResponseBody
    IF @success = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        RETURN
      END

    DECLARE @jarrResp int
    -- Use "Chilkat_9_5_0.JsonArray" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonArray', @jarrResp OUT

    EXEC sp_OAMethod @jarrResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jarrResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jarrResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @http, 'LastStatus', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @http, 'LastHeader', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jarrResp
        RETURN
      END

    -- 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

    DECLARE @json int

    DECLARE @rate_request_id nvarchar(4000)

    DECLARE @shipment_id nvarchar(4000)

    DECLARE @created_at nvarchar(4000)

    DECLARE @status nvarchar(4000)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @rate_id nvarchar(4000)

    DECLARE @rate_type nvarchar(4000)

    DECLARE @carrier_id nvarchar(4000)

    DECLARE @v_Currency nvarchar(4000)

    DECLARE @Amount nvarchar(4000)

    DECLARE @insurance_amountCurrency nvarchar(4000)

    DECLARE @insurance_amountAmount int

    DECLARE @confirmation_amountCurrency nvarchar(4000)

    DECLARE @confirmation_amountAmount int

    DECLARE @other_amountCurrency nvarchar(4000)

    DECLARE @other_amountAmount int

    DECLARE @zone nvarchar(4000)

    DECLARE @package_type nvarchar(4000)

    DECLARE @delivery_days int

    DECLARE @guaranteed_service int

    DECLARE @estimated_delivery_date nvarchar(4000)

    DECLARE @carrier_delivery_days nvarchar(4000)

    DECLARE @ship_date nvarchar(4000)

    DECLARE @negotiated_rate int

    DECLARE @service_type nvarchar(4000)

    DECLARE @service_code nvarchar(4000)

    DECLARE @trackable int

    DECLARE @carrier_code nvarchar(4000)

    DECLARE @carrier_nickname nvarchar(4000)

    DECLARE @carrier_friendly_name nvarchar(4000)

    DECLARE @validation_status nvarchar(4000)

    DECLARE @k int

    DECLARE @count_k int

    DECLARE @strVal nvarchar(4000)

    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAGetProperty @jarrResp, 'Size', @count_i OUT
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OAMethod @jarrResp, 'ObjectAt', @json OUT, @i
        EXEC sp_OAMethod @json, 'StringOf', @rate_request_id OUT, 'rate_request_id'
        EXEC sp_OAMethod @json, 'StringOf', @shipment_id OUT, 'shipment_id'
        EXEC sp_OAMethod @json, 'StringOf', @created_at OUT, 'created_at'
        EXEC sp_OAMethod @json, 'StringOf', @status OUT, 'status'
        SELECT @j = 0
        EXEC sp_OAMethod @json, 'SizeOfArray', @count_j OUT, 'rates'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @json, 'J', @j
            EXEC sp_OAMethod @json, 'StringOf', @rate_id OUT, 'rates[j].rate_id'
            EXEC sp_OAMethod @json, 'StringOf', @rate_type OUT, 'rates[j].rate_type'
            EXEC sp_OAMethod @json, 'StringOf', @carrier_id OUT, 'rates[j].carrier_id'
            EXEC sp_OAMethod @json, 'StringOf', @v_Currency OUT, 'rates[j].shipping_amount.currency'
            EXEC sp_OAMethod @json, 'StringOf', @Amount OUT, 'rates[j].shipping_amount.amount'
            EXEC sp_OAMethod @json, 'StringOf', @insurance_amountCurrency OUT, 'rates[j].insurance_amount.currency'
            EXEC sp_OAMethod @json, 'IntOf', @insurance_amountAmount OUT, 'rates[j].insurance_amount.amount'
            EXEC sp_OAMethod @json, 'StringOf', @confirmation_amountCurrency OUT, 'rates[j].confirmation_amount.currency'
            EXEC sp_OAMethod @json, 'IntOf', @confirmation_amountAmount OUT, 'rates[j].confirmation_amount.amount'
            EXEC sp_OAMethod @json, 'StringOf', @other_amountCurrency OUT, 'rates[j].other_amount.currency'
            EXEC sp_OAMethod @json, 'IntOf', @other_amountAmount OUT, 'rates[j].other_amount.amount'
            EXEC sp_OAMethod @json, 'StringOf', @zone OUT, 'rates[j].zone'
            EXEC sp_OAMethod @json, 'StringOf', @package_type OUT, 'rates[j].package_type'
            EXEC sp_OAMethod @json, 'IntOf', @delivery_days OUT, 'rates[j].delivery_days'
            EXEC sp_OAMethod @json, 'BoolOf', @guaranteed_service OUT, 'rates[j].guaranteed_service'
            EXEC sp_OAMethod @json, 'StringOf', @estimated_delivery_date OUT, 'rates[j].estimated_delivery_date'
            EXEC sp_OAMethod @json, 'StringOf', @carrier_delivery_days OUT, 'rates[j].carrier_delivery_days'
            EXEC sp_OAMethod @json, 'StringOf', @ship_date OUT, 'rates[j].ship_date'
            EXEC sp_OAMethod @json, 'BoolOf', @negotiated_rate OUT, 'rates[j].negotiated_rate'
            EXEC sp_OAMethod @json, 'StringOf', @service_type OUT, 'rates[j].service_type'
            EXEC sp_OAMethod @json, 'StringOf', @service_code OUT, 'rates[j].service_code'
            EXEC sp_OAMethod @json, 'BoolOf', @trackable OUT, 'rates[j].trackable'
            EXEC sp_OAMethod @json, 'StringOf', @carrier_code OUT, 'rates[j].carrier_code'
            EXEC sp_OAMethod @json, 'StringOf', @carrier_nickname OUT, 'rates[j].carrier_nickname'
            EXEC sp_OAMethod @json, 'StringOf', @carrier_friendly_name OUT, 'rates[j].carrier_friendly_name'
            EXEC sp_OAMethod @json, 'StringOf', @validation_status OUT, 'rates[j].validation_status'
            SELECT @k = 0
            EXEC sp_OAMethod @json, 'SizeOfArray', @count_k OUT, 'rates[j].warning_messages'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @json, 'K', @k
                EXEC sp_OAMethod @json, 'StringOf', @strVal OUT, 'rates[j].warning_messages[k]'
                SELECT @k = @k + 1
              END
            SELECT @k = 0
            EXEC sp_OAMethod @json, 'SizeOfArray', @count_k OUT, 'rates[j].error_messages'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @json, 'K', @k
                SELECT @k = @k + 1
              END
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @json, 'SizeOfArray', @count_j OUT, 'invalid_rates'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @json, 'J', @j
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @json, 'SizeOfArray', @count_j OUT, 'errors'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @json, 'J', @j
            SELECT @j = @j + 1
          END
        EXEC @hr = sp_OADestroy @json

        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jarrResp


END
GO

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]"
    }
  ]
}