---
title: Get Labels
slug: api-documentation/get-labels
docTags: 
createdAt: 2026-08-27T17:08:07.245Z
---

{
  "id": "ZR10HRb2Wucf71JWcbo6o",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/shipping-method/label",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/shipping-method/label"
      }
    ],
    "name": "Get Labels",
    "description": "<p>This endpoint creates the labels associated with a shipment.</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 body required to create shipping labels.",
          "customType": "LabelRequest",
          "schema": [
            {
              "name": "addrFrom",
              "kind": "required",
              "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": "addrTo",
              "kind": "required",
              "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": "id",
              "kind": "required",
              "type": "string<uuid>",
              "description": "Unique identifier for a shipping method.",
              "example": "8A218593-40EB-4DD0-94BD-8ACA1D95BB14",
              "format": "uuid"
            },
            {
              "name": "carrierId",
              "kind": "required",
              "type": "string",
              "description": "Unique identifier for a carrier.",
              "example": "DHL"
            },
            {
              "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": "serviceCode",
              "kind": "required",
              "type": "string",
              "description": "This represents a service code.",
              "example": "serviceCode"
            }
          ],
          "modelRef": "#/components/schemas/LabelRequest",
          "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-labels returned.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>This represents a successful label-creation response.</p>",
            "customType": "LabelResponse",
            "schema": [
              {
                "name": "shippingLabel",
                "kind": "optional",
                "type": "object",
                "description": "This represents the shipping label.",
                "modelRef": "#/components/schemas/ShippingLabel",
                "customType": "ShippingLabel",
                "schema": [
                  {
                    "name": "createdAt",
                    "kind": "required",
                    "type": "string<date-time>",
                    "description": "This represents a creation date.",
                    "example": "2017-07-21T17:32:28Z",
                    "format": "date-time"
                  },
                  {
                    "name": "isInternational",
                    "kind": "required",
                    "type": "boolean",
                    "description": "This flag describes whether or not the shipment is international.",
                    "example": false
                  },
                  {
                    "name": "labelDownload",
                    "kind": "required",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "shipDate",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "This represents a 'shipDate' in Epoch Millis.",
                    "example": 1729018800000,
                    "format": "int64"
                  },
                  {
                    "name": "shippingItemLabels",
                    "kind": "required",
                    "type": "array",
                    "description": "<p>This represents an array of shipping-item labels.</p>",
                    "modelRef": "#/components/schemas/ShippingItemLabel",
                    "customType": "ShippingItemLabel[]",
                    "schema": [
                      {
                        "name": "packageCode",
                        "kind": "optional",
                        "type": "string",
                        "description": "This represents a package code.",
                        "example": "PackageCode"
                      },
                      {
                        "name": "trackingNumber",
                        "kind": "optional",
                        "type": "string",
                        "description": "This represents the tracking number.",
                        "example": "123456789"
                      }
                    ]
                  },
                  {
                    "name": "status",
                    "kind": "required",
                    "type": "string",
                    "description": "This represents a status.",
                    "example": "active"
                  },
                  {
                    "name": "trackable",
                    "kind": "required",
                    "type": "boolean",
                    "description": "This flag describes whether or not the shipment is trackable.",
                    "example": true
                  },
                  {
                    "name": "trackingNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "This represents the tracking number.",
                    "example": "123456789"
                  }
                ]
              },
              {
                "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"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/LabelResponse",
            "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": "8Yhz-M2MMovUer-no6RVN",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/shipping-method/label \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data '{\n     \"addrFrom\": {\n     \"street1\": \"\",\n     \"city\": \"\",\n     \"stateOrRegion\": \"\",\n     \"country\": \"\",\n     \"postalCode\": \"\",\n     \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\"\n     }\n     },\n     \"addrTo\": {\n     \"street1\": \"\",\n     \"city\": \"\",\n     \"stateOrRegion\": \"\",\n     \"country\": \"\",\n     \"postalCode\": \"\",\n     \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\"\n     }\n     },\n     \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n     \"carrierId\": \"DHL\",\n     \"packages\": [\n     {\n     \"dimensions\": {\n     \"width\": 10.5,\n     \"length\": 20,\n     \"height\": 15,\n     \"unit\": \"cm\"\n     },\n     \"weight\": {\n     \"value\": 2.5,\n     \"unit\": \"kg\"\n     }\n     }\n     ],\n     \"serviceCode\": \"serviceCode\"\n     }'"
        },
        {
          "id": "Y5-yiZArNdIk79Isjq2OV",
          "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   \"addrFrom\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"addrTo\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n   \"carrierId\": \"DHL\",\n   \"packages\": [\n      {\n         \"dimensions\": {\n            \"width\": 10.5,\n            \"length\": 20,\n            \"height\": 15,\n            \"unit\": \"cm\"\n         },\n         \"weight\": {\n            \"value\": 2.5,\n            \"unit\": \"kg\"\n         }\n      }\n   ],\n   \"serviceCode\": \"serviceCode\"\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/label\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "azGlTNSenaa6s51nIVFBo",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/shipping-method/label\")\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   \"addrFrom\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"addrTo\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n   \"carrierId\": \"DHL\",\n   \"packages\": [\n      {\n         \"dimensions\": {\n            \"width\": 10.5,\n            \"length\": 20,\n            \"height\": 15,\n            \"unit\": \"cm\"\n         },\n         \"weight\": {\n            \"value\": 2.5,\n            \"unit\": \"kg\"\n         }\n      }\n   ],\n   \"serviceCode\": \"serviceCode\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "sRr3GU4CD06U66n6zIHi4",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/shipping-method/label\"\n\npayload = json.dumps({\n   \"addrFrom\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"addrTo\": {\n      \"street1\": \"\",\n      \"city\": \"\",\n      \"stateOrRegion\": \"\",\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"name\": {\n         \"first\": \"John\",\n         \"last\": \"Smith\"\n      }\n   },\n   \"id\": \"8A218593-40EB-4DD0-94BD-8ACA1D95BB14\",\n   \"carrierId\": \"DHL\",\n   \"packages\": [\n      {\n         \"dimensions\": {\n            \"width\": 10.5,\n            \"length\": 20,\n            \"height\": 15,\n            \"unit\": \"cm\"\n         },\n         \"weight\": {\n            \"value\": 2.5,\n            \"unit\": \"kg\"\n         }\n      }\n   ],\n   \"serviceCode\": \"serviceCode\"\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": "8Yhz-M2MMovUer-no6RVN"
    },
    "results": {
      "languages": [
        {
          "id": "AkUUDhFhq50boPLVBEHj0",
          "language": "200",
          "code": "// Success-labels returned.\n{\n  \"shippingLabel\": {\n    \"createdAt\": \"2017-07-21T17:32:28Z\",\n    \"isInternational\": false,\n    \"labelDownload\": \"\",\n    \"shipDate\": 1729018800000,\n    \"shippingItemLabels\": [\n      {\n        \"packageCode\": \"PackageCode\",\n        \"trackingNumber\": \"123456789\"\n      }\n    ],\n    \"status\": \"active\",\n    \"trackable\": true,\n    \"trackingNumber\": \"123456789\"\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": "QdMsLpc3pZfYVhImOqTld",
          "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": "QZwvDbsy7U4iv0yrlNAYG",
          "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": "AkUUDhFhq50boPLVBEHj0"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}