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

> Retrieve information about a specific contract by including the `id` of the contract as a path parameter.



## OpenAPI

````yaml /.openapi/v3/contracts/openapi.yaml get /contracts/{id}
openapi: 3.1.0
info:
  title: Contracts API
  version: 3.0.0
  description: >-
    The Contracts API allows you to manage and retrieve information about your
    direct shipping contracts connected to your Sendcloud account.
  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: Contracts
paths:
  /contracts/{id}:
    parameters:
      - schema:
          type: integer
        in: path
        name: id
        description: The id of the contract.
        required: true
    get:
      tags:
        - Contracts
      summary: Retrieve a contract
      description: >-
        Retrieve information about a specific contract by including the `id` of
        the contract as a path parameter.
      operationId: sc-public-v3-scp-get-specific_contract
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Retrieve contract
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/contract'
              examples:
                RetrieveContract:
                  summary: Retrieve a contract
                  value:
                    data:
                      id: 60
                      carrier:
                        code: lettresuivie
                        name: Lettre Suivie
                      client_id: sendcloud-1
                      is_default_per_carrier: true
                      state: active
                      type: direct
        '404':
          description: Contract not found
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  schemas:
    contract:
      title: Contract
      description: User contract
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          description: Unique identifier of the contract.
        client_id:
          description: >-
            Value of the carrier specific key for contact (e.g. the value of
            DelisID in DPD Benelux, username for DHL Express).
          type:
            - string
            - 'null'
        carrier:
          type: object
          properties:
            code:
              type: string
            name:
              type: string
              minLength: 1
              description: Carrier name.
        name:
          type: string
          description: >-
            A custom name set by the user used to identify this contract
            throughout the platform.
          maxLength: 50
        country_code:
          type: string
          description: The country of the contract, as an ISO 3166-1 alpha-2.
          example: NL
        is_default_per_carrier:
          type: boolean
          description: >-
            Indicates if the contract is marked as 

            default. When you have multiple active direct contracts for the same
            carrier, default indicates that the contract will be prioritized
            over the other direct contracts for the same carrier, when no
            contract is explicitly 
             mentioned while creating a parcel. You can have only one default direct contract per carrier and it will always be False for the broker and subbroker. The default can be configured in the "My contracts" page in the Sendcloud platform.
        state:
          type: string
          description: State of the contract
          enum:
            - active
            - inactive
            - validating
            - validation_failed
          example: active
        type:
          type: string
          description: Contract type
          enum:
            - direct
            - broker
            - subbroker
          example: direct
        error:
          type:
            - string
            - 'null'
          description: An error message when validating contract
          example: Missing or invalid shipper number
  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.

````