> ## 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 custom status mapping for an integration

> Fetch a map of available shop order statuses and Sendcloud's internal status category for the integration.


<Warning>
  Only the Prestashop V2 integration is supported.
</Warning>


## OpenAPI

````yaml /.openapi/v3/integrations/openapi.yaml get /shop-order-statuses/mapping
openapi: 3.1.0
info:
  title: Integrations
  version: 3.0.0
  contact:
    name: Sendcloud API Support
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The Integrations API lets you manage some aspects of your integrations, and
    set and retrieve available shop order statuses.
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
security: []
tags:
  - name: Integrations
    description: IntegrationsAPI
  - name: Exception logs
    description: Integration exception logs API
paths:
  /shop-order-statuses/mapping:
    get:
      tags:
        - Integrations
      summary: Retrieve custom status mapping for an integration
      description: >
        Fetch a map of available shop order statuses and Sendcloud's internal
        status category for the integration.
      operationId: sc-public-v3-integrations-get-shop_order_statuses_mapping
      parameters:
        - $ref: '#/components/parameters/required_integration_id'
      responses:
        '200':
          description: Custom status mapping for an integration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-custom-status-mapping'
                type: object
              examples:
                Response:
                  value:
                    data:
                      integration_id: 23452345
                      mapping:
                        - status_category: READY_TO_SEND
                          external_id: '11'
                          is_valid: true
                        - status_category: IN_TRANSIT
                          external_id: '11'
                          is_valid: true
                        - status_category: DELIVERED
                          external_id: null
                          is_valid: true
                        - status_category: CANCEL
                          external_id: '1'
                          is_valid: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                InvalidRequest:
                  value:
                    errors:
                      - status: '400'
                        code: non_field_errors
                        title: integration ID
                        detail: Integration ID is a required GET parameter
      security:
        - HTTPBasicAuth: []
components:
  parameters:
    required_integration_id:
      in: query
      required: true
      name: integration_id
      schema:
        type: integer
        example: 251
      description: Filter response on `integration_id`.
  schemas:
    get-custom-status-mapping:
      title: Get Custom Status Mapping
      type: object
      description: >-
        Retrieve available shop order statuses mapped onto Sendcloud's internal
        status category for the given integration.
      properties:
        data:
          type: object
          properties:
            integration_id:
              type: integer
              description: Sendcloud Integration ID.
              example: 23452345
            mapping:
              type: array
              description: >-
                Array containing available shop order statuses mapped onto
                Sendcloud's internal status category.
                  - The array contains an object of each of Sendcloud's internal status categories.
                  - Each of sendcloud's internal status categories will be mapped onto either `AvailableStatus.external_id` or `null`
                  - Not all `external_ids` in AvailableStatus may be mapped onto Sendcloud's internal status category.
                  - Two `external_ids` may map onto the same internal status category.
                  - An invalid mapping is a mapping that points to `external_id` that has been deleted.
              items:
                type: object
                description: Status category to `external_id` association map.
                properties:
                  status_category:
                    type: string
                    enum:
                      - READY_TO_SEND
                      - IN_TRANSIT
                      - DELIVERED
                      - CANCEL
                    description: Sendcloud internal status category.
                    example: READY_TO_SEND
                  external_id:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Field containing the ID linked to the order status inside
                      the integrated webshop. It may be `None` or `null`.
                    example: '11'
                  is_valid:
                    type: boolean
                    description: >-
                      A flag showing if the mapping points to an existing
                      `external_id`.
                    example: true
    errors:
      title: Errors
      type: object
      description: A standardized format for errors in JSON:API responses.
      properties:
        errors:
          type:
            - array
            - object
          items:
            type: object
            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

````