AssetLab Purchase Orders API

Purchase orders for procurement

Operations 14

GET /purchase-orders List purchase orders #
POST /purchase-orders Create purchase order #
GET /purchase-orders/{id} Get purchase order by ID #
PATCH /purchase-orders/{id} Update purchase order #
DELETE /purchase-orders/{id} Delete purchase order #
GET /purchase-order-lines List purchase order lines #
POST /purchase-order-lines Create purchase order line #
GET /purchase-order-lines/{id} Get purchase order line by ID #
PATCH /purchase-order-lines/{id} Update purchase order line #
DELETE /purchase-order-lines/{id} Delete purchase order line #

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/assetlab-ca:assetlab-ca-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

assetlab-ca-purchase-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Assetlab Ca Purchase Orders API
  version: '1.0'
  contact:
    name: AssetLab Support
    url: https://assetlab.ca
    email: support@assetlab.ca
  license:
    name: Proprietary
  description: 'Operations tagged Purchase Orders across 2 of this provider''s published API definitions: assetlab-ca-openapi.yaml, assetlab-ca-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
  description: Production
security:
- BearerAuth: []
tags:
- name: Purchase Orders
  description: Purchase orders for procurement
paths:
  /purchase-orders:
    get:
      operationId: listPurchaseOrders
      summary: List purchase orders
      tags:
      - Purchase Orders
      description: Returns a paginated list of purchase orders. Requires `purchase_orders:read` scope.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - $ref: '#/components/parameters/search'
      - name: status
        in: query
        schema:
          type: string
          enum:
          - draft
          - issued
          - partially_received
          - received
          - closed
          - cancelled
        description: Filter by status
      - name: vendor_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by vendor
      - name: project_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by project
      responses:
        '200':
          description: Paginated purchase order list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PurchaseOrder'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createPurchaseOrder
      summary: Create purchase order
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrder'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
      description: Production
  /purchase-orders/{id}:
    get:
      operationId: getPurchaseOrder
      summary: Get purchase order by ID
      tags:
      - Purchase Orders
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Purchase order detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrder'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updatePurchaseOrder
      summary: Update purchase order
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope. Immutable fields are silently stripped.
      parameters:
      - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderUpdate'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrder'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
    delete:
      operationId: deletePurchaseOrder
      summary: Delete purchase order
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope.
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/Deleted'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
      description: Production
  /purchase-order-lines:
    get:
      operationId: listPurchaseOrderLines
      summary: List purchase order lines
      tags:
      - Purchase Orders
      description: Returns a paginated list of purchase order line items, ordered by purchase order and line number. A purchase order with lines takes its amount from them. Requires `purchase_orders:read` scope.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - name: purchase_order_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by purchase_order_id
      - name: part_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by part_id
      responses:
        '200':
          description: Paginated purchase order line list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PurchaseOrderLine'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createPurchaseOrderLine
      summary: Create purchase order line
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope. The purchase order's amount becomes the sum of its lines.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderLineCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrderLine'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
      description: Production
  /purchase-order-lines/{id}:
    get:
      operationId: getPurchaseOrderLine
      summary: Get purchase order line by ID
      tags:
      - Purchase Orders
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Purchase order line detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrderLine'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updatePurchaseOrderLine
      summary: Update purchase order line
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope. Immutable fields, including purchase_order_id, are silently stripped.
      parameters:
      - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderLineUpdate'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrderLine'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
    delete:
      operationId: deletePurchaseOrderLine
      summary: Delete purchase order line
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope. A line with stock received is refused with 400 until its quantity_received is 0.
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/Deleted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
      description: Production
  /purchase-order-links:
    get:
      operationId: listPurchaseOrderLinks
      summary: List purchase order links
      tags:
      - Purchase Orders
      description: Returns a paginated list of reference links from purchase orders to work orders, PM schedules and projects. Links never add to committed cost. Requires `purchase_orders:read` scope.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - name: purchase_order_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by purchase_order_id
      - name: work_order_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by work_order_id
      - name: pm_schedule_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by pm_schedule_id
      - name: project_id
        in: query
        schema:
          type: string
          format: uuid
        description: Filter by project_id
      responses:
        '200':
          description: Paginated purchase order link list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PurchaseOrderLink'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createPurchaseOrderLink
      summary: Create purchase order link
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope. Provide exactly one of work_order_id, pm_schedule_id or project_id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderLinkCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrderLink'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
      description: Production
  /purchase-order-links/{id}:
    get:
      operationId: getPurchaseOrderLink
      summary: Get purchase order link by ID
      tags:
      - Purchase Orders
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Purchase order link detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PurchaseOrderLink'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deletePurchaseOrderLink
      summary: Delete purchase order link
      tags:
      - Purchase Orders
      description: Requires `purchase_orders:write` scope.
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/Deleted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
      description: Production
