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

# Get v1purchase invoices 1



## OpenAPI

````yaml /api-reference/openapi.json get /v1/purchase-invoices/{id}
openapi: 3.0.1
info:
  title: Fatorly Integration
  version: v1
servers:
  - url: https://integration.fatorly.com
    description: Production
  - url: https://integration.sandbox.fatorly.com
    description: Sandbox
security:
  - ApiKey: []
tags:
  - name: CreditNotes
  - name: Customers
  - name: Invoices
  - name: Items
  - name: PurchaseCreditNotes
  - name: PurchaseInvoices
  - name: Vendors
  - name: Webhooks
  - name: WhoAmi
  - name: EchoTest
  - name: ThrowTest
paths:
  /v1/purchase-invoices/{id}:
    get:
      tags:
        - PurchaseInvoices
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/V1PurchaseDocumentDetail'
            application/json:
              schema:
                $ref: '#/components/schemas/V1PurchaseDocumentDetail'
            text/json:
              schema:
                $ref: '#/components/schemas/V1PurchaseDocumentDetail'
        '401':
          description: Unauthorized — Missing or invalid X-Api-Key.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemPayload'
        '403':
          description: Forbidden — The API key lacks the scope this operation requires.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemPayload'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemPayload'
        '429':
          description: >-
            Too Many Requests — Rate limit exceeded; retry after the Retry-After
            interval.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in the current window (0 when rejected).
              schema:
                type: integer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemPayload'
        '500':
          description: Internal Server Error — Unexpected server error; report the traceId.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemPayload'
        '502':
          description: Bad Gateway
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemPayload'
components:
  schemas:
    V1PurchaseDocumentDetail:
      required:
        - id
        - invoiceNumber
        - documentType
        - status
        - issueDate
        - dueDate
        - currency
        - seller
        - buyerName
        - totalNetAmount
        - totalVatAmount
        - totalPayableAmount
        - note
        - lines
        - links
      type: object
      properties:
        id:
          type: string
        invoiceNumber:
          type: string
        documentType:
          enum:
            - Invoice
            - CreditNote
            - SelfBillingInvoice
            - SelfBillingCreditNote
          type: string
          description: >-
            Document identity. Invoice and CreditNote are standard tax
            documents; the SelfBilling* variants are issued by the buyer on the
            supplier's behalf. On /v1/credit-notes endpoints, CreditNote is
            applied regardless of the value sent.
          example: Invoice
        status:
          enum:
            - Draft
            - Pending
            - Sent
            - DeliveryFailed
            - Received
          type: string
          description: >-
            Document status: Draft (created, not submitted), Pending (queued or
            being delivered over Peppol), Sent (delivered), DeliveryFailed
            (submission failed — see submissionError), Received (inbound
            purchase document).
          example: Draft
        issueDate:
          type: string
        dueDate:
          type: string
          nullable: true
        currency:
          type: string
        seller:
          $ref: '#/components/schemas/V1PurchaseParty'
        buyerName:
          type: string
        totalNetAmount:
          type: number
          format: double
        totalVatAmount:
          type: number
          format: double
        totalPayableAmount:
          type: number
          format: double
        note:
          type: string
          nullable: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/V1PurchaseLine'
        links:
          $ref: '#/components/schemas/V1Links'
    ProblemPayload:
      required:
        - type
        - title
        - status
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
          format: int32
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        traceId:
          type: string
          nullable: true
        errors:
          type: array
          nullable: true
    V1PurchaseParty:
      required:
        - name
        - trn
        - participantId
      type: object
      properties:
        name:
          type: string
        trn:
          type: string
          nullable: true
        participantId:
          type: string
          nullable: true
    V1PurchaseLine:
      required:
        - lineNumber
        - description
        - quantity
        - unitCode
        - unitPrice
        - netAmount
        - vatCategory
        - vatRate
        - vatAmount
        - grossAmount
        - sellersItemId
        - buyersItemId
        - standardItemId
      type: object
      properties:
        lineNumber:
          type: integer
          format: int32
        description:
          type: string
        quantity:
          type: number
          format: double
        unitCode:
          type: string
        unitPrice:
          type: number
          format: double
        netAmount:
          type: number
          format: double
        vatCategory:
          enum:
            - S
            - Z
            - E
            - O
            - AE
          type: string
          description: >-
            UAE VAT category code: S = Standard rate (5%), Z = Zero-rated, E =
            Exempt (requires exemptionReasonCode), O = Out of scope, AE =
            Reverse charge (requires goodsNatureCode on the line). Defaults to S
            when omitted.
          example: S
        vatRate:
          type: number
          format: double
        vatAmount:
          type: number
          format: double
        grossAmount:
          type: number
          format: double
        sellersItemId:
          type: string
          nullable: true
        buyersItemId:
          type: string
          nullable: true
        standardItemId:
          type: string
          nullable: true
    V1Links:
      required:
        - self
      type: object
      properties:
        self:
          type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      description: >-
        Your fat_… integration key. Create one in Settings → Integrations → API
        Keys.
      name: X-Api-Key
      in: header

````