Updates an existing CoworkerInvoice record. You must include the Id of the record to update along with all required fields.
Authentication
This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header.
The authenticated user must be a full unrestricted administrator or have the CoworkerInvoice-Edit role.
Enums
eStorecoveInvoiceStatus — StorecoveInvoiceStatus values
Value Name 1 None 2 TransferFailed 3 Processing 4 ProcessingFailed 5 Processed
Request Body
Required Fields
The Id of the CoworkerInvoice record to update.
Unique invoice number assigned when the invoice is finalised.
Name of the person or company being billed.
Billing address on the invoice.
Billing city on the invoice.
Billing post code on the invoice.
Optional Fields
Reference code used to match payments to this invoice.
Billing phone number on the invoice.
Billing fax number on the invoice.
Billing state or region on the invoice.
Bank account number on the invoice for payment.
Tax identification number of the billed party.
Customer purchase order number for this invoice.
Date by which payment is due.
Start date of the billing period covered by this invoice.
End date of the billing period covered by this invoice.
Transaction Total Amount.
Transaction Exchange Rate.
Whether the invoice is still a draft. Draft invoices can be modified before finalisation.
Date the invoice was marked as fully paid.
Status of e-invoicing transfer via Storecove. See eStorecoveInvoiceStatus enum above.
DoNotApplyCreditAutomatically
Whether to skip automatic application of available credit to this invoice.
Last Payment Attempt Local.
Code Examples
curl -X PUT \
"https://spaces.nexudus.com/api/billing/coworkerinvoices" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"CoworkerId": 0,
"BusinessId": 0,
"InvoiceNumber": "",
"BillToName": "",
"BillToAddress": "",
"BillToCity": "",
"BillToPostCode": "",
"BillToCountryId": 0,
"CurrencyId": 0,
"Id": 87654321
}'
Response
200
HTTP status code. 200 on success.
A human-readable message confirming the update.
Contains the Id of the updated record.
true if the coworkerinvoice was updated successfully.
{
"Status" : 200 ,
"Message" : "CoworkerInvoice was successfully updated." ,
"Value" : {
"Id" : 87654321
},
"OpenInDialog" : false ,
"OpenInWindow" : false ,
"RedirectURL" : null ,
"JavaScript" : null ,
"UpdatedOn" : "2025-01-15T10:30:00Z" ,
"UpdatedBy" : "admin@example.com" ,
"Errors" : null ,
"WasSuccessful" : true
}
400
A summary of the validation error(s), in the format PropertyName: error message.
null on validation failure.
Array of validation errors. The value that was submitted for the field, or null if missing.
The validation error message.
The name of the property that failed validation.
false when the request fails validation.
{
"Message" : "InvoiceNumber: is a required field" ,
"Value" : null ,
"Errors" : [
{
"AttemptedValue" : null ,
"Message" : "is a required field" ,
"PropertyName" : "InvoiceNumber"
}
],
"WasSuccessful" : false
}