API
Credit notes
Read credit notes and their invoice application history.
Use the invoices:read scope with an API key or OAuth token. Filter the list by clientId or status.
The detail response includes application history. An application with unappliedAt set stays in the history after its credit is removed from the invoice. The invoice's creditApplied field shows the credit that still applies.
x-api-key<token>
In: header
Query Parameters
page?integer
Default
1Range
1 <= valuepageSize?integer
Default
25Range
1 <= value <= 100clientId?string
UUID v4
Format
uuidstatus?string
Value in
"draft" | "issued" | "void"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.clientcasa.com/api/v1/credit-notes"{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"creditNoteNumber": "string",
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"businessId": "550e8400-e29b-41d4-a716-446655440000",
"issueDate": "2019-08-24",
"status": "draft",
"reason": "string",
"currency": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"page": 1,
"pageSize": 1,
"total": 0,
"totalPages": 0,
"hasMore": true
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}x-api-key<token>
In: header
Path Parameters
id*string
UUID v4
Format
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.clientcasa.com/api/v1/credit-notes/550e8400-e29b-41d4-a716-446655440000"{
"id": "550e8400-e29b-41d4-a716-446655440000",
"creditNoteNumber": "string",
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"businessId": "550e8400-e29b-41d4-a716-446655440000",
"issueDate": "2019-08-24",
"status": "draft",
"reason": "string",
"currency": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"applications": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"invoiceId": "550e8400-e29b-41d4-a716-446655440000",
"amount": 0,
"taxAmount": 0,
"appliedAt": "2019-08-24T14:15:22Z",
"unappliedAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"code": "booking_inquiry_unavailable",
"property1": null,
"property2": null
}
}
}