Recompute a field rule for records

post/v1/field-rules/{root}/{field_key}/compute

Enqueues async recomputation of a field rule for a batch of records (1-500). Returns 202.

Requires a bearer token: Authorization: Bearer <token>.

Path parameters

NameTypeRequiredDescription
rootstringYesRoot.
field_keystringYesFieldKey.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

202Recompute accepted.

{
  "data": {
    "type": "field_rule_compute",
    "attributes": {
      "status": "accepted",
      "field_key": "issuer.name",
      "root": "invoices",
      "record_count": 2
    }
  }
}

400Validation error.

{
  "code": "BAD_REQUEST",
  "status": 400,
  "title": "Bad Request",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

401Unauthorized.

{
  "code": "UNAUTHORIZED",
  "status": 401,
  "title": "Unauthorized",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

404Not found.

{
  "code": "NOT_FOUND",
  "status": 404,
  "title": "Not Found",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}