Methods
GET
Retrieve Single Customer
/backend/api/v1/customers/ID - fetch customer with specified ID.
List Customers
/backend/api/v1/customers/ - list all customers.
Additional Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountNumber | string | No | Search for a customer by exact account number |
CRMReference | string | No | Search for a customer by exact CRM reference |
dropped | flag | No | Show only dropped customers |
active | flag | No | Show only active customers |
droppedSince | datetime | No | Only include customers dropped since |
reinstatedSince | datetime | No | Only include customers reinstated since |
numberActive | flag | No | When expanding numbers, only include active numbers |
serviceActive | flag | No | When expanding services, only include active services |
featureActive | flag | No | When expanding features, only include active features |
finalBill | flag | No | Show only customers in final bill status |
excludeFinalBill | flag | No | Exclude customers in final bill status |
Search Example:
# Find customer by account number
curl -H "Authorization: Bearer YOUR_API_KEY" \
"/backend/api/v1/customers?accountNumber=C12345"
# Find customer by CRM reference
curl -H "Authorization: Bearer YOUR_API_KEY" \
"/backend/api/v1/customers?CRMReference=CRM-12345"
# Exclude dropped customers from search
curl -H "Authorization: Bearer YOUR_API_KEY" \
"/backend/api/v1/customers?accountNumber=C12345&active=true"
Search Notes:
- The
accountNumberparameter performs an exact match - The
CRMReferenceparameter performs an exact match - Returns an array containing a single customer (or empty array if not found)
- Both account numbers and CRM references are unique, so searches return only one result
- Combining with filters like
activecan exclude dropped customers - Optimised for performance using indexed fields
Expand with Filtering Example:
# Get customer with only active numbers included
curl -H "Authorization: Bearer YOUR_API_KEY" \
"/backend/api/v1/customers/123?expandNumbers=true&numberActive=true"
# Get customer with active numbers and active features
curl -H "Authorization: Bearer YOUR_API_KEY" \
"/backend/api/v1/customers/123?expandNumbers=true&numberActive=true&expandFeatures=true&featureActive=true"
# List customers with only active services expanded
curl -H "Authorization: Bearer YOUR_API_KEY" \
"/backend/api/v1/customers?expandServices=true&serviceActive=true"
POST
/backend/api/v1/customers/ - add a new customer, the newly-added customer will be returned.
PATCH
/backend/api/v1/customers/ID - update customer with specified ID. The modified customer will be returned.
DELETE
/backend/api/v1/customers/ID - schedule deletion of customer with specified ID. The current details of the customer will be returned, and the customer record (including all resources linked to the customer) will be completely purged in 30 days.
Actions
Available Actions
drop
Drop (deactivate) a customer. This action changes the customer’s status to dropped and records the drop date.
Parameters:
status(required) - The status name for the dropped customer (e.g., “Ex-Customer”)dateDrop(required) - The date the customer was dropped (format: YYYY-MM-DD)cancellationNoticeGivenDate(optional) - The date cancellation notice was givenstatusReason(optional) - Text explanation for dropping the customerignoreTrafficNumberType(optional) - How to handle traffic on the customer’s numbers after dropping
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=drop \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Ex-Customer",
"dateDrop": "2025-01-24",
"statusReason": "Customer requested cancellation"
}'
reinstate
Reinstate a previously dropped customer, returning them to active status.
Parameters:
status(required) - The status name for the reinstated customer (e.g., “Active”)dateReinstate(required) - The date the customer is reinstated (format: YYYY-MM-DD)dateReinstateNumbersFeatures(optional) - Date to also reinstate the customer’s numbers and features that were dropped on this datestatusReason(optional) - Text explanation for reinstating the customer
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=reinstate \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Active",
"dateReinstate": "2025-01-24"
}'
finalBill
Mark the customer as ready for their final bill. The actual final bill will be generated during the next billing run.
Parameters:
status(required) - The status name for the final bill status (e.g., “Final Bill”)dateFinalBill(required) - The date the customer will be billed until (format: YYYY-MM-DD)cancellationNoticeGivenDate(optional) - The date cancellation notice was givenstatusReason(optional) - Text explanation for setting this customer to final bill status
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=finalBill \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Final Bill",
"dateFinalBill": "2025-01-24"
}'
generatePIN
Generate a new PIN for the customer.
Response: Returns only the generated PIN, not the full customer record.
{
"pin": "1234"
}
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=generatePIN \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
addSharedContact
Add a shared contact to the customer.
Parameters:
sharedContactID(required) - The ID of the shared contact to add
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=addSharedContact \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sharedContactID": 456
}'
removeSharedContact
Remove a shared contact from the customer.
Parameters:
sharedContactID(required) - The ID of the shared contact to remove
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=removeSharedContact \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sharedContactID": 456
}'
linkToXero
Link the customer to Xero accounting system.
Parameters:
xeroID(required) - The UUID of the customer in Xero
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=linkToXero \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"xeroID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
unlinkFromXero
Unlink the customer from Xero accounting system.
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=unlinkFromXero \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
restoreCalls
Restore deleted calls for the customer.
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=restoreCalls \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
writeOffDebt
Write off any outstanding debt for the customer. This action creates a credit note for the full outstanding amount, leaving the customer’s balance at zero. The customer must be dropped before performing this action.
Parameters:
dateWriteoff(required) - The date the debt is written off (format: YYYY-MM-DD)vatTreatment(optional) - How VAT should be handled on the write-off:standard(default) - Apply VAT pro-rata based on original transactionsvat_exempt- Create VAT-exempt write-off (no VAT reclaim)
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=writeOffDebt \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dateWriteoff": "2025-01-24"
}'
writeOffCredit
Write off any outstanding credit balance for the customer. This action creates a debit note to reclaim the customer’s credit, leaving the balance at zero. The customer must be dropped and must have a credit balance (no outstanding debt) before performing this action.
Parameters:
dateWriteoff(required) - The date the credit is written off (format: YYYY-MM-DD)vatTreatment(optional) - How VAT should be handled on the write-off:standard(default) - Apply VAT pro-rata based on original transactionsvat_exempt- Create VAT-exempt write-off
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=writeOffCredit \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dateWriteoff": "2025-01-24"
}'
generatePaymentLinks
Generate no-login payment URLs for the customer. The customer must have a MyAccount profile assigned.
Response: Returns the payment link UUID and an array of available links (not the full customer record). The available links depend on the customer’s MyAccount profile and configured payment providers.
{
"success": true,
"paymentLinkUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"links": [
{
"type": "cardPayment",
"providerName": "Stripe",
"label": "Card Payment (Stripe)",
"url": "https://..."
},
{
"type": "directDebitSetup",
"providerName": "GoCardless",
"label": "Direct Debit Setup (GoCardless)",
"url": "https://..."
}
]
}
If no payment methods are enabled, the response contains an empty links array:
{
"success": true,
"paymentLinkUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"links": []
}
Error codes:
500521- Payment link generation failed
Example:
curl -X POST https://example.com/backend/api/v1/customers/123?action=generatePaymentLinks \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Response Format
Unless otherwise stated (e.g., generatePIN, generatePaymentLinks), actions return the updated customer object in JSON format, using the same structure as GET requests.
Error Handling
If an action fails, the API will return an appropriate HTTP status code with error details:
{
"error": "Invalid Action",
"error_code": 400502,
"hint": "The action was not performed"
}
Common error codes:
400501- Action not recognised400502- Action failed to execute400503- Missing required parameters403xxx- Permission denied
Fields
| Field | Name | Type | Description |
|---|---|---|---|
| title | Title | Preset Value | Customer title (e.g., Mr, Mrs, Ms) |
| firstnames | First Names | Text | Customer first name(s) |
| lastname | Last Name | Text | Customer last name |
| companyName | Company Name | Text | Name of the customer company or organisation |
| customerAKA | Customer Also Known As | Text | Alternative name for the customer or company |
| billToName | Bill-To Name | Text | Name to appear on invoices |
| billToDepartment | Bill-To Department | Text | Department to appear on invoices |
| address1 | Address Line 1 | Text | First line of customer address |
| address2 | Address Line 2 | Text | Second line of customer address |
| address3 | Address Line 3 | Text | Third line of customer address |
| address4 | Address Line 4 | Text | Fourth line of customer address (typically city) |
| address5 | Address Line 5 | Text | Fifth line of customer address (typically county/state) |
| postcode | Postcode | Text | Postal/zip code for customer address |
| country | Country | Preset Value | Country code for customer location |
| number1type | Number 1 Type | Preset Value | Type of the first contact number |
| number1 | Number 1 | Text | First contact number for the customer |
| number1SubType | Number 1 Sub Type | Preset Value | |
| number1RenewalDate | Number 1 Renewal Date | Date | |
| number2type | Number 2 Type | Preset Value | Type of the second contact number |
| number2 | Number 2 | Text | Second contact number for the customer |
| number2SubType | Number 2 Sub Type | Preset Value | |
| number3type | Number 3 Type | Preset Value | Type of the third contact number |
| number3 | Number 3 | Text | Third contact number for the customer |
| number3SubType | Number 3 Sub Type | Preset Value | Subtype of the third contact number |
| number3RenewalDate | Number 3 Renewal Date | Date | Renewal date for the third contact number or service |
| number4type | Number 4 Type | Preset Value | |
| number4 | Number 4 | Text | |
| number4SubType | Number 4 Sub Type | Preset Value | |
| number4RenewalDate | Number 4 Renewal Date | Date | |
| Email Address | Text | Primary email address for the customer | |
| website | Website | Text | Customer website URL |
| internalUse | Internal Use | Text | Notes for internal use only, not visible to customers |
| CRMReference | CRM Reference | Text | Reference number from external CRM system |
| customerClass | Customer Class | Preset Value | Classification of customer type |
| customerGroups | Customer Groups | Preset Value(s) | Array of customer group names the customer belongs to |
| accountNumber | Account Number | Text | Unique account number assigned to the customer |
| internalAccountNumber | Internal Account Number | Text | Account number used for internal reference |
| customerReference | Customer Reference | Text | Reference number provided by the customer |
| billingCycle | Billing Cycle | Preset Value | Frequency of invoice generation for this customer |
| accountManager | Account Manager | Preset Value | Name of the account manager for this customer |
| language | Language | Preset Value | Name of the preferred language for customer communications |
| currency | Currency | Preset Value | Currency code for customer billing |
| paymentMethod | Payment Method | Preset Value | Payment method name used by this customer |
| paymentTerms | Payment Terms | Number | Number of days/months for payment terms |
| paymentTermsType | Payment Terms Type | Preset Value | Unit type name for payment terms |
| paymentGraceDays | Grace Period (Days) | Number | Number of extra days after the due date before invoices are treated as overdue for this customer (falls back to payment method Grace Period when unset). |
| VATRate | VAT Rate | Preset Value | VAT rate name applied to customer invoices |
| VATRateCalls | VAT Rate (Calls) | Preset Value | VAT rate name applied specifically to call charges |
| customerVATNumber | Customer’s VAT Number | Text | Customer’s VAT registration number |
| status | Customer Status | Preset Value | Current status name of the customer account |
| statusChangedStamp | Status Changed Date | Date | Date when the customer status was last changed |
| updatedDate | Dropped / Reinstated Date | Date | Date when the customer was last dropped or reinstated |
| statusReason | Status Reason | Preset Value | Reason name for the current customer status |
| enteredDate | Entered Date | Date | Date when the customer record was first created |
| contractStartDate | Contract Start Date | Date | Date when the customer contract began |
| contractEndDate | Contract End Date | Date | Date when the customer contract expires |
| cancellationNoticeGivenDate | Cancellation Notice Given | Date | Date when the customer gave notice of cancellation |
| annualIncreaseReferenceDate | Annual Increase Reference Date | Date | Date when the next annual increase is due for this customer |
| annualIncreaseProfile | Annual Increase Profile | Preset Value | Annual increase profile name for this customer |
| securityCode | Security Code | Text | Additional security code for customer verification |
| accountFlags | Account Flags | Preset Value(s) | Array of account flag names applied to this customer |
| companyNumber | Company Number | Text | Official registration number of the company |
| countryOfIncorporation | Country of Incorporation | Text | Country where the company is legally registered |
| dateOfIncorporation | Date of Incorporation | Date | Date when the company was legally formed |
| primarySICCode | Primary SIC Code | Text | Primary Standard Industrial Classification code for the company |
| SICCodes | SIC Codes | Text | All Standard Industrial Classification codes for the company |
| industryType | Industry Type | Preset Value | Industry type name for the company |
| companiesHouseStatus | Status at Companies House | Preset Value | Companies House status name for the company |
| companiesHouseUpdatedDate | Updated from Companies House | Date | Date when the company information was last updated from Companies House |
| employees | Employees | Number | Number of employees in the company |
| turnover | Turnover | Currency | Annual turnover of the company |
| netAssets | Net Assets | Currency | Total net assets of the company |
| profileCheckedDate | Profile Checked | Date | Date when the customer profile was last verified |
| expectedSpend | Expected Spend | Currency | Expected monthly spend for this customer |
| customerProducts | Customer Products | Preset Value(s) | Array of product names associated with this customer |
| customerProductInterests | Customer Product Interests | Preset Value(s) | Array of product names the customer has expressed interest in |
| fixedFeeTariff | Fixed Fee Tariff | Preset Value | Name of the fixed fee tariff applied to this customer |
| defaultInboundTariff | Inbound Tariff | Preset Value | Name of the default tariff used for inbound calls |
| defaultInboundMarkup | Inbound Markup | Number | Percentage markup applied for inbound calls when the selected tariff has no rate |
| defaultNationalTariff | National Tariff | Preset Value | Name of the default tariff used for national calls |
| defaultNationalMarkup | National Markup | Number | Percentage markup applied for national calls when the selected tariff has no rate |
| defaultMobileTariff | Mobile Tariff | Preset Value | Name of the default tariff used for mobile calls |
| defaultMobileMarkup | Mobile Markup | Number | Percentage markup applied for mobile calls when the selected tariff has no rate |
| defaultNongeographicTariff | Non-geographic Tariff | Preset Value | Name of the default tariff used for non-geographic calls |
| defaultNongeographicMarkup | Non-geographic Markup | Number | Percentage markup applied for non-geographic calls when the selected tariff has no rate |
| defaultServiceNumbersTariff | Service Numbers Tariff | Preset Value | Name of the default tariff used for service number calls |
| defaultServiceNumbersMarkup | Service Numbers Markup | Number | Percentage markup applied for service number calls when the selected tariff has no rate |
| defaultInternationalTariff | International Tariff | Preset Value | Name of the default tariff used for international calls |
| defaultInternationalMarkup | International Markup | Number | Percentage markup applied for international calls when the selected tariff has no rate |
| defaultExtendedInternationalTariff | Extended International Tariff | Preset Value | |
| defaultExtendedInternationalMarkup | Extended International Markup | Number | Percentage markup applied for extended international calls when the selected tariff has no rate |
| defaultSurchargesTariff | Surcharges Tariff | Preset Value | Name of the default tariff used for surcharges |
| defaultSurchargesMarkup | Surcharges Markup | Number | Percentage markup applied for surcharges when the selected tariff has no rate |
| defaultBespokeTariff1 | Bespoke Tariff 1 | Preset Value | Name of the default tariff used for bespoke tariff 1 |
| defaultBespokeTariff1Markup | Bespoke Tariff 1 Markup | Number | Percentage markup applied for bespoke tariff 1 calls when the selected tariff has no rate |
| defaultBespokeTariff2 | Bespoke Tariff 2 | Preset Value | Name of the default tariff used for bespoke tariff 2 |
| defaultBespokeTariff2Markup | Bespoke Tariff 2 Markup | Number | Percentage markup applied for bespoke tariff 2 calls when the selected tariff has no rate |
| fallbackMarkupSuggested | Fallback Suggested Retail Markup | Number | Suggested retail markup applied as a last resort when rates are missing and no per-class markup applies |
| fallbackMarkup | Fallback Markup | Number | Wholesale markup applied as a last resort when rates are missing and no per-class markup applies |
| dealerCode | Dealer Code | Preset Value | Dealer name associated with this customer |
| soldBy | Sold By | Preset Value | Name of the user who sold to this customer |
| commissionHolder | Commission Holder | Preset Value | Name of the user who receives commission for this customer |
| commissionReferenceDate | Commission Reference Date | Date | Reference date for commission calculations |
| leadSource | Lead Source | Preset Value | Name of the lead source for this customer |
| leadDetails | Lead Details | Text | Additional details about the customer lead |
| saleType | Sale Type | Preset Value | Name of the sale type for this customer |
| saleDepartment | Sale Department | Text | Department responsible for the sale |
| loginFlags | Legacy Stats Site | Preset Value(s) | Array of login feature names allowed for this customer |
| enhancedLoginFlags | Legacy Enhanced Stats Site | Preset Value(s) | Array of enhanced login feature names allowed for this customer |
| myAccountCustomerProfile | MyAccount Profile | Preset Value | Name of the MyAccount profile configuration for this customer |
| emptyInvoiceAction | Empty Invoices | Preset Value | Name of the action to take when an invoice would be empty |
| emptyInvoiceActionValue | Empty Invoice Value | Number | Value to use with the empty invoice action |
| lowInvoiceDetect | Low Invoice | Preset Value | Name of the method to detect low-value invoices |
| lowInvoiceDetectValue | Low Invoice Value | Number | Threshold value for detecting low-value invoices |
| lowInvoiceAction | Low Invoice Action | Preset Value | Name of the action to take for low-value invoices |
| lowInvoiceActionValue | Low Invoice Action Value | Number | Value to use with the low invoice action |
| billStyle | Bill Style | Preset Value | Name of the visual style to use for customer invoices |
| shortBillPages | Short Bill Pages | Preset Value(s) | Array of page names to include in short customer invoices |
| longBillPages | Long Bill Pages | Preset Value(s) | Array of page names to include in long customer invoices |
| onlineBillType | Online Bill | Preset Value | Name of the bill type to generate for online viewing |
| emailBillType | Email Bill | Preset Value | Name of the bill type to generate for email delivery |
| postBillType | Post Bill | Preset Value | Name of the bill type to generate for postal delivery |
| faxBillType | Fax Bill | Preset Value | Name of the bill type to generate for fax delivery |
| defaultInvoiceMessage | Default Invoice Message | Preset Value | Name of the default message to include on customer invoices |
| nextInvoiceMessage | Next Invoice Message | Preset Value | Name of the message to include on the next customer invoice only |
| invoiceUsageReportCustomerProfile | Invoice Usage Report | Preset Value | Name of the usage report configuration for customer invoices |
| purchaseOrderNumber | Purchase Order Number | Text | Customer’s Purchase Order Number to include on invoices |
| creditController | Credit Controller | Preset Value | Name of the user responsible for credit control of this customer |
| creditLimit | Credit Limit | Currency | Maximum amount of credit extended to this customer |
| creditLimitCalls | Unbilled Calls Credit Limit | Currency | Maximum unbilled call charges allowed for this customer |
| creditLimitOverdue | Overdue Invoices Credit Limit | Currency | Maximum overdue amount allowed for this customer |
| autoTopupProfile | Auto Topup Profile | Preset Value | Name of the profile for automatic account balance top-ups |
| autoTopupAmount | Auto Topup Amount | Currency | Amount to top up automatically when triggered |
| carrierCallAllocation | Bill Calls From | Preset Value | Name of the call data source for billing this customer |
| id | Customer ID | Text | The unique identifier for this customer |
| billTypes | Bill Types | Preset Value(s) | |
| countryCode | Country Code | Text | ISO country code for customer location |