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

# Check service requirements

> Verify that an invoice meets every prerequisite for a service type before requesting the Service.

A Service is a financial product – financing, insurance, or collection – applied to a captured invoice. Before requesting one, call this endpoint to confirm the invoice satisfies the prerequisites for that service type.

<Tip>
  Check requirements first rather than requesting a Service and handling the rejection. The response tells you which
  prerequisite is outstanding and what to resolve.
</Tip>


## OpenAPI

````yaml GET /v1/invoices/{external_id}/services/{service_type}/requirements
openapi: 3.0.0
info:
  version: 0.0.1
  title: Tilta API
  description: Tilta API documentation
servers:
  - url: https://api.tilta.io
    description: Tilta Production API
  - url: https://api.tilta-sandbox.io
    description: Tilta Sandbox API
security: []
paths:
  /v1/invoices/{external_id}/services/{service_type}/requirements:
    get:
      tags:
        - Invoice Services
      summary: List requirements for a service
      description: |-
        Get service Requirements by service Type.
            The request will return an array of Requirements.
      parameters:
        - schema:
            type: string
            maxLength: 100
            pattern: ^[a-zA-Z0-9-_]+$
            description: Unique identifier of an invoice.
          required: true
          name: external_id
          in: path
        - schema:
            type: string
            enum:
              - FINANCING
              - INSURANCE
              - COLLECTION
          required: true
          name: service_type
          in: path
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                      enum:
                        - INVOICE_INELIGIBLE
                        - FACILITY_MISSING
                        - MERCHANT_NOT_ENROLLED
                        - FACILITY_CURRENCY_CONFLICT
                        - FACILITY_EXCEEDED_AVAILABLE_AMOUNT
                        - FACILITY_EXPIRED
                        - INVOICE_DUE_DATE_BIGGER_FACILITY_EXP_DATE
                        - FROZEN_FACILITY
                        - NO_ACTIVE_MANDATE
                        - INVOICE_CURRENCY_NOT_SUPPORTED
                        - INVOICE_PAYMENT_TERM_EXCEEDED
                        - INVOICE_ISSUE_DATE_TOO_OLD
                        - NO_INVOICE_FILE_FOUND
                        - BUYER_CONTACT_REQUIRED
                        - INVOICE_FILE_DATA_MISMATCH
                    description:
                      type: string
                  required:
                    - code
                    - description
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequestSchema'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedRequestSchema'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoiceServiceNotFoundSchema'
      security:
        - bearerAuth: []
components:
  schemas:
    badRequestSchema:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: BAD_REQUEST
        error:
          type: string
          description: Error message for debugging purposes
          example: Request validation failed. 1 issue found.
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Issue code
                example: INVALID_TYPE
              path:
                type: string
                description: Issue path starting with body, params, querystring, or headers
                example: body.registered_at
              message:
                type: string
                description: Issue message for debugging purposes
                example: Invalid type
            required:
              - code
              - path
              - message
          description: List of issues
          example:
            - code: INVALID_TYPE
              path: body.registered_at
              message: Invalid type
      required:
        - code
        - error
        - issues
      description: Bad Request, see error message for details.
      example:
        code: BAD_REQUEST
        error: Request validation failed. 1 issue found.
        issues:
          - code: INVALID_TYPE
            path: body.registered_at
            message: Invalid type
    unauthorizedRequestSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: Unauthorized
        code:
          type: string
          description: Error code.
          example: UNAUTHORIZED
      required:
        - error
        - code
      description: Unauthorized Request.
      example:
        error: Unauthorized
        code: UNAUTHORIZED
    invoiceServiceNotFoundSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: No Entity found
        code:
          type: string
          description: Error code.
          example: NOT_FOUND
      required:
        - error
        - code
      description: No invoice service found.
      example:
        error: No Entity found
        code: NOT_FOUND
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your Tilta API key, sent as `Bearer <key>`.

````