Page 1 of 1

Add Result headers to Access-Control-Expose-Headers

Posted: Thu Sep 17, 2026 5:03 am
by Goldfish6413
We're currently working on a webapp that uses Simpro API. The API returns headers like

Code: Select all

Result-Total
that indicates the number of records for the endpoint, but I can't access that header or any response header other than

Code: Select all

Content-Type
when using JS

Code: Select all

fetch()
because the API doesn't specify Access-Control-Expose-Headers.

If you can add the access control header to expose the following headers it'll help us get the number of items and display it to the user:
  • Result-Total
  • Result-Pages
  • Result-Count

Re: Add Result headers to Access-Control-Expose-Headers

Posted: Tue Sep 22, 2026 11:32 pm
by SimproAPITeam
Hi,

Thanks for following up, and apologies for the confusion caused by our earlier reply — after digging into this further, good news: this is actually already possible today, it's just not obvious from the docs.

Type: "Deposit" is current and correct — it isn't tied to a legacy deposit mechanism. To control how much of the job is claimed on that deposit invoice, you set a Claim value per cost center in the request body, rather than a
single top-level amount field. You can specify the claim either as a fixed amount or as a percentage:

POST /api/v1.0/companies/{companyID}/invoices/
{
"Type": "Deposit",
"Jobs": [12345],
"PaymentTerms": {
"DueDate": "2026-10-15"
},
"CostCenters": [
{
"ID": 1,
"Claim": {
"ExTax": 500.00
}
}
]
}

Or to claim a percentage instead of a fixed amount:

"CostCenters": [
{ "ID": 1, "Claim": { "Percent": 20 } }
]

A few notes:
- If a job has multiple cost centers, include an entry (with its own Claim) for each one you want included in the deposit.
- We'd recommend using POST /api/v1.0/companies/{companyID}/invoices/ (not the job-scoped /jobs/{jobId}/invoices/ endpoint) going forward — the job-scoped version still works but is marked deprecated in the API reference.
- Once the invoice is created, you can retrieve a payment link for it via the invoice's getInvoicePaymentLink endpoint, which should complete your proposal → deposit invoice → payment link flow.

Let us know how you get on with this, or if you hit any validation errors with a specific job's cost center setup and we're happy to help troubleshoot further.

Kind regards,