customer

The customer object provides access to customer details stored in the system. Customer information is automatically stored in the system when a new booking is made.

To retrieve information on a specific customer, you should ideally use the customer ID in a GET call to customer/[customer_id]. In this case, the customer information will be returned as “customer” in the JSON response.

If you do not have the customer ID stored, you can also look up customers based on indexed fields, including email address, name, and phone number. These must be an exact match, but can return multiple results on non-unique fields such as the customer name. The results will be stored in the “customers” object in the JSON response.

GET /api/3.0/customer

Retrieve a list of customers.

Query Parameters:
  • customer_id (string) – The unique customer code identifying a customer in the system.

  • customer_email (string) – A unique customer e-mail address to search.

  • customer_name (string) – The full name of the customer to search.

  • customer_phone (string) – The (exact) customer phone number to search.

GET /api/3.0/customer/{customer_id}

Retrieve contact details for a customer.

Parameters:
  • customer_id (string) – The unique customer code identifying a customer in the system.

 1{
 2    "version": "3.0",
 3    "account_id": 1,
 4    "host_id": "your-company.checkfront.com",
 5    "name": "Your Company",
 6    "locale": {
 7    "id": "en_CA",
 8    "lang": "en",
 9    "currency": "CAD"
10    },
11    "request": {
12        "status": ""
13    },
14    "customer": {
15        "customer_id": 25,
16        "meta_id": null,
17        "code": "NQ2-039-421",
18        "status_id": "ACTIVE",
19        "last_booking_date": null,
20        "customer_name": "John Smith",
21        "customer_email": "support@checkfront.com",
22        "customer_email_optin": null,
23        "customer_region": "BC",
24        "customer_city": "Victoria",
25        "customer_address": "386 Mews St",
26        "customer_country": "0",
27        "customer_postal_zip": "12345",
28        "customer_phone": "0",
29        "customer_crm_id": null,
30        "notes": null,
31        "meta": {
32            "source": false,
33            "diet": false,
34            "diet_allergies": false
35        },
36        "referer": null,
37        "bookings": {
38            "LZTM-290317": {
39                "created_date": "2017-03-29T23:54:18-07:00"
40            },
41            "XJZQ-020417": {
42                "created_date": "2017-04-02T23:19:29-07:00"
43            }
44        }
45    }
46}