Link invoice to contract
https://api.light.inc/v1/contracts/{contractId}/invoice-receivables/{invoiceReceivableId}/link
Links an existing sales invoice to the contract, so it shows on the contract and counts towards its value. The contract's billing schedule is not changed. The contract must be ACTIVE or PENDING_TERMINATION. The invoice must be DRAFT, OPEN, PARTIALLY_PAID or PAID, not linked to a contract yet, and share the contract's customer, company entity and currency. An invoice already linked to a contract returns CONTRACT_INVOICE_ALREADY_LINKED with that contract's contractId in the error's context; when it is this contract, as on a retry of a call that went through, treat it as success.
Permission: contracts:update (AR_CLERK, COMPANY_ADMIN, CONTROLLER)
Authorization
Send one of these on every request. See Authentication for how to get credentials.
- API key
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
- Bearer token
Path parameters
-
contractIdstring · uuidrequired -
invoiceReceivableIdstring · uuidrequired
Response
application/json;charset=UTF-8This endpoint returns no content.