---
title: "PurchaseOrders"
method: POST
path: "/workspaces/{workspace_id}/subscription/purchase_orders"
tags: ["subscription"]
---

# PurchaseOrders

`POST /workspaces/{workspace_id}/subscription/purchase_orders`

## Request

- Base URL: `https://localhost:8080/api/v9`
- URL: `https://localhost:8080/api/v9/workspaces/{workspace_id}/subscription/purchase_orders`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/toggl/apis/toggl-api/docs/workspaces/:workspace_id/subscription/purchase_orders/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a Purchase Order document for a workspace and send an email to the customer with a reference to the document.

## Path parameters

- `workspace_id` integer, required

## Request body

- PurchaseordersPayload
  - `user_count` integer, required

## Response `200`

Basic data of the created Purchase Order.

- AccountingPurchaseOrderListItem
  - `created_at` string
  - `due_date` string
  - `id` integer

## Other responses

- `400`: Possible error messages: * user\_count must be greater than 0 * workspace has no subscription * workspace has no contact data * Unpaid purchase order found
- `403`: User does not have access to this resource
- `500`: Internal Server Error

---

[API](https://skmtc.dev/toggl/apis/toggl-api.md) - [All operations](https://skmtc.dev/toggl/apis/toggl-api/llms.txt) - [OpenAPI document](https://skmtc.dev/toggl/apis/toggl-api/revisions/3085aee16990?raw)
