Customer API
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]stringOptionalExample:
Comma-separated list of customer fields (e.g., "analytics,predictions")
analytics,predictionsResponses
200
Successful response with customer data and related orders.
application/json
403
Forbidden
application/json
404
Resource not found.
application/json
503
Internal Server Error.
application/json
get
/customers/{customer_id}Last updated
Was this helpful?
