Operations reference
Overview
This page lists every operation of the Fr8Labs API, grouped by module, with the scope each one needs. It is generated from the live API reference.
Base URL:
https://notification-hub.fr8labs.co/api/v1. Every path below is relative to it.Full details (every parameter, field, response and error code of each operation): https://notification-hub.fr8labs.co/api-docs.
Machine-readable reference (OpenAPI 3.1, public, no key needed):
GET https://notification-hub.fr8labs.co/api/v1/openapi.json. Use it to generate a client in your own language.
Every write has a preview. Each write below has a dry run at POST <path>/dry-runs, shown in the Preview column. It checks the request against your live data and writes nothing. The Dry run column says whether the write refuses to run without one. If-Match shows which writes change an existing record, and which version they need. See Writes: send, or preview first.
Every write needs an Idempotency-Key header.
Path parameters
Parameter | Meaning |
|---|---|
| The record's id, as the API returns it in |
|
|
| The quotation's numeric id or its quotation number |
| The numeric id |
|
|
| The house bill's id, as |
|
|
| The document's or asset's name in your ledger |
| The id in a write's |
Account
Any valid key can call these. No scope is needed.
Method | Path | What it does | Scope |
|---|---|---|---|
|
| Who is this key? (company, environment, scopes) | — (any valid key) |
|
| The outcome of a write whose result was not known when it was sent | — (any valid key) |
CRM
Needs the CRM module on. Reads need crm:read; writes need crm:write.
Reads
Method | Path | What it does | Scope |
|---|---|---|---|
|
| List CRM attachments (metadata) |
|
|
| List CRM contacts |
|
|
| Get one CRM contact |
|
|
| Count CRM leads and deals |
|
|
| List CRM deals |
|
|
| Get one CRM deal |
|
|
| Describe a CRM form |
|
|
| List CRM leads |
|
|
| Get one CRM lead |
|
|
| List CRM organizations |
|
|
| Get one CRM organization |
|
|
| Search the CRM |
|
|
| Your CRM site |
|
GET /crm/searchtakesq(at least 2 characters) and has its own limit of 20 calls a minute per key.Attachments are listed as details only (name, size, what they are attached to). Files cannot be downloaded through the API.
Writes
Method | Path | What it does | Scope | Preview (dry run) | Dry run | If-Match |
|---|---|---|---|---|---|---|
|
| Add a CRM contact |
|
| Optional | — |
|
| Edit a CRM contact |
|
| Optional | Yes ( |
|
| Open a CRM deal |
|
| Optional | — |
|
| Edit a CRM deal |
|
| Optional | Yes ( |
|
| Reassign a deal |
|
| Optional | Yes ( |
|
| Set a deal's status |
|
| Optional | Yes ( |
|
| Create a CRM lead |
|
| Optional | — |
|
| Edit a CRM lead |
|
| Optional | Yes ( |
|
| Reassign a lead |
|
| Optional | Yes ( |
|
| Set a lead's status |
|
| Optional | Yes ( |
|
| Log a call or visit note |
|
| Optional | — |
|
| Create a follow-up task |
|
| Optional | — |
|
| Edit a task |
|
| Optional | Yes ( |
Freight operations
Needs the Freight operations module on. Reads need actions:read; writes need actions:write. Buy-side data (buy amounts, costs, profit, markup, vendors) needs margin as well. See Authentication and keys.
Reads
Method | Path | What it does | Scope |
|---|---|---|---|
|
| Look up your charge codes |
|
|
| Get one invoice |
|
|
| Get one job |
|
|
| Get a job's costing lines |
|
|
| List a job's documents (metadata) |
|
|
| List living rates (vendor rate sheets) |
|
|
| Look up your partners (codes) |
|
|
| List quotation templates |
|
|
| List quotations |
|
|
| Get one quotation |
|
|
| List tasks across jobs |
|
GET /jobs/{id}/documentslists document details only. Files cannot be downloaded through the API.GET /living-rateslists vendor rate sheets without prices. The vendor is shown only withmargin.GET /partnersandGET /charge-codesreturn the exact codes the writes take (partnerCode,chargeCode). Search by part of a code or name, or look up onecode. Partners show identity details only: no credit, bank or contact data.
Writes
Method | Path | What it does | Scope | Preview (dry run) | Dry run | If-Match |
|---|---|---|---|---|---|---|
|
| Record a vendor's credit note against a job purchase invoice |
|
| Optional | — |
|
| Record a vendor's debit note against a job purchase invoice |
|
| Optional | — |
|
| Credit a job sales invoice |
|
| Optional | — |
|
| Debit a job sales invoice |
|
| Optional | — |
|
| Create an ocean or air job |
|
| Optional | — |
|
| Add a house bill to a job |
|
| Optional | — |
|
| Edit a house bill |
|
| Optional | Yes ( |
|
| Create a purchase invoice (vendor bill) draft on a job |
|
| Optional | — |
|
| Create a purchase invoice (vendor bill) draft from the job's costing |
|
| Optional | — |
|
| Create a sales invoice draft on a job |
|
| Optional | — |
|
| Create a sales invoice draft from the job's costing |
|
| Optional | — |
|
| Edit a job's master bill |
|
| Optional | Yes ( |
|
| Create a warehouse, trucking or other non-ocean / non-air job |
|
| Optional | — |
|
| Create a draft quotation |
|
| Optional | — |
|
| Mark a quotation accepted |
|
| Optional | — |
|
| Withdraw or decline a quotation |
|
| Optional | — |
|
| Convert an accepted quotation into a job |
|
| Optional | — |
|
| Mark a quotation as sent (no email) |
|
| Optional | — |
|
| Edit a quotation |
|
| Optional | Yes ( |
Invoices created here are drafts on a job. Posting a job invoice is done in FMS.
Credit and debit notes go against a posted job invoice that this API created (
{id}= itsinvoiceId). See Credit and debit notes below.A quotation goes through
create(draft) →mark-sent→accept→convert(to a job).mark-sentsends no email.
Accounting
Needs the Accounting module on, for the companies (legal entities) you picked. Reads need accounting:read; writes need accounting:write. Every accounting call names one of those companies in company: its name as it appears in your accounting system.
Reads
Method | Path | What it does | Scope |
|---|---|---|---|
|
| Read the asset register |
|
|
| Read one asset and its schedule |
|
|
| List bank and cash accounts |
|
|
| Where bank reconciliation stands |
|
|
| List postable cost centers |
|
|
| List ledger documents by state |
|
|
| Read one ledger document |
|
|
| List postable GL accounts |
|
|
| List freight invoices waiting to post to your ledger |
|
|
| List item tax templates |
|
|
| List ledger items |
|
|
| List a party's open invoices |
|
|
| List ledger customers or suppliers |
|
|
| Is a date open for posting? |
|
Writes
Method | Path | What it does | Scope | Preview (dry run) | Dry run | If-Match |
|---|---|---|---|---|---|---|
|
| Cancel a posted document this API created |
|
| Optional | Yes ( |
|
| Delete a draft this API created |
|
| Optional | Yes ( |
|
| Post a draft this API created |
|
| Optional | Yes ( |
|
| Create a journal entry draft |
|
| Optional | — |
|
| Create a payment entry draft (one currency) |
|
| Optional | — |
|
| Create a non-job purchase invoice draft |
|
| Optional | — |
|
| Record a supplier's credit note against a non-job purchase invoice |
|
| Optional | — |
|
| Record a supplier's debit note against a non-job purchase invoice |
|
| Optional | — |
|
| Create a non-job sales invoice draft |
|
| Optional | — |
|
| Credit a non-job sales invoice |
|
| Optional | — |
|
| Debit a non-job sales invoice |
|
| Optional | — |
|
| Create a customer or supplier (non-job) |
|
| Optional | — |
Invoices, journal entries and payments created here are drafts with no job behind them. Invoices for a job are created under Freight operations.
…/submitposts a draft that this API created. It does not post documents created anywhere else.…/cancelcancels a posted document this API created;…/deletedeletes a draft this API created. Once a payment or journal is applied to an invoice it is not cancelled through the API (MONEY_APPLIED): issue a credit note instead. A cancel needs your ledger to let the API user cancel that kind of document (PERMISSION_MISSINGotherwise; Fr8Labs sets this up).The answer to every accounting create carries
document.modified. Send it asIf-Matchon…/submitto post the draft: create, then post, is two calls.POST /partnersadds a customer or supplier for your ledger alone. If one already matches, it returns that one instead. See Partners and codes below.
Credit and debit notes
Corrections are new documents: a credit note lowers what is owed on an invoice, a debit note raises it. The original is never edited.
Only against a posted invoice this API created. Job invoices under Freight operations (
/invoices/{side}/{id}/…), non-job invoices under Accounting (/accounting/{sales|purchase}-invoices/{name}/…).Each line names a line of the original (
line, 1 = the first) or its charge, and what to credit or debit, before tax, in the invoice's currency:Job invoices (
/invoices/{side}/{id}/…): name the charge withchargeCode. SendquantityandunitPrice, exactly as on an invoice — the unit price may not be above the original's, and on a sales invoice the quantity may not be more than is left on the line;quantity × unitPricemust be whole cents. Or sendamount, and the API works out an exact quantity and unit price; when the original price cannot write the amount exactly in one line, the note gets two lines on that charge (the original price, and the few cents left over).Non-job invoices (
/accounting/…): name the item withitemCode, and sendamount.
Never more than is left. Earlier credit notes on the same charge count, drafts included (
NOTE_EXCEEDS_REMAINING). If a credit would leave part of a line impossible to credit later, the dry run warnsNOTE_STRANDS_REMAINDER.The note takes the original's customer or supplier, currency, exchange rate and tax. It is dated on or after the original, in the current month or later:
invoiceDateon a job note,postingDate(withcompany) on a non-job note.A vendor's note against a job purchase invoice needs
vendorInvoiceNo: the vendor's own number for it. A job sales note may carryreferenceNo. A supplier's note against a non-job purchase invoice may carrybillNoandbillDate.The note is a draft. A job note is posted in FMS; a non-job note with
…/submit.
Your own system's numbers
A non-job sales or purchase invoice can carry your own system's numbers for it: externalInvoiceNo (your invoice number) and externalJobNo (your job, booking or bill of lading number). Your accountants see them on the invoice in your ledger, can filter by them, and they come back on GET /accounting/documents/… and on every event for the invoice.
Set up at onboarding. Your ledger needs two fields for them, which Fr8Labs adds. Until then, a request that sends them is refused (
EXTERNAL_REFS_NOT_SET_UP): send the invoice without them, or ask support.One invoice of yours, once. A second invoice with the same
externalInvoiceNofor the same company is refused (DUPLICATE_EXTERNAL_INVOICE, with ours inmeta.existing). This is on top ofIdempotency-Key, which only covers retries of one request. Cancelled invoices and credit notes do not count.These are never Fr8Labs job numbers. A job invoice is created on its job (
/invoices/…), not here.
Partners and codes
Customers and suppliers are sent through the API, as they are created in your other system. Charge codes, accounts and taxes are set up with Fr8Labs once, at onboarding.
Charge codes are agreed before you go live. Map each of your own charges to one of your Fr8Labs charge codes, once. Then send our code on every line (
chargeCodeon freight,itemCodeon a non-job invoice).GET /charge-codeslists them. A new charge of yours needs a new mapping first. Until then, lines using it are refused as an unknown code. On your ledger, each charge code has an item with the same code, so the code fromGET /charge-codesalso works asitemCodeon a non-job invoice. If no item has that code, the dry run refuses the line and suggests close matches.POST /partnersneedsuse: "non-job". That is a customer or supplier for your ledger alone, used on invoices with no freight job. A partner that appears on freight jobs is created in FMS instead.Send your own code as
externalRef. Sending it again returns the same party, however long after, even if you renamed it.It never creates a duplicate by accident. Before creating, it looks for a party with the same
externalRef, the same tax id (taxId, for example a UEN), or the same name. Case, spacing and stray tabs are ignored, and parties that came from FMS are included.By default, one match is returned instead (
200,created: false, withmatchedBy).Several matches block the request (
PARTY_MATCH_AMBIGUOUS, with the candidates).A disabled match blocks too (
MATCHED_PARTY_DISABLED).To create a new party anyway, send
onMatch: "create"and acknowledge theDUPLICATE_RECORDwarning.
Use the returned
party.nameascustomer,supplierorpartyon accounting documents.New parties use the same groups as FMS. A new customer is filed under customer group "Commercial" and territory "All Territories", and a new supplier under supplier group "Services". The dry run's preview shows them (
customerGroup,territory,supplierGroup).
Example body:
{
"use": "non-job",
"company": "Example Logistics Pte Ltd",
"partyType": "customer",
"name": "Example Trading Pte Ltd",
"taxId": "201912345K",
"externalRef": "PTY-000123"
}Events
Needs the Accounting module. See Events and webhooks.
Method | Path | What it does | Scope |
|---|---|---|---|
|
| What changed on your invoices (payments, credits, cancellations) |
|
Webhooks deliver the same events to your own address; you set it in the portal (API access → Webhooks).
Reference
Method | Path | What it does | Scope |
|---|---|---|---|
|
| This reference, as OpenAPI 3.1 | None: public, no key needed |
Documentation owner: Fr8Labs Customer Success. Text reviewed: 18 October 2026.