---
updatedAt: 2026-04-21T17:39:49.000Z
agentTools:
  projectIndex: https://developer.bill.com/v2/llms.txt
---

# Create a purchase order

Create a purchase order object.

### What is a purchase order?
A purchase order is a document sent to a vendor to confirm the purchase of goods or services. It includes details such as the items being purchased, quantities, prices, and terms of the purchase.

You can create a purchase order with `/v2/Crud/Create/PurchaseOrder.json`. In the purchase order, add line items to record details about individual goods or services. In addition, you can associate line items to accounts tracking objects, such as item or chart of accounts.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "AP | Vendor transactions",
    "version": "2.0",
    "description": "BILL is a cloud-based cash flow management system for an organization's Accounts Payable (AP) and Accounts Receivable (AR) automation.\n * **AP**: Automate workflows to pay vendors bills at scale for the goods and services they provide. Pay vendors with a wide range of payment methods. Generate vendor credits, bill credits, and payment disbursement reports.\n * **AR**: Automate workflows to get paid by customers at scale for the goods and services you provide. Generate and send invoices on a schedule, generate customer and invoice credits, and seamlessly charge authorized customers.\n * **Organization**: Manage your bank accounts (for sending and receiving payments), users (with user roles), and sync with your choice of accounting software.\n\nIntegrate with the BILL API to send and receive payments for your business. See [Support Center](https://help.bill.com/hc/en-us) for resources about using the BILL web app.",
    "contact": {
      "email": "developerprogram@hq.bill.com"
    }
  },
  "servers": [
    {
      "url": "https://api-stage.bill.com/api/v2",
      "description": "Sandbox base URL"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl",
      "java",
      "javascript",
      "python",
      "ruby"
    ]
  },
  "paths": {
    "/Crud/Create/PurchaseOrder.json": {
      "post": {
        "summary": "Create a purchase order",
        "operationId": "ap-vendortransactions-createpurchaseorder",
        "description": "Create a purchase order object.\n\n### What is a purchase order?\nA purchase order is a document sent to a vendor to confirm the purchase of goods or services. It includes details such as the items being purchased, quantities, prices, and terms of the purchase.\n\nYou can create a purchase order with `/v2/Crud/Create/PurchaseOrder.json`. In the purchase order, add line items to record details about individual goods or services. In addition, you can associate line items to accounts tracking objects, such as item or chart of accounts.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePurchaseOrderResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "devKey",
                  "sessionId",
                  "data"
                ],
                "properties": {
                  "devKey": {
                    "type": "string",
                    "description": "Developer key generated with your BILL developer account"
                  },
                  "sessionId": {
                    "type": "string",
                    "description": "API session ID generated with [`/v2/Login.json`](ref:auth-login)"
                  },
                  "data": {
                    "$ref": "#/components/schemas/CreatePurchaseOrderRequest"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Purchase orders"
        ]
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Error code (only when `response_status` is `1`)"
          },
          "error_message": {
            "type": "string",
            "description": "Error message (only when `response_status` is `1`)"
          }
        }
      },
      "CreatePurchaseOrderRequest": {
        "type": "object",
        "required": [
          "obj"
        ],
        "properties": {
          "obj": {
            "type": "object",
            "required": [
              "entity",
              "vendorId",
              "poNumber",
              "poDate"
            ],
            "properties": {
              "entity": {
                "type": "string",
                "description": "Object type. Set as `PurchaseOrder`.",
                "default": "PurchaseOrder"
              },
              "isActive": {
                "type": "string",
                "description": "Object visibility status. Inactive objects are hidden by default in the BILL web app.\n* `1`: Active\n* `2`: Inactive"
              },
              "vendorId": {
                "type": "string",
                "description": "BILL-generated ID of the vendor. The value begins with `009`."
              },
              "fullfillmentStatus": {
                "type": "string",
                "description": "Purchase order fulfillment status.\n* `0`: Unfilled\n* `1`: Partially filled\n* `2`: Filled\n* `3`: Closed"
              },
              "serviceStartDate": {
                "type": "string",
                "description": "Date when the service starts. This value is in the YYYY-MM-DD format."
              },
              "serviceEndDate": {
                "type": "string",
                "description": "Date when the service ends. This value is in the YYYY-MM-DD format."
              },
              "exchangeRate": {
                "type": "number",
                "description": "Exchange rate applied to the purchase order"
              },
              "poNumber": {
                "type": "string",
                "description": "User-generated purchase order number. This value can be your chosen number scheme or purchase order date."
              },
              "description": {
                "type": "string",
                "description": "Purchase order description"
              },
              "requestor": {
                "type": "string",
                "description": "BILL-generated ID of the user who created the purchase order request"
              },
              "poDate": {
                "type": "string",
                "description": "Date when the purchase order is created. This value is in the YYYY-MM-DD format."
              },
              "sentDate": {
                "type": "string",
                "description": "Date when the purchase order is sent to the vendor. This value is in the YYYY-MM-DD format."
              },
              "requiredDate": {
                "type": "string",
                "description": "Date when the purchase order contents are required from the vendor. This value is in the YYYY-MM-DD format."
              },
              "salesTaxPercent": {
                "type": "number",
                "description": "Sales tax percentage applied to all the taxable line items in the purchase order. This is a read-only field."
              },
              "salesTaxTotal": {
                "type": "number",
                "description": "Sales tax amount applied to all the taxable line items in the purchase order (`salesTaxPercent` x sum of all taxable line item amounts). This is a read-only field."
              },
              "paymentTermId": {
                "type": "string",
                "description": "BILL-generated ID of the payment terms associated with the purchase order. This is an accounts tracking object."
              },
              "chartOfAccountId": {
                "type": "string",
                "description": "BILL-generated ID of the chart of accounts associated with the purchase order. This is an accounts tracking object."
              },
              "departmentId": {
                "type": "string",
                "description": "BILL-generated ID of the department associated with the purchase order. This is an accounts tracking object."
              },
              "locationId": {
                "type": "string",
                "description": "BILL-generated ID of the location associated with the purchase order. This is an accounts tracking object."
              },
              "invoiceProductId": {
                "type": "string",
                "description": "BILL-generated ID of the item in the purchase order. This is an accounts tracking object."
              },
              "billingEmail": {
                "type": "string",
                "description": "Purchase order billing email address"
              },
              "vendorEmail": {
                "type": "string",
                "description": "Purchase order vendor email address"
              },
              "shippingAddressId": {
                "type": "string",
                "description": "Purchase order shipping address ID"
              },
              "billingAddressId": {
                "type": "string",
                "description": "Purchase order billing address ID"
              },
              "purchaseRequestId": {
                "type": "string",
                "description": "BILL-generated ID of the purchase request associated with the purchase order"
              },
              "billingStatus": {
                "type": "string",
                "description": "Purchase order billing status.\n* `0`: Unbilled\n* `1`: Partially billed\n* `3`: Billed"
              },
              "closureStatus": {
                "type": "string",
                "description": "Purchase order closure status.\n* `0`: Unknown\n* `1`: Open\n* `2`: Closed"
              },
              "orderType": {
                "type": "string",
                "description": "Purchase order type.\n* `0`: Item\n* `1`: Expense\n* `2`: Both"
              },
              "remainingAmount": {
                "type": "number",
                "description": "Remaining amount to be billed for the purchase order"
              },
              "memo": {
                "type": "string",
                "description": "Purchase order memo"
              },
              "priceToleranceWarning": {
                "type": "boolean",
                "description": "Set as `true` if the proposed purchase order price is within the tolerance limit set with `appliedPriceToleranceAmount`"
              },
              "appliedPriceToleranceAmount": {
                "type": "number",
                "description": "Purchase order price tolerance amount"
              },
              "purchaseOrderLineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "entity",
                    "amount"
                  ],
                  "properties": {
                    "entity": {
                      "type": "string",
                      "description": "Object type. Set as `PurchaseOrderLineItem`.",
                      "default": "PurchaseOrderLineItem"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Purchase order line item amount"
                    },
                    "lineType": {
                      "type": "string",
                      "description": "Purchase order line item type.\n* `1`: Expense\n* `2`: Item"
                    },
                    "quantity": {
                      "type": "number",
                      "description": "Purchase order line item quantity"
                    },
                    "qtyBilled": {
                      "type": "number",
                      "description": "Purchase order line item quantity billed"
                    },
                    "qtyReceived": {
                      "type": "number",
                      "description": "Purchase order line item quantity received"
                    },
                    "matchType": {
                      "type": "string",
                      "description": "Purchase order line item match type.\n* `3-way`: Three-way match. The purchase order is matched with both the bill and receipts (received quantity).\n* `2-way`: Two-way match. The purchase order is matched with the bill.\n* `None`: Matching is not enforced"
                    },
                    "unitPrice": {
                      "type": "number",
                      "description": "Purchase order line item unit price"
                    },
                    "description": {
                      "type": "string",
                      "description": "Purchase order line item description"
                    },
                    "actgClassId": {
                      "type": "string",
                      "description": "BILL-generated ID of the accounting class associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "chartOfAccountId": {
                      "type": "string",
                      "description": "BILL-generated ID of the chart of accounts associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "departmentId": {
                      "type": "string",
                      "description": "BILL-generated ID of the department associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "employeeId": {
                      "type": "string",
                      "description": "BILL-generated ID of the employee associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "itemId": {
                      "type": "string",
                      "description": "BILL-generated ID of the item associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "jobId": {
                      "type": "string",
                      "description": "BILL-generated ID of the job associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "locationId": {
                      "type": "string",
                      "description": "BILL-generated ID of the location associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "customerId": {
                      "type": "string",
                      "description": "BILL-generated ID of the customer associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "jobBillable": {
                      "type": "boolean",
                      "description": "Set as `true` if the purchase order line item is billable to a job"
                    },
                    "unitOfMeasureId": {
                      "type": "string",
                      "description": "BILL-generated ID of the unit of measure associated with the purchase order line item"
                    },
                    "billedAmount": {
                      "type": "number",
                      "description": "Purchase order line item billed amount"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CreatePurchaseOrderResponse": {
        "type": "object",
        "properties": {
          "response_status": {
            "type": "integer",
            "description": "Response status.\n* `0`: Success response\n* `1`: Error response. Only `error_code` and `error_message` is returned in `response_data`."
          },
          "response_message": {
            "type": "string",
            "description": "Response status.\n* `Success`: Success response\n* `Error`: Error response. Only `error_code` and `error_message` is returned in `response_data`."
          },
          "response_data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/ErrorResponse"
              }
            ],
            "properties": {
              "entity": {
                "type": "string",
                "description": "Object type. Set as `PurchaseOrder`."
              },
              "id": {
                "type": "string",
                "description": "BILL-generated ID of the purchase order. The value begins with `pur`."
              },
              "isActive": {
                "type": "string",
                "description": "Object visibility status. Inactive objects are hidden by default in the BILL web app.\n* `1`: Active\n* `2`: Inactive"
              },
              "vendorId": {
                "type": "string",
                "description": "BILL-generated ID of the vendor. The value begins with `009`."
              },
              "createdTime": {
                "type": "string",
                "description": "Created date and time"
              },
              "updatedTime": {
                "type": "string",
                "description": "Updated date and time"
              },
              "createdBy": {
                "type": "string",
                "description": "BILL-generated ID of the user that created the purchase order. This value begins with `006`."
              },
              "approvalStatus": {
                "type": "string",
                "description": "Purchase order approval status.\n* `0`: Unassigned\n* `1`: Assigned\n* `3`: Approved\n* `4`: Approving\n* `5`: Denied            "
              },
              "fullfillmentStatus": {
                "type": "string",
                "description": "Purchase order fulfillment status.\n* `0`: Unfilled\n* `1`: Partially filled\n* `2`: Filled\n* `3`: Closed"
              },
              "serviceStartDate": {
                "type": "string",
                "description": "Date when the service starts. This value is in the YYYY-MM-DD format."
              },
              "serviceEndDate": {
                "type": "string",
                "description": "Date when the service ends. This value is in the YYYY-MM-DD format."
              },
              "exchangeRate": {
                "type": "number",
                "description": "Exchange rate applied to the purchase order"
              },
              "poNumber": {
                "type": "string",
                "description": "User-generated purchase order number. This value can be your chosen number scheme or purchase order date."
              },
              "description": {
                "type": "string",
                "description": "Purchase order description"
              },
              "requestor": {
                "type": "string",
                "description": "BILL-generated ID of the user who created the purchase order request"
              },
              "poDate": {
                "type": "string",
                "description": "Date when the purchase order is created. This value is in the YYYY-MM-DD format."
              },
              "sentDate": {
                "type": "string",
                "description": "Date when the purchase order is sent to the vendor. This value is in the YYYY-MM-DD format."
              },
              "requiredDate": {
                "type": "string",
                "description": "Date when the purchase order contents are required from the vendor. This value is in the YYYY-MM-DD format."
              },
              "salesTaxPercent": {
                "type": "number",
                "description": "Sales tax percentage applied to all the taxable line items in the purchase order. This is a read-only field."
              },
              "salesTaxTotal": {
                "type": "number",
                "description": "Sales tax amount applied to all the taxable line items in the purchase order (`salesTaxPercent` x sum of all taxable line item amounts). This is a read-only field."
              },
              "paymentTermId": {
                "type": "string",
                "description": "BILL-generated ID of the payment terms associated with the purchase order. This is an accounts tracking object."
              },
              "chartOfAccountId": {
                "type": "string",
                "description": "BILL-generated ID of the chart of accounts associated with the purchase order. This is an accounts tracking object."
              },
              "departmentId": {
                "type": "string",
                "description": "BILL-generated ID of the department associated with the purchase order. This is an accounts tracking object."
              },
              "locationId": {
                "type": "string",
                "description": "BILL-generated ID of the location associated with the purchase order. This is an accounts tracking object."
              },
              "invoiceProductId": {
                "type": "string",
                "description": "BILL-generated ID of the item in the purchase order. This is an accounts tracking object."
              },
              "billingEmail": {
                "type": "string",
                "description": "Purchase order billing email address"
              },
              "vendorEmail": {
                "type": "string",
                "description": "Purchase order vendor email address"
              },
              "shippingAddressId": {
                "type": "string",
                "description": "Purchase order shipping address ID"
              },
              "billingAddressId": {
                "type": "string",
                "description": "Purchase order billing address ID"
              },
              "purchaseRequestId": {
                "type": "string",
                "description": "BILL-generated ID of the purchase request associated with the purchase order"
              },
              "billingStatus": {
                "type": "string",
                "description": "Purchase order billing status.\n* `0`: Unbilled\n* `1`: Partially billed\n* `3`: Billed"
              },
              "closureStatus": {
                "type": "string",
                "description": "Purchase order closure status.\n* `0`: Unknown\n* `1`: Open\n* `2`: Closed"
              },
              "orderType": {
                "type": "string",
                "description": "Purchase order type.\n* `0`: Item\n* `1`: Expense\n* `2`: Both"
              },
              "remainingAmount": {
                "type": "number",
                "description": "Remaining amount to be billed for the purchase order"
              },
              "memo": {
                "type": "string",
                "description": "Purchase order memo"
              },
              "priceToleranceWarning": {
                "type": "boolean",
                "description": "Set as `true` if the proposed purchase order price is within the tolerance limit set with `appliedPriceToleranceAmount`"
              },
              "appliedPriceToleranceAmount": {
                "type": "number",
                "description": "Purchase order price tolerance amount"
              },
              "hasLinkedBills": {
                "type": "boolean",
                "description": "Set as `true` if the purchase order has linked bills"
              },
              "linkedBillsCount": {
                "type": "number",
                "description": "Count of bills linked to the purchase order"
              },
              "hasNotes": {
                "type": "boolean",
                "description": "Set as `true` if the purchase order has notes"
              },
              "createdDate": {
                "type": "string",
                "format": "date-time",
                "description": "Purchase order creation date"
              },
              "createdByUser": {
                "type": "string",
                "description": "Name of the user that created the purchase order"
              },
              "updatedByUser": {
                "type": "string",
                "description": "Name of the user that last updated the purchase order"
              },
              "multipleBillLineItems": {
                "type": "boolean",
                "description": "Set as `true` if the purchase order has multiple bill line items"
              },
              "purchaseOrderLineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "entity": {
                      "type": "string",
                      "description": "Object type. Set as `PurchaseOrderLineItem`.",
                      "default": "PurchaseOrderLineItem"
                    },
                    "id": {
                      "type": "string",
                      "description": "BILL-generated ID of the purchase order line item. The value begins with `pol`."
                    },
                    "createdTime": {
                      "type": "string",
                      "description": "Created date and time"
                    },
                    "updatedTime": {
                      "type": "string",
                      "description": "Updated date and time"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Purchase order line item amount"
                    },
                    "lineType": {
                      "type": "string",
                      "description": "Purchase order line item type.\n* `1`: Expense\n* `2`: Item"
                    },
                    "quantity": {
                      "type": "number",
                      "description": "Purchase order line item quantity"
                    },
                    "qtyBilled": {
                      "type": "number",
                      "description": "Purchase order line item quantity billed"
                    },
                    "qtyReceived": {
                      "type": "number",
                      "description": "Purchase order line item quantity received"
                    },
                    "matchType": {
                      "type": "string",
                      "description": "Purchase order line item match type.\n* `3-way`: Three-way match. The purchase order is matched with both the bill and receipts (received quantity).\n* `2-way`: Two-way match. The purchase order is matched with the bill.\n* `None`: Matching is not enforced"
                    },
                    "unitPrice": {
                      "type": "number",
                      "description": "Purchase order line item unit price"
                    },
                    "description": {
                      "type": "string",
                      "description": "Purchase order line item description"
                    },
                    "actgClassId": {
                      "type": "string",
                      "description": "BILL-generated ID of the accounting class associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "chartOfAccountId": {
                      "type": "string",
                      "description": "BILL-generated ID of the chart of accounts associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "departmentId": {
                      "type": "string",
                      "description": "BILL-generated ID of the department associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "employeeId": {
                      "type": "string",
                      "description": "BILL-generated ID of the employee associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "itemId": {
                      "type": "string",
                      "description": "BILL-generated ID of the item associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "jobId": {
                      "type": "string",
                      "description": "BILL-generated ID of the job associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "locationId": {
                      "type": "string",
                      "description": "BILL-generated ID of the location associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "customerId": {
                      "type": "string",
                      "description": "BILL-generated ID of the customer associated with the purchase order line item. This is an accounts tracking object."
                    },
                    "jobBillable": {
                      "type": "boolean",
                      "description": "Set as `true` if the purchase order line item is billable to a job"
                    },
                    "unitOfMeasureId": {
                      "type": "string",
                      "description": "BILL-generated ID of the unit of measure associated with the purchase order line item"
                    },
                    "billedAmount": {
                      "type": "number",
                      "description": "Purchase order line item billed amount"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```