Download OpenAPI specification:
A Bonterra API Gateway that routes requests to internal Bonterra APIs
Retrieves a list of all users in your Apricot instance. Supports pagination, filtering, and sorting.
Common use cases:
| sort | string Examples:
Sort order for results. Prefix with '-' for descending order |
object Example: filter[active]=1&filter[name]=Client Filter parameters to narrow down results. Use field names as keys | |
object Example: page[number]=1&page[size]=25 Pagination parameters for limiting result set size |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
curl -X GET "https://api.bonterra.network/v1/apricot/users" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}Creates a new user account in Apricot. Requires username, password, first name, last name, and user type.
Common use cases:
Important notes:
| Authorization required | string Header that carries token for request Authorization |
| type required | string Resource type, must be 'users' |
object User attributes |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
{- "type": "users",
- "attributes": {
- "username": "john.doe@bonterratech.com",
- "password": "SecureP@ssw0rd123",
- "name_first": "John",
- "name_middle": "Michael",
- "name_last": "Doe",
- "user_type": "Admin"
}
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}What it does: Retrieves the profile information for the currently authenticated user based on the access token. This is a self-service endpoint that returns details about "you" (the token owner) without needing to know your user ID.
When to use it:
What you'll need:
What you'll get back: Your complete user profile including:
Use cases:
vs. GET /users/{id}:
| Authorization required | string Header that carries token for request Authorization |
| id required | integer <int32> |
| type | string Value: "users" |
required | object |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
curl -X GET "https://api.bonterra.network/v1/apricot/users/info" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "id": 1,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "johnny.loius@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Johnny",
- "name_middle": "string",
- "name_last": "Apricot",
- "login_attempts": 0,
- "mod_time": "2013-10-14T15:31:10.000Z",
- "mod_user": 1,
- "active": 1,
- "password_reset": "string",
- "property1": null,
- "property2": null
}, - "links": {
- "self": "/apricot/records/12345",
- "first": "/apricot/records?form_id=100&page=1",
- "prev": "/apricot/records?form_id=100&page=1",
- "next": "/apricot/records?form_id=100&page=3",
- "last": "/apricot/records?form_id=100&page=10"
}
}| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
| id required | integer <int32> |
| type | string Value: "users" |
required | object |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
{- "id": 1,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "johnny.loius@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Johnny",
- "name_middle": "string",
- "name_last": "Apricot",
- "login_attempts": 0,
- "mod_time": "2013-10-14T15:31:10.000Z",
- "mod_user": 1,
- "active": 1,
- "password_reset": "string",
- "property1": null,
- "property2": null
}, - "links": {
- "self": "/apricot/records/12345",
- "first": "/apricot/records?form_id=100&page=1",
- "prev": "/apricot/records?form_id=100&page=1",
- "next": "/apricot/records?form_id=100&page=3",
- "last": "/apricot/records?form_id=100&page=10"
}
}| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
| type required | string Resource type, must be 'users' |
object User attributes |
| id required | integer <int32> |
| type | string Value: "users" |
required | object |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
{- "type": "users",
- "attributes": {
- "username": "john.doe@bonterratech.com",
- "password": "SecureP@ssw0rd123",
- "name_first": "John",
- "name_middle": "Michael",
- "name_last": "Doe",
- "user_type": "Admin"
}
}{- "id": 1,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "johnny.loius@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Johnny",
- "name_middle": "string",
- "name_last": "Apricot",
- "login_attempts": 0,
- "mod_time": "2013-10-14T15:31:10.000Z",
- "mod_user": 1,
- "active": 1,
- "password_reset": "string",
- "property1": null,
- "property2": null
}, - "links": {
- "self": "/apricot/records/12345",
- "first": "/apricot/records?form_id=100&page=1",
- "prev": "/apricot/records?form_id=100&page=1",
- "next": "/apricot/records?form_id=100&page=3",
- "last": "/apricot/records?form_id=100&page=10"
}
}Retrieves all Apricot organizations that a Bonterra Auth user is linked to. This endpoint is used for authorization purposes by Account and Impact Hub services.
Purpose:
Personas:
Important notes:
| bonterra_auth_id required | string Example: 37f9a9b0-76ac-4d13-a3b4-8eb9873a24f5 Bonterra Auth ID (GUID, e.g., 37f9a9b0-76ac-4d13-a3b4-8eb9873a24f5) |
| Authorization required | string Header that carries token for request Authorization |
required | Array of objects (ApricotUserOrganizationMembership) Array of organization memberships. Each item represents the user's relationship with an organization. Empty array if user has no organizations. |
| bonterra_auth_id required | string The Bonterra Auth user ID |
| is_super_user | boolean Indicates if the user is a super user. Only present when the user is a super user. |
{- "bonterra_auth_id": "37f9a9b0-76ac-4d13-a3b4-8eb9873a24f5",
- "orgs": [
- {
- "org_id": "12345",
- "org_name": "Acme Foundation",
- "user_id": "789",
- "user_email": "user@example.com",
- "user_first_name": "John",
- "user_last_name": "Doe",
- "user_type": "Administrator",
- "locked": false,
- "locked_reason": "Unlocked"
}, - {
- "org_id": "67890",
- "org_name": "Global Charity Network",
- "user_id": "456",
- "user_email": "user@example.com",
- "user_first_name": "John",
- "user_last_name": "Doe",
- "user_type": "Standard",
- "locked": true,
- "locked_reason": "User is inactive"
}
]
}What it does: Retrieves a list of all users who have been granted access to a specific program. This helps you manage program-level permissions and understand who can view/edit data within a program.
When to use it:
What you'll need:
What you'll get back: Array of user objects with access to this program, each containing:
Common use cases:
Filtering & Pagination:
Note: This returns users with explicit program access. System administrators may have access to all programs without being explicitly listed.
| id required | integer <int32> |
object Example: page[number]=1&page[size]=25 Pagination parameters for limiting result set size | |
| sort | string Examples:
Sort order for results. Prefix with '-' for descending order |
object Example: filter[active]=1&filter[name]=Client Filter parameters to narrow down results. Use field names as keys |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
curl -X GET "https://api.bonterra.network/v1/apricot/programs/2/users" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}What it does: Retrieves the metadata value associated with a specific key for a user. User metadata allows you to store custom key-value pairs for users, enabling extensibility beyond standard user fields.
When to use it:
What you'll need:
What you'll get back: The metadata value for the specified key, which can be:
Common metadata keys:
| id required | integer <int32> |
| key | string |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
curl -X GET "https://api.bonterra.network/v1/apricot/users/123/metadata?key=external_system_id" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}What it does: Creates or updates a metadata key-value pair for a user. If the key already exists, its value is updated. If the key doesn't exist, it's created. This allows you to store custom data associated with users.
When to use it:
What you'll need:
What you'll get back: Confirmation of the updated/created metadata including:
Best practices:
Common use cases:
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
Metadata key-value pair to create or update
| key | string |
| value | string |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
{- "key": "external_system_id",
- "value": "SF-12345"
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}What it does: Permanently deletes a metadata key-value pair for a specific user. Once deleted, the metadata cannot be recovered unless you re-create it with a PUT request.
When to use it:
What you'll need:
What you'll get back: Confirmation that the metadata was deleted, including:
Important notes:
Common scenarios:
| id required | integer <int32> |
| key | string |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
curl -X DELETE "https://api.bonterra.network/v1/apricot/users/123/metadata?key=external_system_id" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}Retrieves a list of all programs in your Apricot instance. Programs are used to organize records and users by service type or department.
Common use cases:
object Example: page[number]=1&page[size]=25 Pagination parameters for limiting result set size | |
| sort | string Examples:
Sort order for results. Prefix with '-' for descending order |
object Example: filter[active]=1&filter[name]=Client Filter parameters to narrow down results. Use field names as keys |
Array of objects (ApricotProgram) Array of program objects |
curl -X GET "https://api.bonterra.network/v1/apricot/programs" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}What it does: Creates a new program in your Apricot instance. Programs are the top-level organizational structure used to group related forms, records, and users. Each program typically represents a distinct service area, grant-funded initiative, or department.
When to use it:
What you'll need:
What you'll get back: The newly created program object including:
Important notes:
Common program types:
Program data for the new program
| type required | string Resource type, must be 'programs' |
| id | integer <int32> The ID of the program (for updates) |
object Program attributes |
Array of objects (ApricotProgram) Array of program objects |
{- "data": {
- "type": "programs",
- "attributes": {
- "name": "Emergency Financial Assistance 2025",
- "description": "Short-term financial assistance for emergency needs including rent, utilities, and medical costs",
- "active": true
}
}
}{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}What it does: Retrieves detailed information about a specific program. Programs in Apricot are organizational containers that group related forms, records, and users together, representing distinct service areas or organizational divisions.
When to use it:
What you'll need:
What you'll get back: Complete program object including:
Program hierarchy: Programs can contain multiple forms, and each form can contain multiple records. Understanding the program structure is essential for proper data organization.
| id required | integer <int32> |
Array of objects (ApricotProgram) Array of program objects |
curl -X GET "https://api.bonterra.network/v1/apricot/programs/2" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}What it does: Updates an existing program's properties. You can modify the program name, description, active status, and other program-level attributes. This operation performs a partial update, so you only need to include the fields you want to change.
When to use it:
What you'll need:
What you'll get back: The complete updated program object with all fields, including:
Important notes:
id field in the request body must match the URL path parameterCommon update scenarios:
| id required | integer <int32> |
Program fields to update (partial update supported)
| type required | string Resource type, must be 'programs' |
| id | integer <int32> The ID of the program (for updates) |
object Program attributes |
Array of objects (ApricotProgram) Array of program objects |
{- "data": {
- "type": "programs",
- "id": "2",
- "attributes": {
- "name": "Youth Services - Updated",
- "description": "Updated comprehensive youth development program",
- "active": true
}
}
}{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}What it does: Retrieves program configuration optimized for Bonterra Connect's intake process. This endpoint returns program information in a format specifically designed for cross-product integration, particularly for referral and intake workflows between Connect and Apricot.
When to use it:
What you'll need:
What you'll get back: Program object with Connect-specific configuration:
Integration scenario:
vs. GET /programs/{id}:
Note: This is a specialized endpoint for Bonterra product integration. If you're not integrating with Connect, use the standard GET /programs/{id} endpoint instead.
| id required | integer <int32> |
| type required | string The type of Apricot record you are sending |
| id | integer <int32> The ID of the Apricot Program |
object |
curl -X GET "https://api.bonterra.network/v1/apricot/programs/2/intake" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "type": "programs",
- "id": 1,
- "attributes": {
- "name": "Sample Program",
- "description": "string",
- "active": 1,
- "referrals": "string",
- "referrals_email": "string",
- "mod_time": "2017-03-12T16:13:53.000Z",
- "mod_user": 1,
- "members": 1,
- "site_id": 1
}
}What it does: Retrieves a list of all users who have been granted access to a specific program. This helps you manage program-level permissions and understand who can view/edit data within a program.
When to use it:
What you'll need:
What you'll get back: Array of user objects with access to this program, each containing:
Common use cases:
Filtering & Pagination:
Note: This returns users with explicit program access. System administrators may have access to all programs without being explicitly listed.
| id required | integer <int32> |
object Example: page[number]=1&page[size]=25 Pagination parameters for limiting result set size | |
| sort | string Examples:
Sort order for results. Prefix with '-' for descending order |
object Example: filter[active]=1&filter[name]=Client Filter parameters to narrow down results. Use field names as keys |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotUser) Array of user objects |
curl -X GET "https://api.bonterra.network/v1/apricot/programs/2/users" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 1487,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "john.doe@bonterratech.com",
- "user_type": "Admin",
- "name_first": "John",
- "name_last": "Doe",
- "active": 1,
- "mod_time": "2023-11-18T09:15:00Z"
}, - "links": {
- "self": "/apricot/users/1487"
}
}, - {
- "id": 1488,
- "type": "users",
- "attributes": {
- "org_id": 448,
- "username": "jane.smith@bonterratech.com",
- "user_type": "Standard",
- "name_first": "Jane",
- "name_last": "Smith",
- "active": 1,
- "mod_time": "2023-11-17T15:30:00Z"
}, - "links": {
- "self": "/apricot/users/1488"
}
}
]
}What it does: Creates a copy (clone) of an existing program, duplicating its structure, forms, and configuration. This is useful when you need to create a new program with similar settings to an existing one, saving time compared to manually recreating everything from scratch.
When to use it:
What you'll need:
What gets copied:
What does NOT get copied:
What you'll get back: The newly created program object including:
Important notes:
Common scenarios:
| id required | integer <int32> |
New program details for the copy
| type required | string Resource type, must be 'programs' |
| id | integer <int32> The ID of the program (for updates) |
object Program attributes |
| type required | string The type of Apricot record you are sending |
| id | integer <int32> The ID of the Apricot Program |
object |
{- "data": {
- "type": "programs",
- "attributes": {
- "name": "Emergency Financial Assistance 2026",
- "description": "Copy of 2025 program for new grant year",
- "active": true
}
}
}{- "type": "programs",
- "id": 1,
- "attributes": {
- "name": "Sample Program",
- "description": "string",
- "active": 1,
- "referrals": "string",
- "referrals_email": "string",
- "mod_time": "2017-03-12T16:13:53.000Z",
- "mod_user": 1,
- "members": 1,
- "site_id": 1
}
}Get a list of all Apricot Programs for Connect Intake
object Example: page[number]=1&page[size]=25 Pagination parameters for limiting result set size | |
| sort | string Examples:
Sort order for results. Prefix with '-' for descending order |
object Example: filter[active]=1&filter[name]=Client Filter parameters to narrow down results. Use field names as keys |
Array of objects (ApricotProgram) Array of program objects |
{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}Retrieves all records for a specific form. Use this endpoint to fetch a list of records that belong to a particular form. Results can be paginated.
Common use cases:
| form_id required | integer <int32> Example: The ID of the form to query records from |
| Authorization required | string Header that carries token for request Authorization |
| id | integer <int32> Unique identifier for the record |
| type | string Resource type, always 'records' for record objects |
object Contains the form field data and metadata for this record | |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15",
- "field_1004": "123 Main Street",
- "field_1005": "Active"
}, - "links": {
- "self": "/apricot/records/12345"
}
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Creates a new record in the specified form. This endpoint supports three content types for different use cases, including the ability to create a record with file attachments in a single request.
When to use it:
What you'll need:
What you'll get back: Newly created record with ID and all field values including attachment metadata if files were uploaded
Three Content Type Options:
1. application/json (Most common) Use for creating records without files. Simple JSON body with field values.
2. application/vnd.api+json (JSON API format) Use if your application follows JSON API specification.
3. multipart/form-data (For records with attachments - Option 1) Use when creating a new record AND you have files ready to attach immediately. This is the "Option 1" approach for working with attachments.
Two Approaches for Attachments:
Option 1: Create Record with Attachments (this endpoint with multipart/form-data)
Option 2: Add Attachment to Existing Record
Field Naming Patterns: Field IDs follow specific patterns based on field type:
field_1001, field_1002field_2_first, field_2_lastfield_99_line1, field_99_city, field_99_state, field_99_zipfield_827, field_950 (uploaded as files in multipart/form-data)Important notes:
form_id parameter is required (query parameter or in attributes)| form_id required | integer <int32> Example: The ID of the form to query records from |
| Authorization required | string Header that carries token for request Authorization |
For JSON requests (application/json or application/vnd.api+json): Send record data as JSON with type and attributes.
For multipart/form-data (creating record with attachments):
| type required | string Resource type, must be 'records' |
object (ApricotRecordBodyAttributes) Attributes for creating or updating a record. Field names are dynamic based on form definition (e.g., field_1001, field_1002). | |
Array of objects (ApricotRecordBodyMetadata) Optional metadata array to bypass UI validation requirements when creating/updating records |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "type": "records",
- "attributes": {
- "form_id": 2,
- "programs": [
- 2
], - "field_96": "Active",
- "field_2_first": "John",
- "field_2_last": "Doe"
}
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Retrieves a single record by its unique identifier. Returns the complete record including all field values, metadata, attachment information, timestamps, and relationships.
When to use it:
What you'll need:
What you'll get back: Complete record object containing:
Understanding the Response:
Important notes:
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
| id | integer <int32> Unique identifier for the record |
| type | string Resource type, always 'records' for record objects |
object Contains the form field data and metadata for this record | |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
curl -X GET "https://api.bonterra.network/v1/apricot/records/123" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15",
- "field_1004": "123 Main Street",
- "field_1005": "Active"
}, - "links": {
- "self": "/apricot/records/12345"
}
}What it does: Updates an existing record with new field values. You can update one field or multiple fields in a single request. Fields not included in the request remain unchanged.
When to use it:
What you'll need:
What you'll get back: Updated record object with all field values (not just the ones you updated)
Two Update Strategies:
Strategy 1: Partial Update (Recommended for most cases) Only send the fields you want to change. Other fields remain unchanged.
Strategy 2: Full Update (Safest for critical data) GET the record first, modify the fields you want, then PUT the complete attributes object.
Important notes:
Common Issues:
"Required field missing" error:
409 Conflict error:
Accidentally clearing fields:
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
Update request body containing the fields to modify.
Partial update: Include only the fields you want to change Full update: Include all attributes from GET response with your changes
| type required | string Resource type, must be 'records' |
object (ApricotRecordBodyAttributes) Attributes for creating or updating a record. Field names are dynamic based on form definition (e.g., field_1001, field_1002). | |
Array of objects (ApricotRecordBodyMetadata) Optional metadata array to bypass UI validation requirements when creating/updating records |
| id | integer <int32> Unique identifier for the record |
| type | string Resource type, always 'records' for record objects |
object Contains the form field data and metadata for this record | |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
{- "type": "records",
- "attributes": {
- "field_1002": "newemail@example.com"
}
}{- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15",
- "field_1004": "123 Main Street",
- "field_1005": "Active"
}, - "links": {
- "self": "/apricot/records/12345"
}
}| id required | integer <int32> |
| field_id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
| id | string |
| name | string |
string | |
| role | string |
| createdAt | string |
| updatedAt | string |
{- "id": "string",
- "name": "string",
- "email": "string",
- "role": "string",
- "createdAt": "string",
- "updatedAt": "string"
}What it does: Uploads a file attachment to a specific field on an existing record. This is one of two ways to add attachments to records in Apricot.
When to use it:
What you'll need:
What you'll get back: Success response with attachment metadata including file ID, filename, size, and download URL
Two Approaches for Working with Attachments:
Option 1: Create Record with Attachments (multipart/form-data) Use this when creating a new record and you have files ready to attach immediately. See POST /apricot/records with Content-Type: multipart/form-data
Option 2: Add Attachment to Existing Record (this endpoint) Use this endpoint when working with existing records.
Finding Field IDs: To find which field_id to use for attachments:
Example: If you see a field with id: 827 and it's an attachment type, use field_id=827
Important notes:
Common Issues:
"Field not found" error:
"Invalid file type" error:
Content-Type header issues:
| id required | integer <int32> |
| field_id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
Upload a file using multipart/form-data. The file should be sent in a form field named "file".
Important: Do not set Content-Type header manually - your HTTP client will set it correctly with the multipart boundary.
| file | string <binary> The file to upload (PDF, DOCX, PNG, JPG, etc.) |
object |
{ "file": "(binary file data)" }
{- "data": {
- "id": "123",
- "type": "records",
- "attributes": {
- "field_827": {
- "file_id": "file_456",
- "filename": "resume.pdf",
- "size": 245760,
- "content_type": "application/pdf",
- "uploaded_at": "2024-01-15T10:30:00Z"
}
}
}
}What it does: Retrieves all records that are linked to the specified record. In Apricot, records can be connected to other records to establish relationships (e.g., a client record linked to service records, or a parent record linked to child records).
When to use it:
What you'll need:
What you'll get back: Collection of linked record objects, each containing:
Common relationship scenarios:
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
curl -X GET "https://api.bonterra.network/v1/apricot/records/12345/links" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Creates an external referral linking a record to services or organizations outside your Apricot system. This tracks when you refer a client to external resources such as other agencies, healthcare providers, housing services, or community programs.
When to use it:
What you'll need:
What you'll get back: The created referral object including:
Common referral scenarios:
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
External referral details
| type required | string |
object (ApricotExternalReferralBodyAttributes) |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "data": {
- "type": "external_referrals",
- "attributes": {
- "organization_name": "Community Health Center",
- "service_type": "Primary Care",
- "referral_date": "2025-01-15",
- "contact_person": "Dr. Smith",
- "contact_phone": "555-0123",
- "reason": "Annual physical examination",
- "status": "pending",
- "notes": "Client needs transportation assistance"
}
}
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Retrieves all internal program referrals for a specific record. This shows when a record (typically a client/participant) has been referred from one program to another within your Apricot system, enabling cross-program service coordination and tracking.
When to use it:
What you'll need:
What you'll get back: Collection of program referral objects, each containing:
Common program referral scenarios:
| id required | integer <int32> |
| key | string |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
curl -X GET "https://api.bonterra.network/v1/apricot/records/12345/referrals/programs" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Retrieves a list of all possible actions that can be performed on records in your Apricot system. Record actions are workflow operations like approvals, reviews, status changes, or other custom actions configured in your Apricot instance.
When to use it:
What you'll need:
What you'll get back: Array of action objects, each containing:
Common record actions:
Note: The specific actions available depend on your Apricot configuration and may include custom actions created by your organization.
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecordAction) |
curl -X GET "https://api.bonterra.network/v1/apricot/records/actions" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 25
}, - "data": [
- {
- "id": "string",
- "name": "string",
- "email": "string",
- "role": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
}What it does: Retrieves multiple specific records by providing a form ID and an array of document/record IDs. This is a targeted batch retrieval endpoint that lets you fetch exact records you need without filtering through a full list.
When to use it:
What you'll need:
What you'll get back: Collection of complete record objects matching the provided IDs, including:
vs. Other record endpoints:
Important notes:
Performance tip: When you need 10+ specific records, this is much faster than making individual GET /records/{id} calls.
| Authorization required | string Header that carries token for request Authorization |
Form ID and array of record IDs to retrieve
| type required | string Resource type, must be 'records' |
object (ApricotRecordBodyAttributes) Attributes for creating or updating a record. Field names are dynamic based on form definition (e.g., field_1001, field_1002). | |
Array of objects (ApricotRecordBodyMetadata) Optional metadata array to bypass UI validation requirements when creating/updating records |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "form_id": 2,
- "document_ids": [
- 12345,
- 12346,
- 12350,
- 12355,
- 12360
]
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}| form_id required | integer <int32> Example: The ID of the form to query records from |
| search required | string Example: Search query string to match against record fields |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Search for records using a flexible text query with powerful search options including fuzzy matching, wildcard placement, and field-specific search. More powerful than the simple GET /records?search= endpoint.
When to use it:
What you'll need:
What you'll get back: Array of matching records with pagination metadata, similar to GET /records
Search Options Explained:
form_id (required)
search (required)
fieldIdsToMatch (optional)
disableFuzzy (optional, default: false)
disablePrefix (optional, default: false)
disableWildcard (optional, default: false)
wildcardPlacement (optional, default: "both")
Search Behavior Examples:
Example 1: Basic search (fuzzy enabled, both wildcards)
{"form_id": 2, "search": "john", "wildcardPlacement": "both"}
Matches: "John", "Johnny", "Johnson", "St. John"
Example 2: Exact search (no fuzzy, no wildcards)
{"form_id": 2, "search": "John Doe", "disableFuzzy": true, "disableWildcard": true}
Matches only: "John Doe" (exact)
Example 3: Starts-with search (post wildcard only)
{"form_id": 2, "search": "John", "wildcardPlacement": "post"}
Matches: "John", "Johnny", "Johnson" (but not "St. John")
Example 4: Search specific fields only
{"form_id": 2, "search": "example.com", "fieldIdsToMatch": [1002]}
Only searches in field_1002 (e.g., email field)
Important notes:
| Authorization required | string Header that carries token for request Authorization |
Search query with configuration options
Minimum required: form_id and search Optional: All other fields for fine-tuning search behavior
| form_id required | integer <int32> ID of the form to search records in |
| search required | string Search query string to match against record fields |
| disableFuzzy | boolean Default: false Disable fuzzy matching (exact matches only) |
| disablePrefix | boolean Default: false Disable prefix matching |
| disableWildcard | boolean Default: false Disable wildcard matching |
| fieldIdsToMatch | Array of integers Limit search to specific field IDs (if empty, searches all fields) |
| wildcardPlacement | string Default: "both" Enum: "both" "pre" "post" Where to place wildcards in the search query |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "form_id": 2,
- "search": "John Doe"
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Creates a filtered subset of records based on specific criteria. This endpoint allows you to retrieve multiple records by providing an array of record IDs, effectively creating a custom collection of records without having to make individual requests.
When to use it:
What you'll need:
What you'll get back: Collection of complete record objects matching the provided IDs, including:
Performance tip: This is more efficient than making individual GET requests for each record when you need to fetch multiple specific records at once.
| Authorization required | string Header that carries token for request Authorization |
Array of record IDs to retrieve
| id | integer <int32> Unique identifier for the record |
| type | string Resource type, always 'records' for record objects |
object Contains the form field data and metadata for this record | |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "record_ids": [
- 12345,
- 12346,
- 12347,
- 12350,
- 12355
], - "form_id": 2
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}What it does: Retrieves records for participants who have not yet registered for the client portal. This is used to manage portal invitations and track which clients need portal access setup.
When to use it:
What you'll need:
What you'll get back: Records for participants without portal registration.
| Authorization required | string Header that carries token for request Authorization |
| form_id required | integer <int32> |
| desired_fields required | Array of strings |
| exclusions | Array of integers <int32> [ items <int32 > ] |
| last_mod_date | string or null |
| searching | string or null |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotRecord) Array of record objects |
{- "form_id": 0,
- "desired_fields": [
- "string"
], - "exclusions": [
- 0
], - "last_mod_date": "string",
- "searching": "string"
}{- "meta": {
- "count": 2
}, - "data": [
- {
- "id": 12345,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-15T14:30:00Z",
- "creation_user": 1487,
- "mod_time": "2023-11-18T09:15:00Z",
- "mod_user": 1487,
- "field_1001": "John Doe",
- "field_1002": "john.doe@example.com",
- "field_1003": "2023-10-15"
}, - "links": {
- "self": "/apricot/records/12345"
}
}, - {
- "id": 12346,
- "type": "records",
- "attributes": {
- "form_id": 100,
- "parent_id": null,
- "creation_time": "2023-10-16T10:00:00Z",
- "creation_user": 1488,
- "mod_time": "2023-11-17T15:30:00Z",
- "mod_user": 1488,
- "field_1001": "Jane Smith",
- "field_1002": "jane.smith@example.com",
- "field_1003": "2023-10-16"
}, - "links": {
- "self": "/apricot/records/12346"
}
}
]
}Retrieves a list of all forms available in your Apricot instance. Forms are the templates used to collect data in records.
Common use cases:
Response includes:
object Example: page[number]=1&page[size]=25 Pagination parameters for limiting result set size | |
| sort | string Examples:
Sort order for results. Prefix with '-' for descending order |
object Example: filter[active]=1&filter[name]=Client Filter parameters to narrow down results. Use field names as keys |
| Authorization required | string Header that carries token for request Authorization |
| id | integer <int32> Unique identifier for the form |
| type | string Resource type, always 'forms' |
object |
curl -X GET "https://api.bonterra.network/v1/apricot/forms" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "id": 100,
- "type": "forms",
- "attributes": {
- "name": "Client Intake Form",
- "parent_id": null,
- "description": "Form for collecting client information during intake",
- "active": 1,
- "creation_time": "2022-01-15T10:00:00Z",
- "creation_user": "admin@example.com",
- "mod_time": "2023-11-01T14:30:00Z",
- "mod_user": "admin@example.com",
- "sort_order": 1,
- "reference_tag": "INTAKE_V2",
- "program_assignment_type": 1,
- "form_logic_enabled": 1,
- "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "parent_guid": null
}
}What it does: Retrieves detailed information about a specific form, including its complete structure, sections, field definitions, field types, and all field IDs. This is essential for working with records and attachments.
When to use it:
What you'll need:
What you'll get back: Complete form structure including:
CRITICAL: Finding Attachment Field IDs
This endpoint is essential for discovering which field IDs are attachment fields.
Steps to find attachment field IDs:
sections arrayfields arrayfield_type_id indicates an attachment fieldid value - this is what you use for attachmentsExample: If you find a field with id: 827 and it's an attachment type:
field_827 when creating records with attachments (multipart/form-data)/records/{record_id}/attachment/827 for the attachment endpointField Type Reference: Common field_type_id values:
Important notes:
sections.fields array shows fields in display order| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
| id | integer <int32> |
| type | string |
object | |
object (ApricotLinks) Hypermedia links for navigation and resource discovery |
curl -X GET "https://api.bonterra.network/v1/apricot/forms/2" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "id": 0,
- "type": "forms",
- "attributes": {
- "name": "string",
- "parent_id": 0,
- "description": "string",
- "active": 1,
- "creation_time": "string",
- "creation_user": "string",
- "mod_time": "string",
- "mod_user": "string",
- "sort_order": 0,
- "reference_tag": "string",
- "program_assignment_type": 0,
- "form_logic_enabled": 1,
- "guid": "string",
- "parent_guid": "string",
- "sections": [
- {
- "id": 0,
- "form_id": 0,
- "name": "string",
- "sort_order": 0,
- "active": 1,
- "reference_tag": "string",
- "is_hidden": 1,
- "guid": "string",
- "fields": [
- {
- "id": 0,
- "section_id": 0,
- "field_type_id": 0,
- "sort_order": 0,
- "label": "string",
- "is_required": 1,
- "active": 1,
- "is_searchable": 1,
- "is_duplicate": 1,
- "is_hidden": 1,
- "is_readonly": 1,
- "tooltip": "string",
- "guid": "string",
- "reference_tag": "string",
- "field_properties": [
- {
- "id": 0,
- "field_id": "string",
- "type": "string",
- "value": "string"
}
], - "field_options": [
- {
- "id": "string",
- "type": "string",
- "attributes": {
- "field_id": 0,
- "value": "string",
- "sort_order": 0
}
}
]
}
], - "additionalProperties": null
}
], - "property1": null,
- "property2": null
}, - "links": {
- "self": "/apricot/records/12345",
- "first": "/apricot/records?form_id=100&page=1",
- "prev": "/apricot/records?form_id=100&page=1",
- "next": "/apricot/records?form_id=100&page=3",
- "last": "/apricot/records?form_id=100&page=10"
}
}What it does: Retrieves a complete list of all fields within a specific form. This is the most efficient way to get just the field definitions without the full form structure.
When to use it:
What you'll need:
What you'll get back: Array of field objects containing:
Note: This endpoint returns fields only. For complete form structure including sections and metadata, use GET /apricot/forms/{id} instead.
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
object (ApricotMeta) Metadata about the response, including pagination information | |
Array of objects (ApricotFormField) |
curl -X GET "https://api.bonterra.network/v1/apricot/forms/2/fields" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "meta": {
- "count": 25
}, - "data": [
- {
- "id": 1001,
- "section_id": 50,
- "field_type_id": 1,
- "sort_order": 1,
- "label": "Full Name",
- "is_required": 1,
- "active": 1,
- "is_searchable": 1,
- "is_duplicate": 0,
- "is_hidden": 0,
- "is_readonly": 0,
- "tooltip": "Enter the client's full legal name",
- "guid": "field-a1b2c3d4-e5f6-7890",
- "reference_tag": "CLIENT_NAME",
- "field_properties": [ ],
- "field_options": [ ]
}
]
}What it does: Retrieves a list of all programs that have access to a specific form. In Apricot, forms can be shared across multiple programs, allowing different service areas to use the same data collection structure.
When to use it:
What you'll need:
What you'll get back: Array of program objects that have access to this form, each containing:
Common scenarios:
Use this to:
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
Array of objects (ApricotProgram) Array of program objects |
curl -X GET "https://api.bonterra.network/v1/apricot/forms/2/programs" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}What it does: Retrieves the list of programs that the authenticated user has access to for a specific form. This helps determine which programs a user can create or view records in for the given form.
When to use it:
What you'll need:
What you'll get back: Array of programs the authenticated user can access for this form.
| id required | integer <int32> |
| Authorization required | string Header that carries token for request Authorization |
Array of objects (ApricotProgram) Array of program objects |
curl -X GET "https://api.bonterra.network/v1/apricot/forms/2/userPrograms" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{- "data": [
- {
- "id": 200,
- "type": "programs",
- "attributes": {
- "name": "Youth Services",
- "description": "Program for youth development and support",
- "active": 1,
- "site_id": 1,
- "sort_order": 1
}, - "links": {
- "self": "/apricot/programs/200"
}
}, - {
- "id": 201,
- "type": "programs",
- "attributes": {
- "name": "Family Support",
- "description": "Family counseling and support services",
- "active": 1,
- "site_id": 1,
- "sort_order": 2
}, - "links": {
- "self": "/apricot/programs/201"
}
}
]
}