Links a customer credit to a sales invoice
curl --request POST \
--url https://api.light.inc/v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId} \
--header 'Authorization: <api-key>'{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerCredit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentNumber": "<string>",
"documentDate": "2023-12-25",
"status": "DRAFT",
"amount": 123,
"currency": "USD"
},
"invoiceReceivable": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentNumber": "<string>",
"documentDate": "2023-12-25",
"status": "DRAFT",
"amount": 123,
"currency": "USD"
},
"linkedAt": "2023-11-07T05:31:56Z"
}Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
default response
ID of the company
Invoice payable details
Show child attributes
Unique identifier for the object
Document number
Date the accounting document was issued
Status of the accounting document
⚠️ This enum is not exhaustive; new values may be added in the future.
DRAFT, POSTED, PARTIALLY_CLEARED, CLEARED, ARCHIVED The amount of the accounting document in cents
"USD"
Invoice payable details
Show child attributes
Unique identifier for the object
Document number
Date the accounting document was issued
Status of the accounting document
⚠️ This enum is not exhaustive; new values may be added in the future.
DRAFT, POSTED, PARTIALLY_CLEARED, CLEARED, ARCHIVED The amount of the accounting document in cents
"USD"
Timestamp when the customer credit was linked to the sales invoice
curl --request POST \
--url https://api.light.inc/v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId} \
--header 'Authorization: <api-key>'{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerCredit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentNumber": "<string>",
"documentDate": "2023-12-25",
"status": "DRAFT",
"amount": 123,
"currency": "USD"
},
"invoiceReceivable": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentNumber": "<string>",
"documentDate": "2023-12-25",
"status": "DRAFT",
"amount": 123,
"currency": "USD"
},
"linkedAt": "2023-11-07T05:31:56Z"
}