components:
  schemas:
    PurchaseOrderUpdate:
      type: object
      properties:
        po_number:
          type: string
        description:
          type: string
          nullable: true
        amount:
          type: number
          description: Money in the organization's currency - GET /v1/organization-settings for currency_code. A purchase order with line items takes its amount from them; a different value is rejected with 400 - edit the lines instead
        status:
          type: string
          enum:
          - draft
          - issued
          - partially_received
          - received
          - closed
          - cancelled
        issued_date:
          type: string
          format: date
          nullable: true
        expected_date:
          type: string
          format: date
          nullable: true
        notes:
          type: string
          nullable: true
        project_id:
          type: string
          format: uuid
          nullable: true
        work_order_id:
          type: string
          format: uuid
          nullable: true
        vendor_id:
          type: string
          format: uuid
          nullable: true
        category_id:
          type: string
          format: uuid
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Asset not found
    PurchaseOrderLineUpdate:
      type: object
      properties:
        description:
          type: string
        quantity:
          type: number
          description: Greater than 0. Whole units when part_id is set
        unit_cost:
          type: number
          description: Price per unit. Money in the organization's currency - GET /v1/organization-settings for currency_code
        quantity_received:
          type: number
          description: Between 0 and quantity. For a line with a part, the change is added to or taken from that part's stock
        part_id:
          type: string
          format: uuid
          nullable: true
          description: Cannot change once stock has been received on the line
        line_number:
          type: integer
          minimum: 1
    PurchaseOrderLinkCreate:
      type: object
      required:
      - purchase_order_id
      description: Exactly one of work_order_id, pm_schedule_id or project_id.
      properties:
        purchase_order_id:
          type: string
          format: uuid
        work_order_id:
          type: string
          format: uuid
        pm_schedule_id:
          type: string
          format: uuid
        project_id:
          type: string
          format: uuid
    PurchaseOrderLink:
      type: object
      description: A reference link from a purchase order to one other record. Never adds to committed cost.
      properties:
        id:
          type: string
          format: uuid
        purchase_order_id:
          type: string
          format: uuid
        work_order_id:
          type: string
          format: uuid
          nullable: true
        pm_schedule_id:
          type: string
          format: uuid
          nullable: true
        project_id:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
    PurchaseOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        po_number:
          type: string
        description:
          type: string
          nullable: true
        amount:
          type: number
          description: Money in the organization's currency - GET /v1/organization-settings for currency_code
        status:
          type: string
          enum:
          - draft
          - issued
          - partially_received
          - received
          - closed
          - cancelled
        issued_date:
          type: string
          format: date
          nullable: true
        expected_date:
          type: string
          format: date
          nullable: true
        notes:
          type: string
          nullable: true
          description: Only in detail response
        project_id:
          type: string
          format: uuid
          nullable: true
        work_order_id:
          type: string
          format: uuid
          nullable: true
          description: Only in detail response
        vendor_id:
          type: string
          format: uuid
          nullable: true
        category_id:
          type: string
          format: uuid
          nullable: true
        created_by:
          type: string
          nullable: true
          description: Clerk user ID. Only in detail response
        vendors:
          $ref: '#/components/schemas/VendorRef'
        projects:
          $ref: '#/components/schemas/ProjectRef'
        cost_categories:
          $ref: '#/components/schemas/CostCategoryRef'
          description: Only in detail response
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    VendorRef:
      type: object
      nullable: true
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    PurchaseOrderCreate:
      type: object
      required:
      - po_number
      - amount
      - status
      properties:
        po_number:
          type: string
        description:
          type: string
          nullable: true
        amount:
          type: number
          description: Money in the organization's currency - GET /v1/organization-settings for currency_code
        status:
          type: string
          enum:
          - draft
          - issued
          - partially_received
          - received
          - closed
          - cancelled
        issued_date:
          type: string
          format: date
          nullable: true
        expected_date:
          type: string
          format: date
          nullable: true
        notes:
          type: string
          nullable: true
        project_id:
          type: string
          format: uuid
          nullable: true
        work_order_id:
          type: string
          format: uuid
          nullable: true
        vendor_id:
          type: string
          format: uuid
          nullable: true
        category_id:
          type: string
          format: uuid
          nullable: true
    Pagination:
      type: object
      properties:
        page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 25
        total:
          type: integer
          example: 142
        total_pages:
          type: integer
          example: 6
    ProjectRef:
      type: object
      nullable: true
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    CostCategoryRef:
      type: object
      nullable: true
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    PurchaseOrderLine:
      type: object
      properties:
        id:
          type: string
          format: uuid
        purchase_order_id:
          type: string
          format: uuid
        line_number:
          type: integer
        part_id:
          type: string
          format: uuid
          nullable: true
        description:
          type: string
        quantity:
          type: number
        unit_cost:
          type: number
          description: Price per unit. Money in the organization's currency - GET /v1/organization-settings for currency_code
        quantity_received:
          type: number
          description: Between 0 and quantity. For a line with a part, raising it adds the difference to that part's stock
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PurchaseOrderLineCreate:
      type: object
      required:
      - purchase_order_id
      - description
      - quantity
      properties:
        purchase_order_id:
          type: string
          format: uuid
        description:
          type: string
        quantity:
          type: number
          description: Greater than 0. Whole units when part_id is set
        unit_cost:
          type: number
          description: Price per unit. Money in the organization's currency - GET /v1/organization-settings for currency_code
        quantity_received:
          type: number
          description: Between 0 and quantity
        part_id:
          type: string
          format: uuid
          nullable: true
        line_number:
          type: integer
          minimum: 1
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PayloadTooLarge:
      description: Request body exceeds size limit
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Deleted:
      description: Resource deleted
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
              message:
                type: string
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid request (validation error or malformed input)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Insufficient permissions - missing scope, or a resource the organization's plan does not include
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Resource UUID
    page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
        minimum: 1
      description: Page number
    search:
      name: search
      in: query
      schema:
        type: string
        maxLength: 200
      description: Case-insensitive name search
    per_page:
      name: per_page
      in: query
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 1000
      description: Items per page
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key from AssetLab Settings > API Keys
x-refined-from:
- assetlab-ca-openapi.yaml
- assetlab-ca-openapi.yaml
x-tagGroups:
- name: Core
  tags:
  - Assets
  - Work Orders
  - Work Requests
  - PM Schedules
  - PM Templates
