openapi: 3.1.0
info:
  title: Parcel statuses API
  version: 3.0.0
  description: |
    Tracking Statuses cover all of the delivery 'milestones' across the shipping journey. They also indicate when
    an action has been made (e.g. Delivery method changed) or an action is required by the recipient (e.g. Ready for
    collection) or by the sender (e.g. Address invalid). Certain delivery milestones also trigger the sending of
    [tracking notifications](https://support.sendcloud.com/hc/en-us/articles/360024840812-Tracking/),
    which you can be configured in the Sendcloud platform.
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
tags:
  - name: Parcel Statuses
paths:
  /parcels/statuses:
    get:
      summary: Retrieve a list of parcel statuses
      x-mint:
        href: /api/v3/parcel-statuses/retrieve-a-list-of-parcel-statuses
        content: |-
          <Info>
            OAuth2 scopes required: `read:parcel`. See [Scopes for OAuth apps](/api/v3/scopes).
          </Info>
      tags:
        - Parcel Statuses
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Retrieve Parcel Statuses
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ParcelStatus'
                    minItems: 1
                    maxItems: 99
                required:
                  - data
              examples:
                RetrieveParcelStatuses:
                  summary: Retrieve a list of Parcel Statuses
                  value:
                    data:
                      - code: READY_TO_SEND
                        message: Ready to send
                      - code: ANNOUNCED
                        message: Announced
        '429':
          description: Throttled
      operationId: sc-public-v3-scp-get-all_parcel_statuses
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds:
            - read:parcel
      description: Get a list of all parcel statuses available in the Sendcloud system, with their unique code and friendly description.
components:
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: Basic Authentication using API key and secrets is currently the main authentication mechanism.
      scheme: basic
    OAuth2ClientCreds:
      type: oauth2
      description: OAuth2 is a standardized protocol for authorization that allows users to share their private resources stored on one site with another site without having to provide their credentials. OAuth2 Client Credentials Grant workflow. This workflow is typically used for server-to-server interactions that require authorization to access specific resources.
      flows:
        clientCredentials:
          tokenUrl: https://account.sendcloud.com/oauth2/token/
          scopes:
            read:analytics: View your shipping analytics
            read:audit-log: View your account's audit log
            read:brand: View your brands
            write:brand: Manage your brands
            write:carrier: Configure carriers and contracts
            read:checkout: View your dynamic checkout configurations and templates
            read:event-subscription: View your event subscriptions
            write:event-subscription: Create and manage your event subscriptions
            read:integration: View your integrations
            write:integration: Connect and manage integrations
            read:invoice: View your invoices
            read:notification: View your notifications
            write:notification: Manage your notifications
            read:operational-settings: View your warehouses, shipping lanes, and other operational settings
            write:operational-settings: Manage your warehouses, shipping lanes, and other operational settings
            read:order: View your orders
            write:order: Import and process your orders
            read:organization: View organization settings
            write:organization: Change organization settings
            read:parcel: View your shipments and their tracking status
            write:parcel: Create, announce, and cancel shipments
            read:pickup: View carrier pickups and the options available for scheduling them
            write:pickup: Schedule and manage carrier pickups
            read:price: View shipping prices
            write:product: Manage your product catalog
            read:return: View your returns
            write:return: Create and manage returns
            read:return-settings: View your return settings
            write:return-settings: Configure your return settings
            read:service-point: View carrier service points
            read:shipping-method: View shipping methods, products and prices
            read:shipping-rule: View your shipping rules
            write:shipping-rule: Create and manage shipping rules
            read:support-ticket: View your support tickets
            write:support-ticket: Manage your support tickets
            read:tracking-message: View your tracking notifications
            write:tracking-message: Manage your tracking notifications
            read:tracking-page: View your tracking page
            write:tracking-page: Customize your tracking page
            read:user: Read your basic account information
  schemas:
    ParcelStatus:
      title: Parcel Status
      description: Parcel Status
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Unique code identifier
        message:
          type: string
          minLength: 1
          description: Friendly description
      examples:
        - code: ANNOUNCED
          message: Announced
