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

# Read an expense's OCR status and assigned tags

> Returns the latest OCR job status and the current category, subcategory and project from the expense header.



## OpenAPI

````yaml /openapi/openapi.json get /expenses/tags/{invoiceId}
openapi: 3.1.0
info:
  title: OpenAPI
  version: '1.0'
  summary: OpenApi
  contact:
    name: Altera Support
    url: https://altera.co
    email: wsparcie@altera.co
  description: ''
  license:
    url: https://altera.co/regulamin
    name: Terms of services for Altera.app
servers:
  - url: https://api.altera.co
    description: Production endpoint (proxied)
security:
  - Authorization: []
tags:
  - name: Configuration
  - name: Data export
  - name: Expenses
  - name: Sales
paths:
  /expenses/tags/{invoiceId}:
    get:
      tags:
        - Expenses
      summary: Read an expense's OCR status and assigned tags
      description: >-
        Returns the latest OCR job status and the current category, subcategory
        and project from the expense header.
      operationId: getExpenseTags
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
            maximum: 9007199254740991
      responses:
        '200':
          description: OCR status and tag assignments.
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - data
                properties:
                  result:
                    type: string
                    enum:
                      - OK
                  data:
                    type: object
                    required:
                      - ocrStatus
                      - costCenter
                      - costCenter2
                      - project
                    properties:
                      ocrStatus:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Latest job status, or null when no OCR job exists for
                          the expense.
                        example: COMPLETED
                      costCenter:
                        $ref: '#/components/schemas/AssignedExpenseTag'
                      costCenter2:
                        $ref: '#/components/schemas/AssignedExpenseTag'
                      project:
                        $ref: '#/components/schemas/AssignedExpenseTag'
              example:
                result: OK
                data:
                  ocrStatus: COMPLETED
                  costCenter:
                    tagId: 6
                    name: Travel
                  costCenter2: null
                  project:
                    tagId: 9
                    name: Field service
        '400':
          description: Invalid expense ID.
        '401':
          $ref: '#/components/responses/OpenApiAuthorizationRequired'
        '403':
          $ref: '#/components/responses/OpenApiAccessDenied'
        '404':
          description: >-
            No expense with this ID in the API key's company, or the expense was
            deleted.
components:
  schemas:
    AssignedExpenseTag:
      type:
        - object
        - 'null'
      description: Null when unassigned. Existing assignments can refer to archived tags.
      required:
        - tagId
        - name
      properties:
        tagId:
          type: integer
          minimum: 1
        name:
          type:
            - string
            - 'null'
          description: >-
            Null when the assigned ID has no matching entry in the company's
            catalog.
  responses:
    OpenApiAuthorizationRequired:
      description: >-
        The Authorization header is missing, or a verified key has expired
        (KEY_EXPIRED).
    OpenApiAccessDenied:
      description: The API key is invalid or the company does not have OpenAPI access.
  securitySchemes:
    Authorization:
      name: Authorization
      type: apiKey
      in: header
      description: OpenApi Key created within Altera.app for a certain company

````

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