- name: Facilities
  tags:
  - Sites
  - Buildings
  - Locations
- name: Feature Classification
  tags:
  - Systems
  - System Groups
  - System Classes
  - Asset Types
  - Asset Type Groups
  - Manufacturers
- name: Projects
  tags:
  - Projects
  - Project Sites
  - Project Buildings
  - Project Locations
  - Project System Classes
  - Project System Groups
  - Project Systems
  - Project Assets
  - Project Tasks
  - Project Milestones
  - Project Phases
  - Project Budget Items
  - Project Time Entries
  - Project Comments
  - Project Risks
  - Project Document Folder Templates
- name: Financial
  tags:
  - Budgets
  - Invoices
  - Purchase Orders
  - Expenses
  - Change Orders
  - Cost Categories
  - Asset Costs
  - Asset Replacement Plans
- name: Vendors & Contracts
  tags:
  - Vendors
  - Contracts
  - Vendor Site Assignments
  - Contract Sites
- name: Compliance
  tags:
  - Compliance
  - Compliance Records
- name: Parts & Inventory
  tags:
  - Parts
  - Part Categories
- name: Comments & Documents
  tags:
  - Asset Comments
  - Work Order Comments
  - Asset Documents
  - Project Documents
  - Contract Documents
  - Attachments
  - Upload URLs
- name: Level of Service
  tags:
  - Service Areas
  - Service Area System Classes
  - Service Area Sites
  - LoS Measures
  - LoS Measurements
  - LoS Proposed Targets
  - LoS Targets History
  - System LoS Targets
  - Infrastructure LoS Targets
  - Criticality Modifiers
  - LoS Consequences
  - LoS Status Snapshots
- name: Infrastructure
  tags:
  - Infrastructure Feature Classes
  - Infrastructure Networks
  - Infrastructure Assets
  - Infrastructure Asset Inspections
- name: Dashboard & Analytics
  tags:
  - Dashboard
  - Dashboard Snapshots
  - Site FCI History
  - Asset Risk History
  - Asset Condition Assessments
- name: Configuration
  tags:
  - Asset Statuses
  - Work Categories
  - Building Types
  - Location Types
  - Custom Field Definitions
  - Custom Field Values