> ## 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 the status of a return

> Find out the label creation status for a return parcel.

<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>

Once a return parcel has been successfully created, a polling URL is included in the response. Creating a label depends on the response time of the carrier, so you need to make a request to this endpoint to see the status of the label. The URL you received contains a token with the `id`, so you don't need to provide any additional lookup details or authentication.

* A `200` response will indicate that the label is ready and can be downloaded.
* A `202` response will indicate that the label is not ready to be downloaded but the return data has been accepted. If you have paid returns enabled this status is used to indicate we are waiting for payment. For more information take a look at [this help center article](https://support.sendcloud.com/hc/en-us/articles/5987289174420-Charge-customers-for-a-return-fee-via-the-return-portal).
* A `500` response means that the label announcement failed.


## OpenAPI

````yaml /.openapi/v2/return-portal/openapi.yaml get /brand/{brand_domain}/return-portal/label/polling
openapi: 3.1.0
info:
  title: Return portal
  version: 2.0.0
  description: >-
    The Return portal API provides you with the tools to manage your own return
    portal, and create returns through that portal.
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  termsOfService: https://www.sendcloud.com/terms-conditions/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://panel.sendcloud.sc/api/v2
    description: Sendcloud Production
security: []
tags:
  - name: Return portal
    description: Sendcloud's Return portal
paths:
  /brand/{brand_domain}/return-portal/label/polling:
    parameters:
      - schema:
          type: string
        name: brand_domain
        in: path
        required: true
        description: The domain of the brand configured for your return portal.
    get:
      tags:
        - Return portal
      summary: Retrieve the status of a return
      description: Find out the label creation status for a return parcel.
      operationId: sc-public-v2-scp-get-label_polling
      parameters:
        - schema:
            type: string
          in: query
          name: token
          description: Polling token, used to find the return
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  download_url:
                    type: string
                    description: A URL pointing to the downloadable label
                    format: uri
                  return:
                    type: integer
                    description: ID of the created return
                  parcels:
                    type: array
                    description: ID(s) of the created parcels of the return
                    items:
                      type: integer
                  tracking_numbers:
                    type: array
                    description: Tracking number(s) of the created parcels
                    items:
                      type: string
                  customs_declaration_url:
                    type: string
                    format: uri
                    description: >-
                      If available the customs-declaration can be downloaded
                      here
                required:
                  - download_url
                  - return
                  - parcels
                  - tracking_numbers
              examples:
                ReturnCreated:
                  summary: Successful creation of a return
                  value:
                    download_url: >-
                      https://panel.sendcloud.sc/api/v2/brand/my-brand/return-portal/label/download?token=xxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx
                    return: 123456
                    parcels:
                      - 7654321
                    tracking_numbers:
                      - 3SYZXG123456789
        '202':
          description: Accepted
        '404':
          $ref: '#/components/responses/404'
      security:
        - JWTtoken: []
components:
  responses:
    '404':
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  request:
                    type: string
                    example: api/v2/brand/brand_domain/return-portal
                  message:
                    type: string
                    example: No ReturnsPortal matches the given query
  securitySchemes:
    JWTtoken:
      type: http
      scheme: bearer
      description: The JWT generated when starting the Return Portal process

````