Invoices
Update open invoice
Updates an open invoice (e.g. tags). Only open invoices can be updated. Returns 400 when invoice is not found or is closed.
PUT
/
invoices
/
{clientId}
/
{invoiceId}
Update open invoice
curl --request PUT \
--url https://api.sandbox.flowpayroll.ai/v1/billing/invoices/{clientId}/{invoiceId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"tags": [
{
"name": "<string>",
"group": "<string>",
"value": "<string>"
}
],
"dueDate": "<string>",
"invoiceNumber": "<string>",
"reference": "<string>",
"currencyCode": "<string>",
"lineAmountTypes": "<string>"
}
'{
"content": {
"data": {
"id": "<string>",
"organisationId": "<string>",
"clientId": "<string>",
"amount": 123,
"lineAmountTypes": "<string>",
"subTotal": 123,
"totalTax": 123,
"totalCreditAmount": 123,
"balanceDue": 123,
"currencyCode": "<string>",
"appliedCredits": [
{
"creditNoteId": "<string>",
"amountApplied": 123,
"appliedDate": "<string>"
}
],
"groupingKey": "<string>",
"invoiceFormatTagGroup": "<string>",
"invoiceFormatTagName": "<string>",
"date": "<string>",
"dueDate": "<string>",
"invoiceNumber": "<string>",
"reference": "<string>",
"attachments": [
{
"id": "<string>",
"fileName": "<string>",
"url": "<string>",
"description": "<string>",
"s3Key": "<string>",
"contentType": "<string>",
"fileSize": 123,
"uploadedDate": "<string>",
"uploadedBy": "<string>",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "<string>"
}
],
"lineItemAttachmentCount": 123,
"linesWithoutAttachmentsCount": 123,
"linesWithoutPoNumberCount": 123,
"lineItems": [
{
"id": "<string>",
"invoiceId": "<string>",
"organisationId": "<string>",
"clientId": "<string>",
"employeeId": "<string>",
"employeeName": "<string>",
"description": "<string>",
"amount": 123,
"payElementId": "<string>",
"units": 123,
"chargeRate": 123,
"chargeUnits": 123,
"chargeValue": 123,
"date": "<string>",
"tags": [
{
"name": "<string>",
"group": "<string>",
"value": "<string>"
}
],
"createdDate": "<string>",
"createdBy": "<string>",
"attachments": [
{
"id": "<string>",
"lineItemId": "<string>",
"filename": "<string>",
"contentType": "<string>",
"fileSize": 123,
"uploadedDate": "<string>",
"uploadedBy": "<string>",
"s3Key": "<string>",
"source": "<string>",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "<string>"
}
],
"payElementDescription": "<string>",
"accountCode": "<string>",
"taxType": "<string>",
"quantity": 123,
"unitAmount": 123,
"lineAmount": 123,
"taxAmount": 123,
"poNumber": "<string>"
}
],
"subtotalGroups": [
{
"label": "<string>",
"amount": 123,
"taxAmount": 123,
"totalAmount": 123,
"sortOrder": 123
}
],
"tags": [
{
"name": "<string>",
"group": "<string>",
"value": "<string>"
}
],
"externalId": "<string>",
"externalProvider": "<string>",
"lastSyncedAt": "<string>",
"syncStatus": "<string>",
"syncErrorMessage": "<string>",
"syncErrorCode": "<string>",
"externalProviderStatus": "<string>",
"emailSent": true,
"emailSentAt": "<string>",
"emailSentBy": "<string>",
"createdDate": "<string>",
"createdBy": "<string>",
"updatedDate": "<string>",
"updatedBy": "<string>"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>"
}
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>"
},
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"message": {
"text": "<string>",
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Authentication token for API access
Body
application/json
Was this page helpful?
⌘I
Update open invoice
curl --request PUT \
--url https://api.sandbox.flowpayroll.ai/v1/billing/invoices/{clientId}/{invoiceId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"tags": [
{
"name": "<string>",
"group": "<string>",
"value": "<string>"
}
],
"dueDate": "<string>",
"invoiceNumber": "<string>",
"reference": "<string>",
"currencyCode": "<string>",
"lineAmountTypes": "<string>"
}
'{
"content": {
"data": {
"id": "<string>",
"organisationId": "<string>",
"clientId": "<string>",
"amount": 123,
"lineAmountTypes": "<string>",
"subTotal": 123,
"totalTax": 123,
"totalCreditAmount": 123,
"balanceDue": 123,
"currencyCode": "<string>",
"appliedCredits": [
{
"creditNoteId": "<string>",
"amountApplied": 123,
"appliedDate": "<string>"
}
],
"groupingKey": "<string>",
"invoiceFormatTagGroup": "<string>",
"invoiceFormatTagName": "<string>",
"date": "<string>",
"dueDate": "<string>",
"invoiceNumber": "<string>",
"reference": "<string>",
"attachments": [
{
"id": "<string>",
"fileName": "<string>",
"url": "<string>",
"description": "<string>",
"s3Key": "<string>",
"contentType": "<string>",
"fileSize": 123,
"uploadedDate": "<string>",
"uploadedBy": "<string>",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "<string>"
}
],
"lineItemAttachmentCount": 123,
"linesWithoutAttachmentsCount": 123,
"linesWithoutPoNumberCount": 123,
"lineItems": [
{
"id": "<string>",
"invoiceId": "<string>",
"organisationId": "<string>",
"clientId": "<string>",
"employeeId": "<string>",
"employeeName": "<string>",
"description": "<string>",
"amount": 123,
"payElementId": "<string>",
"units": 123,
"chargeRate": 123,
"chargeUnits": 123,
"chargeValue": 123,
"date": "<string>",
"tags": [
{
"name": "<string>",
"group": "<string>",
"value": "<string>"
}
],
"createdDate": "<string>",
"createdBy": "<string>",
"attachments": [
{
"id": "<string>",
"lineItemId": "<string>",
"filename": "<string>",
"contentType": "<string>",
"fileSize": 123,
"uploadedDate": "<string>",
"uploadedBy": "<string>",
"s3Key": "<string>",
"source": "<string>",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "<string>"
}
],
"payElementDescription": "<string>",
"accountCode": "<string>",
"taxType": "<string>",
"quantity": 123,
"unitAmount": 123,
"lineAmount": 123,
"taxAmount": 123,
"poNumber": "<string>"
}
],
"subtotalGroups": [
{
"label": "<string>",
"amount": 123,
"taxAmount": 123,
"totalAmount": 123,
"sortOrder": 123
}
],
"tags": [
{
"name": "<string>",
"group": "<string>",
"value": "<string>"
}
],
"externalId": "<string>",
"externalProvider": "<string>",
"lastSyncedAt": "<string>",
"syncStatus": "<string>",
"syncErrorMessage": "<string>",
"syncErrorCode": "<string>",
"externalProviderStatus": "<string>",
"emailSent": true,
"emailSentAt": "<string>",
"emailSentBy": "<string>",
"createdDate": "<string>",
"createdBy": "<string>",
"updatedDate": "<string>",
"updatedBy": "<string>"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>"
}
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>"
},
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"message": {
"text": "<string>",
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}