Skip to main content
PUT
/
api
/
billing
/
coworkerinvoices
Update CoworkerInvoice
curl --request PUT \
  --url https://spaces.nexudus.com/api/billing/coworkerinvoices \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Id": 123,
  "CoworkerId": 123,
  "BusinessId": 123,
  "InvoiceNumber": "<string>",
  "BillToName": "<string>",
  "BillToAddress": "<string>",
  "BillToCity": "<string>",
  "BillToPostCode": "<string>",
  "BillToCountryId": 123,
  "CurrencyId": 123,
  "StorecoveInvoiceStatus": 123
}
'
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt

Use this file to discover all available pages before exploring further.

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
ID of the coworker linked to this record.
BusinessId
integer
required
ID of the business linked to this record.
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
ID of the bill to country linked to this record.
CurrencyId
integer
required
ID of the currency linked to this record.
StorecoveInvoiceStatus
integer
required
Status of e-invoicing transfer via Storecove.

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
The transaction total amount value for this coworker invoice.
TransactionCurrencyId
integer
ID of the transaction currency linked to this record.
TransactionExchangeRate
number
The transaction exchange rate value for this coworker invoice.
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.
Billed
boolean
Whether billed is enabled.
DoNotApplyCreditAutomatically
boolean
Whether to skip automatic application of available credit to this invoice.
CreatedOnLocal
string
Date/time value for created on local.
DueDateLocal
string
Date/time value for due date local.
InvoiceFromDateLocal
string
Date/time value for invoice from date local.
InvoiceToDateLocal
string
Date/time value for invoice to date local.
PaidOnLocal
string
Date/time value for paid on local.
RefundedOnLocal
string
Date/time value for refunded on local.
LastPaymentAttemptLocal
string
Date/time value for 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,
    "StorecoveInvoiceStatus": 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
}