Credit Notes
Credit Note object
Attributes |
id Unique object's identifier. |
invoice The ID of the invoice that was discounted. In read resources this field is expandable, returns the invoice object. expandable |
number A unique, identifying number that appears on credit note header sent to the customer of this credit note. It's automatically assigned. |
date Closing date of the credit note. Typically this is the date on which credit note is generated. |
lines The list of line items for this credit note. |
amount Taxable subtotal of this credit note. |
exempt Non taxable subtotal of this credit note. |
tax Tax amount of this credit note. |
tax_percent Tax rate to this credit note. |
subtotal Sum of amount and exempt of this credit note. |
total Sum of subtotal and taxes to this invoice. |
discount Discount amount applicable to subtotal to this invoice. |
discount_scheme Scheme of the discount, one of |
local_file URL to local format when document type of this credit note belong to a tax agency. |
internal_note An internal note to provide additional information about credit adjustment. |
note A note or reason for the customer of this credit note. |
tax_agency An object with key pairs for particular tax agency properties. |
status Status of this credit note, one of |
user Email of the user that created this credit note. |
created Date and time of the creation of this credit note. |
updated 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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
id | string | The id of credit note object. |
Last updated