> ## 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 return portal URL

> Retrieve a return portal link for a specific shipment using the shipment's id.

The URL which is retrieved will link directly to the shipment in the Sendcloud Return portal, so a **return parcel** can be created immediately based on the outgoing shipment.

If no Return portal is configured, or if no brand is connected to the shipment, this endpoint will return an error response with a 404 status code.


## OpenAPI

````yaml /.openapi/v3/shipments/openapi.yaml get /shipments/{id}/return-portal-url
openapi: 3.1.0
info:
  title: Shipments
  version: 3.0.0
  description: >-
    The Shipments API allows you to create and announce, retrieve, and cancel
    outgoing shipments and their associated parcels within the Sendcloud
    platform.
  contact:
    name: Sendcloud API Support
    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
security: []
tags:
  - name: Shipments
    description: Shipments API
paths:
  /shipments/{id}/return-portal-url:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: ID of the shipment
    get:
      tags:
        - Shipments
      summary: Retrieve a return portal URL
      description: >-
        Retrieve a return portal link for a specific shipment using the
        shipment's id.
      operationId: sc-public-v3-scp-get-return_portal_url
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                        description: The return portal URL for the shipment.
                        minLength: 1
                    required:
                      - url
                required:
                  - data
              examples:
                ReturnPortalURL:
                  summary: Return portal URL
                  value:
                    data:
                      url: http://mybrand.returns-portal.com/initiate/
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                ReturnPortalNotFound:
                  summary: Return portal not found
                  value:
                    errors:
                      - status: '404'
                        code: not_found
                        detail: No return portal is configured for this shipment.
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  schemas:
    errors:
      title: Errors
      description: >-
        A standardized format for errors in
        [JSON:API](https://jsonapi.org/format/#error-objects) responses.
      type: array
      items:
        allOf:
          - $ref: '#/components/schemas/ErrorObject'
          - required:
              - status
              - code
              - detail
    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.
  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.

````