---
title: "Create a Purchase Order"
method: POST
path: "/v2/accounting/purchaseOrders"
tags: ["PurchaseOrderControllerV2", "Purchase Orders"]
---

# Create a Purchase Order

`POST /v2/accounting/purchaseOrders`

## Request

- Base URL: `https://api.railz.ai`
- URL: `https://api.railz.ai/v2/accounting/purchaseOrders`
- Auth: HTTP bearer

**Supported for:**

`quickbooks` `xero` `oracleNetsuite` `dynamicsBusinessCentral` `myob` `zohoBooks`

## Request body

- PushPurchaseOrderV2Dto
  - `connectionUuid` string, required: Unique connection identifier.
  - `data` PushPurchaseOrderV2, required
    - `passThrough` object
    - `currencyRate` number
    - `postedDate` string, date
    - `dueDate` string, date
    - `deliveryDate` string, date
    - `memo` string
    - `vendorRef` VendorRefDto, required
      - `id` string, required
    - `currency` string
    - `apAccountRef` ApAccountRefDto
      - `id` string, required
    - `expectedArrivalDate` string, date
    - `shippingAddress` ShippingAddressDto
      - `line1` string
      - `line2` string
      - `city` string
      - `region` string: Region within a country. For example, state name for USA, province name for Canada.
      - `country` string: Country name as 3 ISO alpha-3 characters.
      - `postalCode` string: Postal code. For example, zip code for USA and Canada.
    - `contact` ShippingContact
      - `name` string
      - `email` string
      - `phone` string
    - `lines` PurchaseOrderLineV2[], required
      - `description` string
      - `accountRef` AccountRefDto
        - `id` string, required
      - `taxRateRef` TaxRateRefDto
        - `id` string, required
      - `inventoryRef` InventoryRefDto
        - `id` string, required
      - `trackingCategoryRefs` PurchaseOrderTrackingCategoryRefDto[]
        - `id` string
        - `name` string
        - `type` 'class' | 'department' | 'location' | 'unknown'
      - `quantity` number, float
      - `unitAmount` number, float
      - `discountPercentage` number, float
      - `taxAmount` number, float
    - `purchaseOrderType` 'item' | 'service' | 'professional' | 'miscellaneous'

## Response `200`

- PushPurchaseOrderV2ResponseDto
  - `connectionUuid` string, required
  - `businessName` string, required
  - `serviceName` 'freshbooks' | 'quickbooks' | 'quickbooksDesktop' | 'xero' | 'oracleNetsuite' | 'sageBusinessCloud' | 'sageIntacct' | 'dynamicsBusinessCentral' | 'dynamics365Finance' | 'wave' | 'myob' | 'zohoBooks' | 'byod', required
  - `pushCommunicationId` string, required
  - `requestedOn` string, date-time, required
  - `status` 'success' | 'failed' | 'pending', required
  - `data` PushPurchaseOrderV2, required
    - `passThrough` object
    - `currencyRate` number
    - `postedDate` string, date
    - `dueDate` string, date
    - `deliveryDate` string, date
    - `memo` string
    - `vendorRef` VendorRefDto, required
      - `id` string, required
    - `currency` string
    - `apAccountRef` ApAccountRefDto
      - `id` string, required
    - `expectedArrivalDate` string, date
    - `shippingAddress` ShippingAddressDto
      - `line1` string
      - `line2` string
      - `city` string
      - `region` string: Region within a country. For example, state name for USA, province name for Canada.
      - `country` string: Country name as 3 ISO alpha-3 characters.
      - `postalCode` string: Postal code. For example, zip code for USA and Canada.
    - `contact` ShippingContact
      - `name` string
      - `email` string
      - `phone` string
    - `lines` PurchaseOrderLineV2[], required
      - `description` string
      - `accountRef` AccountRefDto
        - `id` string, required
      - `taxRateRef` TaxRateRefDto
        - `id` string, required
      - `inventoryRef` InventoryRefDto
        - `id` string, required
      - `trackingCategoryRefs` PurchaseOrderTrackingCategoryRefDto[]
        - `id` string
        - `name` string
        - `type` 'class' | 'department' | 'location' | 'unknown'
      - `quantity` number, float
      - `unitAmount` number, float
      - `discountPercentage` number, float
      - `taxAmount` number, float
    - `purchaseOrderType` 'item' | 'service' | 'professional' | 'miscellaneous'

## Other responses

- `400`: Bad Request Error - Thrown if fields sent via query does not follow specifications
- `401`: Unauthorized - Not logged in or log in expired
- `403`: Forbidden - Not enough permission
- `500`: Server Error

## Changes

- **2026-09-03** `1383b9a47ac9`: 1 info
  - api tag `PurchaseOrderControllerV2` added
- **2026-08-10** `5cdfae3fa1fa`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/railz/apis/fis-accounting-data-as-a-service-api/changes/v2/accounting/purchaseOrders/post.md)

---

[API](https://skmtc.dev/railz/apis/fis-accounting-data-as-a-service-api.md) - [All operations](https://skmtc.dev/railz/apis/fis-accounting-data-as-a-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/railz/apis/fis-accounting-data-as-a-service-api/revisions/1383b9a47ac9?raw)
