Vic.ai Purchase Orders API

The purchase orders.

Operations 9

GET /v0/purchaseOrders List purchase orders #
POST /v0/purchaseOrders Create a purchase order #
POST /v0/purchaseOrders/synchronize Synchronize Purchase Orders #
GET /v0/purchaseOrders/{purchaseOrderId} Get a purchase order #
PUT /v0/purchaseOrders/{purchaseOrderId} Update a purchase order #
DELETE /v0/purchaseOrders/{purchaseOrderId} Delete a purchase order #
POST /v0/purchaseOrders/{purchaseOrderId}/process Process the purchase order #
POST /v0/purchaseOrders/{purchaseOrderId}/close Close a purchase order #
POST /v0/purchaseOrders/{purchaseOrderId}/open Opens a purchase order #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vicai-purchase-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vicai-purchase-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: v10.40.4
  contact: {}
  title: Vic.ai Accounts Purchase Orders API
  description: "## Introduction\n\nThe Vic.ai API provides a seamless connection between your Enterprise Resource\nPlanning (ERP) system and the Vic.ai product suite.\n\nThe API is designed to offer three main areas of functionality:\n\n- **Syncing master data:** This refers to the data in your ERP that Vic.ai\n  interacts with. You are required to supply and update this data in Vic.ai, and\n  you also have the option to verify the copy of the masterdata in Vic.ai.\n\n- **Syncing training data:** We need historical data to train your AI model. To\n  that end, the API provides endpoints to sync historical invoices into Vic.ai\n  and to confirm their presence.\n\n- **Subscribing to and receiving webhooks:** Webhooks enable users or automated\n  tasks to interact with your ERP through various actions in the Vic.ai product\n  suite, such as posting an invoice, payment or purchase order or requesting\n  synchronization. You will receive a notification via a webhook when these\n  actions occur.\n\n\nFor US-based integrations, please use the following base API URL:\n\n```\nhttps://api.us.vic.ai\n```\n\nFor integrations based in Norway, use the following base API URL:\n\n```\nhttps://api.no.vic.ai\n```\n\nAll paths mentioned in this documentation should use one of these URLs as the\nbase.\n\nExample:\n\n```bash\ncurl https://api.us.vic.ai/v0/healthCheck \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n```\n\n## Getting Started\n\nTo begin interacting with the Vic.ai API, you will need the following\ncredentials:\n\n* A Vic.ai client ID\n* A Vic.ai client secret.\n\nThese can be provided to you securely by a Vic.ai representative\n[upon request](https://www.vic.ai/book-a-demo).\n\n**Please note:** These credentials are essentially the keys to your ERP\nintegration. If they fall into the wrong hands, unauthorized parties could\nimpersonate you, gain access to sensitive data, and potentially perform\nmalicious actions. Therefore, it's crucial to keep these credentials safe at all\ntimes to protect your application's integrity and your clients' data.\n\n### Limitations\n\nThe Vic.ai API has the following limitations:\n\n**Rate Limiting:** The API is rate-limited to 500 requests per 10-second time\nframe. If you exceed this limit, you will receive a `429 Too Many Requests`\nresponse. The limit is per Oauth client ID. If you continue to receive `429`s,\nplease contact support with a request id from the response headers.\n"
servers:
- url: https://api.no.stage.vic.ai
  description: staging server, NO
- url: https://api.us.vic.ai
  description: production server, US
- url: https://api.no.vic.ai
  description: production server, NO
security:
- BearerAuth: []
tags:
- name: Purchase Orders
  description: The purchase orders.
