Customers API

34 PracBill API endpoints for customers. Base URL https://billing.pracbill.com.au/api.

Create a customer (api_key last)

POST /customer/add/{api_key}

Alternative URI for /{api_key}/customer/add with the API token as the final segment. Same handler and behaviour.

Request body

FieldTypeDescription
cidintegerExplicit customer id to insert (normally omitted so one is assigned).
companystringCompany Name
namestringfirst name
surnamestringlast name
emailstringcustomer email address
mobilestringmobile phone contact number
phonestringprimary contact number
web_passwordstringcustomer portal password (create only, write-only). Stored only as a bcrypt hash and never returned.
dobstringcustomer date of birth (converted with AppDate::toDBDate, so common date formats are accepted)
abnstringabn for business
paymethodstringthe payment method to use ( Invoice, Credit Card, Direct Debit )
ctgidintegercall rates id for this customer, only need if custom rates are required for this customer
price_book_idintegerprice book id for this customer. only need if custom prices are required for this customer
expected_revenuenumbermonthly expected revenue
minimum_spendnumberminimum spend requirements
credit_limitnumberthe total credit limit we should apply to this customer
termsintegerthe number of days before an invoice is due
billinggroupstringthe billing group
reseller_cidintegerthe reseller ( customer id ) that referred this customer
trading_namestringCompany Trading Name
agreement_startstringWhen does the current agreement start
agreement_endstringWhen does the current agreement end
currencystringThe Specific currency to use for this customer, not required if they are using the department default
do_not_send_invoicebooleanset to true to not email invoices to customer
customers_idstringyour own external identifier for this customer. Opaque to the platform; not validated or checked for uniqueness. Can also be used in place of the customer id when retrieving a customer.
bank_namestringthe name on the bank account
bank_numberstringthe account number on the bank account
bank_bsbstringthe 6 digit bsb on the bank account
card_tokenstringGateway card token; stored as the customer's ezypay_id.
full_addressstringfull address string saved as the customer's primary address ( Address will be looked up using Google )
create_in_xerobooleanWhen true, the customer is also created in Xero and the response includes xero_id.

Responses

  • 200 — Customer created (or an error envelope with success=false)

Price POS applications and screens

POST /customer/register/applications/{api_key}

Calculate the monthly fee for the requested numbers of applications and screens, plus the setup product. Amounts are number_format strings. Note the API key is the LAST path segment.

Request body

FieldTypeDescription
applicationsRequiredintegerNumber of POS applications/stations
screensRequiredintegerNumber of screens

Responses

  • 200 — Pricing breakdown

Check a registration for duplicates

POST /customer/register/check/{api_key}

POS self-registration pre-check: fails if the department email already belongs to a customer or the company name already matches a department. Note the API key is the LAST path segment.

Request body

FieldTypeDescription
proposalNumberintegerWhen present the duplicate checks are skipped.
departmentobject

Responses

  • 200 — {success:1} when OK, otherwise an error envelope

Price POS hardware

POST /customer/register/hardware/{api_key}

Same calculation as /customer/register/applications but returns the setup service-type fee (setupFee) instead of the setup product. Note the API key is the LAST path segment.

Request body

FieldTypeDescription
applicationsRequiredintegerNumber of POS applications/stations
screensRequiredintegerNumber of screens

Responses

  • 200 — Pricing breakdown

Submit a proposal request

POST /customer/register/proposal/submit/{api_key}

Creates a customer from customerDetails and an internal 'New Customer Registration' helpdesk job with a readable note. Note the API key is the LAST path segment.

Request body

FieldTypeDescription
customerDetailsobject

Responses

  • 200 — Proposal request submitted

Get a proposal

POST /customer/register/proposal/{api_key}

Fetch a quote (proposal) with its items grouped by reporting category, together with the customer/lead details and the original registration data. Note the API key is the LAST path segment.

Request body

FieldTypeDescription
proposalNumber requiredintegerQuote id (quotes.qid)

Responses

  • 200 — Proposal (or an error envelope)

Submit a POS registration

POST /customer/register/submit/{api_key}

Creates the customer, a new department (with default POS settings and an initial user), a 'New Customer Registration' helpdesk job, base/setup/application/screen engineering records and the login email. Returns only {success:true}. Note the API key is the LAST path segment.

Request body

FieldTypeDescription
proposalNumberintegerWhen present, the customer is taken from the existing quote instead of being created.
customerDetailsobject
paymentDetailsobject
softwareApplicationsobject

