ACE (Agentic Commerce Engine)
API ReferenceEnrichmentRules

Generate contextual rules

POST
/enrichment/rules

Generate the eight section contextual rules for a product selection. Returns inline for small selections, or a job (202) for large ones or when mode is async. Requires the enrichment:write scope.

Authorization

AuthorizationBearer <token>

API key in the Authorization header: Authorization: Bearer ace_live_.... Use an ace_test_... key for the free, rate-capped sandbox.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/enrichment/rules" \  -H "Content-Type: application/json" \  -d '{    "source": {      "type": "inline",      "products": [        {          "id": "string",          "title": "string"        }      ]    }  }'
{  "data": null}
{  "data": {    "id": "string",    "kind": "rules",    "status": "pending",    "progress": {      "phase": "string",      "completed": 0,      "total": 0    },    "estimateMs": 0,    "productCount": 0,    "succeededCount": 0,    "failedCount": 0,    "storeId": "string",    "createdAt": "2019-08-24T14:15:22Z",    "links": {      "self": "string",      "results": "string"    }  }}
Empty
{  "error": {    "code": "INSUFFICIENT_CREDITS",    "message": "Not enough credits for this request.",    "details": null  }}
{  "error": {    "code": "INSUFFICIENT_CREDITS",    "message": "Not enough credits for this request.",    "details": null  }}