Invoices
Update an invoice
Updates the details of a specific invoice by its ID
put/contracts/{contractId}/invoices/{id}
Request
- Base URLhttps://connect.clever.gy
- AuthAPI key in header clevergy-api-key
Path parameters
contractIdstring required
ID of the contract for which to update the invoice
idstring required
ID of the invoice to update
Request body
Example request
{
"issueDate": "2023-01-15T12:00:00Z",
"invoicePeriodFrom": "2023-01-01T00:00:00Z",
"invoicePeriodTo": "2023-01-31T23:59:59Z",
"type": "ELECTRICITY",
"cost": 125.5,
"externalId": "ext-456",
"concepts": {
"energyCost": 75.2,
"powerCost": 35,
"otherCost": 15.3,
"totalEnergySurplus": 10.5,
"surplusSaving": 5,
"discountSaving": 20,
"virtualWallet": 15,
"excessPowerCost": 10,
"reactiveEnergyCost": 8
},
"obtainMethod": "REAL",
"totalEnergyConsumption": 350.75
}Response
Invoice updated successfully
Example response
{
"id": "invoice-123",
"issueDate": "2023-01-15",
"invoicePeriodFrom": "2023-01-01",
"invoicePeriodTo": "2023-01-31",
"type": "ELECTRICITY",
"cost": 125.5,
"contractId": "contract-123",
"externalId": "ext-456",
"concepts": {
"energy": "75.20",
"taxes": "15.30",
"fixed": "35.00"
},
"fileUrl": "https://example.com/invoices/detail/123",
"obtainMethod": "REAL",
"totalEnergyConsumption": 350.75,
"paymentDate": "2023-02-01",
"paymentStatus": "PAID"
}Changes
No recorded changes to this operation across all 1 revision of this API.