Introduction
Welcome to the Mon Ami REST API! You can use our API to access Mon Ami REST API endpoints, which can get information on clients from our database, or setup webhooks so you get live notifications when things happen within the Mon Ami platform.
To setup API access contact us to get started.
We have examples in an assortment of languages! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. If you would like examples in a specific programming language, send a pull request or open an issue
Authentication
A Mon Ami API credential consists of a uid
and a secret
. You will need to use these to create Authorization headers and verify webhook signatures. Each of these examples will assume that these values are available as the environment variables MONAMI_UID
and MONAMI_SECRET
.
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/clients
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/clients',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
Errors
Errors will be returned a JSON with the following format.
{
"errors": [
{
"message": "The Authorization header is invalid."
},
{
"message": "first_name must be provided"
},
{
"message": "last_name must be provided"
}
]
}
The Mon Ami API uses the following error codes:
Status Code | Meaning | Description |
---|---|---|
400 | Bad Request | Your request is invalid. |
401 | Unauthorized | Your API key is wrong. |
404 | Not Found | The specified record could not be found. |
405 | Method Not Allowed | You tried to access a record with an invalid method. |
406 | Not Acceptable | You requested a format that isn't json. |
409 | Conflict | The request causes a conflict with existing data. |
410 | Gone | The record requested has been removed from our servers. |
422 | Unprocessable Entity | The request has invalid parameters. See the error messages in the response. |
429 | Too Many Requests | You're requesting too many records! Slow down! |
500 | Internal Server Error | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |
Client Calls
Get Client Calls
This endpoint returns a paginated list of client calls as well as pagination links and meta information.
GET /api/client_calls
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/client_calls?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/client_calls?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"client_calls": [
{
"id": 11,
"attempt_count": 0,
"status": "completed",
"completed_call_start_at": "2024-03-12T14:17:51.196Z",
"slug": "43e98a9667ab8be7",
"created_at": "2024-03-12T14:17:51.219Z",
"updated_at": "2024-03-12T14:18:59.225Z",
"completed_call_duration_in_minutes": 10.0,
"call_story": {
"wellbeing": "concerned",
"concerns": "mobility",
"private_message": "Having trouble retrieving things from the shelves"
},
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 30,
"created_at": "2024-03-12T14:18:53.391Z",
"updated_at": "2024-03-12T14:18:53.391Z",
"default_frequency": "weekly",
"name": "Telephone socialization",
"short_name": null,
"label": "telephone_socialization",
"status": "active"
},
"client": {
"id": 3,
"status": "active",
"created_at": "2024-03-12T07:17:35.597-07:00",
"updated_at": "2024-03-12T07:19:00.470-07:00",
"external_id": null,
"label": "ami-2bff7b48",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 16,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1943-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:34.924Z",
"updated_at": "2024-03-12T14:19:00.465Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075511226",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
}
],
"links": {
"self": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"first": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"next": "http://app.monami.io/api/client_calls?page=2&per_page=1",
"last": "http://app.monami.io/api/client_calls?page=23&per_page=1"
},
"meta": {
"total_pages": 23,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
client_calls | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Client Call
GET /api/client_calls/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/client_calls/11
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/client_calls/11',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 11,
"attempt_count": 0,
"status": "completed",
"completed_call_start_at": "2024-03-12T14:17:51.196Z",
"slug": "43e98a9667ab8be7",
"created_at": "2024-03-12T14:17:51.219Z",
"updated_at": "2024-03-12T14:18:59.225Z",
"completed_call_duration_in_minutes": 10.0,
"call_story": {
"wellbeing": "concerned",
"concerns": "mobility",
"private_message": "Having trouble retrieving things from the shelves"
},
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 30,
"created_at": "2024-03-12T14:18:53.391Z",
"updated_at": "2024-03-12T14:18:53.391Z",
"default_frequency": "weekly",
"name": "Telephone socialization",
"short_name": null,
"label": "telephone_socialization",
"status": "active"
},
"client": {
"id": 3,
"status": "active",
"created_at": "2024-03-12T07:17:35.597-07:00",
"updated_at": "2024-03-12T07:19:00.470-07:00",
"external_id": null,
"label": "ami-2bff7b48",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 16,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1943-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:34.924Z",
"updated_at": "2024-03-12T14:19:00.465Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075511226",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
}
This endpoint retrieves a specific client call.
URL Parameters
Parameter | Description |
---|---|
id | The id of the client call to retrieve |
Get Client Calls by Status
GET /api/client_calls/?q[by_status]=:status
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/client_calls?q[by_status]=completed&per_page=1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/client_calls?q[by_status]=completed&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"client_calls": [
{
"id": 11,
"attempt_count": 0,
"status": "completed",
"completed_call_start_at": "2024-03-12T14:17:51.196Z",
"slug": "43e98a9667ab8be7",
"created_at": "2024-03-12T14:17:51.219Z",
"updated_at": "2024-03-12T14:18:59.225Z",
"completed_call_duration_in_minutes": 10.0,
"call_story": {
"wellbeing": "concerned",
"concerns": "mobility",
"private_message": "Having trouble retrieving things from the shelves"
},
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 30,
"created_at": "2024-03-12T14:18:53.391Z",
"updated_at": "2024-03-12T14:18:53.391Z",
"default_frequency": "weekly",
"name": "Telephone socialization",
"short_name": null,
"label": "telephone_socialization",
"status": "active"
},
"client": {
"id": 3,
"status": "active",
"created_at": "2024-03-12T07:17:35.597-07:00",
"updated_at": "2024-03-12T07:19:00.470-07:00",
"external_id": null,
"label": "ami-2bff7b48",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 16,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1943-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:34.924Z",
"updated_at": "2024-03-12T14:19:00.465Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075511226",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
}
],
"links": {
"self": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"first": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"next": "http://app.monami.io/api/client_calls?page=2&per_page=1",
"last": "http://app.monami.io/api/client_calls?page=20&per_page=1"
},
"meta": {
"total_pages": 20,
"current_page": 1
}
}
This endpoint filters based on client call statuses.
URL Parameters
Parameter | Description |
---|---|
by_status | The status of a client call record. Available values for status are: pending and completed . |
Get Client Calls by Volunteer
GET /api/client_calls/?q[by_volunteer]=:volunteer_id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/client_calls?q[by_volunteer]=1&per_page=1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/client_calls?q[by_volunteer]=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"client_calls": [
{
"id": 6,
"attempt_count": 0,
"status": "completed",
"completed_call_start_at": "2024-03-12T14:17:50.280Z",
"slug": "a11523f3174c8718",
"created_at": "2024-03-12T14:17:50.299Z",
"updated_at": "2024-03-12T14:18:59.185Z",
"completed_call_duration_in_minutes": 7.0,
"call_story": {
"wellbeing": "great",
"concerns": null,
"private_message": null
},
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 30,
"created_at": "2024-03-12T14:18:53.391Z",
"updated_at": "2024-03-12T14:18:53.391Z",
"default_frequency": "weekly",
"name": "Telephone socialization",
"short_name": null,
"label": "telephone_socialization",
"status": "active"
},
"client": {
"id": 1,
"status": "active",
"created_at": "2024-03-12T07:17:30.034-07:00",
"updated_at": "2024-03-12T07:19:00.671-07:00",
"external_id": null,
"label": "ami-5b3d9f58",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 9,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1946-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:29.266Z",
"updated_at": "2024-03-12T14:19:00.668Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075514392",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
}
],
"links": {
"self": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"first": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"next": "http://app.monami.io/api/client_calls?page=2&per_page=1",
"last": "http://app.monami.io/api/client_calls?page=13&per_page=1"
},
"meta": {
"total_pages": 13,
"current_page": 1
}
}
This endpoint filters based on the volunteer present on a client call.
URL Parameters
Parameter | Description |
---|---|
by_volunteer | The ID for the volunteer associated with the client call |
Get Client Calls by Completed Call Start At
GET /api/client_calls/?q[completed_call_start_at_from]=:date&q[completed_call_start_at_to]=:date
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/client_calls?q[completed_call_start_at_from]=2024-03-12&q[completed_call_start_at_to]=2024-03-13&per_page=1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/client_calls?q[completed_call_start_at_from]=2024-03-12&q[completed_call_start_at_to]=2024-03-13&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"client_calls": [
{
"id": 11,
"attempt_count": 0,
"status": "completed",
"completed_call_start_at": "2024-03-12T14:17:51.196Z",
"slug": "43e98a9667ab8be7",
"created_at": "2024-03-12T14:17:51.219Z",
"updated_at": "2024-03-12T14:18:59.225Z",
"completed_call_duration_in_minutes": 10.0,
"call_story": {
"wellbeing": "concerned",
"concerns": "mobility",
"private_message": "Having trouble retrieving things from the shelves"
},
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 30,
"created_at": "2024-03-12T14:18:53.391Z",
"updated_at": "2024-03-12T14:18:53.391Z",
"default_frequency": "weekly",
"name": "Telephone socialization",
"short_name": null,
"label": "telephone_socialization",
"status": "active"
},
"client": {
"id": 3,
"status": "active",
"created_at": "2024-03-12T07:17:35.597-07:00",
"updated_at": "2024-03-12T07:19:00.470-07:00",
"external_id": null,
"label": "ami-2bff7b48",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 16,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1943-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:34.924Z",
"updated_at": "2024-03-12T14:19:00.465Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075511226",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": [
"spanish"
],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
}
],
"links": {
"self": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"first": "http://app.monami.io/api/client_calls?page=1&per_page=1",
"next": "http://app.monami.io/api/client_calls?page=2&per_page=1",
"last": "http://app.monami.io/api/client_calls?page=20&per_page=1"
},
"meta": {
"total_pages": 20,
"current_page": 1
}
}
This endpoint filters based on the volunteer present on a client call.
URL Parameters
Parameter | Description |
---|---|
completed_call_start_at_from | The first date a client call could be completed at in the given range |
completed_call_start_at_to | The last date a client call could be completed at in the given range |
Clients
List Clients
This endpoint returns a paginated list of clients as well as pagination links and meta information.
GET /api/clients
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/clients?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/clients?page=1&per_page=1',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"clients": [
{
"id": 12,
"status": "pending",
"created_at": "2024-03-12T07:19:02.114-07:00",
"updated_at": "2024-03-12T07:19:02.122-07:00",
"external_id": null,
"label": "ami-9776d470",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "San Mateo",
"state": "CA",
"zip": "94402"
},
"person": {
"id": 54,
"first_name": "My String",
"preferred_name": null,
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1959-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:19:02.091Z",
"updated_at": "2024-03-12T14:19:02.115Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": null,
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
],
"links": {
"self": "http://app.monami.io/api/clients?page=1&per_page=1",
"first": "http://app.monami.io/api/clients?page=1&per_page=1",
"next": "http://app.monami.io/api/clients?page=2&per_page=1",
"last": "http://app.monami.io/api/clients?page=21&per_page=1"
},
"meta": {
"total_pages": 21,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
clients | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
first_name | Filters by the user's first name | |
last_name | Filters by the user's last name | |
phone_number | Filters by any of the user's phone numbers, e.g. +15044791643 |
|
date_of_birth | Filters by the user's date of birth. Format: YYYY-MM-DD |
|
address_county | Filters by the user's county | |
social_security_number_last_4 | Filters by the last 4 digits of the user's SSN | |
status | Filters by the user's status |
Get a Specific Client
GET /api/clients/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/clients/12
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/clients/12',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 12,
"status": "pending",
"created_at": "2024-03-12T07:19:02.114-07:00",
"updated_at": "2024-03-12T07:19:02.122-07:00",
"external_id": null,
"label": "ami-9776d470",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "San Mateo",
"state": "CA",
"zip": "94402"
},
"person": {
"id": 54,
"first_name": "My String",
"preferred_name": null,
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1959-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:19:02.091Z",
"updated_at": "2024-03-12T14:19:02.115Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": null,
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
This endpoint retrieves a specific client.
URL Parameters
Parameter | Description |
---|---|
id | The id of the client to retrieve |
Create a Client
POST /api/clients/
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/clients/ \
-d '{
"person": {
"first_name": "Jane",
"preferred_name": "Client",
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "test@monami.io",
"gender": "female",
"primary_language": "english",
"secondary_languages": ["spanish","portuguese"],
"phone_numbers": [
{ "number": "+17075518391", "primary": true, "label": "home" }
]
},
"address": {
"address_line1": "X Random St",
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"custom_fields": {
"gender_identity": "custom_value",
"pronouns": "custom_value2"
}
}' \
-H 'Content-Type: application/json'
require 'excon'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.post('https://app.monami.io/api/clients/',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: {
person: {
first_name: "Jane",
preferred_name: "Client",
last_name: "Doe",
date_of_birth: "1940-05-30",
email: "test@monami.io",
gender: "female",
primary_language: "english",
secondary_languages: ["spanish","portuguese"],
phone_numbers: [
{ number: "+17075518391", primary: true, label: "home" }
]
},
address: {
address_line1: "X Random St",
city: "San Francisco",
state: "CA",
zip: "94117"
},
custom_fields: {
gender_identity: "custom_value",
pronouns: "custom_value2"
}
}.to_json
)
A successful request returns JSON structured like this:
{
"id": 22,
"status": "active",
"created_at": "2024-03-13T09:04:33.346-07:00",
"updated_at": "2024-03-13T09:04:33.346-07:00",
"external_id": null,
"label": "ami-c090e55c",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": null,
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "test@monami.io",
"created_at": "2024-03-13T16:04:33.256Z",
"updated_at": "2024-03-13T16:04:33.399Z",
"gender": "female",
"primary_language": "english",
"secondary_languages": ["spanish", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
This endpoint returns the newly created client.
Payload Parameters
Parameter | Description |
---|---|
person | JSON formatted person parameters |
address | JSON formatted address parameters |
custom_fields | JSON formatted custom fields |
Person Parameters
Parameter | Description |
---|---|
first_name | Client's first name |
preferred_name | Client's preferred name |
last_name | Client's last name |
date_of_birth | Client's birthdate, e.g. YYYY-MM-DD |
Client's email address | |
gender | Client's gender. Options are: female , male , trans_female , trans_male , non_binary , trans_non_binary , gender_queer , two_spirit , questioning_not_sure , not_listed , prefer_not_to_say |
primary_language | Language Object type label |
secondary_languages | Array of Language Object type labels |
phone_numbers | Array of Phone Number parameters |
Phone Number Parameters
Parameter | Description |
---|---|
number | Phone number including area code, e.g. '+17075518391' |
primary | Whether or not phone is primary. Only one primary phone per person. Options: true or false |
label | Type of phone number. Options: cell , home or work |
Address Parameters
Parameter | Description |
---|---|
address_line1 | Client's address |
city | Client's City |
state | Clients State 2 letter abbreviation eg.: CA |
zip | 5 digits zip code |
Create a Client for a specific Person
POST /api/people/:person_id/clients/
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/people/78/clients/ \
--form 'custom_fields="{\"gender_identity\": \"custom_value\", \"pronouns\": \"custom_value2\"}"'
require "uri"
require "net/http"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
url = URI("http://app.monami.io/api/people/82/clients/")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Basic #{credential}"
form_data = [['custom_fields', '{"gender_identity": "custom_value", "pronouns": "custom_value2"}']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
A successful request returns JSON structured like this:
{
"id": 22,
"status": "active",
"created_at": "2024-03-13T09:04:33.346-07:00",
"updated_at": "2024-03-13T09:04:33.346-07:00",
"external_id": null,
"label": "ami-c090e55c",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"person": {
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "test@monami.io",
"created_at": "2024-03-13T16:04:33.256Z",
"updated_at": "2024-03-13T16:04:33.399Z",
"gender": "female",
"primary_language": "english",
"secondary_languages": ["spanish", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
This endpoint creates a client for a specific person.
Payload Parameters
Parameter | Description |
---|---|
person_id | Integer ID present in the URL |
address | JSON formatted address parameters |
custom_fields | JSON formatted custom fields |
Update a Client
PATCH /api/clients/:client_id
curl -i -u $MONAMI_UID:$MONAMI_SECRET \
-X PATCH https://app.monami.io/api/clients/22 \
-d '{ "person": { "email": "new_email@monami.io" } }' \
-H 'Content-Type: application/json'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.put('https://app.monami.io/api/clients/22',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: {
person: { email: 'new_email@monami.io' },
address: { address_line2: 'Apt 2B' }
}.to_json
)
A successful request returns JSON structured like this:
{
"id": 22,
"status": "active",
"created_at": "2024-03-13T09:04:33.346-07:00",
"updated_at": "2024-03-13T09:04:33.346-07:00",
"external_id": null,
"label": "ami-c090e55c",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": "Apt 2B",
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "new_email@monami.io",
"created_at": "2024-03-13T16:04:33.256Z",
"updated_at": "2024-03-13T16:04:33.399Z",
"gender": "female",
"primary_language": null,
"secondary_languages": ["english", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
This endpoint returns the updated client.
Payload Parameters
Parameter | Description |
---|---|
person | JSON formatted person parameters |
address | JSON formatted address parameters |
custom_fields | JSON formatted custom fields |
Person Parameters
Parameter | Description |
---|---|
first_name | Client's first name |
preferred_name | Client's preferred name |
last_name | Client's last name |
date_of_birth | Client's birthdate eg.: YYYY-MM-DD |
Client's email address | |
gender | Client's gender. Options are: female , male , trans_female , trans_male , non_binary , trans_non_binary , gender_queer , two_spirit , questioning_not_sure , not_listed , prefer_not_to_say |
primary_language | Language Object type label |
secondary_languages | Array of Language Object type labels |
phone_numbers | Array of Phone Number parameters |
Phone Number Parameters
Parameter | Description |
---|---|
number | Phone number including area code, e.g. '+17075518391' |
primary | Whether or not phone is primary. Only one primary phone per person. Options: true or false |
label | Type of phone number. Options: cell , home or work |
Address Parameters
Parameter | Description |
---|---|
address_line1 | Client's address |
city | Client's city |
state | Client's state. 2-letter abbreviation e.g.: CA |
zip | 5 digits zip code |
Adopt a Client
PATCH /api/clients/:client_label/adopt
curl -i -u $MONAMI_UID:$MONAMI_SECRET \
-X PATCH https://app.monami.io/api/clients/ami-c090e55c/adopt \
-H 'Content-Type: application/json'
require 'excon'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.put('https://app.monami.io/api/clients/ami-c090e55c/adopt',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
An adoptable client response contains JSON structured like this:
{
"label": "ami-c090e55c",
"person": {
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"email": "new_email@monami.io",
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
A sucessful adoption request returns JSON structured like this:
{
"id": 22,
"status": "active",
"created_at": "2024-03-13T09:04:33.346-07:00",
"updated_at": "2024-03-13T09:04:33.346-07:00",
"external_id": null,
"label": "ami-c090e55c",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": "Apt 2B",
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "new_email@monami.io",
"created_at": "2024-03-13T16:04:33.256Z",
"updated_at": "2024-03-13T16:04:33.399Z",
"gender": "female",
"primary_language": null,
"secondary_languages": ["english", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": ["my_credential_site"]
}
}
This endpoint adds a specific client to a site credential's site, and returns the full client response.
URL Parameters
Parameter | Description |
---|---|
client_label | The label of the client to adopt |
List Documents for a Client
This endpoint returns a paginated list of Documents that have been completed for a Client.
GET /api/clients/:client_id/documents
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/clients/ami-abc1234/documents"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/clients/ami-abc1234/documents',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"documents": [
{
"document": {
"metadata": {
"name": "Nutrition Assessment",
"label": "nutrition-assessment",
"status": "completed"
},
"data": {
"person.first_name": "Robert",
"person.last_name": "Johnson"
}
}
}
],
"links": {
"self": "http://app.monami.io/api/clients/ami-6f22e351/documents?page=1",
"first": "http://app.monami.io/api/clients/ami-6f22e351/documents?page=1",
"last": "http://app.monami.io/api/clients/ami-6f22e351/documents?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
documents | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
q[label] | null | Filter by a Document Template label. Ex: 'nutrition-assessment' |
q[completed_at_gt] | null | Filter by completed_at date greater than a cutoff date in 'YYYY-MM-DD' format. |
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Assessments
List available templates for Assessment Requests
This endpoint returns a collection of Documents Templates that can be used to create Assessment Requests.
GET /api/assessments/templates
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/assessments/templates"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/assessments/templates',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"templates": [
{
"name": "Screen for Consumer Services v1",
"code": "SF-101",
"label": "sf-101-screen-for-consumer-services-v1",
"description": "The standard form 101",
"full_name": "SF-101 - Screen for Consumer Services v1",
"created_at": "2024-12-10T23:29:39.002Z",
"updated_at": "2024-12-10T23:29:39.002Z"
}
],
"links": {
"self": "http://app.monami.io/api/assessments/templates?page=1&per_page=25",
"first": "http://app.monami.io/api/assessments/templates?page=1&per_page=25",
"last": "http://app.monami.io/api/assessments/templates?page=1&per_page=25"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
templates | The collection of available assessment templates. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
templates
parameters
Parameter | Description |
---|---|
label | The persistent API ID to use when referring to the document or passing in other requests |
name | The name of the assessment template. |
code | (Optional) - The document code of the assessment template |
description | A helpful description of the template |
full_name | A combined name of the code and name of the assessment template |
created_at | The creation DateTime of the assessment template |
updated_at | DateTime of the most recent update to the assessment template |
Query Parameters
Parameter | Default | Description |
---|---|---|
q[label_eq] | null | Filter by a Document Template label. Ex: 'sf-101-screen-for-consumer-services-v1' |
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Create an Assessment Request
This endpoint creates an assessment request
POST /api/assessments/requests
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/assessments/requests"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.post('https://app.monami.io/api/assessments/requests',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: '{ "client_id": "ami-010101", "document_label": "sf-101-screen-for-consumer-services-v1" }'
)
A successful request returns an HTTP 201 Created status and JSON structured like this:
{
"id": 2,
"status": "requested",
"created_at": "2024-12-10T23:48:51.180Z",
"updated_at": "2024-12-10T23:48:51.180Z",
"documentable": {
"id": 22,
"type": "Client",
"label": "ami-010101"
},
"document": {
"metadata": {
"name": "Screen for Consumer Services v1"
},
"data": {}
}
}
Request Parameters
Parameter | Description |
---|---|
client_id | The label of the client to create the assessment request. |
document_label | The label of the document template to use for the assessment |
List Assessment requests
This endpoint returns a collection of assessment requests and metadata
GET /api/assessments/requests
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/assessments/requests"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/assessments/requests',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"requests": [
{
"id": 1,
"status": "completed",
"created_at": "2024-12-10T23:43:48.318Z",
"updated_at": "2024-12-10T23:43:52.045Z",
"documentable": {
"id": 22,
"type": "Client",
"label": "ami-010101"
},
"document": {
"metadata": {
"name": "Screen for Consumer Services v1"
},
"data": {}
},
"links": {
"pdf": "http://app.monami.io/pdf-path"
}
}
],
"links": {
"self": "http://app.monami.io/api/assessments/requests?page=1&per_page=25",
"first": "http://app.monami.io/api/assessments/requests?page=1&per_page=25",
"last": "http://app.monami.io/api/assessments/requests?page=1&per_page=25"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
requests | The collection of assessment requests. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
q[status_eq] | null | Filter by request status(requested, completed). |
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Show an Assessment request
This endpoint returns an assessment request and metadata.
GET /api/assessments/requests/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/assessments/requests/5"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/assessments/requests/5',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 5,
"status": "completed",
"created_at": "2024-11-14T07:39:01.266Z",
"updated_at": "2024-11-14T09:26:06.951Z",
"documentable": {
"id": 8,
"type": "Client",
"label": "ami-010101"
},
"document": {
"metadata": {
"name": "Screen for Consumer Services v1"
},
"data": {
"adl_dress": "Yes",
"iadl_shop": "NO DIFFICULTY",
"iadl_summary": "Quis expedita reprehenderit. Fuga consequatur ipsum. Deleniti eum laboriosam.",
"iadl_housekeeping": "NO DIFFICULTY",
"iadl_manage_money": "NO DIFFICULTY",
"meals_last_3_days": "No",
"iadl_prepare_meals": "GREAT DIFFICULTY ‑ e.g., little or no involvement in the activity possible",
"iadl_use_telephone": "GREAT DIFFICULTY ‑ e.g., little or no involvement in the activity possible",
"iadl_transportation": "GREAT DIFFICULTY ‑ e.g., little or no involvement in the activity possible",
"assistance_receiving": [],
"iadl_manage_medications": "SOME DIFFICULTY ‑ e.g., needs some help, is very slow, or fatigues"
}
},
"links": {
"pdf": "https://app.monami.io/pdf-path"
}
}
Response Parameters
Parameter | Description |
---|---|
id | The unique ID of the assessment request. |
status | The status of the assessment request. (requested , completed ) |
documentable | Type and identification metadata |
document | Document data and metadata |
links | Links to other repreresentaions of the document |
Languages
Get Languages
This endpoint returns a paginated list of languages as well as pagination links and meta information.
GET /api/languages
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/languages?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/languages?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"languages": [
{
"id": 1,
"name": "English",
"label": "english"
}
],
"links": {
"self": "http://app.monami.io/api/languages?page=1&per_page=1",
"first": "http://app.monami.io/api/languages?page=1&per_page=1",
"next": "http://app.monami.io/api/languages?page=2&per_page=1",
"last": "http://app.monami.io/api/languages?page=63&per_page=1"
},
"meta": {
"total_pages": 63,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
languages | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Language
GET /api/languages/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/languages/43
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/languages/43',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 43,
"name": "Portuguese",
"label": "portuguese"
}
This endpoint retrieves a specific language.
URL Parameters
Parameter | Description |
---|---|
id | The id of the language to retrieve |
People
Get People
This endpoint returns a paginated list of people as well as pagination links and meta information.
GET /api/people
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/people?page=2&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/people?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"people": [
{
"id": 6,
"first_name": "Karma",
"preferred_name": null,
"middle_name": null,
"last_name": "Marty",
"date_of_birth": null,
"email": "My String",
"created_at": "2024-01-25T15:56:29.766Z",
"updated_at": "2024-01-25T15:56:29.766Z",
"gender": "Female",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
],
"links": {
"self": "http://app.monami.io/api/people?page=2&per_page=1",
"first": "http://app.monami.io/api/people?page=1&per_page=1",
"prev": "http://app.monami.io/api/people?page=1&per_page=1",
"last": "http://app.monami.io/api/people?page=2&per_page=1"
},
"meta": {
"total_pages": 2,
"current_page": 2
}
}
Response Parameters
Parameter | Description |
---|---|
people | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Person
GET /api/people/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/people/6
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/people/6',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 6,
"first_name": "Karma",
"preferred_name": null,
"middle_name": null,
"last_name": "Marty",
"date_of_birth": null,
"email": "My String",
"created_at": "2024-01-25T15:56:29.766Z",
"updated_at": "2024-02-16T20:33:51.338Z",
"gender": "Female",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
This endpoint retrieves a specific person.
URL Parameters
Parameter | Description |
---|---|
id | The id of the person to retrieve |
Get People by email
GET /api/people/?q[by_email]=:email
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/people?q[by_email]=some@email.com&per_page=1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/people?q[by_email]=some@email.com&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"people": [
{
"id": 6,
"first_name": "Karma",
"preferred_name": null,
"middle_name": null,
"last_name": "Marty",
"date_of_birth": null,
"email": "some@email.com",
"created_at": "2024-01-25T15:56:29.766Z",
"updated_at": "2024-02-16T20:33:51.338Z",
"gender": "Female",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
],
"links": {
"self": "http://app.monami.io/api/people?page=1",
"first": "http://app.monami.io/api/people?page=1",
"last": "http://app.monami.io/api/people?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
This endpoint filters based on the person's email.
URL Parameters
Parameter | Description |
---|---|
by_email | The email address of a person record. |
Get Person by Volunteer
GET /api/people/?q[by_volunteer]=:volunteer_id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/people?q[by_volunteer]=1&per_page=1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/people?q[by_volunteer]=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"people": [
{
"id": 9,
"first_name": "Lenny",
"preferred_name": "Herma",
"middle_name": null,
"last_name": "Mann",
"date_of_birth": "1941-01-25",
"email": "My String",
"created_at": "2024-01-25T15:56:30.555Z",
"updated_at": "2024-01-25T15:56:30.959Z",
"gender": "Prefer not to say",
"primary_language": "english",
"secondary_languages": ["german"],
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
],
"links": {
"self": "http://app.monami.io/api/people?page=1",
"first": "http://app.monami.io/api/people?page=1",
"last": "http://app.monami.io/api/people?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
This endpoint returns the Person record for a given Volunteer.
URL Parameters
Parameter | Description |
---|---|
by_volunteer | The ID for the volunteer associated with the person |
Get Person by Client
GET /api/people/?q[by_client]=:client_id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/people?q[by_client]=10
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/people?q[by_client]=10',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"people": [
{
"id": 9,
"first_name": "Lenny",
"preferred_name": "Herma",
"middle_name": null,
"last_name": "Mann",
"date_of_birth": "1941-01-25",
"email": "My String",
"created_at": "2024-01-25T15:56:30.555Z",
"updated_at": "2024-01-25T15:56:30.959Z",
"gender": "Prefer not to say",
"primary_language": "english",
"secondary_languages": ["german"],
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
],
"links": {
"self": "http://app.monami.io/api/people?page=1",
"first": "http://app.monami.io/api/people?page=1",
"last": "http://app.monami.io/api/people?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
This endpoint returns the Person record for a given Client.
URL Parameters
Parameter | Description |
---|---|
by_client | The ID for the client associated with the person |
Update a Person
PATCH /api/people/:person_id
curl -i -u $MONAMI_UID:$MONAMI_SECRET \
-X PATCH https://app.monami.io/api/people/6 \
-d '{ "email": "new_email@monami.io", "secondary_languages": ["italian", "spanish"] }' \
-H 'Content-Type: application/json'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.put('https://app.monami.io/api/people/6',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: {
email: 'new_email@monami.io',
secondary_languages: ['italian', 'spanish']
}.to_json
)
A successful request returns JSON structured like this:
{
"id": 6,
"first_name": "Karma",
"preferred_name": null,
"middle_name": null,
"last_name": "Marty",
"date_of_birth": null,
"email": "new_email@monami.io",
"created_at": "2024-01-25T15:56:29.766Z",
"updated_at": "2024-02-16T20:33:51.338Z",
"gender": "Female",
"primary_language": "english",
"secondary_languages": ["spanish", "italian"],
"phone_numbers": [
{
"number": "+15044791643",
"primary": true,
"label": "home"
}
],
"sites": []
}
This endpoint returns the updated person.
Payload Parameters
Parameter | Description |
---|---|
first_name | Person's first name |
preferred_name | Person's preferred name |
last_name | Person's last name |
date_of_birth | Person's birthdate eg.: YYYY-MM-DD |
Person's email address | |
gender | Person's gender. Options are: female , male , trans_female , trans_male , non_binary , trans_non_binary , gender_queer , two_spirit , questioning_not_sure , not_listed , prefer_not_to_say |
primary_language | Language Object type label |
secondary_languages | Array of Language Object type labels |
Adopt a Person
PATCH /api/people/:id/adopt
curl -i -u $MONAMI_UID:$MONAMI_SECRET \
-X PATCH https://app.monami.io/api/people/78/adopt \
-H 'Content-Type: application/json'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.put('https://app.monami.io/api/people/78/adopt',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
An adoptable person response contains JSON structured like this:
{
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"email": "new_email@monami.io",
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": []
}
A sucessful adoption request returns JSON structured like this:
{
"id": 78,
"first_name": "Jane",
"preferred_name": "Client",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "new_email@monami.io",
"created_at": "2024-03-13T16:04:33.256Z",
"updated_at": "2024-03-13T16:04:33.399Z",
"gender": "female",
"primary_language": null,
"secondary_languages": ["english", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": ["my_credential_site"]
}
This endpoint adds a specific person to a site credential's site, and returns the full person response.
URL Parameters
Parameter | Description |
---|---|
id | The id of the person to adopt |
Service Records
Create a Service Record
POST /api/service_records
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/service_records \
--form '"{\"recipient_id\":\"ami-54709fe3\",\"program_label\":\"nutrition\",\"service_definition_label\":\"nutrition_definition_name_1\",\"funding_source_label\":\"label_1\",\"provider_label\":\"kihn-mcdermott\",\"service_rate_id\":1,\"unit_count\":2.5,\"service_delivered_on\":\"2024-09-10\",\"comment\":\"Hello API!\"}"'
require "uri"
require "net/http"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
url = URI("http://app.monami.io/api/service_records")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Basic #{credential}"
form_data = {"recipient_id":"ami-54709fe3","program_label":"nutrition","service_definition_label":"nutrition_definition_name_1","funding_source_label":"label_1","provider_label":"kihn-mcdermott","service_rate_id":1,"unit_count":2.5,"service_delivered_on":"2024-09-10","comment":"Hello API!"}
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
A successful request returns JSON structured like this:
{
"id": 1,
"status": "active",
"unit_type": "each",
"unit_count": 2.5,
"per_unit_expenditure_cents": 1000,
"recipient_count": 1,
"service_delivered_on": "2024-09-10",
"service_detail": null,
"service_rate_id": 1,
"program_label": "nutrition",
"provider_label": "helping_hands",
"service_definition_label": "congregate_dining",
"funding_source_label": "state_funding",
"site_label": null,
"recipient_type": "Client",
"recipient_id": "ami-54709fe3",
"volunteer_id": null,
"comment": "Hello API!",
"links": {
"recipient_url": "http://app.monami.io/api/clients/ami-54709fe3"
}
}
Request Parameters
Parameter | Description |
---|---|
recipient_id | The unique ID of the recipient of the service. Ex: ami-54709fe3 |
program_label | The label of the Program associated with the service record. |
service_definition_label | The label of the Service Definition associated with the service record. |
funding_source_label | The label of the Funding Source associated with the service record. |
provider_label | The label of the Provider associated with the service record. |
service_rate_id | The ID of the service rate associated with the service record. |
unit_count | The number of service units delivered. |
service_delivered_on | The date the service was rendered. |
comment | Notes about the service record |
Response Parameters
Parameter | Description |
---|---|
id | The unique ID of the service record |
status | Status of the service record. (active, pending, canceled) |
unit_type | The unit type of the service. (fifteen_minute, daily, each, per_service, per_month, per_meal, per_hour, per_trip, per_session, per_contact, per_activity, per_person) |
unit_count | The number of service units delivered. |
per_unit_expenditure_cents | The per unit cost in Cents. |
recipient_count | The number of recipients of the service. |
service_delivered_on | The date the service was rendered. |
service_detail | Notes about the service delivery. |
service_rate_id | The ID of the service rate associated with the service record. |
program_label | The label of the Program associated with the service record. This can be used as an ID on other APIs. |
provider_label | The label of the Provider associated with the service record. This can be used as an ID on other APIs. |
service_definition_label | The label of the Service Definition associated with the service record. This can be used as an ID on other APIs. |
funding_source_label | The label of the Funding Source associated with the service record. This can be used as an ID on other APIs. |
site_label | The label of the Site associated with the service record. This can be used as an ID on other APIs. |
recipient_type | The type of recipient of the service. Usually Client, but something service groups are used. |
recipient_id | The unique ID of the recipieint of the service |
volunteer_id | The unique ID of a volunteer if they're associated with the service record. |
comment | Notes about the service record |
links | A map of URLs to related API endpoints. |
List Service Records
This endpoint returns a paginated list of service records as well as pagination links and meta information.
GET /api/service_records
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/clients?page=1&per_page=3&q[date_from]=8/05/2014&q[date_to]=9/06/2024&q[with_status]=active"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/service_records?page=1&per_page=3&q[date_from]=8/05/2014&q[date_to]=9/06/2024&q[with_status]=active',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"service_records": [
{
"id": 19,
"status": "active",
"unit_count": 1.0,
"unit_type": "each",
"recipient_count": 1,
"service_delivered_on": "2020-08-05",
"service_detail": "MyString",
"program_id": null,
"provider_id": null,
"service_definition_id": 19,
"service_funding_source_id": null,
"service_rate_id": null,
"per_unit_expenditure_cents": 0,
"activity_type": "Meeting",
"activity_id": 19,
"recipient_type": "Client",
"recipient_id": "ami-e0852a7e",
"volunteer_id": null,
"links": {
"recipient_url": "http://app.monami.io/api/clients/ami-e0852a7e"
}
},
{
"id": 20,
"status": "active",
"unit_count": 1.0,
"unit_type": "each",
"recipient_count": 1,
"service_delivered_on": "2020-08-05",
"service_detail": "AnotherString",
"program_id": null,
"provider_id": null,
"service_definition_id": 20,
"service_funding_source_id": null,
"service_rate_id": null,
"per_unit_expenditure_cents": 0,
"activity_type": "Meeting",
"activity_id": 20,
"recipient_type": "Client",
"recipient_id": "ami-6969e283",
"volunteer_id": null,
"links": {
"recipient_url": "http://app.monami.io/api/clients/ami-6969e283"
}
},
{
"id": 21,
"status": "active",
"unit_count": 1.0,
"unit_type": "each",
"recipient_count": 1,
"service_delivered_on": "2020-08-05",
"service_detail": "OneMoreString",
"program_id": null,
"provider_id": null,
"service_definition_id": 21,
"service_funding_source_id": null,
"service_rate_id": null,
"per_unit_expenditure_cents": 0,
"activity_type": "Meeting",
"activity_id": 21,
"recipient_type": "Client",
"recipient_id": "ami-dfcabdc4",
"volunteer_id": null,
"links": {
"recipient_url": "http://app.monami.io/api/clients/ami-dfcabdc4"
}
}
],
"links": {
"self": "http://app.monami.io/api/service_records?page=1",
"first": "http://app.monami.io/api/service_records?page=1",
"last": "http://app.monami.io/api/service_records?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
q[date_from] | Null | The first date a service record could be delivered on in the given range |
q[date_to] | Null | The last date a service record could be delivered on in the given range |
q[with_status] | Null | Filter service records by a status. (active, canceled, pending) |
Response Parameters
Parameter | Description |
---|---|
service_records | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Get a Specific Service Record
GET /api/service_records/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/service_records/1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/service_records/1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 2,
"status": "active",
"unit_type": "each",
"recipient_count": 1,
"service_delivered_on": "2024-09-06",
"service_detail": "MyString",
"service_rate_id": null,
"program_label": "sint_rem_dicta_sunt",
"provider_label": "welch-kohler",
"service_definition_label": "event_definition_name_1",
"funding_source_label": "label_2",
"site_label": "dietrich_schmitt",
"unit_count": 1.0,
"per_unit_expenditure_cents": 100,
"recipient_type": "Client",
"recipient_id": "ami-bb6ff3ef",
"volunteer_id": null,
"comment": null,
"links": {
"recipient_url": "http://app.monami.io/api/clients/ami-bb6ff3ef"
}
}
This endpoint retrieves a specific service record.
URL Parameters
Parameter | Description |
---|---|
id | The id of the service record to retrieve |
Service Definitions
Get Service Definitions
This endpoint returns a paginated list of Service Definitions as well as pagination links and meta information.
GET /api/service_definitions
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/service_definitions?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/service_definitions?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"service_definitions": [
{
"id": 3,
"default_frequency": "weekly",
"name": "nutrition",
"short_name": null,
"label": "nutrition",
"status": "active",
"created_at": "2024-09-06T13:39:09.186-07:00",
"updated_at": "2024-09-06T13:39:09.186-07:00"
},
{
"id": 4,
"default_frequency": "weekly",
"name": "congregate dining",
"short_name": null,
"label": "congregate_dining",
"status": "active",
"created_at": "2024-09-06T13:39:09.208-07:00",
"updated_at": "2024-09-06T13:39:09.208-07:00"
}
],
"links": {
"self": "http://app.monami.io/api/service_definitions?page=1",
"first": "http://app.monami.io/api/service_definitions?page=1",
"last": "http://app.monami.io/api/service_definitions?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
service_definitions | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Service Definition
GET /api/service_definitions/:id_or_label
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/service_definitions/nutrition
# OR
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/service_definitions/43
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/service_definitions/nutrition',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 6,
"name": "nutrition",
"label": "nutrition",
"default_frequency": "weekly",
"short_name": null,
"status": "active",
"created_at": "2024-09-06T13:44:30.089-07:00",
"updated_at": "2024-09-06T13:44:30.089-07:00"
}
This endpoint retrieves a specific Service Definition.
Service Definition Parameters
Parameter | Description |
---|---|
id | The id of the service definition |
name | The common name of the service definition |
label | The label which can be used as a friendly id on the API in within Mon Ami |
default_frequency | How frerquently services are delivered by default. (weekly, monthly, once, daily, quarterly, yearly, per_bid, twice_weekly, bi_weekly) |
short_name | (Optional) - An abbreviated name for really long names. definition |
status | The id of the service definition. (pending, active, finished, canceled) |
Service Rates
Get Service Rates
This endpoint returns a paginated list of Service Rates as well as pagination links and meta information.
GET /api/service_rates
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/service_rates?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/service_rates?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"service_rates": [
{
"id": 6,
"start_on": "2024-08-30",
"end_on": null,
"unit_rate_in_cents": 1000,
"rate_details": null,
"created_at": "2024-09-06T14:49:23.408-07:00",
"updated_at": "2024-09-06T14:49:23.408-07:00",
"provider_label": "cole_marvin",
"service_definition_label": "nutrition"
}
],
"links": {
"self": "http://app.monami.io/api/service_rates?page=1",
"first": "http://app.monami.io/api/service_rates?page=1",
"last": "http://app.monami.io/api/service_rates?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
service_rates | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Service Rate
GET /api/service_rates/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/service_rates/5
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/service_rates/5',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 5,
"start_on": "2024-08-30",
"end_on": null,
"unit_rate_in_cents": 1000,
"rate_details": null,
"provider_label": "abshire_hintz_and_robel",
"service_definition_label": "nutrition",
"created_at": "2024-09-06T14:47:48.061-07:00",
"updated_at": "2024-09-06T14:47:48.061-07:00"
}
This endpoint retrieves a specific Service Rate.
Service Rate Parameters
Parameter | Description |
---|---|
id | The id of the service definition |
starts_on | The start date of the rate being valid. |
end_on | (Optional) - If set, the final date of the rate being valid. |
unit_rate_in_cents | The cost in cents. 100 cents = 1 Dollar. |
rate_details | (Optional) - A short description of the service rate. |
provider_label | The label of the provider associated with the rate. |
service_definition_label | The label of the service definition associated with this rate. |
Funding Sources
Get Funding Sources
This endpoint returns a paginated list of Funding Sources as well as pagination links and meta information.
GET /api/funding_sources
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/funding_sources?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/funding_sources?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"funding_sources": [
{
"id": 124,
"name": "East O'Reilly College",
"status": "active",
"created_at": "2024-09-06T16:37:13.767-07:00",
"updated_at": "2024-09-06T16:37:13.767-07:00",
"label": "label_3"
},
{
"id": 125,
"name": "South Bahringer Academy",
"status": "active",
"created_at": "2024-09-06T16:37:13.779-07:00",
"updated_at": "2024-09-06T16:37:13.779-07:00",
"label": "label_4"
},
{
"id": 126,
"name": "Thompson Academy",
"status": "active",
"created_at": "2024-09-06T16:37:13.873-07:00",
"updated_at": "2024-09-06T16:37:13.873-07:00",
"label": "label_5"
}
],
"links": {
"self": "http://app.monami.io/api/funding_sources?page=1",
"first": "http://app.monami.io/api/funding_sources?page=1",
"last": "http://app.monami.io/api/funding_sources?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
funding_sources | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Funding Source
GET /api/funding_sources/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/funding_sources/5
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/funding_sources/5',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 122,
"name": "East Beier",
"label": "label_1",
"status": "active",
"created_at": "2024-09-06T16:36:23.837-07:00",
"updated_at": "2024-09-06T16:36:23.837-07:00"
}
This endpoint retrieves a specific Funding Source.
Funding Source Parameters
Parameter | Description |
---|---|
id | The id of the funding source |
name | Name of the funding source |
label | A friendly id that can be used on APIs and within Mon Ami. |
status | The status of the funding source. (active, disabled) |
Programs
Get Programs
This endpoint returns a paginated list of Programs as well as pagination links and meta information.
GET /api/programs
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/programs?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/programs?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"programs": [
{
"id": 210,
"label": "aliquid_dolores_nisi_laboriosam",
"name": "Aliquid dolores nisi laboriosam.",
"short_name": "animi",
"created_at": "2024-09-06T15:56:02.173-07:00",
"updated_at": "2024-09-06T15:56:02.173-07:00",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": null,
"external_guid": null,
"caregiver_relationship_type": null,
"default_funding_source_label": "label_3",
"funding_source_labels": ["label_3", "label_4"],
"service_definition_labels": []
},
{
"id": 211,
"label": "quas_sunt_quis_molestiae",
"name": "Quas sunt quis molestiae.",
"short_name": "ut",
"created_at": "2024-09-06T15:56:02.280-07:00",
"updated_at": "2024-09-06T15:56:02.280-07:00",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": null,
"external_guid": null,
"caregiver_relationship_type": null,
"default_funding_source_label": "label_5",
"funding_source_labels": ["label_5", "label_6"],
"service_definition_labels": []
},
{
"id": 212,
"label": "dolor_voluptatibus_similique_voluptates",
"name": "Dolor voluptatibus similique voluptates.",
"short_name": "voluptatem",
"created_at": "2024-09-06T15:56:02.370-07:00",
"updated_at": "2024-09-06T15:56:02.370-07:00",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": null,
"external_guid": null,
"caregiver_relationship_type": null,
"default_funding_source_label": "label_7",
"funding_source_labels": ["label_7", "label_8"],
"service_definition_labels": []
}
],
"links": {
"self": "http://app.monami.io/api/programs?page=1",
"first": "http://app.monami.io/api/programs?page=1",
"last": "http://app.monami.io/api/programs?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
programs | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Program
GET /api/programs/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/programs/5
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/programs/5',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 208,
"label": "quia_et_iure_quidem",
"name": "Quia et iure quidem.",
"short_name": "repudiandae",
"created_at": "2024-09-06T15:54:57.724-07:00",
"updated_at": "2024-09-06T15:54:57.724-07:00",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": null,
"external_guid": null,
"caregiver_relationship_type": null,
"default_funding_source_label": "label_1",
"funding_source_labels": ["label_1", "label_2"],
"service_definition_labels": []
}
This endpoint retrieves a specific Program.
Program Parameters
Parameter | Description |
---|---|
id | The id of the program |
name | The name of the program |
label | A friendly id that can be used on APIs as well as within Mon Ami |
short_name | (Optional) - An abbreviatted name for the program |
description | (Optional) - A short description of this program. |
external_guid | (Optional) - An ID from an external system. Can also be used on supported APIs for preventing duplicate records. |
type | The type of program. Ex: (internal, external, reporting_only) |
default_funding_source_label | The label of the default funding source for this program |
funding_source_labels | An array of labels of the funding sources available to this program. |
service_definition_labels | An array of labels of the service definitions associatted with this program |
Visits
List Visits
This endpoint returns a paginated list of visits as well as pagination links and meta information.
GET /api/visits
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/visits?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/visits?page=1&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"visits": [
{
"id": 126,
"status": "completed",
"visit_type": "service",
"schedule_type": "fixed",
"scheduled_duration": 210,
"scheduled_start_at": "2024-03-10T15:00:00.000-07:00",
"created_at": "2024-03-12T07:18:35.882-07:00",
"updated_at": "2024-03-12T07:20:35.498-07:00",
"start_at": "2024-03-10T15:00:00.000-07:00",
"completed_at": "2024-03-10T18:30:00.000-07:00",
"duration": 210,
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 32,
"created_at": "2024-03-12T14:18:53.409Z",
"updated_at": "2024-03-12T14:18:53.409Z",
"default_frequency": "weekly",
"name": "Personal Care",
"short_name": null,
"label": "personal_care_2",
"status": "active"
},
"client": {
"id": 2,
"status": "active",
"created_at": "2024-03-12T07:17:34.014-07:00",
"updated_at": "2024-03-12T07:19:00.423-07:00",
"external_id": null,
"label": "ami-3f472c50",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94301"
},
"person": {
"id": 13,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:33.331Z",
"updated_at": "2024-03-12T14:19:00.410Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075511731",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"visit_coding": null,
"visit_recap": {
"description": "Delivered groceries",
"survey_wellbeing": "concerned",
"survey_health_concern": "Access to essentials",
"volunteer_admin_notes": null
}
}
],
"links": {
"self": "http://app.monami.io/api/visits?page=1&per_page=1",
"first": "http://app.monami.io/api/visits?page=1&per_page=1",
"next": "http://app.monami.io/api/visits?page=2&per_page=1",
"last": "http://app.monami.io/api/visits?page=240&per_page=1"
},
"meta": {
"total_pages": 240,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
visits | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Visit
GET /api/visits/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/visits/126
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/visits/126',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 126,
"status": "completed",
"visit_type": "service",
"schedule_type": "fixed",
"scheduled_duration": 210,
"scheduled_start_at": "2024-03-10T15:00:00.000-07:00",
"created_at": "2024-03-12T07:18:35.882-07:00",
"updated_at": "2024-03-12T07:20:35.498-07:00",
"start_at": "2024-03-10T15:00:00.000-07:00",
"completed_at": "2024-03-10T18:30:00.000-07:00",
"duration": 210,
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 32,
"created_at": "2024-03-12T14:18:53.409Z",
"updated_at": "2024-03-12T14:18:53.409Z",
"default_frequency": "weekly",
"name": "Personal Care",
"short_name": null,
"label": "personal_care_2",
"status": "active"
},
"client": {
"id": 2,
"status": "active",
"created_at": "2024-03-12T07:17:34.014-07:00",
"updated_at": "2024-03-12T07:19:00.423-07:00",
"external_id": null,
"label": "ami-3f472c50",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94301"
},
"person": {
"id": 13,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:33.331Z",
"updated_at": "2024-03-12T14:19:00.410Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075511731",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"visit_coding": null,
"visit_recap": {
"description": "Delivered groceries",
"survey_wellbeing": "concerned",
"survey_health_concern": "Access to essentials",
"volunteer_admin_notes": null
}
}
This endpoint retrieves a specific visit.
URL Parameters
Parameter | Description |
---|---|
id | The id of the visit to retrieve |
Get Visits by Start At Date
GET /api/visits/?q[start_at_from]=:start_at_from&q[start_at_to]=:start_at_to
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/visits?q[start_at_from]=2024-03-10&q[start_at_to]=2024-03-11&per_page=1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/visits?q[start_at_from]=2024-03-10&q[start_at_to]=2024-03-11&per_page=1',
headers: {
'Content-Type' : 'application/json',
'Authorization' : "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"visits": [
{
"id": 6,
"status": "completed",
"visit_type": "service",
"schedule_type": "fixed",
"scheduled_duration": 210,
"scheduled_start_at": "2024-03-10T15:00:00.000-07:00",
"created_at": "2024-03-12T07:18:07.987-07:00",
"updated_at": "2024-03-12T07:20:34.273-07:00",
"start_at": "2024-03-10T15:00:00.000-07:00",
"completed_at": "2024-03-10T18:30:00.000-07:00",
"duration": 210,
"program": {
"id": 1,
"name": "Community Services",
"short_name": null,
"created_at": "2024-03-12T14:17:24.975Z",
"updated_at": "2024-03-12T14:18:53.381Z",
"type": "internal",
"description": null,
"category": null,
"reporting_framework": "oaa",
"label": "community_services"
},
"funding_source": {
"id": 13,
"name": "III-B",
"status": "active",
"created_at": "2024-03-12T14:18:53.053Z",
"updated_at": "2024-03-12T14:18:53.053Z",
"label": "iii_b"
},
"service_definition": {
"id": 32,
"created_at": "2024-03-12T14:18:53.409Z",
"updated_at": "2024-03-12T14:18:53.409Z",
"default_frequency": "weekly",
"name": "Personal Care",
"short_name": null,
"label": "personal_care_2",
"status": "active"
},
"client": {
"id": 1,
"status": "active",
"created_at": "2024-03-12T07:17:30.034-07:00",
"updated_at": "2024-03-12T07:19:00.671-07:00",
"external_id": null,
"label": "ami-5b3d9f58",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 9,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1946-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:29.266Z",
"updated_at": "2024-03-12T14:19:00.668Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075514392",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"volunteer": {
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
},
"visit_coding": null,
"visit_recap": {
"description": "Delivered groceries",
"survey_wellbeing": "concerned",
"survey_health_concern": "Access to essentials",
"volunteer_admin_notes": null
}
}
],
"links": {
"self": "http://app.monami.io/api/visits?page=1&per_page=1",
"first": "http://app.monami.io/api/visits?page=1&per_page=1",
"next": "http://app.monami.io/api/visits?page=2&per_page=1",
"last": "http://app.monami.io/api/visits?page=20&per_page=1"
},
"meta": {
"total_pages": 20,
"current_page": 1
}
}
This endpoint filters based on visit start date.
URL Parameters
Parameter | Description |
---|---|
start_at_from | The first date a visit could happen on in the given range |
start_at_to | The last date a visit could happen on in the given range |
Volunteers
List Volunteers
This endpoint returns a paginated list of volunteers as well as pagination links and meta information.
GET /api/volunteers
curl -i -u $MONAMI_UID:$MONAMI_SECRET "https://app.monami.io/api/volunteers?page=1&per_page=1"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/volunteers?page=1&per_page=1',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"volunteers": [
{
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
],
"links": {
"self": "http://app.monami.io/api/volunteers?page=1&per_page=1",
"first": "http://app.monami.io/api/volunteers?page=1&per_page=1",
"next": "http://app.monami.io/api/volunteers?page=2&per_page=1",
"last": "http://app.monami.io/api/volunteers?page=2&per_page=1"
},
"meta": {
"total_pages": 2,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
volunteers | The collection of results. |
links | Pagination links to access all the pages of the results |
meta | Helpful response metadata |
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Select the page of results. |
per_page | 25 | How many results per page. |
Get a Specific Volunteer
GET /api/volunteers/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/volunteers/1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
Excon.get('https://app.monami.io/api/volunteers/1',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"id": 1,
"status": "approved",
"created_at": "2024-03-12T07:17:28.069-07:00",
"updated_at": "2024-03-12T07:17:29.032-07:00",
"external_id": null,
"label": "twyla-r-earum-rerum-eum",
"custom_fields": {},
"address": {
"address_line1": "My String",
"address_line2": null,
"city": "Palo Alto",
"state": "CA",
"zip": "94306"
},
"person": {
"id": 7,
"first_name": "My String",
"preferred_name": "My String",
"middle_name": null,
"last_name": "My String",
"date_of_birth": "1930-03-12",
"email": "email@monami.io",
"created_at": "2024-03-12T14:17:27.096Z",
"updated_at": "2024-03-12T14:17:29.037Z",
"gender": "prefer_not_to_say",
"primary_language": "english",
"secondary_languages": ["spanish"],
"phone_numbers": [
{
"number": "+17075514082",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
This endpoint retrieves a specific volunteer.
URL Parameters
Parameter | Description |
---|---|
id | The id of the volunteer to retrieve |
Create a Volunteer
POST /api/volunteers/
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/volunteers/ \
-d '{
"person": {
"first_name": "John",
"preferred_name": "Volunteer",
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "volunteer@monami.io",
"gender": "male",
"primary_language": "english",
"secondary_languages": ["spanish","portuguese"],
"phone_numbers": [
{ "number": "+17075518391", "primary": true, "label": "cell" }
]
},
"address": {
"address_line1": "X Random St",
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"custom_fields": {
"gender_identity": "custom_value",
"pronouns": "custom_value2"
}
}' \
-H 'Content-Type: application/json'
require 'excon'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.post('https://app.monami.io/api/volunteers/',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: {
person: {
first_name: "John",
preferred_name: "Volunteer",
last_name: "Doe",
date_of_birth: "1940-05-30",
email: "volunteer@monami.io",
gender: "male",
primary_language: "english",
secondary_languages: ["spanish","portuguese"],
phone_numbers: [
{ number: "+17075518391", primary: true, label: "cell" }
]
},
address: {
address_line1: "X Random St",
city: "San Francisco",
state: "CA",
zip: "94117"
},
custom_fields: {
gender_identity: "custom_value",
pronouns: "custom_value2"
}
}.to_json
)
A successful request returns JSON structured like this:
{
"id": 3,
"status": "applied",
"created_at": "2024-03-13T11:38:00.900-07:00",
"updated_at": "2024-03-13T11:38:00.900-07:00",
"external_id": null,
"label": "volunteer-d",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": null,
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 79,
"first_name": "John",
"preferred_name": "Volunteer",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "volunteer@monami.io",
"created_at": "2024-03-13T18:38:00.777Z",
"updated_at": "2024-03-13T18:38:00.931Z",
"gender": "male",
"primary_language": "english",
"secondary_languages": ["spanish", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
This endpoint retrieves the newly created volunteer.
Payload Parameters
Parameter | Description |
---|---|
person | JSON formatted person parameters |
address | JSON formatted address parameters |
custom_fields | JSON formatted custom fields |
Person Parameters
Parameter | Description |
---|---|
first_name | Volunteer's first name |
preferred_name | Volunteer's preferred name |
last_name | Volunteer's last name |
date_of_birth | Volunteer's birthdate eg.: YYYY-MM-DD |
Volunteer's email address | |
gender | Volunteer's gender. Options are: female , male , trans_female , trans_male , non_binary , trans_non_binary , gender_queer , two_spirit , questioning_not_sure , not_listed , prefer_not_to_say |
primary_language | Language Object type label |
secondary_languages | Array of Language Object type labels |
phone_numbers | Array of Phone Number parameters |
Phone Number Parameters
Parameter | Description |
---|---|
number | Phone number including area code, e.g. '+17075518391' |
primary | Whether or not phone is primary. Only one primary phone per person. Options: true or false |
label | Type of phone number. Options: cell , home or work |
Address Parameters
Parameter | Description |
---|---|
address_line1 | Volunteer's address |
city | Volunteer's City |
state | Volunteers State 2 letter abbreviation eg.: CA |
zip | 5 digits zip code |
Create a Volunteer for a specific Person
POST /api/people/:person_id/volunteers/
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/people/79/volunteers/ \
--form 'address="{\"address_line1\": \"X Random St\", \"city\": \"San Francisco\", \"state\": \"CA\", \"zip\": \"94117\"}"' \
--form 'custom_fields="{\"gender_identity\": \"custom_value\", \"pronouns\": \"custom_value2\"}"'
require "uri"
require "net/http"
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
url = URI("http://app.monami.io/api/people/79/volunteers/")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Basic #{credential}"
form_data = [['address', '{"address_line1": "X Random St", "city": "San Francisco", "state": "CA", "zip": "94117"}'],['custom_fields', '{"gender_identity": "custom_value", "pronouns": "custom_value2"}']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
A successful request returns JSON structured like this:
{
"id": 4,
"status": "applied",
"created_at": "2024-03-13T11:42:32.745-07:00",
"updated_at": "2024-03-13T11:42:32.745-07:00",
"external_id": null,
"label": "volunteer-d",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": null,
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 79,
"first_name": "John",
"preferred_name": "Volunteer",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "volunteer@monami.io",
"created_at": "2024-03-13T18:38:00.777Z",
"updated_at": "2024-03-13T18:42:32.777Z",
"gender": "male",
"primary_language": "english",
"secondary_languages": ["spanish", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
This endpoint creates a volunteer for a given person.
Payload Parameters
Parameter | Description |
---|---|
person_id | Integer ID present in the URL |
address | JSON formatted address parameters |
custom_fields | JSON formatted custom fields |
Address Parameters
Parameter | Description |
---|---|
address_line1 | Volunteer's address |
city | Volunteer's City |
state | Volunteers State 2 letter abbreviation eg.: CA |
zip | 5 digits zip code |
Update a Volunteer
PATCH /api/volunteers/:volunteer_id
curl -i -u $MONAMI_UID:$MONAMI_SECRET \
-X PATCH https://app.monami.io/api/volunteers/3 \
-d '{ "person": { "email": "new_email@monami.io" }, "address": { "address_line2": "Apt 2B" } }' \
-H 'Content-Type: application/json'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.put('https://app.monami.io/api/volunteers/3',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: {
person: { email: 'new_email@monami.io' },
address: { address_line2: 'Apt 2B' }
}.to_json
)
A successful request returns JSON structured like this:
{
"id": 3,
"status": "applied",
"created_at": "2024-03-13T11:38:00.900-07:00",
"updated_at": "2024-03-13T11:38:00.900-07:00",
"external_id": null,
"label": "volunteer-d",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": "Apt 2B",
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 79,
"first_name": "John",
"preferred_name": "Volunteer",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "new_email@monami.io",
"created_at": "2024-03-13T18:38:00.777Z",
"updated_at": "2024-03-13T18:38:00.931Z",
"gender": "male",
"primary_language": "english",
"secondary_languages": ["spanish", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "cell"
}
],
"sites": []
}
}
This endpoint returns the updated volunteer.
Payload Parameters
Parameter | Description |
---|---|
person | JSON formatted person parameters |
address | JSON formatted address parameters |
custom_fields | JSON formatted custom fields |
Person Parameters
Parameter | Description |
---|---|
first_name | Volunteer's first name |
preferred_name | Volunteer's preferred name |
last_name | Volunteer's last name |
date_of_birth | Volunteer's birthdate eg.: YYYY-MM-DD |
Volunteer's email address | |
gender | Volunteer's gender. Options are: female , male , trans_female , trans_male , non_binary , trans_non_binary , gender_queer , two_spirit , questioning_not_sure , not_listed , prefer_not_to_say |
secondary_languages | Array of Language Object type labels |
phone_numbers | Array of Phone Number parameters |
Phone Number Parameters
Parameter | Description |
---|---|
number | Phone number including area code, e.g. '+17075518391' |
primary | Whether or not phone is primary. Only one primary phone per person. Options: true or false |
label | Type of phone number. Options: cell , home or work |
Address Parameters
Parameter | Description |
---|---|
address_line1 | Volunteer's address |
city | Volunteer's city |
state | Volunteer's state. 2 letter abbreviation e.g.: CA |
zip | 5 digit zip code |
Adopt a Volunteer
PATCH /api/volunteers/:volunteer_label/adopt
curl -i -u $MONAMI_UID:$MONAMI_SECRET \
-X PATCH https://app.monami.io/api/volunteers/volunteer-d/adopt \
-H 'Content-Type: application/json'
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.put('https://app.monami.io/api/volunteers/volunteer-d/adopt',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
An adoptable client response contains JSON structured like this:
{
"label": "volunteer-d",
"person": {
"id": 79,
"first_name": "John",
"preferred_name": "Volunteer",
"middle_name": null,
"last_name": "Doe",
"email": "new_email@monami.io",
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "home"
}
],
"sites": []
}
}
A sucessful adoption request returns JSON structured like this:
{
"id": 3,
"status": "applied",
"created_at": "2024-03-13T11:38:00.900-07:00",
"updated_at": "2024-03-13T11:38:00.900-07:00",
"external_id": null,
"label": "volunteer-d",
"custom_fields": {
"pronouns": "custom_value2",
"gender_identity": "custom_value"
},
"address": {
"address_line1": "X Random St",
"address_line2": "Apt 2B",
"city": "San Francisco",
"state": "CA",
"zip": "94117"
},
"person": {
"id": 79,
"first_name": "John",
"preferred_name": "Volunteer",
"middle_name": null,
"last_name": "Doe",
"date_of_birth": "1940-05-30",
"email": "new_email@monami.io",
"created_at": "2024-03-13T18:38:00.777Z",
"updated_at": "2024-03-13T18:38:00.931Z",
"gender": "male",
"primary_language": "english",
"secondary_languages": ["spanish", "portuguese"],
"phone_numbers": [
{
"number": "+17075518391",
"primary": true,
"label": "cell"
}
],
"sites": ["my_credential_site"]
}
}
This endpoint adds a specific volunteer to a site credential's site, and returns the full volunteer response.
URL Parameters
Parameter | Description |
---|---|
volunteer_label | The label of the volunteer to adopt |
Webhooks
Webhooks can be used to integrate apps without polling. You can setup subscriptions to events in Mon Ami and get JSON notifications sent to the URL of your choice. You can use your API credential secret to verify the messages send from Mon Ami to provide a secure and reliable system integration.
Get all webhooks for a given Credential
To manage your webhook subscriptions there is an /api/webhooks
resource that lists the webhooks created for a given credential.
GET /api/webhooks
curl -i -u $MONAMI_UID:$MONAMI_SECRET https://app.monami.io/api/webhooks
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.get('https://app.monami.io/api/webhooks',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns JSON structured like this:
{
"webhooks": [
{
"id": 1,
"topic": "*",
"webhook_url": "https://app.monami.io/api/webhooks/test",
"created_at": "2022-05-13T00:34:45.851Z"
}
],
"links": {
"self": "https://app.monami.io/api/webhooks?page=1",
"first": "https://app.monami.io/api/webhooks?page=1",
"last": "https://app.monami.io/api/webhooks?page=1"
},
"meta": {
"total_pages": 1,
"current_page": 1
}
}
Response Parameters
Parameter | Description |
---|---|
id | The id of the webhook. |
topic | The name of the topic or topics to be notified for. Allows wildcards. Ex client.* will receive all client events |
webhook_url | The URL you want the webhook notification to POST to. |
Create a new webhook subscription
You can create a subscription with the topic of *
to get all webhook events or you can subscribe to individual topics,
or wildcard topics, ex: client.*
.
POST /api/webhooks
curl -i -u $MONAMI_UID:$MONAMI_SECRET -d '{ "topic": "client.created", "webhook_url": "https://app.monami.io/api/webhooks/test" }' -H 'Content-Type: application/json' https://app.monami.io/api/webhooks
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.post('https://app.monami.io/api/webhooks/test',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
},
body: '{ "topic": "client.created", "webhook_url": "https://app.monami.io/api/webhooks/test" }'
)
A successful request returns HTTP Status
201 Created
and a JSON object representing the webhook:
{
"id": 4,
"topic": "client.created",
"webhook_url": "https://app.monami.io/api/webhooks/test",
"created_at": "2022-05-14T01:21:30.998Z"
}
Request Parameters
Parameter | Description |
---|---|
topic | The name of the topic or topics to be notified for. Allows wildcards. Ex client.* will receive all client events |
webhook_url | The URL you want the webhook notification to POST to. |
Available topics
Model | Events |
---|---|
assessments.request | completed, created |
client_call | completed, created |
visit | canceled, completed, confirmed, created |
Delete a webhook subscription
If you're no longer interested in getting webhook notifications, you can destroy a webhook.
DELETE /api/webhooks/:id
curl -i -u $MONAMI_UID:$MONAMI_SECRET -H 'Content-Type: application/json' -X 'DELETE' https://app.monami.io/api/webhooks/1
credential = Base64.strict_encode64 ENV.values_at('MONAMI_UID', 'MONAMI_SECRET').join(':')
response = Excon.delete('https://app.monami.io/api/webhooks/1',
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{credential}"
}
)
A successful request returns HTTP Status
204 No Content
:
Implementing an HTTP Handler for the webhook
Example Webhook JSON.
{
"topic": "client.created",
"data": {
"id": 8,
"type": "Client",
"label": "ami-010101",
"created_at": "2022-05-16T16:51:42.382-07:00",
"updated_at": "2022-05-16T16:51:42.382-07:00"
}
}
Verification
To verify the webhook, you need to verify the signature, by securely comparing the Hmac-SHA256
request header with an HMAC of the request POST body.
A Ruby on Rails example that verifies the request and calls a handler.
# I'm not sure how to handle an HTTP request in a shell.
# Have a look at the Ruby example.
class WebhooksController < ActionController::Base
before_action :verify_request!
def create
WebhookHandler.call request.params
end
protected
def verify_request!
unless ActiveSupport::SecurityUtils::secure_compare(verified_signature, signature_header)
raise "HMAC verification failed. Make sure it's not malicious and check hmac config."
end
end
def signature_header
request.headers['Hmac-SHA256'].chomp
end
def verified_signature
Base64.strict_encode64(OpenSSL::HMAC.digest('sha256', ENV['MONAMI_SECRET'], request.raw_post)).chomp
end
end