Skip to main content
PUT
/
api
/
billing
/
coworkerinvoices
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
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

ValueName
1None
2TransferFailed
3Processing
4ProcessingFailed
5Processed

Request Body

Required Fields

Id
integer
required
The Id of the CoworkerInvoice record to update.
CoworkerId
integer
required
Coworker Id.
BusinessId
integer
required
Business Id.
InvoiceNumber
string
required
Unique invoice number assigned when the invoice is finalised.
BillToName
string
required
Name of the person or company being billed.
BillToAddress
string
required
Billing address on the invoice.
BillToCity
string
required
Billing city on the invoice.
BillToPostCode
string
required
Billing post code on the invoice.
BillToCountryId
integer
required
Bill To Country Id.
CurrencyId
integer
required
Currency Id.

Optional Fields

PaymentReference
string
Reference code used to match payments to this invoice.
BillToPhone
string
Billing phone number on the invoice.
BillToFax
string
Billing fax number on the invoice.
BillToState
string
Billing state or region on the invoice.
BillToBankAccount
string
Bank account number on the invoice for payment.
BillToTaxIDNumber
string
Tax identification number of the billed party.
PurchaseOrder
string
Customer purchase order number for this invoice.
DueDate
string
Date by which payment is due.
InvoiceFromDate
string
Start date of the billing period covered by this invoice.
InvoiceToDate
string
End date of the billing period covered by this invoice.
TransactionTotalAmount
number
Transaction Total Amount.
TransactionCurrencyId
integer
Transaction Currency Id.
TransactionExchangeRate
number
Transaction Exchange Rate.
Draft
boolean
Whether the invoice is still a draft. Draft invoices can be modified before finalisation.
PaidOn
string
Date the invoice was marked as fully paid.
StorecoveInvoiceStatus
integer
Status of e-invoicing transfer via Storecove. See eStorecoveInvoiceStatus enum above.
Billed
boolean
Billed.
DoNotApplyCreditAutomatically
boolean
Whether to skip automatic application of available credit to this invoice.
CreatedOnLocal
string
Created On Local.
DueDateLocal
string
Due Date Local.
InvoiceFromDateLocal
string
Invoice From Date Local.
InvoiceToDateLocal
string
Invoice To Date Local.
PaidOnLocal
string
Paid On Local.
RefundedOnLocal
string
Refunded On Local.
LastPaymentAttemptLocal
string
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

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the update.
Value
object
Contains the Id of the updated record.
WasSuccessful
boolean
true if the coworkerinvoice was updated successfully.
Errors
array
null on success.
Example Response
{
  "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

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "InvoiceNumber: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "InvoiceNumber"
    }
  ],
  "WasSuccessful": false
}