---
title: Retrieve an order's shipping labels
description: "Render the order's shipping labels as a single PDF (A6, one Code
  128 barcode per page, one page per package) and return a signed URL to it,
  valid for one hour. Every call renders the labels afresh and signs a new URL,
  so fetch it promptly server-side: the link is too short-lived to embed
  anywhere a recipient might open later."
url: /api/orders/getOrderShippingLabels
---

# Retrieve an order's shipping labels

`GET /orders/{id}/shippingLabels`

````yaml
openapi: 3.2.0
info:
  title: Spoke Connect API
  version: v1
servers:
  - url: https://api.spoke.com/connect/v1
security:
  - BearerAuth: []
  - BasicAuth: []
paths:
  /orders/{id}/shippingLabels:
    get:
      operationId: getOrderShippingLabels
      summary: Retrieve an order's shipping labels
      tags:
        - Orders
      description: "Render the order's shipping labels as a single PDF (A6, one Code 128 barcode per page, one page per package) and return a signed URL to it, valid for one hour. Every call renders the labels afresh and signs a new URL, so fetch it promptly server-side: the link is too short-lived to embed anywhere a recipient might open later."
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 50
            pattern: ^[a-zA-Z0-9_-]{1,50}$
          in: path
          name: id
          required: true
          description: The Spoke order ID.
      responses:
        "200":
          description: A fresh signed link to the shipping-labels PDF.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: Signed URL to the shipping-labels PDF. Fetchable without the API key until it expires.
                  expiresAt:
                    type: number
                    description: When the signed URL stops working, in seconds since epoch.
                required:
                  - url
                  - expiresAt
                additionalProperties: false
                description: A fresh signed link to the shipping-labels PDF.
        "400":
          description: ID format is invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: ID format is invalid
                title: The request is invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Unauthorized
        "404":
          description: The order does not exist, or has been deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    enum:
                      - order_not_found
                required:
                  - message
                  - code
                description: The order does not exist, or has been deleted.
                title: Order not found
        "422":
          description: The shipping labels could not be generated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code, always `order_invalid_fields`.
                    enum:
                      - order_invalid_fields
                  param:
                    type: string
                    description: The order field that caused the rejection.
                required:
                  - message
                  - code
                  - param
                description: The shipping labels could not be generated.
        "500":
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: An internal server error occurred
        default:
          description: The default error model
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: The default error model
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Pass the API key directly as the token.
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.
````