Responses

  • 200 — Registration submitted

Create a customer

POST /{api_key}/customer/add

Create a customer. Available at both /{api_key}/customer/add and the alternative form /customer/add/{api_key}. If the API key is configured with create_order, an order and note are also created.

Request body

FieldTypeDescription
cidintegerExplicit customer id to insert (normally omitted so one is assigned).
companystringCompany Name
namestringfirst name
surnamestringlast name
emailstringcustomer email address
mobilestringmobile phone contact number
phonestringprimary contact number
web_passwordstringcustomer portal password (create only, write-only). Stored only as a bcrypt hash and never returned.
dobstringcustomer date of birth (converted with AppDate::toDBDate, so common date formats are accepted)
abnstringabn for business
paymethodstringthe payment method to use ( Invoice, Credit Card, Direct Debit )
ctgidintegercall rates id for this customer, only need if custom rates are required for this customer
price_book_idintegerprice book id for this customer. only need if custom prices are required for this customer
expected_revenuenumbermonthly expected revenue
minimum_spendnumberminimum spend requirements
credit_limitnumberthe total credit limit we should apply to this customer
termsintegerthe number of days before an invoice is due
billinggroupstringthe billing group
reseller_cidintegerthe reseller ( customer id ) that referred this customer
trading_namestringCompany Trading Name
agreement_startstringWhen does the current agreement start
agreement_endstringWhen does the current agreement end
currencystringThe Specific currency to use for this customer, not required if they are using the department default
do_not_send_invoicebooleanset to true to not email invoices to customer
customers_idstringyour own external identifier for this customer. Opaque to the platform; not validated or checked for uniqueness. Can also be used in place of the customer id when retrieving a customer.
bank_namestringthe name on the bank account
bank_numberstringthe account number on the bank account
bank_bsbstringthe 6 digit bsb on the bank account
card_tokenstringGateway card token; stored as the customer's ezypay_id.
full_addressstringfull address string saved as the customer's primary address ( Address will be looked up using Google )
create_in_xerobooleanWhen true, the customer is also created in Xero and the response includes xero_id.

Responses

  • 200 — Customer created (or an error envelope with success=false)

Authenticate a customer or linked contact

POST /{api_key}/customer/authenticate/

authenticate a customer, or a contact (people) linked to exactly one active customer, within the API key's department. Accepts `identifier` (preferred) or `email` (historic field name) — a customer cid, crn_bpay or email address, or a contact's email address — plus `password`. The identifier must resolve to exactly one eligible principal; a customer and a contact sharing an email is ambiguous and fails. On success returns `principal` (the authenticated customer or contact) and `customer` (the owning customer, kept for backwards compatibility — existing integrations can keep reading `customer.cid`). Any failure (wrong password, ambiguous identifier, inactive account, account in another department, unlinked contact) returns the same generic 'Invalid login details.' message so account existence is never revealed. An invalid/unknown API key returns `description: 'invalid key'` instead. A legacy plaintext password is upgraded to bcrypt on successful login. Not written to api_logs (the body carries a password); not rate-limited.

Request body

FieldTypeDescription
identifierstringPreferred field name. A customer cid, crn_bpay or email address, or a contact's email address. Takes precedence over email when both are supplied.
emailstringHistoric field name; same accepted values as identifier. Ignored if identifier is also supplied.
password requiredstring

Responses

  • 200 — Authentication result

Customer balance

GET /{api_key}/customer/balance/{cid}

Returns the current (stored) customer balance.

Responses

  • 200 — Request received successfully

Log external payment

POST /{api_key}/customer/external-payment/{cid}

Log a payment transaction that was processed by an external party or ecommerce solution. Bypasses all credit card validation and authorization since the payment was already processed externally. Requires a transaction_id for refund tracking. The body is parsed with the shared request extractor: raw JSON, url-encoded JSON, or the legacy `name={json}` form. A repeat of an already-recorded `transaction_id` (same gateway type) returns `success: true` with the existing `payment_id` and the description `Payment already recorded (duplicate transaction_id)`. Failure descriptions: `Invalid key` (note the capital I on this endpoint), `JSON body required`, `Customer not found`, `Amount is required and must be between 0.01 and 99,999,999.99`, `transaction_id is required`, `transaction_id must be between 1 and 255 characters`, `Invalid payment_date format`, `Invoice {n} not found or does not belong to this customer`, `Invoice {n} is voided`, `Failed to record payment`.

Request body

