> ## Documentation Index
> Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a list of returns

> Retrieve a list of returns which have been created under your API credentials.

The response includes return data for each parcel, plus up-to-date tracking history.

The returned data is paginated and has a default number of items per page of `40`, which can be controlled by the `page_size` query param.

You can filter the results to only include return parcels created within a specific time frame using the `from_date` and `to_date` parameters, or based on the `parent_parcel_status`.


## OpenAPI

````yaml /.openapi/v3/returns/openapi.yaml get /returns
openapi: 3.1.0
info:
  title: Returns
  version: 3.0.0
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The Sendcloud **Returns API** lets you create standalone returns easily and
    efficiently, so you can seamlessly incorporate returns into your existing
    workflow, ERP or WMS system. This API can be used in conjunction with other
    core Sendcloud features or independently.
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
security: []
tags:
  - name: Returns
    description: Sendcloud's Returns API
paths:
  /returns:
    get:
      tags:
        - Returns
      summary: Retrieve a list of returns
      description: >-
        Retrieve a list of returns which have been created under your API
        credentials.
      operationId: sc-public-v3-scp-get-returns_get_returns
      parameters:
        - $ref: '#/components/parameters/Cursor'
        - name: from_date
          in: query
          schema:
            type: string
            example: '2022-04-06 00:00:00'
          description: Excludes all returns before this datetime
          example: '2022-04-06 00:00:00'
          required: true
        - name: to_date
          in: query
          schema:
            type: string
            example: '2022-04-07 00:00:00'
          description: Excludes all returns after this datetime
          example: '2022-04-07 00:00:00'
          required: true
        - name: parent_parcel_status
          in: query
          schema:
            type: string
            example: announced
            enum:
              - ready-to-send
              - announced
              - to-sorting
              - delayed
              - sorted
              - unsorted
              - sorting
              - delivery-failed
              - delivery-forced
              - delivered
              - awaiting-customer-pickup
              - announced-uncollected
              - collect-error
              - unsorted2
              - undeliverable
              - shipment-on-route
              - driver-on-route
              - picked-up-by-driver
              - collected-by-customer
              - no-label
              - announcing
              - cancelling-upstream
              - cancelling
              - cancelled
              - cancelled-upstream
              - unknown
              - announcement-failed
              - at-customs
              - at-sorting-centre
              - refused-by-recipient
              - returned-to-sender
              - delivery-method-changed
              - delivery-date-changed
              - delivery-address-changed
              - exception
              - address-invalid
          description: Search for returns with this parent status
          required: false
        - schema:
            type: number
            minimum: 1
            maximum: 40
            example: 10
          in: query
          name: page_size
          description: Refers to the number of items per page
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    description: A cursor-based pagination url to go forward
                  previous:
                    type: string
                    description: A cursor-based pagination url to go backwards
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Return'
              examples:
                Success:
                  value:
                    next: >-
                      http://panel.sendcloud.sc/api/v3/returns?cursor=cD0z&page_size=1
                    previous: >-
                      http://panel.sendcloud.sc/api/v3/returns?cursor=cD0z&page_size=2
                    data:
                      - created_at: '2022-07-18T15:34:21.869312+02:00'
                        is_cancellable: false
                        label_cost:
                          value: 6.15
                          currency: EUR
                        delivered_at: 1734946171662
                        delivered_at_iso: '2022-07-18T15:34:21.869312+02:00'
                        shipping_product:
                          code: postnl:standard/return
                        shipping_option:
                          code: postnl:standard/signature
                        collo_count: 1
                        brand_id: 1
                        tracking_number: JVGL1234567800001339
                        dimensions:
                          length: 3
                          width: 3
                          height: 3
                          unit: cm
                        parcel_items: []
                        insurance: false
                        label_url: >-
                          https://panel.sendcloud.sc/api/v3/parcels/7/documents/label
                        label:
                          label_printer: >-
                            https://panel.sendcloud.sc/api/v3/parcels/7/documents/label
                          normal_printer:
                            - >-
                              https://panel.sendcloud.sc/api/v3/parcels/7/documents/label?paper_size=a4
                            - >-
                              https://panel.sendcloud.sc/api/v3/parcels/7/documents/label?paper_size=a4
                            - >-
                              https://panel.sendcloud.sc/api/v3/parcels/7/documents/label?paper_size=a4
                            - >-
                              https://panel.sendcloud.sc/api/v3/parcels/7/documents/label?paper_size=a4
                        tracking_url: >-
                          https://tracking.eu-central-1-0.sendcloud.sc/forward?carrier=postnl&code=JVGL1234567800001339&destination=NL&lang=en-us&source=NL&type=parcel&verification=5611+JV&servicepoint_verification=&created_at=2022-07-18
                        send_tracking_emails: false
                        weight:
                          value: 1
                          unit: kg
                        from_address:
                          name: Gregory van der Poel
                          address_line_1: Merchant Street
                          address_line_2: ''
                          house_number: '1'
                          postal_code: 5611 LX
                          city: Eindhoven
                          country_code: NL
                          email: merchant@email.com
                        to_address:
                          name: Customer3
                          po_box: ''
                          address_line_1: Customer Street3
                          address_line_2: ''
                          house_number: '12'
                          postal_code: 5611 JV
                          city: Eindhoven
                          state_province_code: Noord Brabant
                          country_code: NL
                          email: customer@email.com
                        reason:
                          id: 1
                          description: Product did not match expectations
                        refund:
                          refund_type: exchange
                          message: Exchange for size M
                        return_fee:
                          value: 1.5
                          currency: EUR
                        order_number: ''
                        status_history:
                          - carrier_update_timestamp: '2022-07-18T15:34:21.862840+02:00'
                            parcel_status_history_id: '1'
                            parent_status: Ready to Ship
                            carrier_code: some-carrier-code
                            carrier_message: some-carrier-message
                        customs_invoice_nr: ''
                        customs_shipment_type: 2
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  parameters:
    Cursor:
      in: query
      name: cursor
      description: >-
        The cursor query string is used as the pivot value to filter results. If
        no value is provided, the first page of results will be returned. To get
        this value, you must encode the offset, reverse and position into a
        base64 string.


        There are 3 possible parameters to encode:

        - `o`: Offset

        - `r`: Reverse

        - `p`: Position
          
        For example, `r=1&p=300` encoded as a base64 string would be
        `cj0xJnA9MzAw`. The query string would then be `cursor=cj0xJnA9MzAw`.
      schema:
        type: string
        example: cj0xJnA9MzAw
  schemas:
    Return:
      title: Return Object
      type: object
      description: A Sendcloud return object
      properties:
        from_address:
          $ref: '#/components/schemas/address-with-required-fields'
        to_address:
          $ref: '#/components/schemas/address-with-required-fields'
        shipping_product:
          $ref: '#/components/schemas/shipping-products-ref'
        shipping_option:
          title: Shipping Option Code
          type: object
          description: Sendcloud shipping option code
          properties:
            code:
              type:
                - string
                - 'null'
              description: >-
                The shipping option code, as provided by the [Shipping options
                API](/api/v3/shipping-options/return-a-list-of-available-shipping-options).
              example: postnl:standard/signature
        dimensions:
          $ref: '#/components/schemas/dimension'
        weight:
          $ref: '#/components/schemas/weight'
        collo_count:
          type: integer
          default: 1
          minimum: 1
          description: The number of collos this return consists of
        parcel_items:
          type: array
          description: List of items contained in this return. Required outside the EU.
          items:
            $ref: '#/components/schemas/parcel-item-returns-details'
        send_tracking_emails:
          type: boolean
          default: false
          description: >-
            When `true`, Sendcloud will send out the default track and trace
            emails
        brand_id:
          type: integer
          description: The ID of the brand this Return belongs to.
          example: 1
          minimum: 1
        label_url:
          type:
            - string
            - 'null'
          description: >-
            URL to download the label. This can be `null` because it might not
            be announced yet. **Deprecated** in favour of the `label` field.
          example: https://panel.sendcloud.sc/api/v3/parcels/8/documents/label
          deprecated: true
        label:
          type: object
          description: URLs to download the label, if the parcel has been announced.
          properties:
            normal_printer:
              type: array
              items:
                type: string
                format: url
              description: >-
                URLs to download the label as an A4 PDF. The array always
                contains 4 identical URLs for backward compatibility with the v2
                positional label layout.
              example:
                - >-
                  https://panel.sendcloud.sc/api/v3/parcels/8/documents/label?paper_size=a4
                - >-
                  https://panel.sendcloud.sc/api/v3/parcels/8/documents/label?paper_size=a4
                - >-
                  https://panel.sendcloud.sc/api/v3/parcels/8/documents/label?paper_size=a4
                - >-
                  https://panel.sendcloud.sc/api/v3/parcels/8/documents/label?paper_size=a4
            label_printer:
              type: string
              description: URL to download the label as an A6 PDF
              format: url
              example: https://panel.sendcloud.sc/api/v3/parcels/8/documents/label
        label_cost:
          $ref: '#/components/schemas/price'
        insurance:
          type: boolean
          description: Whether the return parcel is insured
        tracking_number:
          type:
            - string
            - 'null'
          description: This can be null because it might not be announced yet.
          example: 3SSEND12345678
        tracking_url:
          type:
            - string
            - 'null'
          description: >-
            URL to track your return. This can be null because it might not be
            announced yet.
          example: >-
            https://tracking.eu-central-1-0.sendcloud.sc/forward?carrier=sendcloud&code=3SSEND12345678&destination=NL&lang=en-gb&source=NL&type=letter&verification=1001+VV&servicepoint_verification=&created_at=2022-07-27
        is_cancellable:
          type: boolean
          description: Whether the incoming parcel of this return can be cancelled
        status_history:
          type: array
          description: List with the timeline of your return status
          minItems: 1
          items:
            $ref: '#/components/schemas/detailed-tracking-blob-status'
        created_at:
          type: string
          description: Date and time of creation of this return
          format: date-time
          example: '2022-08-09T14:32:21.463473+02:00'
        delivered_at:
          type:
            - number
            - 'null'
          example: 1734946171662
          description: >-
            A unix timestamp indicating the delivery time of this return.
            **Deprecated** in favour of the `delivered_at_iso` field.
          deprecated: true
        delivered_at_iso:
          type:
            - string
            - 'null'
          format: date-time
          description: Date and time of delivery of this return
          example: '2022-08-09T14:32:21.463473+02:00'
        reason:
          $ref: '#/components/schemas/return-reason'
        refund:
          $ref: '#/components/schemas/return-refund'
          type:
            - object
            - 'null'
        return_fee:
          $ref: '#/components/schemas/price-with-any-currency'
          type:
            - object
            - 'null'
          description: The fee associated with this return
        order_number:
          type: string
          description: Order number filled by the user
          example: ORD12345
        contract:
          type: integer
          description: ID of the contract used to ship this return
        customs_invoice_nr:
          type:
            - string
            - 'null'
          description: Customs invoice number
        customs_shipment_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |
            Customs shipment type
              * `0` - Gift
              * `1` - Documents
              * `2` - Commercial Goods
              * `3` - Commercial Sample
              * `4` - Returned Goods
        delivery_option:
          $ref: '#/components/schemas/DeliveryOption'
        images:
          type: array
          description: Images uploaded when creating a return via the Return Portal
          maxItems: 10
          items:
            type: object
            properties:
              product_id:
                type:
                  - string
                  - 'null'
                example: '123456'
                description: The ID of the product that this image is related to.
              uploaded_image:
                type: string
                format: uri
                example: https://example.com/image.png
                description: >-
                  The temporary publicly-accessible URL of the originally
                  uploaded image
              thumbnail_image:
                type:
                  - string
                  - 'null'
                format: uri
                example: https://example.com/thumbnail.png
                description: The temporary publicly-accessible URL of the image thumbnail
              description:
                type:
                  - string
                  - 'null'
                example: My broken camera, with a crack on the lens
                description: A description of the uploaded image
        status:
          description: The current status of the return
          example: open
          type: string
          enum:
            - open
            - requested
            - request_rejected
            - awaiting_payment
            - payment_failed
        customs_information:
          $ref: '#/components/schemas/parcel-customs-information'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
          readOnly: true
          description: This array will contain errors such as carrier announcement errors.
      required:
        - from_address
        - to_address
        - shipping_product
        - shipping_option
        - weight
        - send_tracking_emails
        - is_cancellable
        - status_history
        - created_at
    address-with-required-fields:
      title: Address Object
      type: object
      description: Sendcloud Address object
      oneOf:
        - $ref: '#/components/schemas/address'
      required:
        - name
        - address_line_1
        - postal_code
        - city
        - country_code
    shipping-products-ref:
      title: Shipping Product Code
      type: object
      properties:
        code:
          type: string
      description: Sendcloud shipping product code
    dimension:
      title: Dimension
      type: object
      description: Dimension in the specified unit
      properties:
        length:
          type: number
          description: length in specified unit
          minimum: 0
          example: 15
        width:
          type: number
          description: width in specified unit
          minimum: 0
          example: 20.5
        height:
          type: number
          description: height in specified unit
          minimum: 0
          example: 37
        unit:
          $ref: '#/components/schemas/dimension-units'
      required:
        - length
        - width
        - height
        - unit
    weight:
      title: Weight
      type: object
      description: Weight in the specified unit
      properties:
        value:
          type: number
          description: Weight value
          exclusiveMinimum: 0
          example: 14.5
        unit:
          $ref: '#/components/schemas/weight-units'
      required:
        - value
        - unit
    parcel-item-returns-details:
      title: Parcel Item Object
      description: A single item in a shipment
      allOf:
        - $ref: '#/components/schemas/parcel-item-returns-create'
        - type: object
          properties:
            return_reason:
              $ref: '#/components/schemas/return-reason'
            return_reason_id:
              type:
                - string
                - 'null'
              description: >-
                The ID of the return reason, if any. **Deprecated** in favour of
                the `return_reason` field.
              example: '1'
              deprecated: true
    price:
      title: Price Object
      type: object
      properties:
        value:
          type: number
        currency:
          type: string
          description: ISO 4217 currency code
          enum:
            - EUR
            - GBP
            - USD
      description: Price in the specified currency
    detailed-tracking-blob-status:
      title: Detailed Tracking status
      type: object
      properties:
        carrier_update_timestamp:
          type: string
          format: date-time
        parcel_status_history_id:
          type: string
        parent_status:
          type: string
        carrier_code:
          type: string
        carrier_message:
          type: string
    return-reason:
      title: Return reason Object
      type: object
      description: >-
        The reason this Return was created. This could be on the item level or
        the whole Return.
      properties:
        id:
          type: integer
          description: Return reason as an int matching the ones provided from Sendcloud
          format: int64
          example: 1
          minimum: 1
        description:
          type: string
          description: Description of the return reason provided
          example: Too big for me
    return-refund:
      title: Return refund Object
      type: object
      description: >-
        Information about the compensation chosen by the customer for the
        returned items
      properties:
        refund_type:
          type: string
          description: Identifier of the refund type
          enum:
            - money
            - credit
            - exchange
          example: exchange
        message:
          type:
            - string
            - 'null'
          description: Additional information about the refund provided by the end consumer
          example: Exchange for size M
    price-with-any-currency:
      title: Price With Any Currency
      type: object
      properties:
        value:
          type: number
        currency:
          type: string
          description: ISO 4217 currency code
          pattern: '[A-Z]{3}'
          example: EUR
      description: Price in the specified currency
      required:
        - value
        - currency
    DeliveryOption:
      title: DeliveryOption
      x-stoplight:
        id: 1e5khic8yxpaw
      type:
        - string
        - 'null'
      description: |-
        The options the customer has for returning this parcel:

        - `drop_off_point`: At a drop-off point - Print at home
        - `drop_off_labelless`: At a drop-off point - No printer needed
        - `in_store`: Return in store
        - `pickup`: Arrange a pick-up
      minLength: 1
      example: drop_off_point
      enum:
        - drop_off_point
        - drop_off_labelless
        - pickup
        - in_store
        - null
    parcel-customs-information:
      title: ParcelCustomsInformation
      type:
        - object
        - 'null'
      description: >-
        Optional customs information that should be provided for international
        parcels. This information is used for generating customs documents.
      example:
        invoice_number: INV-123
        export_reason: commercial_goods
        export_type: private
        invoice_date: '2023-08-24'
        discount_granted:
          value: '14.99'
          currency: EUR
        freight_costs: null
        insurance_costs:
          value: '3.60'
          currency: EUR
        other_costs:
          value: '1.2'
          currency: EUR
        general_notes: >-
          Compliance: Goods comply with international safety standards (CE
          certified).
        additional_declaration_statements:
          - >-
            With reference to the above shipment, I understate that the content
            is not made of leather parts of animal species protected by the
            Washington Convention.
          - >-
            I solemnly declare that the contents of this document represent a
            true and accurate account of the events as they occurred. I
            acknowledge my responsibility for the information presented herein
            and understand that any misrepresentation or falsification may
            result in legal consequences or other penalties as applicable.
        importer_of_record:
          name: John Doe
          company_name: ImporterCo
          address_line_1: Maple Avenue
          house_number: '123'
          postal_code: '90210'
          city: Springfield
          country_code: US
          state_province_code: US-MA
          telephone: '+15551234567'
          email: info@importer-of-record-example.com
        tax_numbers:
          sender:
            - name: VAT
              country_code: NL
              value: NL123456789B01
            - name: EORI
              country_code: NL
              value: NL123456789
          receiver:
            - name: EIN
              country_code: US
              value: '123456789'
          importer_of_record:
            - name: EIN
              country_code: US
              value: '987654321'
        return_data:
          return_postal_code: 1111 AA
          outbound_tracking_number: JT1234567890
          outbound_shipment_date: '2023-08-14'
          outbound_carrier_name: UPS
      properties:
        invoice_number:
          type: string
          minLength: 1
          maxLength: 40
          description: Customs invoice number.
          example: INV-123
        export_reason:
          type: string
          description: >-
            Indicates the purpose or reason behind exporting the items. This
            classification helps customs authorities determine the applicable
            regulations, taxes, and duties. For Returns, this field must always
            be set to `returned_goods`.
          enum:
            - gift
            - documents
            - commercial_goods
            - commercial_sample
            - returned_goods
          example: commercial_goods
        export_type:
          type: string
          description: >-
            Export type documentation serves to categorize international
            shipments into three primary classifications: Private exports,
            intended for personal use; Commercial B2C exports, directed towards
            individual consumers; and Commercial B2B exports, involving
            business-to-business transactions. These distinctions facilitate
            adherence to regulatory requirements and ensure the orderly movement
            of goods across international boundaries.
          enum:
            - private
            - commercial_b2c
            - commercial_b2b
          default: commercial_b2c
          example: private
        invoice_date:
          type: string
          format: date
          description: >-
            The date when the commercial invoice for the goods was issued (ISO
            8601). If not provided, the announcement date will be used by
            default.
        discount_granted:
          $ref: '#/components/schemas/optional-price'
          description: >-
            Shipper's granted discount amount to user. If currency is not passed
            then `total_order_value_currency` is selected by default.
        freight_costs:
          $ref: '#/components/schemas/optional-price'
          description: >-
            Charges associated with the transportation of the goods to their
            destination paid by the receiver. If currency is not passed then
            `total_order_value_currency` is selected by default.
        insurance_costs:
          $ref: '#/components/schemas/optional-price'
          description: >-
            The costs of insurance coverage for the goods during transit paid by
            the receiver. If currency is not passed then
            `total_order_value_currency` is selected by default.
        other_costs:
          $ref: '#/components/schemas/optional-price'
          description: >-
            Additional costs or charges associated with the shipment that are
            not covered by freight and insurance paid by the receiver. If
            currency is not passed then `total_order_value_currency` is selected
            by default.
        general_notes:
          type: string
          description: >-
            Exporter or shipper can include any additional information or
            special instructions related to the goods being shipped. This
            section is used to provide details that may not be covered in other
            parts of the invoice but are relevant for customs clearance.
          minLength: 1
          maxLength: 500
          example: >-
            Compliance: Goods comply with international safety standards (CE
            certified).
        additional_declaration_statements:
          type: array
          description: >-
            List of additional declaration statements. Each statement may
            contain specific details about the nature of the goods being
            shipped, their origin, or any additional information required by
            customs authorities. The content of an additional declaration
            statement can vary based on the requirements of the importing and
            exporting countries, as well as the nature of the goods being
            transported.
          maxItems: 100
          items:
            type: string
            example: >-
              With reference to the above shipment, I understate that the
              content is not made of leather parts of animal species protected
              by the Washington Convention.
            minLength: 1
            maxLength: 1024
        importer_of_record:
          type:
            - object
            - 'null'
          description: >-
            Importer of Record (IOR) information.


            A customs-connected record importer specializes in importing goods
            and managing the associated customs documentation. If not provided,
            the receiver's address will be used instead.
          properties:
            name:
              type: string
              description: Name of IOR
              minLength: 1
              maxLength: 75
            company_name:
              type: string
              description: IOR company name
              maxLength: 50
            address_line_1:
              type: string
              description: Address of IOR
              minLength: 1
              maxLength: 150
            address_line_2:
              type: string
              description: Additional address information, e.g. 2nd level
              maxLength: 150
            house_number:
              type: string
              description: IOR house number
              maxLength: 20
            city:
              type: string
              description: IOR city
              minLength: 1
              maxLength: 30
            postal_code:
              type: string
              description: IOR postal code
              minLength: 1
              maxLength: 12
            country_code:
              type: string
              description: IOR country. ISO 3166-1 alpha-2 code
              minLength: 2
              maxLength: 2
            state_province_code:
              type: string
              description: >-
                Code of the state (e.g. NY for New York) or province (e.g. RM
                for Rome). Destinations that require this field are USA, Canada,
                Italy and Australia. Format ISO-3166-2. See [international
                shipping](/docs/shipments/international-shipping#required-fields-for-international-shipments)
                for details.
              example: IT-RM
              maxLength: 14
            telephone:
              type: string
              description: IOR phone number in E.164 format
              maxLength: 20
            email:
              type: string
              description: IOR email
              maxLength: 320
          required:
            - name
            - address_line_1
            - city
            - postal_code
            - country_code
        tax_numbers:
          type: object
          description: >-
            Identification numbers and codes related to sender, received and
            importer of record provider.
          properties:
            sender:
              type: array
              description: Sender's list of identification number objects
              maxItems: 20
              items:
                $ref: '#/components/schemas/TaxNumber'
            receiver:
              type: array
              description: Receiver's list of identification number objects
              maxItems: 20
              items:
                $ref: '#/components/schemas/TaxNumber'
            importer_of_record:
              type: array
              description: Importer of record's list of identification number objects
              items:
                $ref: '#/components/schemas/TaxNumber'
              maxItems: 20
          required:
            - sender
            - receiver
            - importer_of_record
        return_data:
          type:
            - object
            - 'null'
          description: >-
            Additional information that must be provided for return parcels. All
            fields are nullable. However, a partially filled object is invalid.
            Either all fields should be provided, or none should be.
          properties:
            return_postal_code:
              type: string
              minLength: 1
              maxLength: 12
              description: >-
                The Postcode of the customer to whom the parcel was originally
                shipped.
            outbound_tracking_number:
              type: string
              description: Tracking number of outbound shipment
              example: BE123456789
              minLength: 1
              maxLength: 40
            outbound_shipment_date:
              type: string
              format: date
              description: Data of outbound shipment
              example: '2020-11-27'
            outbound_carrier_name:
              type: string
              description: The name of the carrier used for outbound shipment
              example: DHL
              minLength: 1
              maxLength: 50
          required:
            - return_postal_code
            - outbound_tracking_number
            - outbound_shipment_date
            - outbound_carrier_name
      required:
        - invoice_number
        - export_reason
    ErrorObject:
      title: Error
      type: object
      description: Error in a JSON:API error format
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        links:
          type: object
          description: >-
            A set of hyperlinks that provide additional information about the
            error.
          properties:
            about:
              type: string
              description: A URL that provides additional information about the error.
        status:
          type: string
          format: int32
          description: The HTTP status code of the error.
          minLength: 1
        code:
          type: string
          description: A unique error code for the error, in snake case format.
          minLength: 1
          enum:
            - unknown_field
            - invalid
            - forbidden
            - invalid_choice
            - min_value
            - 'null'
            - not_found
            - required
            - not_a_list
            - non_field_errors
            - authentication_failed
            - validation_error
            - parcel_announcement_error
        title:
          type: string
          description: A short, human-readable summary of the error.
          minLength: 1
        detail:
          type: string
          description: A human-readable explanation of the error.
          minLength: 1
        source:
          type: object
          description: >-
            An object that identifies the source of the error within the request
            payload.
          properties:
            pointer:
              type: string
              description: >-
                A `JSON` pointer to the location of the error within the request
                payload.
            parameter:
              type: string
              description: The name of the `query` parameter that caused the error.
            header:
              type: string
              description: The name of the `header` parameter that caused the error.
        meta:
          type: object
          description: Additional metadata about the error.
    address:
      title: Address Object
      type: object
      description: Sendcloud Address object
      properties:
        name:
          type: string
          example: John Doe
          description: Name of the person associated with the address
          minLength: 1
        company_name:
          type: string
          example: Sendcloud
          description: Name of the company associated with the address
        address_line_1:
          type: string
          example: Stadhuisplein
          description: First line of the address
        house_number:
          type: string
          example: '50'
          description: House number of the address
        address_line_2:
          type: string
          description: Additional address information, e.g. 2nd level
          example: Apartment 17B
        postal_code:
          type: string
          example: 1013 AB
          description: Zip code of the address
          minLength: 1
        city:
          type: string
          example: Eindhoven
          description: City of the address
          minLength: 1
        po_box:
          type:
            - string
            - 'null'
          description: Code required in case of PO Box or post locker delivery
        state_province_code:
          type: string
          example: IT-RM
          description: >-
            The character state code of the customer represented as ISO 3166-2
            code. This field is required for certain countries. See
            [international
            shipping](/docs/shipments/international-shipping#required-fields-for-international-shipments)
            for details.
        country_code:
          type: string
          example: NL
          description: The country code of the customer represented as ISO 3166-1 alpha-2
          minLength: 1
        email:
          type: string
          format: email
          example: johndoe@gmail.com
          description: Email address of the person associated with the address
        phone_number:
          type: string
          example: '+319881729999'
          description: Phone number of the person associated with the address
    dimension-units:
      type: string
      title: Dimensional units
      enum:
        - cm
        - mm
        - m
        - yd
        - ft
        - in
      example: mm
    weight-units:
      type: string
      title: Mass Units Object
      enum:
        - kg
        - g
        - lbs
        - oz
      example: g
    parcel-item-returns-create:
      title: Parcel Item Object
      description: A single item in a shipment
      type: object
      properties:
        item_id:
          type:
            - string
            - 'null'
          description: Order Item external ID in shop system
          example: '5552'
        description:
          type: string
          description: Description of the item
          example: T-Shirt XL
        quantity:
          type: integer
          description: Quantity of items shipped
          minimum: 1
          example: 1
        weight:
          $ref: '#/components/schemas/weight'
        price:
          $ref: '#/components/schemas/price-with-any-currency'
        value:
          $ref: '#/components/schemas/price-with-any-currency'
          deprecated: true
          description: >-
            Price in the specified currency. **Deprecated** in favour of the
            `price` field.
        hs_code:
          type: string
          description: >-
            Harmonized System Code. **This field is required if it's an
            international return**
          example: '6205.20'
          maxLength: 12
        origin_country:
          type: string
          description: >-
            ISO-2 code of the country where the items were originally produced.
            **This field is required if it's an international return**
          example: NL
        sku:
          type: string
          description: The SKU of the product
          example: TS1234
        product_id:
          type: string
          description: The internal ID of the product
          example: '19284'
        return_reason_id:
          type:
            - string
            - 'null'
          description: The ID of the return reason, if any.
          example: '1'
        return_message:
          type:
            - string
            - 'null'
          description: Extra information relating to the return reason
          example: Too big
        mid_code:
          title: MID Code
          type:
            - string
            - 'null'
          description: >
            MID code is short for Manufacturer's Identification code and must be
            shown on the commercial invoice. 

            It's used as an alternative to the full name and address of a
            manufacturer, shipper or exporter 

            and is always required for U.S. formal customs entries.
          example: NLOZR92MEL
        material_content:
          title: Material Content
          type:
            - string
            - 'null'
          description: A description of materials of the order content.
          example: 100% Cotton
        intended_use:
          title: Intended Use
          type:
            - string
            - 'null'
          description: >-
            Intended use of the order contents. The intended use may be personal
            or commercial.
          example: Personal use
        properties:
          type: object
          additionalProperties: true
          description: Any custom user-defined properties of order item or product
          example:
            size: red
            color: green
        variant_id:
          type:
            - string
            - 'null'
          description: Variant ID of the product. Imported from a shop system
          readOnly: true
          example: size-l
    optional-price:
      title: Optional price
      anyOf:
        - type: 'null'
        - $ref: '#/components/schemas/required-price'
    TaxNumber:
      title: Tax Number Object
      description: >-
        Identification numbers and codes used in different contexts. These
        identifiers are used for taxation, customs, business registration, and
        other purposes, depending on the country and the specific regulatory
        requirements. Depending on these requirements you may need to pass one
        or several numbers related to sender, receiver or importer of record
        provider. These numbers and codes will be included into final Customs
        documents.
      type: object
      properties:
        name:
          type: string
          example: EORI
          description: |
            Tax number abbreviation
              * VAT - Value-Added Tax → VOEC number for Norway should be shared here as advised by the [Norwegian Tax Authorities](https://www.skatteetaten.no/globalassets/bedrift-og-organisasjon/voec/sending-and-marking-goods-through-postal-services-and-transporters.pdf)
              * EIN - Employer Identification Number
              * GST - Goods and Service Tax
              * SSN - Social Security Number
              * EORI - Economic Operators Registration and Identification for the European Union
              * DUN - Data Universal Numbering System
              * FED - Federal Tax ID
              * STA - State Tax ID
              * CNP - Brazil CNPJ/CPF Federal Tax
              * IE - Brazil type IE/RG Federal Tax
              * INN - Russia bank details section INN
              * KPP - Russia bank details section KPP
              * OGR - Russia bank details section OGRN
              * OKP - Russia bank details section OKPO
              * IOSS - SDT or Overseas Registered Supplier or Import One-Stop-Shop or GB VAT (foreign) registration or AUSid GST Registration or VAT on E-Commerce
              * FTZ - Free Trade Zone ID
              * DAN - Deferment Account Duties Only
              * TAN - Deferment Account Tax Only
              * DTF - Deferment Account Duties, Taxes and Fees Only
              * RGP - EU Registered Exporters Registration ID
              * DLI - Driver's License
              * NID - National Identity Card - A PID (Personal Identification Number) should be provided as NID (National Identity Card).
              * PAS - Passport
              * MID - Manufacturer ID
              * UKIMS - UK Internal Market Scheme -> customs clearance for shipping from Great Britain to Northern Ireland under the Windsor Framework, for more information see [Windsor Framework](https://www.gov.uk/government/publications/the-windsor-framework)
          enum:
            - VAT
            - EIN
            - GST
            - SSN
            - EORI
            - DUN
            - FED
            - STA
            - CNP
            - IE
            - INN
            - KPP
            - OGR
            - OKP
            - IOSS
            - FTZ
            - DAN
            - TAN
            - DTF
            - RGP
            - DLI
            - NID
            - PAS
            - MID
            - UKIMS
        country_code:
          type: string
          example: NL
          description: Issuing country code (ISO 3166-1 alpha-2 code)
          maxLength: 2
        value:
          type: string
          example: NL123456789B01
          description: Tax number itself
          maxLength: 100
      required:
        - name
        - country_code
        - value
    required-price:
      title: Price object
      description: Price, consisting of a value and currency.
      allOf:
        - $ref: '#/components/schemas/Price'
        - type: object
          required:
            - value
            - currency
    Price:
      title: Price Object
      type: object
      properties:
        value:
          type: string
          example: '12.65'
          pattern: '[\d]+(\.[\d]+)?'
        currency:
          type: string
          description: ISO 4217 currency code
          minLength: 3
          maxLength: 3
          example: USD
  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.

````