---
title: "Adds a purchase order number to an invoice"
method: POST
path: "/public/invoice/v1/add-purchase-order-number-to-invoice"
tags: ["Invoice"]
---

# Adds a purchase order number to an invoice

`POST /public/invoice/v1/add-purchase-order-number-to-invoice`

## Request

- Base URL: `https://api.maqqie.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maqqie.app/public/invoice/v1/add-purchase-order-number-to-invoice`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://maqqie.app/auth/realms/maqqie/protocol/openid-connect/token`

Regenerates an existing invoice, with the purchase order number added to it.
If this operation is called multiple times for the same invoice, the purchase order number will be overwritten
with the latest value.

## Request body

- PurchaseOrderNumberAdditionRequestV1
  - `invoiceId` string, uuid, required
  - `purchaseOrderNumber` string, required: The purchase order number to add to the invoice. Maximum length is 12 characters.

## Response `200`

Successfully added the purchase order number to the invoice

- PurchaseOrderNumberAdditionResponseV1
  - `fileId` string, uuid

## Other responses

- `400`: The request could not be processed. This could be due to a number of reasons: * The request does not have all required data. * Data in the request is invalid. * Data in the request is inconsistent. * The operation is not allowed given the current state of the data.
- `401`: The request did not contain credentials identifying the caller, or the provided credentials were invalid.
- `403`: The data that the request referred to is inaccessible to the caller.

## Changes

- **2026-09-29** `f9510f3f4b22`: 5 breaking, 1 info
  - added the new required request property `invoiceId`
  - added the new required request property `purchaseOrderNumber`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - …2 more
- **2026-09-29** `3352b56bb8fe`: 3 breaking, 3 warning, 1 info
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `string` to no type for status `400`
  - removed the request property `invoiceId`
  - …3 more
- **2026-09-16** `ccf9834e5006`: 5 breaking, 1 info
  - added the new required request property `invoiceId`
  - added the new required request property `purchaseOrderNumber`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - …2 more
- **2026-09-15** `8085d4c1ab80`: 3 breaking, 3 warning, 1 info
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `string` to no type for status `400`
  - removed the request property `invoiceId`
  - …3 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/maqqie/apis/maqqie-public-api/changes/public/invoice/v1/add-purchase-order-number-to-invoice/post.md)

---

[API](https://skmtc.dev/maqqie/apis/maqqie-public-api.md) - [All operations](https://skmtc.dev/maqqie/apis/maqqie-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maqqie/apis/maqqie-public-api/revisions/13ed331da2b2?raw)
