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

# Upload an invoice

> The invoice will be read, and the extracted supplier and payment details will be available once processed.

Requires the `invoice:write` ability.



## OpenAPI

````yaml /api-reference/api.json post /invoices
openapi: 3.1.0
info:
  title: ezyshield
  version: 0.0.1
servers:
  - url: https://app.ezyshield.com.au/api
    description: Production
  - url: https://sandbox.ezyshield.com.au/api
    description: Sandbox
security:
  - http: []
tags:
  - name: Organizations
  - name: API Keys
  - name: Verifications
  - name: Checks
  - name: ABA checks
  - name: Invoices
  - name: Webhook Subscriptions
  - name: Webhook Events
paths:
  /invoices:
    post:
      tags:
        - Invoices
      summary: Upload an invoice
      description: >-
        The invoice will be read, and the extracted supplier and payment details
        will be available once processed.


        Requires the `invoice:write` ability.
      operationId: invoices.store
      parameters:
        - name: fields[invoices]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - status
                - source
                - original_file_name
                - extracted_business_name
                - extracted_business_abn
                - extracted_account_name
                - extracted_account_number
                - extracted_account_bsb
                - extracted_invoice_number
                - created_at
                - updated_at
          explode: false
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/StoreInvoiceRequest'
      responses:
        '201':
          description: '`InvoiceResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/InvoiceResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreInvoiceRequest:
      type: object
      properties:
        file:
          type: string
          format: binary
          contentMediaType: application/octet-stream
          description: >-
            Invoice file to upload and extract supplier and payment details
            from. Must be a PDF, JPEG, or PNG up to 10MB.
          maxLength: 10240
      required:
        - file
      title: StoreInvoiceRequest
    InvoiceResource:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          const: invoices
        attributes:
          type: object
          properties:
            status:
              type: string
              description: The status of the invoice.
            source:
              type: string
              description: How the invoice was created (dashboard, email, or api).
            original_file_name:
              type: string
              description: The original file name of the uploaded invoice.
            extracted_business_name:
              type: string
              description: Extracted supplier business name.
            extracted_business_abn:
              type: string
              description: Extracted supplier ABN.
            extracted_account_name:
              type: string
              description: Extracted bank account name.
            extracted_account_number:
              type: string
              description: Extracted bank account number.
            extracted_account_bsb:
              type: string
              description: Extracted bank account BSB.
            extracted_invoice_number:
              type: string
              description: Extracted invoice number.
            created_at:
              type: string
              description: ISO 8601 formatted date-time.
            updated_at:
              type: string
              description: ISO 8601 formatted date-time.
      required:
        - id
        - type
      title: InvoiceResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````