Recompute a field rule for records
post
/v1/field-rules/{root}/{field_key}/computeEnqueues async recomputation of a field rule for a batch of records (1-500). Returns 202.
Requires a bearer token: Authorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| root | string | Yes | Root. |
| field_key | string | Yes | FieldKey.e.g. FieldKey |
Request
cURL
curl -X POST https://api.wellapp.ai/v1/field-rules/{root}/{field_key}/compute \
-H "Authorization: Bearer $WELL_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"data": {
"type": "field_rule_compute",
"attributes": {
"record_ids": [
"inv_1",
"inv_2"
]
}
}
}'Request body
{
"data": {
"type": "field_rule_compute",
"attributes": {
"record_ids": [
"inv_1",
"inv_2"
]
}
}
}Responses
202 — Recompute accepted.
{
"data": {
"type": "field_rule_compute",
"attributes": {
"status": "accepted",
"field_key": "issuer.name",
"root": "invoices",
"record_count": 2
}
}
}400 — Validation error.
{
"code": "BAD_REQUEST",
"status": 400,
"title": "Bad Request",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}401 — Unauthorized.
{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}404 — Not found.
{
"code": "NOT_FOUND",
"status": 404,
"title": "Not Found",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}