FieldTypeDescription
amount requirednumberPayment amount (must be between 0.01 and 99,999,999.99)
transaction_id requiredstringExternal transaction reference ID (max 255 characters). Used for refund tracking and duplicate detection.
gateway_namestringGateway name for the payment type field (alphanumeric and underscores only). If not specified, uses the department's configured credit card gateway.
descriptionstringPayment description (max 500 characters)
payment_datestringWhen the payment was processed. Defaults to current time.
invoice_idsarray of integerSpecific invoice IDs to apply payment to. If omitted, payment is auto-distributed across unpaid invoices.
gateway_dataobjectFlexible object for storing external gateway metadata. Reserved keys (processed, message, transaction_id, external) are stripped automatically.

Responses

  • 200 — Payment logged successfully or duplicate detected. Check `success`.
  • default — Failure envelope. The legacy API answers failures with HTTP 200 and `success: false` plus a `description` (e.g. `invalid key`, `Customer not found`).

List customers (paginated)

GET /{api_key}/customer/get/page

Get a paginated list of active customers (20 per page). Pagination state is kept server-side per API key (api-{token}-customers.txt table token file). The page segment is optional; /customer/get/page is page 1. Same as /customer/get/page/1.

Responses

  • 200 — Customers retrieved (or an error envelope with success=false)

List customers (paginated)

GET /{api_key}/customer/get/page/{pageNumber}

Get a paginated list of active customers (20 per page). Pagination state is kept server-side per API key (api-{token}-customers.txt table token file). The page segment is optional; /customer/get/page is page 1.

Responses

  • 200 — Customers retrieved (or an error envelope with success=false)

Service type pricing for a customer

GET /{api_key}/customer/get/servicePricing/{cid}

Get all service types with pricing for a customer (price book prices applied where the customer has a price_book_id).

Responses

  • 200 — Pricing retrieved

Single service type price for a customer

GET /{api_key}/customer/get/servicePricing/{cid}/{esid}

Get specific service type pricing for a customer.

Responses

  • 200 — Pricing retrieved

List a customer's services

GET /{api_key}/customer/get/services/{cid}

Get all services (engineering rows, including ended ones) assigned to a customer.

Responses

  • 200 — Customer services retrieved

Customer statement

GET /{api_key}/customer/get/statement/{cid}

Get the customer statement with the default window start (1 January of the year six months ago) as an inline PDF (default), or as structured JSON when format=json is passed.

Responses

  • 200 — Inline PDF statement, or the JSON statement when format=json (JSON errors also return 200 with success=false; an invalid key returns the JSON error even for the PDF default).

Customer statement from a date

GET /{api_key}/customer/get/statement/{cid}/{date_from}

Get customer statement from a specific date as an inline PDF (default), or as structured JSON when format=json is passed.

Responses

  • 200 — Inline PDF statement, or the JSON statement when format=json (JSON errors also return 200 with success=false; an invalid key returns the JSON error even for the PDF default).

Get a customer

GET /{api_key}/customer/get/{cid}

Get a specific customer with full details (core fields, balance, addresses and the ordinary Customer view fields as stored values). Not found returns {success:false, description:'customer not found'}.

Responses

  • 200 — Customer retrieved (or an error envelope with success=false)

List all active customers

GET /{api_key}/customer/getAll

Get all active (inactive = 0) customers, no pagination. Values are raw database strings.

Responses

  • 200 — All customers retrieved

Get credit management status

GET /{api_key}/customer/getCreditManagementStatus/{cid}

Get credit management status for a customer. Credit management prevents automatic late fees and card charges.

Responses

  • 200 — Request received successfully

Get credit management status

GET /{api_key}/customer/getManagementStatus/{cid}

Get credit management status for a customer. Credit management prevents automatic late fees and card charges. Alias of /customer/getCreditManagementStatus/{cid} (same handler and response).

Responses

  • 200 — Request received successfully

Add a customer charge item

POST /{api_key}/customer/item/add

Add a charge item directly to a customer (customers_iitems).

Request body

FieldTypeDescription
charge_datestringDate of the charge (YYYY-MM-DD or DD/MM/YYYY). Defaults to today if omitted
cid requiredintegerCustomer ID (required)
quantitynumberQuantity of items. Defaults to 1 if omitted
pid requiredintegerProduct ID (required)
taxrate_idintegerTax rate ID. Defaults from the product when omitted
taxratenumberTax rate; always recalculated from the tax rate record, so a supplied value is overridden
inc_tax_amountnumberAmount including tax. Defaults from the product when omitted
descriptionstringDescription of the charge. Defaults from the product when omitted
invoiceintegerInvoice ID the item has been billed on
deletedintegerSoft-delete flag (0/1)
deptidintegerDepartment id
iiidintegerRelated invoice item id
sourcestringSource of the charge
orig_idstringCaller's original/external id

