> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Create a purchase order

POST https://api.sandbox.monite.com/v1/payable_purchase_orders
Content-Type: application/json

Reference: https://docs.monite.com/api/purchase-orders/post-payable-purchase-orders

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

### Body (application/json)

This endpoint expects an object.

- `counterpart_id` (string, required) — Counterpart unique ID.
- `currency` (enum, required) — The currency in which the price of the product is set. (all items need to have the same currency)
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `items` (list of PurchaseOrderItem, required) — List of item to purchase
- `message` (string, required) — Msg which will be send to counterpart for who the purchase order is issued.
- `valid_for_days` (integer, required) — Number of days for which purchase order is valid
- `counterpart_address_id` (string, optional) — The ID of counterpart address object stored in counterparts service. If not provided, counterpart's default address is used.
- `entity_vat_id_id` (string, optional) — Entity VAT ID identifier that applied to purchase order
- `project_id` (string, optional) — Project ID of a purchase order

## Response

### 201

Successful Response

- `id` (string, required) — A unique ID assigned to this purchase order.
- `created_at` (datetime, required) — Time at which the receivable was created. Timestamps follow the ISO 8601 standard.
- `updated_at` (datetime, required) — Time at which the receivable was last updated. Timestamps follow the ISO 8601 standard.
- `counterpart` (PurchaseOrderCounterpartSchema, required) — Counterpart information about an organization (juridical person) or individual (natural person) that provides goods and services to or buys them from an
- `counterpart_id` (string, required) — Counterpart unique ID.
- `currency` (enum, required) — The currency in which the price of the product is set. (all items need to have the same currency)
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `document_id` (string, required)
- `entity` (PurchaseOrderResponseSchemaEntity, required) — Data of the entity (address, name, contact)
- `entity_id` (string, required) — The ID of the entity which issued the purchase order.
- `items` (list of PurchaseOrderItem, required) — List of item to purchase
- `message` (string, required) — Msg which will be send to counterpart for who the purchase order is issued.
- `status` (string, required) — Purchase order can be in 'draft' state before sending it to counterpart. After that state is 'issued'
- `valid_for_days` (integer, required) — Number of days for which purchase order is valid
- `counterpart_address` (PurchaseOrderCounterpartAddressSchema, optional) — Counterpart address data saved on creation or update of the purchase order.
- `counterpart_address_id` (string, optional) — The ID of counterpart address object stored in counterparts service. If not provided, counterpart's default address is used.
- `created_by_user_id` (string, optional) — ID of the creator of the purchase order
- `entity_vat_id` (PurchaseOrderVatId, optional)
- `file_id` (string, optional)
- `file_url` (string, optional)
- `issued_at` (string, optional) — When status changed from 'draft' to 'send', so after sending purchase order
- `project_id` (string, optional) — Project ID of a purchase order

## Errors

### 400 Post Payable Purchase Orders Request Bad Request Error

Bad Request

- `error` (ErrorSchema2, required)

### 404 Post Payable Purchase Orders Request Not Found Error

Not found

- `error` (ErrorSchema2, required)

### 422 Post Payable Purchase Orders Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Post Payable Purchase Orders Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema2, required)

## Types

### PurchaseOrderItem

