openapi: 3.1.0
info:
  title: Parcel status
  version: 2.0.0
  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
  description: |-
    During the delivery journey, a parcel can receive a number of different status updates, also refered to as **tracking statuses**. These statuses are used to indicate the current progress of the shipment, or to depict any changes that have taken place which result in the parcel being unable to be delivered. It's the role of the carrier to send tracking updates, and new updates occur whenever the parcel receives a scan, either at the sorting hub, service point or from the delivery driver.

    Shipping carriers use a variety of interchangeable terms to indicate delivery milestones. Sendcloud maps these different terms into a list of universally understandable parcel statuses. These are then used to trigger tracking notifications, or to display the current status of a parcel in the Sendcloud platform.
servers:
  - url: https://panel.sendcloud.sc/api/v2
    description: Sendcloud Production
tags:
  - name: Parcel statuses
paths:
  /parcels/statuses:
    get:
      summary: Retrieve a list of parcel statuses
      x-mint:
        href: /api/v2/parcel-statuses/retrieve-a-list-of-parcel-statuses
        content: |-
          <Warning>
            **API v2 is entering maintenance mode.** New users should start with API v3 to access our latest features and improved performance. Already using v2? Don't worry, your current integration remains fully functional. Read more about [maintenance mode](/docs/getting-started/api-version-guide), or check out the [migration guide for API v3](/docs/getting-started/migration-guidelines-for-api-v3).
          </Warning>
      tags:
        - Parcel statuses
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Unique identifier for the parcel status.
                      example: 5
                      minimum: 1
                    message:
                      type: string
                      description: A message that describes what the given status means.
                      example: Sorted
                  required:
                    - id
                    - message
              examples:
                RetrieveParcelStatuses:
                  summary: Parcel statuses response
                  value:
                    - id: 3
                      message: En route to sorting center
                    - id: 4
                      message: Delivery delayed
                    - id: 5
                      message: Sorted
                    - id: 6
                      message: Not sorted
      operationId: sc-public-v2-scp-get-retrieve_all_parcel_statuses
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
      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:
            api: Default OAuth scope required to access Sendcloud API.
