Shippo Shipments API

Create and manage shipments

OpenAPI Specification

shippo-shipments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Shippo Addresses Shipments API
  description: Shippo is a multi-carrier shipping API that enables developers to add complete shipping functionality to their applications. The API supports address validation, carrier rate comparison across USPS, UPS, FedEx, DHL, and 80+ other carriers, label generation, package tracking, returns management, and webhook notifications.
  version: '2018-02-08'
  contact:
    name: Shippo
    url: https://docs.goshippo.com/
    email: support@goshippo.com
  license:
    name: Shippo API Terms
    url: https://goshippo.com/terms-of-use/
  x-date: '2026-05-02'
servers:
- url: https://api.goshippo.com
  description: Shippo API
security:
- ShippoToken: []
tags:
- name: Shipments
  description: Create and manage shipments
paths:
  /shipments:
    get:
      operationId: listShipments
      summary: List Shipments
      description: Returns a list of all shipment objects.
      tags:
      - Shipments
      parameters:
      - name: page
        in: query
        schema:
          type: integer
      - name: results
        in: query
        schema:
          type: integer
      - name: object_created_gt
        in: query
        description: Filter by creation date (greater than)
        schema:
          type: string
          format: date-time
      - name: object_created_lt
        in: query
        description: Filter by creation date (less than)
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: A list of shipments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentPaginatedList'
    post:
      operationId: createShipment
      summary: Create Shipment
      description: Creates a new shipment object. Shipments are the basic body of the Shippo API. They include shipment details and rates, and can be used to purchase labels.
      tags:
      - Shipments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipmentCreateRequest'
      responses:
        '201':
          description: Shipment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Shipment'
  /shipments/{ShipmentId}:
    get:
      operationId: getShipment
      summary: Get Shipment
      description: Returns an existing shipment using an object ID.
      tags:
      - Shipments
      parameters:
      - name: ShipmentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Shipment object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Shipment'
  /shipments/{ShipmentId}/rates:
    get:
      operationId: getShipmentRates
      summary: Get Shipment Rates
      description: Returns a list of rates for a given shipment.
      tags:
      - Shipments
      parameters:
      - name: ShipmentId
        in: path
        required: true
        schema:
          type: string
      - name: currency_code
        in: query
        description: Currency code for rate amounts (ISO 4217)
        schema:
          type: string
      responses:
        '200':
          description: List of rates for the shipment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatePaginatedList'
components:
  schemas:
    AddressCreateRequest:
      type: object
      required:
      - name
      - street1
      - city
      - state
      - zip
      - country
      properties:
        name:
          type: string
        company:
          type: string
        street1:
          type: string
        street2:
          type: string
        city:
          type: string
        state:
          type: string
        zip:
          type: string
        country:
          type: string
        phone:
          type: string
        email:
          type: string
        is_residential:
          type: boolean
        validate:
          type: boolean
          description: Whether to validate the address
    Address:
      type: object
      properties:
        object_id:
          type: string
          description: Unique identifier for the address
        is_complete:
          type: boolean
          description: Whether the address is complete and valid
        name:
          type: string
          description: Full name of the recipient
        company:
          type: string
          description: Company name
        street1:
          type: string
          description: First line of the street address
        street2:
          type: string
          description: Second line of the street address
        city:
          type: string
          description: City
        state:
          type: string
          description: State or province
        zip:
          type: string
          description: Postal code
        country:
          type: string
          description: ISO 2-letter country code
        phone:
          type: string
          description: Phone number
        email:
          type: string
          description: Email address
        is_residential:
          type: boolean
          description: Whether the address is residential
        validation_results:
          type: object
          description: Address validation results
        object_created:
          type: string
          format: date-time
        object_updated:
          type: string
          format: date-time
    ShipmentPaginatedList:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
        previous:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/Shipment'
    RatePaginatedList:
      type: object
      properties:
        count:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/Rate'
    Shipment:
      type: object
      properties:
        object_id:
          type: string
        status:
          type: string
          enum:
          - WAITING
          - QUEUED
          - SUCCESS
          - ERROR
        address_from:
          $ref: '#/components/schemas/Address'
        address_to:
          $ref: '#/components/schemas/Address'
        address_return:
          $ref: '#/components/schemas/Address'
        parcels:
          type: array
          items:
            $ref: '#/components/schemas/Parcel'
        rates:
          type: array
          items:
            $ref: '#/components/schemas/Rate'
        extra:
          type: object
          description: Additional shipment options (insurance, signature, etc.)
        metadata:
          type: string
          description: User-defined metadata
        object_created:
          type: string
          format: date-time
        object_updated:
          type: string
          format: date-time
    Rate:
      type: object
      properties:
        object_id:
          type: string
        object_created:
          type: string
          format: date-time
        amount:
          type: string
          description: Total cost of the rate
        currency:
          type: string
          description: Currency of the rate amount
        amount_local:
          type: string
          description: Amount in the local currency
        currency_local:
          type: string
        provider:
          type: string
          description: Carrier providing the rate (e.g., USPS, UPS)
        provider_image_75:
          type: string
          description: URL to carrier logo (75px)
        servicelevel:
          type: object
          properties:
            name:
              type: string
            token:
              type: string
            terms:
              type: string
        days:
          type: integer
          description: Estimated transit days
        arrives_by:
          type: string
          description: Estimated delivery time
        duration_terms:
          type: string
          description: Service level terms description
        trackable:
          type: boolean
        attributes:
          type: array
          items:
            type: string
    ShipmentCreateRequest:
      type: object
      required:
      - address_from
      - address_to
      - parcels
      properties:
        address_from:
          oneOf:
          - type: string
          - $ref: '#/components/schemas/AddressCreateRequest'
        address_to:
          oneOf:
          - type: string
          - $ref: '#/components/schemas/AddressCreateRequest'
        address_return:
          oneOf:
          - type: string
          - $ref: '#/components/schemas/AddressCreateRequest'
        parcels:
          type: array
          items:
            oneOf:
            - type: string
            - $ref: '#/components/schemas/ParcelCreateRequest'
        extra:
          type: object
        metadata:
          type: string
        async:
          type: boolean
          description: Whether to create shipment asynchronously
    Parcel:
      type: object
      properties:
        object_id:
          type: string
        length:
          type: string
          description: Length of the parcel
        width:
          type: string
          description: Width of the parcel
        height:
          type: string
          description: Height of the parcel
        distance_unit:
          type: string
          enum:
          - cm
          - in
          - ft
          - mm
          - m
          - yd
        weight:
          type: string
          description: Weight of the parcel
        mass_unit:
          type: string
          enum:
          - g
          - oz
          - lb
          - kg
        template:
          type: string
          description: Predefined parcel template
        object_created:
          type: string
          format: date-time
        object_updated:
          type: string
          format: date-time
    ParcelCreateRequest:
      type: object
      required:
      - length
      - width
      - height
      - distance_unit
      - weight
      - mass_unit
      properties:
        length:
          type: string
        width:
          type: string
        height:
          type: string
        distance_unit:
          type: string
          enum:
          - cm
          - in
          - ft
          - mm
          - m
          - yd
        weight:
          type: string
        mass_unit:
          type: string
          enum:
          - g
          - oz
          - lb
          - kg
        template:
          type: string
  securitySchemes:
    ShippoToken:
      type: http
      scheme: bearer
      description: Shippo API token (prefix with "ShippoToken ")