- `currency` (enum, required) — The currency in which the price of the product is set.
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `name` (string, required) — The name of the product to purchase
- `price` (integer, required) — The subtotal cost (excluding VAT), in [minor units](https://docs.monite.com/references/currencies#minor-units).
- `quantity` (integer, required) — Number (quantity) of products
- `unit` (string, required) — Units (hours, meters, unit)
- `vat_rate` (integer, required) — Percent minor units. Example: 12.5% is 1250

### PurchaseOrderCounterpartSchema

A Counterpart object contains information about an organization (juridical person) or individual (natural person) that provides goods and services to or buys them from an [SME](https://docs.monite.com/docs/glossary#sme).

### PurchaseOrderResponseSchemaEntity

Data of the entity (address, name, contact)

### PurchaseOrderCounterpartAddressSchema

Address information.

- `city` (string, required) — City name.
- `country` (enum, required) — Two-letter ISO country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX`
- `line1` (string, required) — Street address.
- `postal_code` (string, required) — ZIP or postal code.
- `line2` (string, optional) — Additional address information (if any).
- `state` (string, optional) — State, region, province, or county.

### PurchaseOrderVatId

- `id` (string, required)
- `country` (string, required)
- `entity_id` (string, required)
- `type` (string, required)
- `value` (string, required)

### ErrorSchema2

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### PurchaseOrderCounterpartIndividualRootResponse

Represents counterparts that are individuals (natural persons).

- `id` (string, required) — Unique ID of the counterpart.
- `created_at` (datetime, required) — Date and time when the counterpart was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the counterpart was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `individual` (PurchaseOrderCounterpartIndividualResponse, required) — Represents counterparts that are individuals (natural persons).
- `type` (enum, required) — The counterpart type: `organization` (juridical person) or `individual` (natural person).
  - Allowed values: `individual`, `organization`
- `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
- `created_by_entity_user_id` (string, optional) — Entity user ID of counterpart creator.
- `default_billing_address_id` (string, optional) — ID of the counterpart's billing address. If the counterpart is US-based and needs to accept ACH payments, this address must have all fields filled in. If `default_billing_address_id` is not defined, the default address is instead used as the billing address for ACH payments.
- `default_shipping_address_id` (string, optional) — ID of the shipping address.
- `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
  - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
- `reminders_enabled` (boolean, optional)
- `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID. This field is required for counterparts that are non-VAT registered.

### PurchaseOrderCounterpartOrganizationRootResponse

Represents counterparts that are organizations (juridical persons).

- `id` (string, required) — Unique ID of the counterpart.
- `created_at` (datetime, required) — Date and time when the counterpart was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the counterpart was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `organization` (PurchaseOrderCounterpartOrganizationResponse, required) — Represents counterparts that are organizations (juridical persons).
- `type` (enum, required) — The counterpart type: `organization` (juridical person) or `individual` (natural person).
  - Allowed values: `individual`, `organization`
- `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
- `created_by_entity_user_id` (string, optional) — Entity user ID of counterpart creator.
- `default_billing_address_id` (string, optional) — ID of the counterpart's billing address. If the counterpart is US-based and needs to accept ACH payments, this address must have all fields filled in. If `default_billing_address_id` is not defined, the default address is instead used as the billing address for ACH payments.
- `default_shipping_address_id` (string, optional) — ID of the shipping address.
- `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
  - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
- `reminders_enabled` (boolean, optional)
- `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID. This field is required for counterparts that are non-VAT registered.

### PayableEntityIndividualResponse

A base for an entity response schema

- `id` (string, required) — UUID entity ID
- `created_at` (datetime, required) — UTC datetime
- `updated_at` (datetime, required) — UTC datetime
- `address` (PayableEntityAddressSchema, required) — A schema represents address info of the entity
- `individual` (PayableIndividualSchema, required) — A set of metadata describing an individual
- `status` (enum, required) — record status, 'active' by default
  - Allowed values: `active`, `deleted`
- `email` (string, optional) — An official email address of the entity
- `logo` (FileSchema3, optional) — A logo image of the entity
- `phone` (string, optional) — A phone number of the entity
- `tax_id` (string, optional) — The entity's taxpayer identification number or tax ID. This field is required for entities that are non-VAT registered.
- `website` (string, optional) — A website of the entity

### PayableEntityOrganizationResponse

A base for an entity response schema

- `id` (string, required) — UUID entity ID
- `created_at` (datetime, required) — UTC datetime
- `updated_at` (datetime, required) — UTC datetime
- `address` (PayableEntityAddressSchema, required) — A schema represents address info of the entity
- `organization` (PayableOrganizationSchema, required) — A set of metadata describing an organization
- `status` (enum, required) — record status, 'active' by default
  - Allowed values: `active`, `deleted`
- `email` (string, optional) — An official email address of the entity
- `logo` (FileSchema3, optional) — A logo image of the entity
- `phone` (string, optional) — A phone number of the entity
- `tax_id` (string, optional) — The entity's taxpayer identification number or tax ID. This field is required for entities that are non-VAT registered.
- `website` (string, optional) — A website of the entity

### ValidationErrorLocItem

### PurchaseOrderCounterpartIndividualResponse

Represents counterparts that are individuals (natural persons).

- `first_name` (string, required) — The person's first name.
- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `last_name` (string, required) — The person's last name.
- `email` (string, optional) — The person's email address.
- `phone` (string, optional) — The person's phone number.
- `title` (string, optional) — The person's title or honorific. Examples: Mr., Ms., Dr., Prof.

### PurchaseOrderCounterpartOrganizationResponse

Represents counterparts that are organizations (juridical persons).

- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `legal_name` (string, required) — The legal name of the organization.
- `email` (string, optional) — The email address of the organization
- `phone` (string, optional) — The phone number of the organization

### PayableEntityAddressSchema

A schema represents address info of the entity

- `city` (string, required) — A city (a full name) where the entity is registered
- `line1` (string, required) — A street where the entity is registered
- `postal_code` (string, required) — A postal code of the address where the entity is registered
- `country` (enum, optional) — A country name (as ISO code) where the entity is registered
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX`
- `line2` (string, optional) — An alternative street used by the entity
- `state` (string, optional) — A state in a country where the entity is registered

### PayableIndividualSchema

A schema contains metadata for an individual

- `first_name` (string, required) — A first name of an individual
- `last_name` (string, required) — A last name of an individual
- `date_of_birth` (string, optional)
- `id_number` (string, optional)
- `ssn_last_4` (string, optional) — The last four digits of the individual's Social Security number
- `title` (string, optional) — A title of an individual

### FileSchema3

Represents a file (such as a PDF invoice) that was uploaded to Monite.

- `id` (string, required) — A unique ID of this file.
- `created_at` (datetime, required) — UTC date and time when this file was uploaded to Monite. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- `file_type` (string, required) — The type of the business object associated with this file.
- `md5` (string, required) — The MD5 hash of the file.
- `mimetype` (string, required) — The file's [media type](https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types).
- `name` (string, required) — The original file name (if available).
- `region` (string, required) — Geographical region of the data center where the file is stored.
- `size` (integer, required) — The file size in bytes.
- `url` (string, required) — The URL to download the file.
- `pages` (list of PageSchema3, optional) — If the file is a PDF document, this property contains individual pages extracted from the file. Otherwise, an empty array.
- `previews` (list of PreviewSchema3, optional) — Preview images generated for this file. There can be multiple images with different sizes.

### PayableOrganizationSchema

A schema contains metadata for an organization

- `legal_name` (string, required) — A legal name of an organization
- `business_structure` (enum, optional) — Business structure of the company
  - Allowed values: `incorporated_partnership`, `unincorporated_partnership`, `public_corporation`, `private_corporation`, `sole_proprietorship`, `single_member_llc`, `multi_member_llc`, `private_partnership`, `unincorporated_association`, `public_partnership`
- `directors_provided` (boolean, optional)
- `executives_provided` (boolean, optional)
- `legal_entity_id` (string, optional) — A code which identifies uniquely a party of a transaction worldwide
- `owners_provided` (boolean, optional)
- `representative_provided` (boolean, optional)

### PageSchema3

When a PDF document is uploaded to Monite, it extracts individual pages from the document and saves them as PNG images. This object contains the image and metadata of a single page.

- `id` (string, required) — A unique ID of the image.
- `mimetype` (string, required) — The [media type](https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types) of the image.
- `number` (integer, required) — The page number in the PDF document, from 0.
- `size` (integer, required) — Image file size, in bytes.
- `url` (string, required) — The URL to download the image.

### PreviewSchema3

A preview image generated for a file.

- `height` (integer, required) — The image height in pixels.
- `url` (string, required) — The image URL.
- `width` (integer, required) — The image width in pixels.

## Examples

**Request**

```json
{
  "counterpart_id": "counterpart_id",
  "currency": "AED",
  "items": [
    {
      "currency": "AED",
      "name": "name",
      "price": 1,
      "quantity": 1,
      "unit": "unit",
      "vat_rate": 1
    }
  ],
  "message": "message",
  "valid_for_days": 1
}
```

**Response**

```json
{
  "id": "id",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "counterpart": {
    "id": "id",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "created_automatically": true,
    "created_by_entity_user_id": "created_by_entity_user_id",
    "default_billing_address_id": "default_billing_address_id",
    "default_shipping_address_id": "default_shipping_address_id",
    "individual": {
      "email": "asingh@example.net",
      "first_name": "Adnan",
      "is_customer": true,
      "is_vendor": true,
      "last_name": "Singh",
      "phone": "5553211234",
      "title": "Mr."
    },
    "language": "ab",
    "reminders_enabled": true,
    "tax_id": "tax_id",
    "type": "individual"
  },
  "counterpart_id": "counterpart_id",
  "currency": "AED",
  "document_id": "document_id",
  "entity": {
    "id": "id",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "address": {
      "city": "city",
      "country": "AF",
      "line1": "line1",
      "line2": "line2",
      "postal_code": "postal_code",
      "state": "state"
    },
    "email": "email",
    "individual": {
      "date_of_birth": "date_of_birth",
      "first_name": "first_name",
      "id_number": "id_number",
      "last_name": "last_name",
      "ssn_last_4": "ssn_last_4",
      "title": "title"
    },
    "logo": {
      "id": "id",
      "created_at": "2024-01-15T09:30:00Z",
      "file_type": "payables",
      "md5": "31d1a2dd1ad3dfc39be849d70a68dac0",
      "mimetype": "application/pdf",
      "name": "invoice.pdf",
      "pages": [
        {
          "id": "id",
          "mimetype": "image/png",
          "number": 0,
          "size": 21972,
          "url": "https://bucket.s3.amazonaws.com/123/456.png"
        }
      ],
      "previews": [
        {
          "height": 400,
          "url": "https://bucketname.s3.amazonaws.com/1/2/3.png",
          "width": 200
        }
      ],
      "region": "eu-central-1",
      "size": 24381,
      "url": "https://bucketname.s3.amazonaws.com/12345/67890.pdf"
    },
    "phone": "phone",
    "status": "active",
    "tax_id": "tax_id",
    "website": "website"
  },
  "entity_id": "entity_id",
  "items": [
    {
      "currency": "AED",
      "name": "name",
      "price": 1,
      "quantity": 1,
      "unit": "unit",
      "vat_rate": 1
    }
  ],
  "message": "message",
  "status": "status",
  "valid_for_days": 1,
  "counterpart_address": {
    "city": "Berlin",
    "country": "AF",
    "line1": "Flughafenstrasse 52",
    "postal_code": "10115",
    "line2": "line2",
    "state": "state"
  },
  "counterpart_address_id": "counterpart_address_id",
  "created_by_user_id": "created_by_user_id",
  "entity_vat_id": {
    "id": "id",
    "country": "country",
    "entity_id": "entity_id",
    "type": "type",
    "value": "value"
  },
  "file_id": "file_id",
  "file_url": "file_url",
  "issued_at": "issued_at",
  "project_id": "project_id"
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/payable_purchase_orders"

payload = {
    "counterpart_id": "counterpart_id",
    "currency": "AED",
    "items": [
        {
            "currency": "AED",
            "name": "name",
            "price": 1,
            "quantity": 1,
            "unit": "unit",
            "vat_rate": 1
        }
    ],
    "message": "message",
    "valid_for_days": 1
}
headers = {
    "x-monite-version": "2024-01-31",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/payable_purchase_orders';
const options = {
  method: 'POST',
  headers: {
    'x-monite-version': '2024-01-31',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"counterpart_id":"counterpart_id","currency":"AED","items":[{"currency":"AED","name":"name","price":1,"quantity":1,"unit":"unit","vat_rate":1}],"message":"message","valid_for_days":1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/payable_purchase_orders"

	payload := strings.NewReader("{\n  \"counterpart_id\": \"counterpart_id\",\n  \"currency\": \"AED\",\n  \"items\": [\n    {\n      \"currency\": \"AED\",\n      \"name\": \"name\",\n      \"price\": 1,\n      \"quantity\": 1,\n      \"unit\": \"unit\",\n      \"vat_rate\": 1\n    }\n  ],\n  \"message\": \"message\",\n  \"valid_for_days\": 1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-monite-version", "2024-01-31")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/payable_purchase_orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-monite-version"] = '2024-01-31'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"counterpart_id\": \"counterpart_id\",\n  \"currency\": \"AED\",\n  \"items\": [\n    {\n      \"currency\": \"AED\",\n      \"name\": \"name\",\n      \"price\": 1,\n      \"quantity\": 1,\n      \"unit\": \"unit\",\n      \"vat_rate\": 1\n    }\n  ],\n  \"message\": \"message\",\n  \"valid_for_days\": 1\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sandbox.monite.com/v1/payable_purchase_orders")
  .header("x-monite-version", "2024-01-31")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"counterpart_id\": \"counterpart_id\",\n  \"currency\": \"AED\",\n  \"items\": [\n    {\n      \"currency\": \"AED\",\n      \"name\": \"name\",\n      \"price\": 1,\n      \"quantity\": 1,\n      \"unit\": \"unit\",\n      \"vat_rate\": 1\n    }\n  ],\n  \"message\": \"message\",\n  \"valid_for_days\": 1\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sandbox.monite.com/v1/payable_purchase_orders', [
  'body' => '{
  "counterpart_id": "counterpart_id",
  "currency": "AED",
  "items": [
    {
      "currency": "AED",
      "name": "name",
      "price": 1,
      "quantity": 1,
      "unit": "unit",
      "vat_rate": 1
    }
  ],
  "message": "message",
  "valid_for_days": 1
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-01-31',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/payable_purchase_orders");
var request = new RestRequest(Method.POST);
request.AddHeader("x-monite-version", "2024-01-31");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"counterpart_id\": \"counterpart_id\",\n  \"currency\": \"AED\",\n  \"items\": [\n    {\n      \"currency\": \"AED\",\n      \"name\": \"name\",\n      \"price\": 1,\n      \"quantity\": 1,\n      \"unit\": \"unit\",\n      \"vat_rate\": 1\n    }\n  ],\n  \"message\": \"message\",\n  \"valid_for_days\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-01-31",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "counterpart_id": "counterpart_id",
  "currency": "AED",
  "items": [
    [
      "currency": "AED",
      "name": "name",
      "price": 1,
      "quantity": 1,
      "unit": "unit",
      "vat_rate": 1
    ]
  ],
  "message": "message",
  "valid_for_days": 1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/payable_purchase_orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```