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

# Get Cost-Center

> Retrieve a cost-center by its ID.



## OpenAPI

````yaml /openapi-specs/lucca-invoices.yaml get /cleemy-procurement/api/costcenters/{id}
openapi: 3.1.0
info:
  title: Lucca.Invoices
  version: '1.0'
  description: |
    Welcome on the documentation for the Lucca Invoices API.
  contact:
    name: API Support
    url: https://support.lucca.fr
    email: contact@luccasoftware.com
  license:
    name: Unlicensed
    url: https://www.luccasoftware.com
servers:
  - url: https://{host}
    description: Your Lucca account URL.
    variables:
      host:
        default: example.ilucca.net
        description: >-
          The URL of your dedicated Lucca account: `{account}.{env}.{region}`.


          Account reflects your company name. Env indicates the environment.
          Region depends on your server location.


          **Please, use your test or sandbox environments (and not your
          production env.) for testing purposes.**


          Environments:

          - `ilucca`: production environment for customers.

          - `ilucca-test`: test environment for customers.

          - `ilucca-demo`: demo environment for prospects.


          Regions:

          - `.ch` for Swiss located accounts.

          - `.net` for the others.


          Regarding sandboxes, the pattern differs:
          `https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com`,
          where:

          - `{sandboxName}` is automatically generated upon creation.

          - `{server}` may be "eu1", "eu2" or "ch1".
security: []
tags:
  - name: Purchases
    description: Purchases.
  - name: Cost-Centers
    description: Cost-Centers.
  - name: Approval
    description: Approval.
  - name: VAT
    description: VAT Rates.
  - name: Booked-Documents
    description: Booked-Documents.
  - name: Suppliers
    description: Suppliers.
  - name: Natures
    description: Natures.
  - name: Invoices
    description: Invoices.
  - name: Inbox
    description: Inbox.
  - name: Documents
    description: Documents.
paths:
  /cleemy-procurement/api/costcenters/{id}:
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - name: id
        description: ID of the cost-center.
        in: path
        required: true
        schema:
          type: integer
          format: int32
    get:
      tags:
        - Cost-Centers
      summary: Get Cost-Center
      description: Retrieve a cost-center by its ID.
      operationId: get-cost-center
      responses:
        '200':
          description: Successful read of cost-center
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cost-center'
components:
  parameters:
    Authorization:
      name: Authorization
      required: true
      description: 'API key. Value must be formatted like so: `lucca application={api_key}`.'
      in: header
      schema:
        type: string
  schemas:
    cost-center:
      title: cost-center
      description: Cost-center.
      type: object
      required:
        - name
        - code
      properties:
        id:
          type: integer
          format: int32
          readOnly: true
        name:
          type: string
        code:
          type: string
        ownerId:
          description: ID of the user who will be the owner of the cost-center.
          type: integer
          format: int32
          writeOnly: true
        owner:
          allOf:
            - $ref: '#/components/schemas/user-reference'
            - readOnly: true
              description: '**Read-only.** Owner of the cost-center.'
        state:
          $ref: '#/components/schemas/cost-center-state'
        establishmentIds:
          description: >-
            **Write-only.** IDs of the establishments to which the cost-center
            belongs."
          writeOnly: true
          type: array
          items:
            type: integer
            format: int32
        establishments:
          description: '**Read-only.** Establishments to which the cost-center belongs.'
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/establishment-reference'
    user-reference:
      title: Reference to a user
      description: Reference to a user.
      type: object
      required: []
      properties:
        id:
          type: integer
          format: int32
        href:
          type: string
          format: uri
          readOnly: true
        name:
          type: string
          readOnly: true
        firstName:
          type: string
          readOnly: true
        lastName:
          type: string
          readOnly: true
        pictureHref:
          description: '**Read-only.** URL to this user picture image file.'
          type:
            - string
            - 'null'
          format: uri
          readOnly: true
    cost-center-state:
      title: Cost-Center State (enum)
      description: >-
        Disabled: the cost-center is disabled. Enabled: the cost-center is
        enabled.
      type: string
      enum:
        - Disabled
        - Enabled
      default: Disabled
    establishment-reference:
      title: Reference to an establishment
      description: Reference to an establishment.
      type: object
      required: []
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
          readOnly: true
        href:
          type: string
          format: uri
          readOnly: true

````