Skip to main content
A customer is one of your buyers. Create one to keep track of repeat purchases, or to mark a buyer as tax exempt. Exempt buyers are often wholesalers, religious groups, or educational institutions. Pass the customer on a calculation as customer.id.
Where customers fit

The Customer object

Attributes

string
The ID of the customer, cust_….
string, value is "tax.customer"
String representing the object’s type.
string
Your ID for the customer. Unique across your customers. You can use it instead of id to refer to the customer.
string
The customer’s name.
string
The customer’s email. Unique across your customers.
boolean
If true, every calculation for this customer returns 0 tax. Defaults to false.
The Customer object

Use a customer in a calculation

Send the customer’s id or your reference_customer_id as customer.id on a calculation.For a tax-exempt customer, the calculation returns 0 tax. The tax_jurisdictions row has note: "no_collection_exempt_customer", which tells you the customer’s exemption is the reason.
POST /tax/calculations
Exempt customer response

Create a customer

Creates a customer. Only email is required. Try it in the API reference.The response has a Numeral id. If you sent a reference_customer_id, you can use either one to refer to the customer later.

Parameters

string
required
The customer’s email.
string
The customer’s name.
string
Your ID for the customer.
boolean
default:"false"
If true, every calculation for this customer returns 0 tax.

Returns

A Customer object.
POST /tax/customers
Response

Update a customer

Updates a customer’s name, email, is_tax_exempt, or reference_customer_id. Send at least one. Fields you leave out stay as they are. Try it in the API reference.
  • email and reference_customer_id must be unique across your customers. If another customer already uses the new value, the request fails with duplicate_customer, and error_meta has the conflicting customer’s id, reference_customer_id, and email.
  • email must be a valid email address, or the request fails with invalid_email.
  • Setting is_tax_exempt to true makes every future calculation for this customer return 0 tax. Setting it to false removes the exemption.
  • If every value you send matches what’s stored, nothing changes and the current customer is returned with a 200.
  • Deleted customers can’t be updated. The request fails with customer_not_found.
  • If the customer’s buyer record was deleted in Numeral’s Exemption Certificate Manager, setting is_tax_exempt to true fails with invalid_request.

Parameters

string
required
The customer’s id or your reference_customer_id. No id_type needed.
string
The customer’s name.
string
The customer’s email.
boolean
true to exempt the customer from tax, false to remove the exemption.
string
Your ID for the customer.

Returns

The updated Customer object.
POST /tax/customers/:id
Response

Retrieve a customer

Returns a customer by its id or your reference_customer_id. Try it in the API reference.
string
required
The customer’s id, or your reference_customer_id with id_type=reference_customer_id.
enum
default:"id"
id to look up by the Numeral customer ID. reference_customer_id to look up by your own ID.

Returns

A Customer object.
GET /tax/customers/:id

Delete a customer

Deletes a customer. Deleted customers can’t be updated. Try it in the API reference.
string
required
The customer’s id.

Returns

The deleted object type and when it was deleted.
DELETE /tax/customers/:id
Response

Errors

Errors return an error object with error_code, error_message, and sometimes error_meta with details. Handle them by error_code. The request ID is in the X-Request-Id response header.