Customers

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
ParameterTypeRequiredDescription
accountNumberstringNoSearch for a customer by exact account number
CRMReferencestringNoSearch for a customer by exact CRM reference
droppedflagNoShow only dropped customers
activeflagNoShow only active customers
droppedSincedatetimeNoOnly include customers dropped since
reinstatedSincedatetimeNoOnly include customers reinstated since
numberActiveflagNoWhen expanding numbers, only include active numbers
serviceActiveflagNoWhen expanding services, only include active services
featureActiveflagNoWhen expanding features, only include active features
finalBillflagNoShow only customers in final bill status
excludeFinalBillflagNoExclude 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 accountNumber parameter performs an exact match
  • The CRMReference parameter 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 active can 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 given
  • statusReason (optional) - Text explanation for dropping the customer
  • ignoreTrafficNumberType (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 date
  • statusReason (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 given
  • statusReason (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 transactions
    • vat_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 transactions
    • vat_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"
  }'

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 recognised
  • 400502 - Action failed to execute
  • 400503 - Missing required parameters
  • 403xxx - Permission denied

Fields

FieldNameTypeDescription
titleTitlePreset ValueCustomer title (e.g., Mr, Mrs, Ms)
firstnamesFirst NamesTextCustomer first name(s)
lastnameLast NameTextCustomer last name
companyNameCompany NameTextName of the customer company or organisation
customerAKACustomer Also Known AsTextAlternative name for the customer or company
billToNameBill-To NameTextName to appear on invoices
billToDepartmentBill-To DepartmentTextDepartment to appear on invoices
address1Address Line 1TextFirst line of customer address
address2Address Line 2TextSecond line of customer address
address3Address Line 3TextThird line of customer address
address4Address Line 4TextFourth line of customer address (typically city)
address5Address Line 5TextFifth line of customer address (typically county/state)
postcodePostcodeTextPostal/zip code for customer address
countryCountryPreset ValueCountry code for customer location
number1typeNumber 1 TypePreset ValueType of the first contact number
number1Number 1TextFirst contact number for the customer
number1SubTypeNumber 1 Sub TypePreset Value
number1RenewalDateNumber 1 Renewal DateDate
number2typeNumber 2 TypePreset ValueType of the second contact number
number2Number 2TextSecond contact number for the customer
number2SubTypeNumber 2 Sub TypePreset Value
number3typeNumber 3 TypePreset ValueType of the third contact number
number3Number 3TextThird contact number for the customer
number3SubTypeNumber 3 Sub TypePreset ValueSubtype of the third contact number
number3RenewalDateNumber 3 Renewal DateDateRenewal date for the third contact number or service
number4typeNumber 4 TypePreset Value
number4Number 4Text
number4SubTypeNumber 4 Sub TypePreset Value
number4RenewalDateNumber 4 Renewal DateDate
emailEmail AddressTextPrimary email address for the customer
websiteWebsiteTextCustomer website URL
internalUseInternal UseTextNotes for internal use only, not visible to customers
CRMReferenceCRM ReferenceTextReference number from external CRM system
customerClassCustomer ClassPreset ValueClassification of customer type
customerGroupsCustomer GroupsPreset Value(s)Array of customer group names the customer belongs to
accountNumberAccount NumberTextUnique account number assigned to the customer
internalAccountNumberInternal Account NumberTextAccount number used for internal reference
customerReferenceCustomer ReferenceTextReference number provided by the customer
billingCycleBilling CyclePreset ValueFrequency of invoice generation for this customer
accountManagerAccount ManagerPreset ValueName of the account manager for this customer
languageLanguagePreset ValueName of the preferred language for customer communications
currencyCurrencyPreset ValueCurrency code for customer billing
paymentMethodPayment MethodPreset ValuePayment method name used by this customer
paymentTermsPayment TermsNumberNumber of days/months for payment terms
paymentTermsTypePayment Terms TypePreset ValueUnit type name for payment terms
paymentGraceDaysGrace Period (Days)NumberNumber 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).
VATRateVAT RatePreset ValueVAT rate name applied to customer invoices
VATRateCallsVAT Rate (Calls)Preset ValueVAT rate name applied specifically to call charges
customerVATNumberCustomer’s VAT NumberTextCustomer’s VAT registration number
statusCustomer StatusPreset ValueCurrent status name of the customer account
statusChangedStampStatus Changed DateDateDate when the customer status was last changed
updatedDateDropped / Reinstated DateDateDate when the customer was last dropped or reinstated
statusReasonStatus ReasonPreset ValueReason name for the current customer status
enteredDateEntered DateDateDate when the customer record was first created
contractStartDateContract Start DateDateDate when the customer contract began
contractEndDateContract End DateDateDate when the customer contract expires
cancellationNoticeGivenDateCancellation Notice GivenDateDate when the customer gave notice of cancellation
annualIncreaseReferenceDateAnnual Increase Reference DateDateDate when the next annual increase is due for this customer
annualIncreaseProfileAnnual Increase ProfilePreset ValueAnnual increase profile name for this customer
securityCodeSecurity CodeTextAdditional security code for customer verification
accountFlagsAccount FlagsPreset Value(s)Array of account flag names applied to this customer
companyNumberCompany NumberTextOfficial registration number of the company
countryOfIncorporationCountry of IncorporationTextCountry where the company is legally registered
dateOfIncorporationDate of IncorporationDateDate when the company was legally formed
primarySICCodePrimary SIC CodeTextPrimary Standard Industrial Classification code for the company
SICCodesSIC CodesTextAll Standard Industrial Classification codes for the company
industryTypeIndustry TypePreset ValueIndustry type name for the company
companiesHouseStatusStatus at Companies HousePreset ValueCompanies House status name for the company
companiesHouseUpdatedDateUpdated from Companies HouseDateDate when the company information was last updated from Companies House
employeesEmployeesNumberNumber of employees in the company
turnoverTurnoverCurrencyAnnual turnover of the company
netAssetsNet AssetsCurrencyTotal net assets of the company
profileCheckedDateProfile CheckedDateDate when the customer profile was last verified
expectedSpendExpected SpendCurrencyExpected monthly spend for this customer
customerProductsCustomer ProductsPreset Value(s)Array of product names associated with this customer
customerProductInterestsCustomer Product InterestsPreset Value(s)Array of product names the customer has expressed interest in
fixedFeeTariffFixed Fee TariffPreset ValueName of the fixed fee tariff applied to this customer
defaultInboundTariffInbound TariffPreset ValueName of the default tariff used for inbound calls
defaultInboundMarkupInbound MarkupNumberPercentage markup applied for inbound calls when the selected tariff has no rate
defaultNationalTariffNational TariffPreset ValueName of the default tariff used for national calls
defaultNationalMarkupNational MarkupNumberPercentage markup applied for national calls when the selected tariff has no rate
defaultMobileTariffMobile TariffPreset ValueName of the default tariff used for mobile calls
defaultMobileMarkupMobile MarkupNumberPercentage markup applied for mobile calls when the selected tariff has no rate
defaultNongeographicTariffNon-geographic TariffPreset ValueName of the default tariff used for non-geographic calls
defaultNongeographicMarkupNon-geographic MarkupNumberPercentage markup applied for non-geographic calls when the selected tariff has no rate
defaultServiceNumbersTariffService Numbers TariffPreset ValueName of the default tariff used for service number calls
defaultServiceNumbersMarkupService Numbers MarkupNumberPercentage markup applied for service number calls when the selected tariff has no rate
defaultInternationalTariffInternational TariffPreset ValueName of the default tariff used for international calls
defaultInternationalMarkupInternational MarkupNumberPercentage markup applied for international calls when the selected tariff has no rate
defaultExtendedInternationalTariffExtended International TariffPreset Value
defaultExtendedInternationalMarkupExtended International MarkupNumberPercentage markup applied for extended international calls when the selected tariff has no rate
defaultSurchargesTariffSurcharges TariffPreset ValueName of the default tariff used for surcharges
defaultSurchargesMarkupSurcharges MarkupNumberPercentage markup applied for surcharges when the selected tariff has no rate
defaultBespokeTariff1Bespoke Tariff 1Preset ValueName of the default tariff used for bespoke tariff 1
defaultBespokeTariff1MarkupBespoke Tariff 1 MarkupNumberPercentage markup applied for bespoke tariff 1 calls when the selected tariff has no rate
defaultBespokeTariff2Bespoke Tariff 2Preset ValueName of the default tariff used for bespoke tariff 2
defaultBespokeTariff2MarkupBespoke Tariff 2 MarkupNumberPercentage markup applied for bespoke tariff 2 calls when the selected tariff has no rate
fallbackMarkupSuggestedFallback Suggested Retail MarkupNumberSuggested retail markup applied as a last resort when rates are missing and no per-class markup applies
fallbackMarkupFallback MarkupNumberWholesale markup applied as a last resort when rates are missing and no per-class markup applies
dealerCodeDealer CodePreset ValueDealer name associated with this customer
soldBySold ByPreset ValueName of the user who sold to this customer
commissionHolderCommission HolderPreset ValueName of the user who receives commission for this customer
commissionReferenceDateCommission Reference DateDateReference date for commission calculations
leadSourceLead SourcePreset ValueName of the lead source for this customer
leadDetailsLead DetailsTextAdditional details about the customer lead
saleTypeSale TypePreset ValueName of the sale type for this customer
saleDepartmentSale DepartmentTextDepartment responsible for the sale
loginFlagsLegacy Stats SitePreset Value(s)Array of login feature names allowed for this customer
enhancedLoginFlagsLegacy Enhanced Stats SitePreset Value(s)Array of enhanced login feature names allowed for this customer
myAccountCustomerProfileMyAccount ProfilePreset ValueName of the MyAccount profile configuration for this customer
emptyInvoiceActionEmpty InvoicesPreset ValueName of the action to take when an invoice would be empty
emptyInvoiceActionValueEmpty Invoice ValueNumberValue to use with the empty invoice action
lowInvoiceDetectLow InvoicePreset ValueName of the method to detect low-value invoices
lowInvoiceDetectValueLow Invoice ValueNumberThreshold value for detecting low-value invoices
lowInvoiceActionLow Invoice ActionPreset ValueName of the action to take for low-value invoices
lowInvoiceActionValueLow Invoice Action ValueNumberValue to use with the low invoice action
billStyleBill StylePreset ValueName of the visual style to use for customer invoices
shortBillPagesShort Bill PagesPreset Value(s)Array of page names to include in short customer invoices
longBillPagesLong Bill PagesPreset Value(s)Array of page names to include in long customer invoices
onlineBillTypeOnline BillPreset ValueName of the bill type to generate for online viewing
emailBillTypeEmail BillPreset ValueName of the bill type to generate for email delivery
postBillTypePost BillPreset ValueName of the bill type to generate for postal delivery
faxBillTypeFax BillPreset ValueName of the bill type to generate for fax delivery
defaultInvoiceMessageDefault Invoice MessagePreset ValueName of the default message to include on customer invoices
nextInvoiceMessageNext Invoice MessagePreset ValueName of the message to include on the next customer invoice only
invoiceUsageReportCustomerProfileInvoice Usage ReportPreset ValueName of the usage report configuration for customer invoices
purchaseOrderNumberPurchase Order NumberTextCustomer’s Purchase Order Number to include on invoices
creditControllerCredit ControllerPreset ValueName of the user responsible for credit control of this customer
creditLimitCredit LimitCurrencyMaximum amount of credit extended to this customer
creditLimitCallsUnbilled Calls Credit LimitCurrencyMaximum unbilled call charges allowed for this customer
creditLimitOverdueOverdue Invoices Credit LimitCurrencyMaximum overdue amount allowed for this customer
autoTopupProfileAuto Topup ProfilePreset ValueName of the profile for automatic account balance top-ups
autoTopupAmountAuto Topup AmountCurrencyAmount to top up automatically when triggered
carrierCallAllocationBill Calls FromPreset ValueName of the call data source for billing this customer
idCustomer IDTextThe unique identifier for this customer
billTypesBill TypesPreset Value(s)
countryCodeCountry CodeTextISO country code for customer location

Still Didn’t Find Your Answer?

For assistance, please contact us below.

Submit a ticket