Skip to main content
PATCH
Partial update purchase (draft only)

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Path Parameters

id
string
required

Resource identifier.

Body

application/json
supplier
string
required

Supplier ID.

document
integer
required

Purchase-document type ID.

number
integer
required
date
string<date>
required
lines
object[]
required
due_date
string<date> | null
note
string | null
Maximum string length: 100
amount
number | null
exempt
number | null
tax
number | null
tax_percent
number | null
subtotal
number | null
total
number | null
retention
number | null
discount
number | null
discount_scheme
enum<string> | null
Available options:
%,
$
tax_settings
object

Country-specific tax-agency configuration.

metadata
object

Response

200 - application/json

Updated purchase.

supplier
string
required

Supplier ID.

document
integer
required

Purchase-document type ID.

number
integer
required
date
string<date>
required
lines
object[]
required
id
integer
read-only
due_date
string<date> | null
note
string | null
Maximum string length: 100
amount
number | null
exempt
number | null
tax
number | null
tax_percent
number | null
subtotal
number | null
total
number | null
total_adjusted
number | null
read-only
retention
number | null
discount
number | null
discount_scheme
enum<string> | null
Available options:
%,
$
tax_settings
object

Country-specific tax-agency configuration.

status
enum<string>
read-only
Available options:
draft,
finalized
biller_status
string
read-only
tax_agency
object
read-only
local_file
string<uri> | null
read-only
imported
boolean
read-only
test_mode
boolean
read-only
metadata
object
created
string<date-time>
read-only
updated
string<date-time>
read-only