Responses

  • 200 — Item created (or an error envelope with success=false)

Update a customer charge item

POST /{api_key}/customer/item/update/{id}

Update a customer charge item.

Request body

FieldTypeDescription
charge_datestringDate of the charge (YYYY-MM-DD or DD/MM/YYYY)
cidintegerCustomer ID
quantitynumberQuantity of items
pidintegerProduct ID. If supplied, taxrate_id is taken from the product and tax is recalculated
taxrate_idintegerTax rate ID
taxratenumberTax rate; always recalculated from the tax rate record, so a supplied value is overridden
inc_tax_amountnumberAmount including tax. Supplying it (or pid) recalculates ex_tax_amount and tax
descriptionstringDescription of the charge
invoiceintegerInvoice ID the item has been billed on
deletedintegerSoft-delete flag (0/1)
deptidintegerDepartment id
iiidintegerRelated invoice item id
sourcestringSource of the charge
orig_idstringCaller's original/external id

Responses

  • 200 — Item updated (or an error envelope with success=false)

Complete a customer portal password reset

POST /{api_key}/customer/password-reset/confirm

complete a password reset for a customer or linked contact within the API key's department, using a token issued by password-reset/request. Validates that the token is a 64-character lowercase hex string, the password is at least 8 characters, and password/password_confirm match, before consuming the token (exactly once) and writing the new bcrypt (cost 12) hash to customers.web_password or people.web_password. The token must still resolve to an eligible principal in this key's department — unknown, expired, already-used or out-of-department tokens return the same generic invalid/expired message. Not written to api_logs; not rate-limited.

Request body

FieldTypeDescription
token requiredstringThe 64-character lowercase hex reset token from the emailed reset link.
password requiredstringThe new password (minimum 8 characters).
password_confirm requiredstringMust match password.

Responses

  • 200 — Reset result. success is true when the password was reset; otherwise false with a validation-specific message or the generic invalid/expired message.

Request a customer portal password reset

POST /{api_key}/customer/password-reset/request

request a password reset link for a customer or linked contact within the API key's department. Always returns a generic success response so account existence is never revealed. When `email` resolves to exactly one eligible customer or contact, a reset token is issued (1 hour expiry, invalidating any prior unused token for that principal) and the publicwebsite-branded reset email is sent. The link uses the API key's `customer_portal_reset_url` (JSON key data — must be an absolute https URL with no embedded credentials) with `token=` appended as a query parameter, or falls back to the department's public website `/reset-password` page; if neither is available, no email is sent. Not written to api_logs; not rate-limited.

Request body

FieldTypeDescription
email requiredstringThe email address to look up.

Responses

  • 200 — Generic success response (returned whether or not an eligible account exists).

Take a payment (or store a card) for a customer

POST /{api_key}/customer/payment/{cid}

Perform a payment on a customer's account using the department's default gateways. The body is read with a plain `json_decode` of the raw request body (no `data=` / url-encoded variants); a missing or invalid body returns `Json body required`. Payment source (first match wins): `payment_method_id` (an explicit saved payment method — see below), `bank_on_file` (latest bank account on file, needs a default direct deposit gateway), `card_on_file` (latest credit card on file, needs a default credit card gateway), otherwise a new card via `payment_token` or ALL of `cc_name`, `cc_number`, `cc_expmonth`, `cc_expyear`, `cc_ccv` (missing ones are reported as `Credit Card Data Missing cc_x,cc_y`). `payment_token` is not available on all gateways, **Payment Token is currently only supported on: Till Payments**. `amount` must be >= 1, unless `amount` is empty and `store_card` is true, in which case the card is only stored on file (`Card On File Updated successfully`). With `store_card` and an amount the card is stored and then charged. The payment is allocated to the customer's unpaid invoices by amount; when there are none a general invoice is created to hold it. `payment_method_id` (PRACBILL-1878) charges one specific saved method (`id` from `GET /{api_key}/customer/{cid}/paymentMethods`) through that method's own gateway rather than the department default, and the resulting payment records the method id. It must be a positive integer, the method must belong to `cid`, be active and not deleted, and its gateway must be configured in the department. It cannot be combined with `store_card`, `card_on_file`, `bank_on_file`, `payment_token` or any `cc_*` field — store a method through the payment-method API first. These checks run before any invoice is created or gateway is called. Failure descriptions: `Json body required`, `Customer not found`, `payment_method_id must be a positive integer`, `payment_method_id cannot be combined with ...`, `Payment method not found`, `Payment gateway for payment method is not available`, `Payment gateway '...' is not configured for this department`, `Payment gateway '...' is not available`, `Payment Method Validation Failed: ...`, `Payment Amount too low, must be greater or equal to 1`, `No payment gateways found`, `No Credit Card Gateway found`, `No Bank Gateway found`, `No Bank On File found`, `No Card On File found`, `Credit Card Data Missing ...`, `Credit Card Validation Failed: ...`, `Credit Card Payment Failed: ...`. On success `description` is `Success`.