paths:
  /v0/purchaseOrders:
    get:
      description: List purchase orders.
      summary: List purchase orders
      operationId: listPurchaseOrders
      tags:
      - Purchase Orders
      parameters:
      - $ref: '#/components/parameters/PagingLimit'
      - $ref: '#/components/parameters/PagingCursor'
      - $ref: '#/components/parameters/SinceFilter'
      - $ref: '#/components/parameters/UptoFilter'
      - $ref: '#/components/parameters/PurchaseOrderStatusFilter'
      responses:
        '200':
          $ref: '#/components/responses/PurchaseOrdersResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
    post:
      description: 'Creates a purchase order in the Vic.ai system.


        You are responsible for setting the `amount` on the purchase order which is the

        summation of all the purchase order line items.


        Optionally, to set a requestor, you can pass a `requestor` object with `email`

        or `name`.


        Optionally, to set a site owner, you can pass a `siteOwner` object with `email`

        or `name`.

        '
      summary: Create a purchase order
      operationId: createPurchaseOrder
      tags:
      - Purchase Orders
      requestBody:
        $ref: '#/components/requestBodies/CreatePurchaseOrderRequest'
      responses:
        '201':
          $ref: '#/components/responses/PurchaseOrderResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /v0/purchaseOrders/synchronize:
    post:
      description: 'Tells the ERP to synchronize the Purchase Orders resource. If the ERP is

        using the API, the call will be sent via the normal webhook methods. If

        the ERP is not using this API then this will call the native

        integration''s synchronize functionality.

        '
      summary: Synchronize Purchase Orders
      operationId: synchronizePurchaseOrders
      tags:
      - Purchase Orders
      responses:
        '204':
          $ref: '#/components/responses/SynchronizePurchaseOrdersResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /v0/purchaseOrders/{purchaseOrderId}:
    get:
      description: Get a purchase order.
      summary: Get a purchase order
      operationId: getPurchaseOrder
      tags:
      - Purchase Orders
      parameters:
      - name: purchaseOrderId
        in: path
        required: true
        description: 'The internal id or external id of the purchase order. If using the

          external id, you **must** pass `useSystem=external`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/UseSystemDefaultInternal'
      responses:
        '200':
          $ref: '#/components/responses/PurchaseOrderResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
    put:
      description: 'Update a purchase order.


        After the update is accepted, Vic automatically schedules purchase order

        processing. You do not need to call `processPurchaseOrder` manually unless you

        need to trigger processing immediately.


        If the purchase order has matches to invoices that have been transmitted or are

        currently being posted, and the fields `vendor`, `poNumber`, or `matchingType`

        are being changed, you will not be able to update the purchase order -

        an `UnprocessableEntityResponse` will be returned.

        '
      summary: Update a purchase order
      operationId: updatePurchaseOrder
      tags:
      - Purchase Orders
      parameters:
      - name: purchaseOrderId
        in: path
        required: true
        description: 'The internal id or external id of the purchase order. If using the

          external id, you **must** pass `useSystem=external`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/UseSystemDefaultInternal'
      requestBody:
        $ref: '#/components/requestBodies/UpdatePurchaseOrderRequest'
      responses:
        '200':
          $ref: '#/components/responses/PurchaseOrderResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
    delete:
      description: 'Delete a purchase order.


        If there are existing matches made to an invoice that has been transmitted, or

        that is currently being posted, you will not be able to delete the purchase

        order - an `UnprocessableEntityResponse` will be returned.

        '
      summary: Delete a purchase order
      operationId: deletePurchaseOrder
      tags:
      - Purchase Orders
      parameters:
      - name: purchaseOrderId
        in: path
        required: true
        description: 'The internal id or external id of the purchase order. If using the

          external id, you **must** pass `useSystem=external`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/UseSystemDefaultInternal'
      responses:
        '204':
          $ref: '#/components/responses/PurchaseOrderDeletedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /v0/purchaseOrders/{purchaseOrderId}/process:
    post:
      description: "NOTE: Manually calling this endpoint is generally not required. Purchase order\nprocessing is automatically scheduled after any of the following operations:\n\n  - createPurchaseOrder\n  - updatePurchaseOrder\n  - openPurchaseOrder\n  - createPurchaseOrderLineItem\n  - updatePurchaseOrderLineItem\n  - deletePurchaseOrderLineItem\n  - openPurchaseOrderLineItem\n\nProcessing uses a trailing-edge debounce mechanism: the 15-second timer resets\nafter each operation, and processing will be queued 15 seconds after the *last*\nchange.\n\nProcessing will be skipped if updatePurchaseOrder or updatePurchaseOrderLineItem\nare invoked but do not result in any actual changes.\n\nCalling the processPurchaseOrder endpoint will also schedule processing; however,\nthis is only necessary when no prior operation from the list above has been\ncalled recently (i.e., when no automatic scheduling would otherwise occur).\n\nWhen the purchase order modifications are completed use this operation to let\nVic know that it is ready to be processed.\nOnce a purchase order is being processed, it can not be modified until\ncompleted.\n"
      summary: Process the purchase order
      operationId: processPurchaseOrder
      tags:
      - Purchase Orders
      parameters:
      - name: purchaseOrderId
        in: path
        required: true
        description: 'The internal id or external id of the purchase order. If using the

          external id, you **must** pass `useSystem=external`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/UseSystemDefaultInternal'
      responses:
        '200':
          $ref: '#/components/responses/PurchaseOrderResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /v0/purchaseOrders/{purchaseOrderId}/close:
    post:
      description: Closes a purchase order.
      summary: Close a purchase order
      operationId: closePurchaseOrder
      tags:
      - Purchase Orders
      parameters:
      - name: purchaseOrderId
        in: path
        required: true
        description: 'The internal id or external id of the purchase order. If using the

          external id, you **must** pass `useSystem=external`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/UseSystemDefaultInternal'
      responses:
        '200':
          $ref: '#/components/responses/PurchaseOrderResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /v0/purchaseOrders/{purchaseOrderId}/open:
    post:
      description: Opens a purchase order.
      summary: Opens a purchase order
      operationId: openPurchaseOrder
      tags:
      - Purchase Orders
      parameters:
      - name: purchaseOrderId
        in: path
        required: true
        description: 'The internal id or external id of the purchase order. If using the

          external id, you **must** pass `useSystem=external`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/UseSystemDefaultInternal'
      responses:
        '200':
          $ref: '#/components/responses/PurchaseOrderResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
