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.is_tax_exempt exempts a customer from everything. For exemptions backed by a certificate, see exemption certificates.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’sid or your reference_customer_id as customer.id on a calculation.- The customer must already exist. Otherwise the calculation returns
CUSTOMER_NOT_FOUND(404), unless you also senddefault_customer_type. - For a tax-exempt customer, every row in
tax_jurisdictionshas 0 tax andnote: "no_collection_exempt_customer". See Notes.
POST /tax/calculations
Exempt customer row
Create a customer
Creates a customer. Onlyemail 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’sname, 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.emailandreference_customer_idmust be unique across your customers. If another customer already uses the new value, the request fails withDUPLICATE_CUSTOMER.emailmust be a valid email address, or the request fails withINVALID_EMAIL.- Setting
is_tax_exempttotruemakes every future calculation for this customer return 0 tax. Setting it tofalseremoves 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_exempttotruefails withINVALID_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 itsid 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
List all customers
Returns your customers, one page at a time. Deleted customers aren’t included. Try it in the API reference.string
The
last_customer_id from the previous page.Returns
An object with acustomers array of Customer objects, has_more (whether there are more to fetch), and last_customer_id (the cursor for the next page).GET /tax/customers
Response
Delete a customer
Deletes a customer. Deleted customers don’t appear in lists and 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