Skip to main content
GET
/
purchases
/
credit-notes
/
{id}
/
finalize
Finalize purchase credit note
curl --request GET \
  --url https://api.piriod.com/purchases/credit-notes/{id}/finalize/ \
  --header 'Authorization: <api-key>' \
  --header 'x-simple-workspace: <x-simple-workspace>'
{
  "purchase": 123,
  "document": 123,
  "number": 123,
  "date": "2023-12-25",
  "lines": [
    {
      "name": "<string>",
      "amount": 123,
      "quantity": 123,
      "id": 123,
      "description": "<string>",
      "exempt": false,
      "tax": 123,
      "tax_percent": 123,
      "total": 123,
      "discount": 123,
      "discount_scheme": "%",
      "code": "<string>",
      "retention": 123,
      "retention_percent": 0
    }
  ],
  "id": 123,
  "note": "<string>",
  "internal_note": "<string>",
  "amount": 123,
  "exempt": 123,
  "tax": 123,
  "tax_percent": 123,
  "subtotal": 123,
  "total": 123,
  "retention": 123,
  "discount": 123,
  "discount_scheme": "%",
  "status": "draft",
  "biller_status": "<string>",
  "tax_agency": {},
  "local_file": "<string>",
  "imported": true,
  "test_mode": true,
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.piriod.com/llms.txt

Use this file to discover all available pages before exploring further.

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.

Response

Finalized credit note.

Credit note that adjusts (or fully cancels) a purchase.

purchase
integer
required

Purchase ID being adjusted.

document
integer
required

Credit-note document type.

number
integer
required
date
string<date>
required
lines
object[]
required
id
integer
read-only
note
string | null
Maximum string length: 64
internal_note
string | null
Maximum string length: 1024
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:
%,
$
status
enum<string>
read-only
Available options:
draft,
finalized,
cancelled
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
created
string<date-time>
read-only
updated
string<date-time>
read-only