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

# List ExpenseClaims

> Retrieve a list of `ExpenseClaims`.

The `declaredOn` query parameter can operate comparisons with a given date-time value:
- `?declaredOn=2021-01-01`: strict equality.
- `?declaredOn=since,2021-01-01`: greater than or equal.
- `?declaredOn=until,2021-01-01`: lower than or equal.
- `?declaredOn=between,2021-01-01,2021-01-31`: comprised between two dates.



## OpenAPI

````yaml /openapi-specs/cleemy-expenses-v3.yaml get /api/v3/expenseClaims
openapi: 3.1.0
info:
  title: Lucca Expenses
  version: '1.0'
  description: |
    Welcome on the documentation for the Lucca Expenses 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: ExpenseTempItems
    description: Singular expenses.
  - name: ExpenseClaims
    description: Collection of expenses submitted for approval.
  - name: ExpenseClaimItems
    description: Expenses included in an expenseClaim
  - name: CreateExpenseAccountingExport
    description: Service used to create an export and retrieve the exported entry lines.
paths:
  /api/v3/expenseClaims:
    parameters:
      - $ref: '#/components/parameters/Authorization'
    get:
      tags:
        - ExpenseClaims
      summary: List ExpenseClaims
      description: >-
        Retrieve a list of `ExpenseClaims`.


        The `declaredOn` query parameter can operate comparisons with a given
        date-time value:

        - `?declaredOn=2021-01-01`: strict equality.

        - `?declaredOn=since,2021-01-01`: greater than or equal.

        - `?declaredOn=until,2021-01-01`: lower than or equal.

        - `?declaredOn=between,2021-01-01,2021-01-31`: comprised between two
        dates.
      operationId: get-api-v3-expenseClaims
      parameters:
        - schema:
            type: array
            items:
              type: integer
          in: query
          name: ownerId
          description: Comma-separated list of user identifiers (int).
        - schema:
            type: string
          in: query
          name: orderBy
          description: '{fieldName},{''asc''||''desc''}. Example: `?orderby=declaredOn,desc`'
        - schema:
            type: string
          in: query
          name: declaredOn
          description: 'Examples: `between,2022-01-01,202201-31`.'
        - $ref: '#/components/parameters/paging'
        - schema:
            type: string
          in: query
          name: statusId
          description: >-
            1: Created; 2: PartiallyApproved; 3: Approved; 4: Controlled; 5:
            ApprovedAndControlled; 6: PaymentInitiated; 7: Paid; 8: Refused; 9:
            Cancelled. Examples: `2,3` or `PartiallyApproved,Approved`.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExpenseClaim'
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
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
    paging:
      name: paging
      in: query
      required: true
      schema:
        type: string
        example: 100,0
      description: '{offset},{limit}. Defaults to 0,1000.'
  schemas:
    ExpenseClaim:
      type: object
      title: The ExpenseClaim Resource
      description: >-
        When a user wants to declare his expenses, he creates an `ExpenseClaim`.


        An `ExpenseClaim` is created by regrouping one or more
        `ExpenseTempItems` and converting them into ExpenseClaimItems.


        Once created, an `ExpenseClaim` has to be approved by his manager.


        Multiple `ExpenseClaims` can be created through a single request.
      x-tags:
        - ExpenseClaims
      properties:
        id:
          type: integer
          minimum: 1
          readOnly: true
        name:
          type: string
          maxLength: 255
          description: >-
            Name of the expense claim. If empty, it will be generated with the
            month and year of the last of claim item.
        declaredOn:
          type: string
          format: date-time
          description: Day the expenseClaim has been declared (Time zone Europe/Paris).
          readOnly: true
        createdOn:
          type: string
          format: date-time
          description: Day the expenseClaim has been created (Time zone Europe/Paris).
          readOnly: true
        modifiedOn:
          type: string
          format: date-time
          description: Day the expenseClaim has been modified (Time zone Europe/Paris).
          readOnly: true
        paymentReceivedOn:
          type: string
          format: date-time
          description: Day the expenseClaim has been paid (Time zone Europe/Paris).
          readOnly: true
        sourceId:
          allOf:
            - $ref: '#/components/schemas/SourceId'
            - readOnly: true
        source:
          allOf:
            - $ref: '#/components/schemas/Enum'
            - readOnly: true
        paymentMethodId:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodId'
            - readOnly: true
        paymentMethod:
          allOf:
            - $ref: '#/components/schemas/Enum'
            - readOnly: true
        statusId:
          allOf:
            - $ref: '#/components/schemas/ClaimStatusId'
            - readOnly: true
        status:
          allOf:
            - $ref: '#/components/schemas/Enum'
            - readOnly: true
        approvalStateId:
          allOf:
            - $ref: '#/components/schemas/ApprovalStateId'
            - readOnly: true
        approvalState:
          allOf:
            - $ref: '#/components/schemas/Enum'
            - readOnly: true
        authorizedActions:
          type: object
          description: Authorized actions on the expenseClaim for the current user.
          properties:
            isCancellable:
              type: boolean
              description: >-
                The expenseClaim can be deleted by the current authenticated
                user.
            isEditable:
              type: boolean
              description: >-
                The expenseClaim can be edited by the current authenticated
                user.
            isApprovable:
              type: boolean
              description: >-
                The expenseClaim can be approved by the current authenticated
                user.
            isControllable:
              type: boolean
              description: >-
                The expenseClaim can be controlled by the current authenticated
                user.
            isUnControllable:
              type: boolean
              description: >-
                The current authenticated user can cancel the control of the
                expenseClaim.
          readOnly: true
        ownerId:
          type: integer
          description: Unique identifier of the user that made this expenseClaim.
          readOnly: true
        owner:
          $ref: '#/components/schemas/Owner'
        authorId:
          type: integer
          description: Unique identifier of the user that created this grouping of expense.
        author:
          $ref: '#/components/schemas/EntityBase'
        legalEntityId:
          type: integer
        legalEntity:
          $ref: '#/components/schemas/EntityBase'
        departmentId:
          type: integer
        department:
          $ref: '#/components/schemas/EntityBase'
        currencyId:
          $ref: '#/components/schemas/CurrencyId'
        currency:
          $ref: '#/components/schemas/Currency'
      required:
        - declaredOn
        - createdOn
        - modifiedOn
    SourceId:
      title: SourceId
      type: object
      properties:
        id:
          type: string
      description: |-
        The source describes how the expense was created:
        - 0: Legacy
        - 1: OldImport
        - 2: ImportByCb
        - 3: ImportByNature
        - 4: Anytime
        - 5: BudgetInsight
        - 6: Api
        - 7: Ocr
        - 8: Reconciliation
        - 9: InvoiceAggregator
        - 10: EmailAttachments
        - 11: FtpStatementImport
        - 12: CleemyPayment
    Enum:
      title: Enum
      type: object
      description: ''
      properties:
        id:
          type: number
        name:
          type: string
          readOnly: true
        code:
          type: string
    PaymentMethodId:
      title: PaymentMethodId
      description: >-
        How this expense was made: the owner used his money, an enterprise debit
        card, or a Cleemy card:

        - 0: User

        - 1: CorporateCard

        - 3: Cleemy Card
      type: integer
      enum:
        - 0
        - 1
        - 3
    ClaimStatusId:
      title: ClaimStatusId
      type: object
      description: |-
        Status of the expenseClaim.
        - 1: the expenseClaim is created.
        - 2: the expenseClaim has been partially approved.
        - 3: the expenseClaim has been approved.
        - 4: the expenseClaim has been controlled.
        - 5: the expenseClaim has been approved and controlled.
        - 6: the payment of the expenseClaim has been initiated.
        - 7: the expenseClaim has been paid.
        - 8: the expenseClaim has been refused.
        - 9: the expenseClaim has been cancelled.
      properties:
        id:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
    ApprovalStateId:
      title: ApprovalStateId
      type: object
      description: |-
        State of the approval of the expenseClaim.
        - 0: the approval is created.
        - 1: the expenseClaim has been partially approved.
        - 2: the expenseClaim has been approved.
        - 3: the expenseClaim has been refused.
        - 4: the expenseClaim has been cancelled.
      properties:
        id:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
    Owner:
      title: Owner
      type: object
      properties:
        id:
          type: integer
          minimum: 1
        name:
          type: string
        url:
          type: string
          format: uri
        firstName:
          type: string
        lastName:
          type: string
    EntityBase:
      title: EntityBase
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        url:
          type: string
    CurrencyId:
      title: CurrencyId
      description: 'ISO code of the currency (eg: ''EUR'', ''USD'', ''GBP'', ...).'
      type: string
    Currency:
      title: Currency
      type: object
      properties:
        id:
          $ref: '#/components/schemas/CurrencyId'
        name:
          type: string
          description: 'Label of the currency (eg: Pound sterling).'
        url:
          type: string
          format: uri
      description: ''
  responses:
    ResponseProblem:
      description: Problem
      content:
        application/json:
          schema:
            type: object
            properties:
              Status:
                type: integer
                description: HTTP status code.
                example: 401
              Message:
                type: string
                description: Human readable error message.
                example: Unauthorized

````