---
title: Get Rate for Cart
slug: api-documentation/get-rate-for-cart
docTags: 
createdAt: 2026-08-27T17:08:07.245Z
---

{
  "id": "TZCxF-zj_FTuhq82WFV6D",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/shipping-method/rate/cart",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/shipping-method/rate/cart"
      }
    ],
    "name": "Get Rate for Cart",
    "description": "<p>This endpoint returns the shipping rate for the current cart.</p>\n<p>Authorized permissions:</p>\n<ul>\n<li><code>shipping.method.read</code></li>\n</ul>\n<p>Authorized roles:</p>\n<ul>\n<li>customer.default</li>\n<li>customer.anonymous</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site this call is for."
        },
        {
          "kind": "optional",
          "name": "x-upstart-site",
          "type": "string",
          "description": "Unique identifier for the site."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The request must provide details of the cart for which shipping rate should be calculated.",
          "customType": "CartShippingRatesRequest",
          "schema": [
            {
              "name": "country",
              "kind": "optional",
              "type": "string",
              "description": "This represents the target country.",
              "example": "USA"
            },
            {
              "name": "currency",
              "kind": "required",
              "type": "string",
              "description": "<p>The <a href=\"https://en.wikipedia.org/wiki/ISO_4217\" target=\"_blank\">3-character ISO code</a>.</p>",
              "example": "USD"
            },
            {
              "name": "distanceUnit",
              "kind": "required",
              "type": "string",
              "description": "An enumeration of the supported distance measurements.",
              "modelRef": "#/components/schemas/DistanceUnits",
              "customType": "DistanceUnits",
              "schema": []
            },
            {
              "name": "id",
              "kind": "required",
              "type": "string<uuid>",
              "description": "Unique identifier for a cart.",
              "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
              "format": "uuid"
            },
            {
              "name": "items",
              "kind": "required",
              "type": "array",
              "description": "An array of the items in the current cart.",
              "modelRef": "#/components/schemas/CartItem",
              "customType": "CartItem[]",
              "schema": [
                {
                  "name": "catalogItemId",
                  "kind": "required",
                  "type": "string",
                  "description": "Unique identifier for a catalog item.",
                  "example": "catalogItemId"
                },
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "Unique identifier for a cart item.",
                  "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                  "format": "uuid"
                },
                {
                  "name": "pricing",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/CartItemPricing",
                  "customType": "CartItemPricing",
                  "schema": [
                    {
                      "name": "basePrice",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/BasePrice",
                      "customType": "BasePrice",
                      "schema": [
                        {
                          "name": "price",
                          "kind": "required",
                          "type": "number",
                          "description": ""
                        },
                        {
                          "name": "type",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        },
                        {
                          "name": "zone",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        }
                      ]
                    },
                    {
                      "name": "feePriceAdjustments",
                      "kind": "required",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/FeePriceAdjustment",
                      "customType": "FeePriceAdjustment[]",
                      "schema": [
                        {
                          "name": "id",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        },
                        {
                          "name": "value",
                          "kind": "required",
                          "type": "number",
                          "description": ""
                        }
                      ]
                    },
                    {
                      "name": "promotionPriceAdjustments",
                      "kind": "required",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/PromotionPriceAdjustment",
                      "customType": "PromotionPriceAdjustment[]",
                      "schema": [
                        {
                          "name": "id",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        },
                        {
                          "name": "value",
                          "kind": "required",
                          "type": "number",
                          "description": ""
                        }
                      ]
                    },
                    {
                      "name": "taxPriceAdjustment",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/TaxPriceAdjustment",
                      "customType": "TaxPriceAdjustment",
                      "schema": [
                        {
                          "name": "taxCode",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        },
                        {
                          "name": "value",
                          "kind": "optional",
                          "type": "number",
                          "description": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "productItemSkuId",
                  "kind": "required",
                  "type": "string",
                  "description": "<p>Unique identifier of the stock keeping unit (SKU) of an item.</p>",
                  "example": "SKU_item1"
                },
                {
                  "name": "quantity",
                  "kind": "required",
                  "type": "integer<int32>",
                  "description": "The quantity of this item in a cart.",
                  "example": 1,
                  "format": "int32"
                },
                {
                  "name": "shipmentId",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "Unique identifier for a cart shipment.",
                  "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                  "format": "uuid"
                }
              ]
            },
            {
              "name": "locationId",
              "kind": "optional",
              "type": "string",
              "description": "Unique identifier for the location to which a shipment should be sent.",
              "example": "locationToId"
            },
            {
              "name": "postalCode",
              "kind": "optional",
              "type": "string",
              "description": "This represents the ZIP code.",
              "example": "43234"
            },
            {
              "name": "shipments",
              "kind": "required",
              "type": "array",
              "description": "This represents the list of shipments.",
              "modelRef": "#/components/schemas/CartShipmentRequest",
              "customType": "CartShipmentRequest[]",
              "schema": [
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "Unique identifier for a cart shipment.",
                  "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                  "format": "uuid"
                },
                {
                  "name": "shippingMethodId",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "Unique identifier for a cart shipping method.",
                  "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                  "format": "uuid"
                },
                {
                  "name": "rateServiceCode",
                  "kind": "optional",
                  "type": "string",
                  "description": "This represents the rate service code.",
                  "example": "rateServiceCode"
                },
                {
                  "name": "trackingNumber",
                  "kind": "optional",
                  "type": "string",
                  "description": "This represents the tracking number.",
                  "example": "123456789"
                }
              ]
            },
            {
              "name": "shippingAddress",
              "kind": "optional",
              "type": "object",
              "description": "Standardized format for global addresses.",
              "modelRef": "#/components/schemas/Address",
              "customType": "Address",
              "schema": [
                {
                  "name": "street1",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "street2",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "city",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "county",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "stateOrRegion",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "country",
                  "kind": "required",
                  "type": "string",
                  "description": "Defaults to US.",
                  "minLength": 2,
                  "maxLength": 2
                },
                {
                  "name": "postalCode",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "poBox",
                  "kind": "optional",
                  "type": "boolean",
                  "description": ""
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/Name",
                  "customType": "Name",
                  "schema": [
                    {
                      "name": "first",
                      "kind": "required",
                      "type": "string",
                      "description": "The first name of the individual being addressed.",
                      "example": "John"
                    },
                    {
                      "name": "last",
                      "kind": "required",
                      "type": "string",
                      "description": "The last name of the individual being addressed.",
                      "example": "Smith"
                    },
                    {
                      "name": "middleInitial",
                      "kind": "optional",
                      "type": "string",
                      "description": "The middle initial of the individual being addressed.",
                      "example": "D."
                    },
                    {
                      "name": "salutation",
                      "kind": "optional",
                      "type": "string",
                      "description": "The salutation of the individual being addressed.",
                      "example": "Capt."
                    },
                    {
                      "name": "suffix",
                      "kind": "optional",
                      "type": "string",
                      "description": "The optional suffix of the individual being addressed.",
                      "example": "Sr."
                    }
                  ]
                },
                {
                  "name": "businessName",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "phoneNumber",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "shippingCoordinates",
              "kind": "optional",
              "type": "object",
              "description": "Represents geographical coordinates with latitude and longitude.",
              "modelRef": "#/components/schemas/Coordinates",
              "customType": "Coordinates",
              "schema": [
                {
                  "name": "latitude",
                  "kind": "required",
                  "type": "number<double>",
                  "description": "The latitude of the coordinate.",
                  "example": 37.7749,
                  "format": "double"
                },
                {
                  "name": "longitude",
                  "kind": "required",
                  "type": "number<double>",
                  "description": "The longitude of the coordinate.",
                  "example": -122.4194,
                  "format": "double"
                }
              ]
            },
            {
              "name": "stateOrRegion",
              "kind": "optional",
              "type": "string",
              "description": "This represents the target state or region.",
              "example": "California"
            },
            {
              "name": "metadata",
              "kind": "optional",
              "type": "object",
              "description": "Metadata about the shipment calculation that are specific per calculator.",
              "example": "",
              "schema": []
            },
            {
              "name": "pricing",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/CartPricing",
              "customType": "CartPricing",
              "schema": [
                {
                  "name": "promotionPriceAdjustments",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/CartPromotionPriceAdjustment",
                  "customType": "CartPromotionPriceAdjustment[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "required",
                      "type": "string",
                      "description": ""
                    },
                    {
                      "name": "value",
                      "kind": "required",
                      "type": "number",
                      "description": ""
                    },
                    {
                      "name": "itemIds",
                      "kind": "required",
                      "type": "array",
                      "description": "",
                      "example": "",
                      "itemType": "string",
                      "customType": "string[]",
                      "itemExample": "",
                      "itemDefault": ""
                    }
                  ]
                },
                {
                  "name": "totalItemsPrice",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Cart items price including base price, promotions, fees. Excluding tax.</p>"
                },
                {
                  "name": "totalItemsBasePrice",
                  "kind": "optional",
                  "type": "number",
                  "description": "Cart items base price."
                },
                {
                  "name": "totalFee",
                  "kind": "optional",
                  "type": "number",
                  "description": "Total fees."
                },
                {
                  "name": "totalTax",
                  "kind": "optional",
                  "type": "number",
                  "description": "Total tax."
                },
                {
                  "name": "totalItemCartPromotion",
                  "kind": "optional",
                  "type": "number",
                  "description": "All item and cart promotion adjustments."
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/CartShippingRatesRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "LoggedIn",
          "name": "LoggedIn",
          "kind": "optional",
          "type": "http",
          "description": "The presence of this token indicates that the user is a known consumer that has previously logged into the platform.",
          "scheme": "bearer"
        },
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "id": "AnonymousAuth",
          "name": "AnonymousAuth",
          "kind": "optional",
          "type": "http",
          "description": "This is the most basic authentication. The minimum requirement for access is a token representing the user as an anonymous client.",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Success-shipping-rate calculation returned.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>This represents a successful response for the cart-shipping-rates request.</p>",
            "customType": "CartShippingRatesResponse",
            "schema": [
              {
                "name": "country",
                "kind": "optional",
                "type": "string",
                "description": "This represents the target country.",
                "example": "USA"
              },
              {
                "name": "currency",
                "kind": "required",
                "type": "string",
                "description": "<p>The <a href=\"https://en.wikipedia.org/wiki/ISO_4217\" target=\"_blank\">3-character ISO code</a>.</p>",
                "example": "USD"
              },
              {
                "name": "errors",
                "kind": "required",
                "type": "array",
                "description": "<p>This represents an array of errors, if applicable.</p>",
                "modelRef": "#/components/schemas/ErrorMessage",
                "customType": "ErrorMessage[]",
                "schema": [
                  {
                    "name": "level",
                    "kind": "required",
                    "type": "string<INFO | WARN | ERROR>",
                    "description": "Level of an error message.",
                    "example": "INFO",
                    "enum": [
                      "INFO",
                      "WARN",
                      "ERROR"
                    ]
                  },
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "string",
                    "description": "Code of an error message.",
                    "example": "ERR-123"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "Message of an error message.",
                    "example": "Something unexpected happened"
                  },
                  {
                    "name": "detail",
                    "kind": "optional",
                    "type": "string",
                    "description": "Details of an error message.",
                    "example": "Could not contact other service"
                  }
                ]
              },
              {
                "name": "id",
                "kind": "required",
                "type": "string<uuid>",
                "description": "Unique identifier for a cart.",
                "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                "format": "uuid"
              },
              {
                "name": "items",
                "kind": "required",
                "type": "array",
                "description": "An array of the items in the current cart.",
                "modelRef": "#/components/schemas/CartItem",
                "customType": "CartItem[]",
                "schema": [
                  {
                    "name": "catalogItemId",
                    "kind": "required",
                    "type": "string",
                    "description": "Unique identifier for a catalog item.",
                    "example": "catalogItemId"
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "Unique identifier for a cart item.",
                    "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                    "format": "uuid"
                  },
                  {
                    "name": "pricing",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/CartItemPricing",
                    "customType": "CartItemPricing",
                    "schema": [
                      {
                        "name": "basePrice",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/BasePrice",
                        "customType": "BasePrice",
                        "schema": [
                          {
                            "name": "price",
                            "kind": "required",
                            "type": "number",
                            "description": ""
                          },
                          {
                            "name": "type",
                            "kind": "required",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "zone",
                            "kind": "required",
                            "type": "string",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "feePriceAdjustments",
                        "kind": "required",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/FeePriceAdjustment",
                        "customType": "FeePriceAdjustment[]",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "required",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "value",
                            "kind": "required",
                            "type": "number",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "promotionPriceAdjustments",
                        "kind": "required",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/PromotionPriceAdjustment",
                        "customType": "PromotionPriceAdjustment[]",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "required",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "value",
                            "kind": "required",
                            "type": "number",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "taxPriceAdjustment",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/TaxPriceAdjustment",
                        "customType": "TaxPriceAdjustment",
                        "schema": [
                          {
                            "name": "taxCode",
                            "kind": "required",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "value",
                            "kind": "optional",
                            "type": "number",
                            "description": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "productItemSkuId",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>Unique identifier of the stock keeping unit (SKU) of an item.</p>",
                    "example": "SKU_item1"
                  },
                  {
                    "name": "quantity",
                    "kind": "required",
                    "type": "integer<int32>",
                    "description": "The quantity of this item in a cart.",
                    "example": 1,
                    "format": "int32"
                  },
                  {
                    "name": "shipmentId",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "Unique identifier for a cart shipment.",
                    "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                    "format": "uuid"
                  }
                ]
              },
              {
                "name": "locationId",
                "kind": "optional",
                "type": "string",
                "description": "Unique identifier for the location to which a shipment should be sent.",
                "example": "locationToId"
              },
              {
                "name": "postalCode",
                "kind": "optional",
                "type": "string",
                "description": "This represents the ZIP code.",
                "example": "43234"
              },
              {
                "name": "shipments",
                "kind": "required",
                "type": "array",
                "description": "This represents the list of shipments.",
                "modelRef": "#/components/schemas/CartShipmentResponse",
                "customType": "CartShipmentResponse[]",
                "schema": [
                  {
                    "name": "addressFrom",
                    "kind": "optional",
                    "type": "object",
                    "description": "Standardized format for global addresses.",
                    "modelRef": "#/components/schemas/Address",
                    "customType": "Address",
                    "schema": [
                      {
                        "name": "street1",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "street2",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "city",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "county",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stateOrRegion",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "country",
                        "kind": "required",
                        "type": "string",
                        "description": "Defaults to US.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      {
                        "name": "postalCode",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "poBox",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/Name",
                        "customType": "Name",
                        "schema": [
                          {
                            "name": "first",
                            "kind": "required",
                            "type": "string",
                            "description": "The first name of the individual being addressed.",
                            "example": "John"
                          },
                          {
                            "name": "last",
                            "kind": "required",
                            "type": "string",
                            "description": "The last name of the individual being addressed.",
                            "example": "Smith"
                          },
                          {
                            "name": "middleInitial",
                            "kind": "optional",
                            "type": "string",
                            "description": "The middle initial of the individual being addressed.",
                            "example": "D."
                          },
                          {
                            "name": "salutation",
                            "kind": "optional",
                            "type": "string",
                            "description": "The salutation of the individual being addressed.",
                            "example": "Capt."
                          },
                          {
                            "name": "suffix",
                            "kind": "optional",
                            "type": "string",
                            "description": "The optional suffix of the individual being addressed.",
                            "example": "Sr."
                          }
                        ]
                      },
                      {
                        "name": "businessName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "phoneNumber",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "addressTo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Standardized format for global addresses.",
                    "modelRef": "#/components/schemas/Address",
                    "customType": "Address",
                    "schema": [
                      {
                        "name": "street1",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "street2",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "city",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "county",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stateOrRegion",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "country",
                        "kind": "required",
                        "type": "string",
                        "description": "Defaults to US.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      {
                        "name": "postalCode",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "poBox",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/Name",
                        "customType": "Name",
                        "schema": [
                          {
                            "name": "first",
                            "kind": "required",
                            "type": "string",
                            "description": "The first name of the individual being addressed.",
                            "example": "John"
                          },
                          {
                            "name": "last",
                            "kind": "required",
                            "type": "string",
                            "description": "The last name of the individual being addressed.",
                            "example": "Smith"
                          },
                          {
                            "name": "middleInitial",
                            "kind": "optional",
                            "type": "string",
                            "description": "The middle initial of the individual being addressed.",
                            "example": "D."
                          },
                          {
                            "name": "salutation",
                            "kind": "optional",
                            "type": "string",
                            "description": "The salutation of the individual being addressed.",
                            "example": "Capt."
                          },
                          {
                            "name": "suffix",
                            "kind": "optional",
                            "type": "string",
                            "description": "The optional suffix of the individual being addressed.",
                            "example": "Sr."
                          }
                        ]
                      },
                      {
                        "name": "businessName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "phoneNumber",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "errors",
                    "kind": "required",
                    "type": "array",
                    "description": "<p>This represents an array of errors, if applicable.</p>",
                    "modelRef": "#/components/schemas/ErrorMessage",
                    "customType": "ErrorMessage[]",
                    "schema": [
                      {
                        "name": "level",
                        "kind": "required",
                        "type": "string<INFO | WARN | ERROR>",
                        "description": "Level of an error message.",
                        "example": "INFO",
                        "enum": [
                          "INFO",
                          "WARN",
                          "ERROR"
                        ]
                      },
                      {
                        "name": "code",
                        "kind": "required",
                        "type": "string",
                        "description": "Code of an error message.",
                        "example": "ERR-123"
                      },
                      {
                        "name": "message",
                        "kind": "optional",
                        "type": "string",
                        "description": "Message of an error message.",
                        "example": "Something unexpected happened"
                      },
                      {
                        "name": "detail",
                        "kind": "optional",
                        "type": "string",
                        "description": "Details of an error message.",
                        "example": "Could not contact other service"
                      }
                    ]
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "Unique identifier for a cart shipment.",
                    "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
                    "format": "uuid"
                  },
                  {
                    "name": "locationFromId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for the location from which a shipment is sent.",
                    "example": "locationFromId"
                  },
                  {
                    "name": "locationToId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for the location to which a shipment should be sent.",
                    "example": "locationToId"
                  },
                  {
                    "name": "packages",
                    "kind": "required",
                    "type": "array",
                    "description": "This represents shipping packages.",
                    "modelRef": "#/components/schemas/ShippingPackage",
                    "customType": "ShippingPackage[]",
                    "schema": [
                      {
                        "name": "dimensions",
                        "kind": "optional",
                        "type": "object",
                        "description": "Represents the dimensions of a shipping package.",
                        "modelRef": "#/components/schemas/Dimensions",
                        "customType": "Dimensions",
                        "schema": [
                          {
                            "name": "width",
                            "kind": "required",
                            "type": "number<double>",
                            "description": "The width of the package.",
                            "example": 10.5,
                            "format": "double"
                          },
                          {
                            "name": "length",
                            "kind": "required",
                            "type": "number<double>",
                            "description": "The length of the package.",
                            "example": 20,
                            "format": "double"
                          },
                          {
                            "name": "height",
                            "kind": "required",
                            "type": "number<double>",
                            "description": "The height of the package.",
                            "example": 15,
                            "format": "double"
                          },
                          {
                            "name": "unit",
                            "kind": "required",
                            "type": "string<cm | m | in | mm>",
                            "description": "The unit of measurement for dimensions.",
                            "example": "cm",
                            "enum": [
                              "cm",
                              "m",
                              "in",
                              "mm"
                            ]
                          }
                        ]
                      },
                      {
                        "name": "insuredValue",
                        "kind": "optional",
                        "type": "number",
                        "description": "This represents the value of an insurance.",
                        "example": 100,
                        "default": 0
                      },
                      {
                        "name": "packageCode",
                        "kind": "optional",
                        "type": "string",
                        "description": "This represents a package code.",
                        "example": "PackageCode",
                        "default": ""
                      },
                      {
                        "name": "weight",
                        "kind": "required",
                        "type": "object",
                        "description": "Represents the weight of a shipping package.",
                        "modelRef": "#/components/schemas/Weight",
                        "customType": "Weight",
                        "schema": [
                          {
                            "name": "value",
                            "kind": "required",
                            "type": "number<double>",
                            "description": "The weight value.",
                            "example": 2.5,
                            "format": "double"
                          },
                          {
                            "name": "unit",
                            "kind": "required",
                            "type": "string<g | kg | lb>",
                            "description": "The unit of measurement for the weight.",
                            "example": "kg",
                            "enum": [
                              "g",
                              "kg",
                              "lb"
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "rateServiceCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "This represents a rate service code.",
                    "example": "rateServiceCode"
                  },
                  {
                    "name": "rateVariants",
                    "kind": "required",
                    "type": "array",
                    "description": "This represents rate variants.",
                    "modelRef": "#/components/schemas/ShippingRate",
                    "customType": "ShippingRate[]",
                    "schema": [
                      {
                        "name": "carrierCode",
                        "kind": "required",
                        "type": "string",
                        "description": "Unique identifier for the carrier.",
                        "example": "carrierCode"
                      },
                      {
                        "name": "carrierDeliveryDates",
                        "kind": "required",
                        "type": "string",
                        "description": "This represents carrier delivery dates or delivery estimation."
                      },
                      {
                        "name": "carrierId",
                        "kind": "required",
                        "type": "string",
                        "description": "Unique identifier for the carrier.",
                        "example": "DHL"
                      },
                      {
                        "name": "deliveryDays",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "This represents a number of days to deliver a shipping.",
                        "example": 5,
                        "format": "int32"
                      },
                      {
                        "name": "estimatedDeliveryDate",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "This represents an estimated date of delivery.",
                        "example": "2017-07-21T17:32:28Z",
                        "format": "date-time"
                      },
                      {
                        "name": "packageType",
                        "kind": "optional",
                        "type": "string",
                        "description": "This represents a package type.",
                        "example": "packageType"
                      },
                      {
                        "name": "pricing",
                        "kind": "required",
                        "type": "object",
                        "description": "This represents a pricing of a shipping rate.",
                        "modelRef": "#/components/schemas/ShippingRatePricing",
                        "customType": "ShippingRatePricing",
                        "schema": [
                          {
                            "name": "confirmation",
                            "kind": "optional",
                            "type": "number",
                            "description": "This represents the confirmation.",
                            "example": 200
                          },
                          {
                            "name": "insurance",
                            "kind": "optional",
                            "type": "number",
                            "description": "This represents the value of an insurance.",
                            "example": 100
                          },
                          {
                            "name": "other",
                            "kind": "optional",
                            "type": "number",
                            "description": "This represents other pricing.",
                            "example": 10
                          },
                          {
                            "name": "shipping",
                            "kind": "required",
                            "type": "number",
                            "description": "This represents the value of a shipping.",
                            "example": 100
                          },
                          {
                            "name": "fee",
                            "kind": "optional",
                            "type": "number",
                            "description": "This represents the sum of all the additional shipping fees.",
                            "example": 20
                          }
                        ]
                      },
                      {
                        "name": "rateId",
                        "kind": "required",
                        "type": "string",
                        "description": "Unique identifier for a shipping rate.",
                        "example": "rate1"
                      },
                      {
                        "name": "serviceCode",
                        "kind": "required",
                        "type": "string",
                        "description": "This represents a service code.",
                        "example": "serviceCode"
                      },
                      {
                        "name": "serviceType",
                        "kind": "required",
                        "type": "string",
                        "description": "This represents a service type.",
                        "example": "serviceType"
                      },
                      {
                        "name": "shipDate",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "This represents an actual date of shipping.",
                        "example": "2017-07-21T17:32:28Z",
                        "format": "date-time"
                      }
                    ]
                  },
                  {
                    "name": "shippingMethodId",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "Unique identifier for a shipping method.",
                    "format": "uuid"
                  },
                  {
                    "name": "shippingMethodName",
                    "kind": "optional",
                    "type": "string",
                    "description": "This represents a shipping method name.",
                    "example": "Standard shipping"
                  },
                  {
                    "name": "shippingMethodTaxCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "This represents a tax code for a shipping method.",
                    "example": "TAX01"
                  },
                  {
                    "name": "shippingToDistance",
                    "kind": "optional",
                    "type": "object",
                    "description": "This defines a generic distance.",
                    "modelRef": "#/components/schemas/Distance",
                    "customType": "Distance",
                    "schema": [
                      {
                        "name": "value",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "The numeric portion of the distance.",
                        "example": 157.75,
                        "format": "double"
                      },
                      {
                        "name": "unit",
                        "kind": "optional",
                        "type": "string",
                        "description": "An enumeration of the supported distance measurements.",
                        "modelRef": "#/components/schemas/DistanceUnits",
                        "customType": "DistanceUnits",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "trackingNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "This represents the tracking number.",
                    "example": "123456789"
                  },
                  {
                    "name": "metadata",
                    "kind": "optional",
                    "type": "map",
                    "description": "Additional metadata for the shipment.",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "maxHaulAwayLimit",
                    "kind": "optional",
                    "type": "number<Int32>",
                    "description": "",
                    "format": "Int32"
                  },
                  {
                    "name": "haulAwayEnabled",
                    "kind": "required",
                    "type": "boolean",
                    "description": ""
                  }
                ]
              },
              {
                "name": "shippingAddress",
                "kind": "optional",
                "type": "object",
                "description": "Standardized format for global addresses.",
                "modelRef": "#/components/schemas/Address",
                "customType": "Address",
                "schema": [
                  {
                    "name": "street1",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "street2",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "city",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "county",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "stateOrRegion",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "country",
                    "kind": "required",
                    "type": "string",
                    "description": "Defaults to US.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  {
                    "name": "postalCode",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "poBox",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/Name",
                    "customType": "Name",
                    "schema": [
                      {
                        "name": "first",
                        "kind": "required",
                        "type": "string",
                        "description": "The first name of the individual being addressed.",
                        "example": "John"
                      },
                      {
                        "name": "last",
                        "kind": "required",
                        "type": "string",
                        "description": "The last name of the individual being addressed.",
                        "example": "Smith"
                      },
                      {
                        "name": "middleInitial",
                        "kind": "optional",
                        "type": "string",
                        "description": "The middle initial of the individual being addressed.",
                        "example": "D."
                      },
                      {
                        "name": "salutation",
                        "kind": "optional",
                        "type": "string",
                        "description": "The salutation of the individual being addressed.",
                        "example": "Capt."
                      },
                      {
                        "name": "suffix",
                        "kind": "optional",
                        "type": "string",
                        "description": "The optional suffix of the individual being addressed.",
                        "example": "Sr."
                      }
                    ]
                  },
                  {
                    "name": "businessName",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "phoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              },
              {
                "name": "stateOrRegion",
                "kind": "optional",
                "type": "string",
                "description": "This represents the target state or region.",
                "example": "California"
              },
              {
                "name": "haulAwayEnabled",
                "kind": "required",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "maxHaulAwayLimit",
                "kind": "optional",
                "type": "integer",
                "description": "<p>The maximum number of haul-away items allowed.</p>",
                "example": 5
              }
            ],
            "modelRef": "#/components/schemas/CartShippingRatesResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ValidationErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "bzd1koWWX9gOUSqToMtZm",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/shipping-method/rate/cart \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data '{\n     \"currency\": \"USD\",\n     \"distanceUnit\": \"\",\n     \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n     \"items\": [\n     {\n     \"catalogItemId\": \"catalogItemId\",\n     \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n     \"pricing\": {\n     \"basePrice\": {\n     \"price\": \"\",\n     \"type\": \"\",\n     \"zone\": \"\"\n     },\n     \"feePriceAdjustments\": [\n     {\n     \"id\": \"\",\n     \"value\": \"\"\n     }\n     ],\n     \"promotionPriceAdjustments\": [\n     {\n     \"id\": \"\",\n     \"value\": \"\"\n     }\n     ],\n     \"taxPriceAdjustment\": {\n     \"taxCode\": \"\"\n     }\n     },\n     \"productItemSkuId\": \"SKU_item1\",\n     \"quantity\": 1,\n     \"shipmentId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n     }\n     ],\n     \"shipments\": [\n     {\n     \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n     \"shippingMethodId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n     }\n     ],\n     \"shippingAddress\": {\n     \"street1\": \"\",\n     \"city\": \"\",\n     \"stateOrRegion\": \"\",\n     \"country\": \"\",\n     \"postalCode\": \"\",\n     \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\"\n     }\n     },\n     \"shippingCoordinates\": {\n     \"latitude\": 37.7749,\n     \"longitude\": -122.4194\n     },\n     \"pricing\": {\n     \"promotionPriceAdjustments\": [\n     {\n     \"id\": \"\",\n     \"value\": \"\",\n     \"itemIds\": []\n     }\n     ]\n     }\n     }'"
        },
        {
          "id": "NADjaJhWZ0zGVw4UP-_QJ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar raw = JSON.stringify({\n   \"currency\": \"USD\",\n   \"distanceUnit\": \"\",\n   \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n   \"items\": [\n      {\n         \"catalogItemId\": \"catalogItemId\",\n         \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n         \"pricing\": {\n            \"basePrice\": {\n               \"price\": \"\",\n               \"type\": \"\",\n               \"zone\": \"\"\n            },\n            \"feePriceAdjustments\": [\n               {\n                  \"id\": \"\",\n                  \"value\": \"\"\n               }\n            ],\n            \"promotionPriceAdjustments\": [\n               {\n                  \"id\": \"\",\n                  \"value\": \"\"\n               }\n            ],\n            \"taxPriceAdjustment\": {\n               \"taxCode\": \"\"\n            }\n         },\n         \"productItemSkuId\": \"SKU_item1\",\n         \"quantity\": 1,\n         \"shipmentId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n      }\n   ],\n   \"shipments\": [\n      {\n         \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n         \"shippingMethodId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n      }\n   ],\n   \"shippingAddress\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"shippingCoordinates\": {\n      \"latitude\": 37.7749,\n      \"longitude\": -122.4194\n   },\n   \"pricing\": {\n      \"promotionPriceAdjustments\": [\n         {\n            \"id\": \"\",\n            \"value\": \"\",\n            \"itemIds\": []\n         }\n      ]\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/shipping-method/rate/cart\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "attzQJ2x4p3f3euYOcWx6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/shipping-method/rate/cart\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\nrequest.body = JSON.dump({\n   \"currency\": \"USD\",\n   \"distanceUnit\": \"\",\n   \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n   \"items\": [\n      {\n         \"catalogItemId\": \"catalogItemId\",\n         \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n         \"pricing\": {\n            \"basePrice\": {\n               \"price\": \"\",\n               \"type\": \"\",\n               \"zone\": \"\"\n            },\n            \"feePriceAdjustments\": [\n               {\n                  \"id\": \"\",\n                  \"value\": \"\"\n               }\n            ],\n            \"promotionPriceAdjustments\": [\n               {\n                  \"id\": \"\",\n                  \"value\": \"\"\n               }\n            ],\n            \"taxPriceAdjustment\": {\n               \"taxCode\": \"\"\n            }\n         },\n         \"productItemSkuId\": \"SKU_item1\",\n         \"quantity\": 1,\n         \"shipmentId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n      }\n   ],\n   \"shipments\": [\n      {\n         \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n         \"shippingMethodId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n      }\n   ],\n   \"shippingAddress\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"shippingCoordinates\": {\n      \"latitude\": 37.7749,\n      \"longitude\": -122.4194\n   },\n   \"pricing\": {\n      \"promotionPriceAdjustments\": [\n         {\n            \"id\": \"\",\n            \"value\": \"\",\n            \"itemIds\": []\n         }\n      ]\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "WHng8NBXklVGAjgwkWp1s",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/shipping-method/rate/cart\"\n\npayload = json.dumps({\n   \"currency\": \"USD\",\n   \"distanceUnit\": \"\",\n   \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n   \"items\": [\n      {\n         \"catalogItemId\": \"catalogItemId\",\n         \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n         \"pricing\": {\n            \"basePrice\": {\n               \"price\": \"\",\n               \"type\": \"\",\n               \"zone\": \"\"\n            },\n            \"feePriceAdjustments\": [\n               {\n                  \"id\": \"\",\n                  \"value\": \"\"\n               }\n            ],\n            \"promotionPriceAdjustments\": [\n               {\n                  \"id\": \"\",\n                  \"value\": \"\"\n               }\n            ],\n            \"taxPriceAdjustment\": {\n               \"taxCode\": \"\"\n            }\n         },\n         \"productItemSkuId\": \"SKU_item1\",\n         \"quantity\": 1,\n         \"shipmentId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n      }\n   ],\n   \"shipments\": [\n      {\n         \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n         \"shippingMethodId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n      }\n   ],\n   \"shippingAddress\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"shippingCoordinates\": {\n      \"latitude\": 37.7749,\n      \"longitude\": -122.4194\n   },\n   \"pricing\": {\n      \"promotionPriceAdjustments\": [\n         {\n            \"id\": \"\",\n            \"value\": \"\",\n            \"itemIds\": []\n         }\n      ]\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "bzd1koWWX9gOUSqToMtZm"
    },
    "results": {
      "languages": [
        {
          "id": "ph5Nswmtn4LkNIvsSls0J",
          "language": "200",
          "code": "// Success-shipping-rate calculation returned.\n{\n  \"country\": \"USA\",\n  \"currency\": \"USD\",\n  \"errors\": [\n    {\n      \"level\": \"INFO\",\n      \"code\": \"ERR-123\",\n      \"message\": \"Something unexpected happened\",\n      \"detail\": \"Could not contact other service\"\n    }\n  ],\n  \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n  \"items\": [\n    {\n      \"catalogItemId\": \"catalogItemId\",\n      \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n      \"pricing\": {\n        \"basePrice\": {\n          \"price\": 0,\n          \"type\": \"\",\n          \"zone\": \"\"\n        },\n        \"feePriceAdjustments\": [\n          {\n            \"id\": \"\",\n            \"value\": 0\n          }\n        ],\n        \"promotionPriceAdjustments\": [\n          {\n            \"id\": \"\",\n            \"value\": 0\n          }\n        ],\n        \"taxPriceAdjustment\": {\n          \"taxCode\": \"\",\n          \"value\": 0\n        }\n      },\n      \"productItemSkuId\": \"SKU_item1\",\n      \"quantity\": 1,\n      \"shipmentId\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\"\n    }\n  ],\n  \"locationId\": \"locationToId\",\n  \"postalCode\": \"43234\",\n  \"shipments\": [\n    {\n      \"addressFrom\": {\n        \"street1\": \"\",\n        \"street2\": \"\",\n        \"city\": \"\",\n        \"county\": \"\",\n        \"stateOrRegion\": \"\",\n        \"country\": \"\",\n        \"postalCode\": \"\",\n        \"poBox\": false,\n        \"name\": {\n          \"first\": \"John\",\n          \"last\": \"Smith\",\n          \"middleInitial\": \"D.\",\n          \"salutation\": \"Capt.\",\n          \"suffix\": \"Sr.\"\n        },\n        \"businessName\": \"\",\n        \"phoneNumber\": \"\"\n      },\n      \"addressTo\": {\n        \"street1\": \"\",\n        \"street2\": \"\",\n        \"city\": \"\",\n        \"county\": \"\",\n        \"stateOrRegion\": \"\",\n        \"country\": \"\",\n        \"postalCode\": \"\",\n        \"poBox\": false,\n        \"name\": {\n          \"first\": \"John\",\n          \"last\": \"Smith\",\n          \"middleInitial\": \"D.\",\n          \"salutation\": \"Capt.\",\n          \"suffix\": \"Sr.\"\n        },\n        \"businessName\": \"\",\n        \"phoneNumber\": \"\"\n      },\n      \"errors\": [\n        {\n          \"level\": \"INFO\",\n          \"code\": \"ERR-123\",\n          \"message\": \"Something unexpected happened\",\n          \"detail\": \"Could not contact other service\"\n        }\n      ],\n      \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n      \"locationFromId\": \"locationFromId\",\n      \"locationToId\": \"locationToId\",\n      \"packages\": [\n        {\n          \"dimensions\": {\n            \"width\": 10.5,\n            \"length\": 20,\n            \"height\": 15,\n            \"unit\": \"cm\"\n          },\n          \"insuredValue\": 100,\n          \"packageCode\": \"PackageCode\",\n          \"weight\": {\n            \"value\": 2.5,\n            \"unit\": \"kg\"\n          }\n        }\n      ],\n      \"rateServiceCode\": \"rateServiceCode\",\n      \"rateVariants\": [\n        {\n          \"carrierCode\": \"carrierCode\",\n          \"carrierDeliveryDates\": \"\",\n          \"carrierId\": \"DHL\",\n          \"deliveryDays\": 5,\n          \"estimatedDeliveryDate\": \"2017-07-21T17:32:28Z\",\n          \"packageType\": \"packageType\",\n          \"pricing\": {\n            \"confirmation\": 200,\n            \"insurance\": 100,\n            \"other\": 10,\n            \"shipping\": 100,\n            \"fee\": 20\n          },\n          \"rateId\": \"rate1\",\n          \"serviceCode\": \"serviceCode\",\n          \"serviceType\": \"serviceType\",\n          \"shipDate\": \"2017-07-21T17:32:28Z\"\n        }\n      ],\n      \"shippingMethodId\": \"\",\n      \"shippingMethodName\": \"Standard shipping\",\n      \"shippingMethodTaxCode\": \"TAX01\",\n      \"shippingToDistance\": {\n        \"value\": 157.75,\n        \"unit\": \"\"\n      },\n      \"trackingNumber\": \"123456789\",\n      \"metadata\": \"\",\n      \"maxHaulAwayLimit\": \"\",\n      \"haulAwayEnabled\": false\n    }\n  ],\n  \"shippingAddress\": {\n    \"street1\": \"\",\n    \"street2\": \"\",\n    \"city\": \"\",\n    \"county\": \"\",\n    \"stateOrRegion\": \"\",\n    \"country\": \"\",\n    \"postalCode\": \"\",\n    \"poBox\": false,\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middleInitial\": \"D.\",\n      \"salutation\": \"Capt.\",\n      \"suffix\": \"Sr.\"\n    },\n    \"businessName\": \"\",\n    \"phoneNumber\": \"\"\n  },\n  \"stateOrRegion\": \"California\",\n  \"haulAwayEnabled\": false,\n  \"maxHaulAwayLimit\": 5\n}"
        },
        {
          "id": "mO70vrQYqTiC6_fbLTalc",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "3X4MgYD3yiYj6KQwcc59c",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "ph5Nswmtn4LkNIvsSls0J"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}