Credit Notes
Credit Note object
Attributes
id string
Unique object's identifier.
invoice string
The ID of the invoice that was discounted. In read resources this field is expandable, returns the invoice object.
number number
A unique, identifying number that appears on credit note header sent to the customer of this credit note. It's automatically assigned.
document string
The ID of the document type for this credit note.
date date
Closing date of the credit note. Typically this is the date on which credit note is generated.
lines list
The list of line items for this credit note.
amount decimal
Taxable subtotal of this credit note.
exempt decimal
Non taxable subtotal of this credit note.
tax decimal
Tax amount of this credit note.
tax_percent decimal
Tax rate to this credit note.
subtotal decimal
Sum of amount and exempt of this credit note.
total decimal
Sum of subtotal and taxes to this invoice.
discount decimal
Discount amount applicable to subtotal to this invoice.
discount_scheme string
Scheme of the discount, one of $
or %
.
local_file url
URL to local format when document type of this credit note belong to a tax agency.
internal_note string
An internal note to provide additional information about credit adjustment.
note string
A note or reason for the customer of this credit note.
tax_agency object
An object with key pairs for particular tax agency properties.
status string
Status of this credit note, one of draft
or finalized
.
user string
Email of the user that created this credit note.
created datetime
Date and time of the creation of this credit note.
updated datetime
Date and time of the last update of this credit note.
Create a credit note
POST
https://api.piriod.com/creditnotes/
This endpoint creates a credit note with status draft for a given invoice. After create the credit note use Finalize a credit note resource for finish credit note.
Request Body
invoice
string
The id of the invoice to be discounted.
document
string
The id of the document type of this credit note.
date
string
Closing date of this credit note.
lines
array
The list of line items for this credit note.
Retrieve a credit note
GET
https://api.piriod.com/creditnotes/{id}/
This endpoint retrieves a credit note object.
Path Parameters
id
string
The id of the credit note object.
Destroy a credit note
DELETE
https://api.piriod.com/creditnotes/{id}/
Destroy a credit note object. Only credit notes with status draft
are destroyed.
Path Parameters
id
string
The id of the credit note object.
Finalize a credit note
GET
https://api.piriod.com/creditnotes/{id}/finalize/
This endpoint finalize a credit note. When the credit note is finalized, it is validated with the tax agency, if the credit note document type has tax regulations, you will no longer be able to update your data. The status attribute of the credit note object will become to finalized
. The local_file attribute of the credit note object will have a url to get the file that was sent to the tax agency, normally it is a file with an .xml extension.
Path Parameters
id
string
The id of credit note object.
Retrieve a credit note PDF
GET
https://api.piriod.com/creditnotes/{id}/pdf/
This endpoint retrieves a PDF representation of the credit note. Returns a Blob encoded in Base64.
Path Parameters
id
string
The id of credit note object.
Last updated