| id | string (ID) ^[0-9a-fA-F]{24}$ 24 character alpha-numeric BSON identifier |
| account_id | string (ID) ^[0-9a-fA-F]{24}$ 24 character alpha-numeric BSON identifier |
| name required | string non-empty |
| type required | string Enum: "number" "string" |
| description | string or null |
required | Array of objects (CalculatedFieldRule) <= 50 items |
| fallback required | string or null non-empty |
| created_at | string <date-time> (Timestamp) |
| updated_at | string <date-time> (Timestamp) |
{- "id": "5fd4371e940df5a34a3888b2",
- "account_id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "id": "1aacd0",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Returns all calculated fields defined for the account. Returns 404 when the calculated fields feature is disabled for the account.
OK
Authorization information is missing or invalid.
The calculated fields feature is disabled for this account.
[- {
- "id": "5fd4371e940df5a34a3888b2",
- "account_id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "id": "1aacd0",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Create a new account-level calculated field. Returns 404 when the calculated fields feature is disabled for the account.
Created
Authorization information is missing or invalid.
The calculated fields feature is disabled for this account.
Validation failed
{- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "value": "string",
- "rule_set": {
- "op": "and",
- "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}{- "id": "5fd4371e940df5a34a3888b2",
- "account_id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "id": "1aacd0",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Fetch a single calculated field. Returns 404 when the calculated fields feature is disabled for the account.
OK
Authorization information is missing or invalid.
The calculated field was not found, or the feature is disabled.
{- "id": "5fd4371e940df5a34a3888b2",
- "account_id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "id": "1aacd0",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Update an existing calculated field. name and type cannot be changed.
Returns 404 when the calculated fields feature is disabled for the account.
OK
Authorization information is missing or invalid.
The calculated field was not found, or the feature is disabled.
Validation failed
{- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "value": "string",
- "rule_set": {
- "op": "and",
- "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}{- "id": "5fd4371e940df5a34a3888b2",
- "account_id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "id": "1aacd0",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Delete a calculated field that is not referenced by any flow. Returns 404 when the calculated fields feature is disabled for the account. Returns 403 when a flow still references the field.
OK
Authorization information is missing or invalid.
The calculated field is referenced by one or more flows.
The calculated field was not found, or the feature is disabled.
{- "id": "5fd4371e940df5a34a3888b2",
- "account_id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "number",
- "description": "string",
- "rules": [
- {
- "id": "1aacd0",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "string",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "fallback": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}