Request body

FieldTypeDescription
amountnumberAmount to charge. Must be >= 1. Leave empty/null/0 together with `store_card: true` to only store the card.
payment_method_idintegerCharge this saved payment method (payment_methods.id) through its own gateway. Must belong to the customer and be active. Takes precedence over every other source and cannot be combined with store_card, card_on_file, bank_on_file, payment_token or cc_* fields.
bank_on_filebooleanCharge the customer's latest bank account on file (requires a default direct deposit gateway on the department). Takes precedence over card_on_file.
card_on_filebooleanCharge the customer's latest credit card on file (requires a default credit card gateway on the department).
payment_tokenstringA payment/card token to perform the transaction against (also used as the token when `store_card` is true; `card_token` and `token` are accepted as aliases when storing).
cc_namestringThe card holder's name
cc_numberstringThe card number (numeric JSON values are also accepted)
cc_expmonthstringExpiry month (numeric JSON values are also accepted)
cc_expyearstringExpiry year (numeric JSON values are also accepted)
cc_ccvstringThe card's ccv (numeric JSON values are also accepted)
store_cardbooleanStore this card on file for the customer using the department's default credit card gateway before charging. Card details are taken from payment_token (or card_token / token) or the cc_* fields.
card_tokenstringAlias of payment_token, only honoured when storing the card (`store_card`).
tokenstringAlias of payment_token, only honoured when storing the card (`store_card`).

Responses

  • 200 — Request processed. Check `success`.
  • default — Failure envelope. The legacy API answers failures with HTTP 200 and `success: false` plus a `description` (e.g. `invalid key`, `Customer not found`).

Get the Customer's current payment details. Card fields (`cc_*`) are returned when the customer's best active payment method (primary, then backup, then newest) is a credit card; bank fields (`bank_*`) when it is a bank account; neither when there is no active payment method. The card number is masked. Values come straight from the database so numbers are returned as strings.

GET /{api_key}/customer/paymentDetails/{cid}

Responses

  • 200 — Request processed. Check `success`.
  • default — Failure envelope. The legacy API answers failures with HTTP 200 and `success: false` plus a `description` (e.g. `invalid key`, `Customer not found`).

Search customers

GET /{api_key}/customer/search/{field}/{value}

Search customers by field. The response is a bare array (no success envelope) of customer records.

Responses

  • 200 — Search results (array) or an error object

Set credit management status

GET /{api_key}/customer/setCreditManagementStatus/{cid}/{status}

Set credit management status for a customer. Declared as a GET in the handler (not POST) and the status is written unvalidated from the URL (documented values 0 or 1). The returned description interpolates the id left on the database handle after the update, so the customer id in the message is unreliable. Requests carry no body.

Responses

  • 200 — Status updated (success=true, description 'Customer {id} set credit_management {status}'), or an error envelope ('invalid key' / 'no customer id')

Set credit management status

GET /{api_key}/customer/setManagementStatus/{cid}/{status}

Set credit management status for a customer. Declared as a GET in the handler (not POST) and the status is written unvalidated from the URL (documented values 0 or 1). The returned description interpolates the id left on the database handle after the update, so the customer id in the message is unreliable. Requests carry no body. Alias of /customer/setCreditManagementStatus/{cid}/{status} (same handler and response).

Responses

  • 200 — Status updated (success=true, description 'Customer {id} set credit_management {status}'), or an error envelope ('invalid key' / 'no customer id')

Update a customer

POST /{api_key}/customer/update/{cid}

