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

# Get a client

> Get the client.



## OpenAPI

````yaml https://public.leanpay.fr/openapi/leanpay_api_documentation.swagger.yaml get /clients/{clientId}
openapi: 3.1.1
info:
  version: 1.0.0
  title: LeanPay Api documentation
  description: >
    ## Authentication


    Send the API key in the `Authorization` header of every request, as it is,
    without a `Bearer` prefix:


    ```

    Authorization: <API key>

    ```


    A user of the LeanPay app with the required permission creates the key in
    the app. The app shows the key only once, when it creates it: store it.


    ## Errors


    | Status | Cause |

    | --- | --- |

    | `400` | The request is invalid: body, path parameter or query parameter. |

    | `401` | The API key is missing, unknown or inactive. |

    | `404` | The id in the path matches no item, unless the route documents
    another behaviour. |

    | `429` | The rate limit is reached. |

    | `500` | Server error. |


    The body of an error is JSON and holds a human-readable explanation. Use it
    to debug, but do not parse it: rely on the status code.


    **Rate limit.** Each LeanPay account can send 150 requests per minute, all
    its API keys and all routes together. The response to a request with a valid
    API key carries these headers, except a `429`:


    | Header | Value |

    | --- | --- |

    | `X-RateLimit-Limit` | The number of requests allowed per minute. |

    | `X-RateLimit-Remaining` | The number of requests left in the current
    minute. |

    | `X-RateLimit-Reset` | The number of seconds before the count starts again.
    |


    Above the limit, the API returns `429` with only a `Retry-After` header:
    wait this number of seconds before the next request.


    ## Filtering


    Filter a list with the `s` query parameter: a JSON condition, URL-encoded.


    ```

    ?s={"field":{"$operator":value}}

    ```


    - `{"field": value}` is the same as `{"field": {"$eq": value}}`.

    - An item matches an object of several fields only if it matches all of
    them.

    - Combine conditions with `$and` and `$or`, each followed by an array of
    conditions: `{"$or":[{"name":{"$starts":"A"}},{"externalId":"EXT-1"}]}`.

    - An object that holds a non-empty `$and` takes no other key: put every
    condition inside the `$and` array. A field or an `$or` next to it returns
    `400`.

    - An item must also match a field next to `$or`.

    - `$and` and `$or` cannot be nested: a `$and` or an `$or` inside the array
    of another one returns `400`.

    - An `$or` inside a field (`{"field":{"$or":…}}`) takes one plain operator.
    Several operators, a list or a nested `$or` return `400`: use a top-level
    `$or` instead.


    | Operator | Meaning | Operand |

    | --- | --- | --- |

    | `$eq` | Equal to | A value |

    | `$ne` | Not equal to | A value |

    | `$gt` `$gte` | Greater than, greater than or equal to | A value |

    | `$lt` `$lte` | Less than, less than or equal to | A value |

    | `$between` | Between two values, both included | `[min, max]` |

    | `$cont` | Contains the text | A text |

    | `$starts` | Starts with the text | A text |

    | `$ends` | Ends with the text | A text |

    | `$in` | Equal to one of the values | A list |

    | `$notin` | Equal to none of the values | A list |

    | `$isnull` | Is null | `true` |

    | `$notnull` | Is not null | `true` |


    Add `L` to a text operator to ignore the case: `$contL`, `$startsL`,
    `$endsL`.


    | Field type | Format of the value |

    | --- | --- |

    | Date | `YYYY-MM-DD` or a full ISO 8601 date-time:
    `2026-06-01T00:00:00.000Z`. |

    | UUID | The hyphenated form the API returns: `8-4-4-4-12`. |

    | Boolean | `true` or `false`. |

    | Enumeration | One of the values the route lists. |


    A UUID, boolean or enumeration field accepts only `$eq`, `$ne`, `$in`,
    `$notin`, `$isnull` and `$notnull`, alone or inside a field-level `$or`. On
    these fields, only `$in` and `$notin` accept a list, and never a nested
    list.


    Each list route gives the fields it filters on and their operators. A field
    outside this list returns `400`. On a UUID, boolean or enumeration field, an
    operator or a value outside these lists also returns `400`. On the other
    fields, use only the operators the route gives.


    ## Pagination


    A list route returns one page of items.


    | Parameter | Default | Values |

    | --- | --- | --- |

    | `page` | `1` | The number of the page, from `1`. |

    | `limit` | `200` | The number of items per page, from `1` to `200`. |


    The response wraps the page in an envelope:


    ```

    { "data": [ … ], "count": 200, "total": 412, "page": 1, "pageCount": 3 }

    ```


    | Property | Value |

    | --- | --- |

    | `data` | The items of the page. |

    | `count` | The number of items in `data`. |

    | `total` | The number of items that match the filter, on all pages. |

    | `page` | The number of the page. |

    | `pageCount` | The number of pages. |


    A page after the last one is not an error: `data` is empty and `count` is
    `0`.


    ## Sorting


    Sort a list with `sort=field,ASC` or `sort=field,DESC`. Repeat the parameter
    to sort on several fields, in the order given:
    `?sort=updatedAt,ASC&sort=id,ASC`. Each list route gives the fields it sorts
    on and its default sort. A field outside this list returns `400`.


    Items with the same values on all the sort fields come back in no fixed
    order, and can change pages between two requests: add `sort=id,ASC` as the
    last sort field to keep their order stable. An item created, updated or
    deleted while the pages are read can still move the items of the next pages.


    ## Amounts


    All amounts are integers, in hundredths of the currency unit, whatever the
    currency: `1250` is 12.50 EUR, and `500000` is 5,000 JPY. An amount is in
    the `currency` of its item, except `defaultCurrencyAmount`, which is in the
    default currency of the account.
  contact:
    email: integration@leanpay.fr
servers:
  - url: https://api.leanpay.fr/v1/public
security: []
tags:
  - name: clients
  - name: invoices
  - name: credit-notes
  - name: misc-operations
  - name: contacts
  - name: addresses
  - name: payments
  - name: portal-payments
  - name: paybacks
  - name: links
  - name: comments
  - name: deleted-elements
  - name: reminders
  - name: client-groups
  - name: client-properties
  - name: client-payment-schedules
paths:
  /clients/{clientId}:
    get:
      tags:
        - clients
      summary: Get a client
      description: Get the client.
      operationId: getClient
      parameters:
        - $ref: '#/components/parameters/ClientId'
      responses:
        '200':
          description: The client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Client'
              example:
                id: 9bfc607e-4e58-4f4e-a93b-cd934958933f
                tenantId: 344ca963-6bf0-4bbb-b00f-3e377e5dc358
                externalId: CLI-0042
                name: Acme
                createdAt: '2026-03-12T09:41:27.000Z'
                updatedAt: '2026-10-06T08:00:12.000Z'
      security:
        - authorization: []
components:
  parameters:
    ClientId:
      name: clientId
      in: path
      description: Id of the client.
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Client:
      type: object
      properties:
        id:
          description: Id of the client.
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        externalId:
          description: Id of the client outside LeanPay. `null` when the client has none.
          type:
            - string
            - 'null'
        name:
          description: Name of the client.
          type: string
        createdAt:
          description: Date the client was created.
          type: string
          format: date-time
        updatedAt:
          description: Date the client was last updated.
          type: string
          format: date-time
      required:
        - id
        - tenantId
        - externalId
        - name
        - createdAt
        - updatedAt
  securitySchemes:
    authorization:
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.