GuideLab API

Allocate Credit Note

Allocate credit from a credit note to an invoice. Lab-only. Reduces the invoice's amount due and the credit note's remaining balance. May mark the invoice as paid if fully covered.

POST
/credit-notes/{id}/allocate

Allocate credit from a credit note to an invoice. Lab-only. Reduces the invoice's amount due and the credit note's remaining balance. May mark the invoice as paid if fully covered.

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Path Parameters

id*string

Credit note ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/credit-notes/550e8400-e29b-41d4-a716-446655440000/allocate" \  -H "Content-Type: application/json" \  -d '{    "idempotencyKey": "stringst",    "invoiceId": "string",    "amount": "string"  }'
{  "success": true,  "newRemaining": "string",  "newAmountDue": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}