Page cover

Customer API

Get Customer Data and Related Orders

get

Retrieves the aggregated data for a single customer, including their risk score and a list of related predictions.
This API response conforms to JSON:API v1.1.

Authorizations
AuthorizationstringRequired

The token is passed in the Authorization header as a Bearer token.

Use the secret key provided by Yofi and the HS256 algorithm to sign the token.

An example of token claims is shown below:

{
  "iss": "partner_id", // Your unique Partner ID provided by Yofi
  "exp": 1716123456,   // Expiration Time (Unix timestamp). Keep token lifetime short for security.
  "iat": 1716113456,   // Issued At Time (Unix timestamp).
  "aud": "Yofi",       // Audience, must be "Yofi" (case-sensitive).
  "sub": "demo.myshopify.com" // Subject, typically the Shopify shop URL without the 'https://' prefix.
}
Path parameters
customer_idstringRequired

The ID of the customer whose data is being retrieved.

Query parameters
fields[customer]stringOptional

Comma-separated list of customer fields (e.g., "analytics,predictions")

Example: analytics,predictions
Responses
200

Successful response with customer data and related orders.

application/json
get
/customers/{customer_id}

Last updated

Was this helpful?