Customers API

The Customers API can be used to find a customer that have placed an order, and optionally opt out the customer from receiving email messages from TestFreaks.

GET /v1/customers

Find a customer by either their customer ID or email address.

Request parameters

client_id: The unique identifier for your client configuration.

customer_id (optional): Your unique and stable customer identifier for the customer.

email (optional): The customer’s email address.

Note: One of customer_id and email must be provided!

Response body

{
  "data": {
      "customer_id": "C001",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "opt_out": false
    }
}

customer_id Your unique and stable customer identifier for the customer.

name: The name of the customer if present.

email: The customer’s email address if present.

opt_out: Boolean value indicating if the customer has requested not to receive email messages from TestFreaks.

PATCH /v1/customers/<customer-id>

Updates the email opt out status for the customer.

true: The customer will not receive any more email messages from TestFreaks.

false: The customer may receive email messages from TestFreaks, such as requests to rate and review a product, related to current and future orders.

Request body

Content-Type: application/json

{
  "customer": {
    "opt_out": true
  }
}