Customers API

The Customers API manages your customers and allows for full extraction and complete removal of all customer-related data.

GET /v1/customers

Lists customers matching either a customer ID or an email address.

Request parameters

client_id, if you have access to multiple clients with your api key.

external_id, an external customer ID.

email, an email address.

Response body

{
  "data": [
    {
      "id": "e63b2ad38dd9ada0",
      "external_id": "C001",
      "name": "John Doe",
      "email": "john.doe@example.com"
    }
  ]
}

GET /v1/customers/<customer-id>/data

Extracts all the available data associated with a customer.

Response body

{
  "data": {
    "client_id": "example.com",
    "customer_id": "C001",
    "email": "john.doe@example.com",
    "reviews": [
      {
        "author_nick": "John D",
        "score": 4,
        "content": "Great product",
        "pros": [
          "pro1",
          "pro2"
        ],
        "cons": [],
        "date": "2023-01-01",
        "status": "published",
      }
    ],
    "seller_reviews": [
      {
        "author_nick": "John D",
        "score": 5,
        "content": "Great seller",
        "date": "2023-01-01",
        "status": "published",
      }
    ],
    "questions": [
      {
        "author_nick": "John D",
        "title": "Question title?"
        "content": "Question details",
        "date": "2023-01-01",
        "status": "published",
      }
    ],
    "orders": [
      {
        "id": "O123",
        "items": [
          {
            "id": "P001-02-BLK",
            "family_id": "P001",
            "name": "Product 102 Black",
            "delivery_date": "2022-12-01"
          }
        ]
      }
    ]
  }
}

PUT /v1/customers/<customer-id>

Updates a customer and allows for setting the opt-out status.

Request body

Content-Type: application/json

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

DELETE /v1/customers/<customer-id>

Completely removes a customer and all associated data.