components:
  schemas:
    DimensionRef:
      type: object
      description: 'A reference to a dimension within Vic.

        The `internalId` takes precedence over all fields specified. If a

        dimension is not found matching the `internalId` an error will be

        returned.

        When `externalId` is provided, it takes precedence over `name` and can

        be used in combination with `typeExternalId`.

        If `name` is the only field specified and more than one dimension exists

        with that `name`, then an error will be returned. It can be used in

        combination with `typeExternalId`.

        If `typeExternalId` is specified with `externalId` or `name` and more

        than one dimension exists with those fields, then an error will be

        returned.

        '
      properties:
        internalId:
          oneOf:
          - type: string
            maxLength: 255
            description: 'Vic''s id of the dimension.

              Takes precedence over all other fields. Other fields are ignored if

              this is specified.

              '
          - type: 'null'
        externalId:
          description: 'The id of the dimension in the ERP.

            Takes precedence over `name`. Can be used in combination with

            `typeExternalId`.

            If more than one dimension is found meeting the criteria specified,

            an error will be returned.

            '
          oneOf:
          - $ref: '#/components/schemas/ExternalId'
          - type: 'null'
        name:
          oneOf:
          - type: string
            maxLength: 255
            description: 'The name of the dimension.

              Can be used in combination with `typeExternalId`.

              If more than one dimension is found meeting the criteria specified,

              an error will be returned.

              '
          - type: 'null'
        typeExternalId:
          description: 'The type id in the ERP.

            This is a supplemental field to be used with `externalId` or `name`.

            '
          oneOf:
          - $ref: '#/components/schemas/ExternalId'
          - type: 'null'
    VendorLookupByOrgNumber:
      type: object
      required:
      - orgNumber
      properties:
        orgNumber:
          type: string
          maxLength: 255
          description: The org number of the vendor to aid in the predictions.
        countryCode:
          oneOf:
          - $ref: '#/components/schemas/CountryCode'
          - type: 'null'
          description: The country code of the vendor.
    ExternalId:
      description: 'The external id set by the ERP system. It does not have to be a UUID and

        can be any non empty string desired.

        '
      type: string
      example: 21b31bc7-1267-4335-893c-d7fe4706a238
      maxLength: 255
    VendorLookupByExternalId:
      type: object
      required:
      - externalId
      properties:
        externalId:
          oneOf:
          - $ref: '#/components/schemas/ExternalId'
          - type: 'null'
    Vendor:
      type: object
      required:
      - internalId
      - internalUpdatedAt
      - name
      - email
      - phone
      - addressStreet
      - addressCity
      - addressState
      - addressPostalCode
      - countryCode
      properties:
        internalId:
          $ref: '#/components/schemas/InternalId'
        internalUpdatedAt:
          type: string
          description: The date time in UTC when the record was updated at.
          format: date-time
        companyId:
          type: string
          description: The ID of the company that owns this vendor.
          example: '12345'
        externalId:
          oneOf:
          - $ref: '#/components/schemas/ExternalId'
          - type: 'null'
        externalUpdatedAt:
          type: string
          format: date-time
          description: 'The date time when the invoice was updated in the ERP system. This

            does not have UTC normalization.

            '
        name:
          type: string
          maxLength: 255
        email:
          oneOf:
          - $ref: '#/components/schemas/Email'
          - type: 'null'
        description:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        phone:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        addressStreet:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        addressCity:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        addressState:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        addressPostalCode:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        countryCode:
          oneOf:
          - $ref: '#/components/schemas/CountryCode'
          - type: 'null'
        currency:
          $ref: '#/components/schemas/Currency'
        confirmedAt:
          oneOf:
          - type: string
            format: date-time
          - type: 'null'
        state:
          $ref: '#/components/schemas/VendorState'
        taxInfo:
          $ref: '#/components/schemas/VendorTaxInfo'
        defaultPaymentInfo:
          $ref: '#/components/schemas/PaymentInfo'
        paymentTermId:
          oneOf:
          - type: string
            format: uuid
          - type: 'null'
          description: The id of the `PaymentTerm` a vendor uses.
        poMatchingDocumentLevel:
          type: boolean
          description: Whether a vendor Purchase Order matching is document level
          default: false
        vendorGroupId:
          oneOf:
          - type: string
            format: uuid
          - type: 'null'
          description: The `VendorGroup` id the vendor is attached to.
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        externalData:
          oneOf:
          - $ref: '#/components/schemas/ExternalData'
          - type: 'null'
        errors:
          description: The errors that occurred in the external ERP system.
          items:
            $ref: '#/components/schemas/VendorRemoteError'
    MatchItem:
      type: object
      required:
      - invoiceItemId
      - purchaseOrderItemId
      - quantityMatched
      properties:
        invoiceItemId:
          type: string
          description: The invoice item's internal id.
        purchaseOrderItemId:
          type: string
          description: The purchase order item's internal id.
        purchaseOrderItemLineNumber:
          type: string
          description: The purchase order item's line number.
        productNumber:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
          description: The matched purchase order line product number (the human-readable item identifier, also shown as "Item ID" in the Vic.ai UI).
        unitOfMeasure:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
          description: The matched purchase order line unit of measure.
        amountMatched:
          type: string
        quantityMatched:
          type: string
    PurchaseOrderScheduleLineInput:
      type: object
      description: Input schema for creating a schedule line on a purchase order line item.
      required:
      - poScheduleLineRemoteId
      - poLineNumber
      - poScheduleLineNumber
      - itemId
      - uomCode
      - plannedQuantity
      - promisedDeliveryStartDate
      - promisedDeliveryEndDate
      - shipToLocation
      - createdOn
      properties:
        internalId:
          type: string
          format: uuid
          description: The internal ID of the schedule line (for updates).
        poScheduleLineRemoteId:
          type: string
          maxLength: 255
          description: The purchase order schedule line ID from the ERP system.
        poScheduleLineNumber:
          type: integer
          description: The purchase order schedule line number.
          minimum: 1
        poLineNumber:
          type: integer
          description: The purchase order line number this schedule line is associated with.
        itemId:
          type: string
          maxLength: 255
          description: The item ID from the ERP system.
        uomCode:
          type: string
          maxLength: 255
          description: The unit of measure code.
        plannedQuantity:
          type: string
          format: decimal
          description: The planned quantity for this schedule line.
          example: '1.0'
        promisedDeliveryStartDate:
          type: string
          format: date
          description: The promised delivery start date.
        promisedDeliveryEndDate:
          type: string
          format: date
          description: The promised delivery end date. Must be equal to or after the promised delivery start date.
        shipToLocation:
          type: string
          maxLength: 255
          description: The location where items should be shipped.
        createdOn:
          type: string
          format: date
          description: The date this schedule line was created.
    PaymentInfoTermUnit:
      type: string
      description: The payment term units supported.
      enum:
      - DAYS
    Error:
      description: 'generic error message in JSON format.  Note the ''code'' field should

        match the HTTP status code of the wrapping HTTP request.

        '
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: integer
          minimum: 100
          maximum: 599
        message:
          $ref: '#/components/schemas/ErrorString'
    VendorLookupByOrgNumberAndBankAccount:
      type: object
      required:
      - orgNumber
      - countryCode
      - bankAccount
      - bankAccountType
      properties:
        orgNumber:
          type: string
          maxLength: 255
          description: The org number of the vendor to aid in the predictions.
        countryCode:
          $ref: '#/components/schemas/CountryCode'
        bankAccount:
          type: string
          maxLength: 255
          description: The bank account number that is attached to the vendor.
        bankAccountType:
          $ref: '#/components/schemas/BankAccountType'
          description: The type of bank account the bank account number is.
    Tag:
      type: object
      required:
      - value
      properties:
        id:
          type: string
        value:
          type: string
          maxLength: 255
    VendorRemoteError:
      description: 'The remote error on a Vendor.

        This is to describe any errors that have happened in the ERP system. If

        the error that occurred does not pertain to a specific field, then the

        `field` can be left null, or missing all together.

        '
      type: object
      required:
      - message
      properties:
        message:
          type: string
          maxLength: 1024
        field:
          description: 'The field on the Vic.ai vendor that has the error.

            If the error does not pertain to a specific field, then this will be

            null.

            Example: `{"field": "name"}` or `{"field": "externalUpdatedAt"}`

            '
          type: string
          maxLength: 255
    PurchaseOrderMatchingType:
      type: string
      description: The matching type of the purchase order.
      enum:
      - document
      - line
    PurchaseOrderReceiptLineInput:
      type: object
      description: Input schema for creating a receipt line on a purchase order line item.
      required:
      - receiptLineRemoteId
      - receiptLineNumber
      - poLineNumber
      - itemId
      - uomCode
      - receivedQuantity
      - receivedDate
      - createdBy
      - warehouse
      - createdOn
      - status
      properties:
        internalId:
          type: string
          format: uuid
          description: The internal ID of the receipt line (for updates).
        receiptLineRemoteId:
          type: string
          maxLength: 255
          description: The receipt line ID from the ERP system.
        receiptLineNumber:
          type: integer
          description: The receipt line number.
          minimum: 1
        poLineNumber:
          type: integer
          description: The purchase order line number this receipt line is associated with.
        poScheduleLineRemoteId:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
          description: The purchase order schedule line ID (from the ERP) this receipt line is associated with.
        poScheduleLineNumber:
          oneOf:
          - type: integer
          - type: 'null'
          description: The purchase order schedule line number this receipt line is associated with.
        itemId:
          type: string
          maxLength: 255
          description: The item ID from the ERP system.
        uomCode:
          type: string
          maxLength: 255
          description: The unit of measure code.
        receivedQuantity:
          type: string
          format: decimal
          description: The quantity received.
          example: '1.0'
        acceptedQuantity:
          oneOf:
          - type: string
            format: decimal
          - type: 'null'
          description: The quantity accepted.
          example: '1.0'
        receivedDate:
          type: string
          format: date
          description: The date the items were received.
        createdBy:
          type: string
          maxLength: 255
          description: The user or system that created this receipt line.
        warehouse:
          type: string
          maxLength: 255
          description: The warehouse where the items were received.
        createdOn:
          type: string
          format: date
          description: The date this receipt line was created.
        billOfLading:
          description: The bill of lading reference for the goods receipt.
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        deliveryNote:
          description: The delivery note reference for the goods receipt.
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        status:
          type: string
          enum:
          - open
          - closed
          description: The status of the receipt line.
    VendorTaxInfo:
      type: object
      properties:
        taxId:
          oneOf:
          - type: string
          - type: 'null'
        taxIdType:
          oneOf:
          - type: string
            enum:
            - ssn
            - ein
            - other
          - type: 'null'
          description: The type of tax identifier (SSN, EIN, or other)
        is1099vendor:
          type: boolean
        orgNumber:
          oneOf:
          - type: string
          - type: 'null'
    UnitOfMeasure:
      type: string
      example: kg
      maxLength: 255
      description: The unit of measure used.
    PurchaseOrderReceiptMatch:
      type: object
      required:
      - invoiceItemId
      - purchaseOrderItemId
      - purchaseOrderReceiptLineId
      - quantityMatched
      properties:
        invoiceItemId:
          type: string
          description: The invoice item's internal id.
        purchaseOrderItemId:
          type: string
          description: The purchase order item's internal id.
        purchaseOrderReceiptLineId:
          type: string
          description: The purchase order receipt line's internal id.
        amountMatched:
          type: string
        quantityMatched:
          type: string
    Email:
      type: string
      format: email
      maxLength: 255
    PaymentInfo:
      type: object
      properties:
        bankAccountNum:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        bankCode:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        paymentTerm:
          oneOf:
          - $ref: '#/components/schemas/PaymentInfoTerm'
          - type: 'null'
        bankGiro:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        plusGiro:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        bban:
          oneOf:
          - type: string
            maxLength: 255
          - type: 'null'
        internationalBankAccount:
          oneOf:
          - $ref: '#/components/schemas/InternationalBankAccount'
          - type: 'null'
        defaultMethod:
          $ref: '#/components/schemas/PaymentInfoMethod'
    VendorLookup:
      type: object
      oneOf:
      - $ref: '#/components/schemas/VendorLookupByInternalId'
      - $ref: '#/components/schemas/VendorLookupByExternalId'
      - $ref: '#/components/schemas/VendorLookupByName'
      - $ref: '#/components/schemas/VendorLookupByOrgNumberAndBankAccount'
      - $ref: '#/components/schemas/VendorLookupByOrgNumber'
    BankAccountType:
      description: The type of bank account.
      enum:
      - ach
      - iban
      - bban
      - plusgiro
      - bankgiro
    PurchaseOrder:
      type: object
      required:
      - internalId
      - internalUpdatedAt
      - status
      - lineItems
      properties:
        internalId:
          type: string
          maxLength: 255
        externalId:
          oneOf:
          - $ref: '#/components/schemas/ExternalId'
          - type: 'null'
        vendor:
          $ref: '#/components/schemas/Vendor'
        internalUpdatedAt:
          type: string
          format: date-time
        issuedOn:
          type: string
          format: date
        createdOn:
          type: string
          format: date
        poNumber:
          type: string
          maxLength: 255
        deliverOn:
          type: string
          format: date
        amount:
          oneOf:
          - $ref: '#/components/schemas/MonetaryValue'
          - type: 'null'
        currencyId:
          oneOf:
          - $ref: '#/components/schemas/Currency'
          - type: 'null'
        status:
          $ref: '#/components/schemas/PurchaseOrderStatus'
        matchingType:
          $ref: '#/components/schemas/PurchaseOrderMatchingType'
        type:
          $ref: '#/components/schemas/PurchaseOrderType'
        description:
          type: string
          maxLength: 255
        requestor:
          oneOf:
          - $ref: '#/components/schemas/PurchaseOrderRequestor'
          - type: 'null'
        siteOwner:
          oneOf:
          - $ref: '#/components/schemas/PurchaseOrderSiteOwner'
          - type: 'null'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/PurchaseOrderLineItem'
        paymentTermId:
          oneOf:
          - type: string
            format: uuid
          - type: 'null'
          description: The id of the `PaymentTerm` a purchase order uses.
    CreatePurchaseOrder:
      required:
      - poNumber
      - amount
      - vendor
      - lineItems
      - issuedOn
      properties:
        externalId:
          oneOf:
          - $ref: '#/components/schemas/ExternalId'
          - type: 'null'
        issuedOn:
          oneOf:
          - type: string
            format: date
            description: When the purchase order was issued.
          - type: 'null'
        poNumber:
          type: string
          maxLength: 255
          example: '12003400'
          description: The purchase order number. This is used to match against invoices.
        deliverOn:
          oneOf:
          - type: string
            format: date
          - type: 'null'
        amount:
          $ref: '#/components/schemas/MonetaryValue'
        currencyId:
          oneOf:
          - $ref: '#/components/

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vicai/refs/heads/main/openapi/vicai-purchase-orders-api-openapi.yml