Update a customer's details. Success returns {success:true, description:'customer details updated'}. Error envelopes: 'invalid key', 'no customer id', 'invalid customer id', 'No Direct Debit Gateway found', 'No Credit Card Gateway found', 'Failed to store card: ...'. The customer fields are saved before the payment-method store, so a gateway error can follow a successful field update.

Request body

FieldTypeDescription
companystringCompany Name
namestringfirst name
surnamestringlast name
emailstringcustomer email address
mobilestringmobile phone contact number
dobstringcustomer date of birth (converted with AppDate::toDBDate, so common date formats are accepted)
abnstringabn for business
paymethodstringthe payment method to use ( Invoice, Credit Card, Direct Debit )
ctgidintegercall rates id for this customer, only need if custom rates are required for this customer
price_book_idintegerprice book id for this customer. only need if custom prices are required for this customer
expected_revenuenumbermonthly expected revenue
minimum_spendnumberminimum spend requirements
credit_limitnumberthe total credit limit we should apply to this customer
termsintegerthe number of days before an invoice is due
billinggroupstringthe billing group
reseller_cidintegerthe reseller ( customer id ) that referred this customer
trading_namestringCompany Trading Name
agreement_startstringWhen does the current agreement start
agreement_endstringWhen does the current agreement end
currencystringThe Specific currency to use for this customer, not required if they are using the department default
do_not_send_invoicebooleanset to true to not email invoices to customer
customers_idstringyour own external identifier for this customer. Opaque to PracBill; not validated or checked for uniqueness. Send an empty string to clear it, omit the property to leave it unchanged. Can also be used in place of the customer id when retrieving a customer.
bank_namestringThe name on the bank account. When non-empty, a bank-account payment method is created on the department's default direct debit gateway (together with bank_number and bank_bsb) and set as primary.
bank_numberstringthe account number on the bank account
bank_bsbstringthe 6 digit bsb on the bank account
card_tokenstringGateway card token; stored as the customer's ezypay_id AND saved as a new primary payment method on the department's default credit card gateway.
full_addressstringfull address string saved as the customer's primary address (only when non-empty)
credit_managementinteger (0 | 1)credit management flag
commentsstringcustomer comments
store_cardbooleanWhen truthy, store card details (cc_name, cc_number, cc_expmonth, cc_expyear, cc_ccv) as the primary payment method on the default credit card gateway.
payment_tokenstringAlternative gateway token for the payment method store (checked before card_token and token).
tokenstringAlternative gateway token for the payment method store (checked after payment_token and card_token).
cc_namestringCard holder name (used with store_card)
cc_numberstringCard number (used with store_card)
cc_expmonthstringCard expiry month (used with store_card)
cc_expyearstringCard expiry year (used with store_card)
cc_ccvstringCard CCV (used with store_card)
bank_account_namestringAlternative bank account name for the payment method store (used when bank_name is empty)
bank_account_numberstringBank account number used with bank_account_name

Responses

  • 200 — Customer updated (or an error envelope with success=false)

Start a Didit identity verification for a customer in the API key's department and return the hosted verification URL. A cid that is not a positive integer returns 400. The customer must belong to the key's department; a missing or foreign customer returns 404 and no verification is started. The body is optional and may only contain document_types (P, DL, HIC, ID, RP); any other field, an unsupported code or a malformed body returns 400. The request is recorded as initiated_via 'signup'. The department must have Didit verification enabled; if it is not configured the backend's 422 is returned, and a provider failure returns 502. An invalid key returns {success:false, description:'invalid key'}.

POST /{api_key}/customer/{cid}/verification

Request body

FieldTypeDescription
document_typesarray of stringDocument types the customer may verify with. Omit to use the department workflow's default.

Responses

  • 201 — Verification started
  • 400 — cid is not a positive integer, or the body is malformed or names an unsupported document type
  • 404 — Customer not found in the key's department
  • 422 — Didit verification is not configured for the department
  • 502 — Verification provider or backend unavailable

Read the status of a Didit identity verification owned by the API key's department. A verification that is missing or belongs to another department returns 404 (the two are indistinguishable). Only verification_id, status, document_type and url are returned; the decision result and billing details are internal. A provider failure returns 502. An invalid key returns {success:false, description:'invalid key'}.

GET /{api_key}/verification/{verification_id}

Responses

  • 200 — Verification status
  • 400 — verification_id is not a positive integer
  • 404 — Verification not found in the key's department
  • 422 — Didit verification is not configured for the department
  • 502 — Verification provider or backend unavailable

← All API groups