Overview: What are we talking about?
Gingr offers a publicly available API (Application Programming Interface) to allow you to extract data and build additional functionality around our core product.
If you need data pulled from Gingr in a way that the core product will not support, then you can consult and hire a 3rd-party developer to help determine if and how Gingr's API will work for you.
Our support and development teams are not able to provide guidance for implementing the following instructions.
This article includes:
Helpful Hints: Before you begin.
- Requests are performed with HTTP over TLS (HTTPS) and will return a JSON object as a result. All endpoints are read-only.
- Important! Never share your API keys with any party that should not be able to access your Gingr data. If you are using an employee's API key and they are no longer with the company, or if you think your API key has been exposed, you can delete and re-create a new key for a user account.
How to: Access and Use API Keys.
Before you can start using our API, you must first have a key. All API requests require a key that is based on a user account. You can choose to use your own user account's API key or create a new user account for the purposes of accessing the API.
To access a user's API key to make requests:
- To retrieve a user's key, go to the Left-hand Navigation: Reports & More » Users » Edit User » API Keys.
-
The user account for making API requests must have the Can Access API user permission from Left-hand Navigation: Reports and More Icon » Groups.
- When making an API request, you will need to include the user's API key to make a successful request.
Note: You will see example requests reference the key parameter as "{my_key}"
How to: Use Gingr's API.
HTTP POST https://{your_app}.gingrapp.com/api/v1/reservations
- retrieve a list of reservations within a given date range, or all currently checked in reservations
- required parameters
- key: 'user_specific_api_key',
- start_date: 'YYYY-MM-DD'*
- end_date: 'YYYY-MM-DD'* Important Note: the maximum range is 30 days
- OR checked_in: true (ignores start/end date)
- optional parameters
- location_id: 1 -- either the ID of a location in Gingr, or null - if null, all reservations from all locations are returned
Example cURL call that returns reservations with dates starting and ending in June
HTML
curl "https://{your_subdomain_here}.gingrapp.com/api/v1/reservations" \
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
--data-urlencode "start_date=YYYY-MM-DD" \
--data-urlencode "end_date=YYYY-MM-DD" \
--data-urlencode "key={your_api_key_here}"
*Raw dates can be passed with times: YYYY-MM-DD 00:00:00; however, responses only return with date within a 24-hour period. Passing an end_date with time 00:00:01+ will show results for that entire day up to 00:00:00 the next day. Date parameters passed without time will default to a 00:00:00 time stamp. (i.e. single date w/o time should have end_date set for next day for results to show for a single day)
HTTP GET https://{your_app}.gingrapp.com/api/v1/reservation_widget_data
- retrieve a summary of reservations for a given date, including # of check ins, outs and overnights.
- This is the API that powers the widget in the top-center of your Gingr Dashboard.
- required parameters
- key: 'user_specific_api_key',
- timestamp: a date in YYYY-MM-DD format
HTTP GET https://{your_app}.gingrapp.com/api/v1/reservations_by_animal
- retrieve a list of reservations for a given animal
- required parameters
- key: - user's API Key
- id: 23 - an animal's ID
- optional parameters
- restrict_to: choose "pending_requests", "currently_checked_in", "future", "past", "wait_listed"
- params: an array of
- fromDate - ISO 8601 date format
- toDate - ISO 8601 date format
- reservationTypeIds - an array of reservation type IDs
- animalIds - an array of animal IDs
- cancelledOnly - boolean
- confirmedOnly - boolean
- completedOnly - boolean
- limit - number, only return these number of records
Please note: Reservation data for this call is only pulled for the location the User's API is currently logged into. If a pet has reservations for another location the user isn't currently operating in, that reservation info will not show up via API.
HTTP GET https://{your_app}.gingrapp.com/api/v1/reservations_by_owner
- retrieve a list of reservations for a given owner
- required parameters
- key: - user's API Key
- id: 23 - an owner's ID
- optional parameters
- restrict_to: choose "pending_requests", "currently_checked_in", "future", "past", "wait_listed"
- params: an array of
- fromDate - ISO 8601 date format
- toDate - ISO 8601 date format
- reservationTypeIds - an array of reservation type IDs
- animalIds - an array of animal IDs
- cancelledOnly - boolean
- confirmedOnly - boolean
- completedOnly - boolean
- limit - number, only return these number of records
Please note: Reservation data for this call is only pulled for the location the User's API is currently logged into. If a pet has reservations for another location the user isn't currently operating in, that reservation info will not show up via API.
- retrieve a list of reservation types
- required parameters
- key: 'user_specific_api_key',
- Optional Parameters
- id (reservation type id)
- active_only true/false
- retrieve a list of allowable additional services for a given reservation type
- Required Parameters
- key (same as other calls)
- type_id (reservation type id, integer)
- Optional parameters
- location_id (location id, integer, probably 1)
- authorize that an owner account exists and a provided password matches what we have on file
- Required Parameters
- email (customer email address)
- password (customers password in gingr)
- key (same as other calls)
- retrieve a list of recently uploaded report card files
- required fields
- key (same as other calls)
- optional fields
- number days - integer - (today - X days)
- limit - integer
- location_id
- customers that were created or modified within the given date range
- required parameters
- key: 'user_specific_api_key'
- start_date: 'YYYY-MM-DD',
- end_date: 'YYYY-MM-DD'
- optional parameters
- location_id -- if set, filters down to owners of the specified home location
- reservations that were cancelled within a given date range
- required parameters
- key: 'user_specific_api_key'
- start_date: 'YYYY-MM-DD'
- end_date: 'YYYY-MM-DD'
- optional parameters
- location_id -- if set, filters down to owners of the specified home location
- returns the form's data structure for a type of record
- required parameters
- form -- either "owner_form" or "animal_form"
- Retrieve information about a specific owner record
- required parameters
- key
- id - A gingr owner id
- optional parameters
- id (owner ID)
- animal_id (animal ID)
- reservation_id (reservation_id)
- phone (cell phone number)
- retrieve a list of locations for this app
- required parameters
- key
- retrieve a list of species for this app
- required parameters
- key
HTTP GET https://{your_app}.gingrapp.com/api/v1/get_breeds
- retrieve a list of breeds for this app
- required parameters
- key
HTTP GET https://{your_app}.gingrapp.com/api/v1/get_vets
- retrieve a list of vets for this app
- required parameters
- key
HTTP GET https://{your_app}.gingrapp.com/api/v1/get_temperaments
- retrieve a list of temperaments for this app
- required parameters
- key
- retrieve a list of immunizations for a given species
- required parameters
- key
- species_id
- retrieve a list of immunization records for a given animal
- required parameters
- key
- animal_id
- retrieve a list of all retail items for sale
- required parameters
- key
- retrieve an estimated cost for a future reservation
- required parameters
- key
- id (for a reservation)
- retrieve a list of transactions
- required parameters
- key
- from_date: 'YYYY-MM-DD'
- to_date: 'YYYY-MM-DD'
- retrieve a list of transactions
- required parameters
- key
- optional parameters
- per_page -- integer; number of results to return (this + `page` param below enables pagination). defaults to null
- page -- integer; offset number of results to return. defaults to null.
- complete -- boolean (true or false); when set to true, will only return Invoices. When false, will only return Estimates. defaults to false.
- closed_only -- boolean (true or false); when set to true, will only return closed invoices. when set to false, will return open & closed invoices. defaults to false.
- from_date: 'YYYY-MM-DD'
- to_date: 'YYYY-MM-DD'
- retrieve a transaction and payment details
- required parameters
- key
- id -- POS Transaction ID
- retrieve a list of timeclock records
- required parameters
- key
- start_date: 'YYYY-MM-DD'
- end_date: 'YYYY-MM-DD'
- location_id -- integer
- optional parameters
- include_deleted -- boolean
- include_clocked_in -- boolean
- user_ids -- array of user IDs
- retrieve a list of owners
- required parameters
- key
- optional parameters
- params: a key-value array of where clauses for the query
- Example cURL call that returns owners with a Zip code of 80302
curl "https://{your-subdomain-here}.gingrapp.com/api/v1/owners" \
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
--data-urlencode "key={your-key-here}" \
--data-urlencode "params[zip]=80302"
- retrieve a list of animals
- required parameters
- key
- optional parameters
- params: a key-value array of where clauses for the query
- Example cURL call that returns animals with a birthday in November (using MySQL functions)
curl "https://{your_app}.gingrapp.com/api/v1/animals" \
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
--data-urlencode "params[month(from_unixtime(birthday))]=11" \
--data-urlencode "key={user_specific_api_key}"
- retrieve a single subscription by its ID
- required parameters
- key
- id -- ID of a subscription
HTTP GET https://{your_app}.gingrapp.com/api/v1/get_subscriptions
- retrieve a list of subscriptions
- required parameters
- key
- optional parameters
- include_deleted -- true/false, whether canceled/deleted subscriptions should be returned in the response
- bill_day_of_month -- retrieve subscriptions set to renew on a specific day of the month
- owner_id -- an owner id, if set the response will be limited to subscriptions of that owner
- limit -- how many results to return in this response
- offset -- can be used in conjunction with limit to paginate the response
- location_id -- if set, response will be limited to a specific location
- package_id -- the ID of a particular package
HTTP GET https://{your_app}.gingrapp.com/api/v1/custom_field_search
- retrieve custom field information for an owner/animal
- parameters:
- key: your api key
- form_id: id of the form you wish to search (owner_form = 1 animal_form = 2)
- field_name: technical name of field you wish to search
- search: the search term you are looking for on that field_name and form_id
Example URL:
https://.gingrapp.com/api/v1/custom_field_search?key={{your_api_key}}&form_id=1&field_name=[your custom Field Name on the form]&search=[the search term you are needing to find]
results:
{
"success": true,
"error": false,
"data": [{
"system_id": "1694",
"first_name": "Alexandra",
"last_name": "Smith",
"home_phone": "(555) 555-5555",
"cell_phone": "(343) 444-4444",
"emergency_contact_name": "Melissa Salminen",
"emergency_contact_phone": "(222) 222-2222",
"notes": "<b>Authorized Persons<\/b> Melissa Salminen<br>",
"home_location": "1",
"password": "adsfadsfasdfasfadsf",
"stripe_default_card": null,
"payment_processor_id": "1",
"allow_online_login": "1",
"opt_out_email": "0",
"opt_out_sms": "0",
"opt_out_marketing_email": "0",
"opt_out_marketing_sms": "1",
"opt_out_photo_sharing": "0",
"opt_out_reminder_email": "0",
"opt_out_reminder_sms": "0",
"barcode": null,
"submission_id": "10904",
.....
},
....
]
}
HTTP GET https://{your_app}.gingrapp.com/api/v1/back_of_house (AKA Digital Whiteboard)
- retrieve data used to power Gingr's digital whiteboard.
- parameters:
- key: your api key
- location_id (required)
- type_ids (required, an array of reservation_type_ids)
- mins_future (optional, if set, restricts to the next/last X minutes)
- full_day (optional, if set, mins_future field is ignored and system will include all reservations checking in/out today)
Example request
curl 'https://{subdomain}.gingrapp.com/api/v1/back_of_house?key={my_key}&location_id=1&full_day=true'
Example response
{
"success": true,
"error": false,
"data": {
"checking_in": [
{
"id": "953",
"owner_id": "94",
"animal_id": "115",
"o_last": "Holbrook",
"a_first": "Maggie",
"type_id": "1",
"type": "Daycare | Full Day ",
"check_in_stamp": null,
"check_out_stamp": null,
"start_date": "1559696400",
"end_date": "1559703600",
"run_name": null,
"area_name": null,
"belonging_count": "0",
"belonging_area": null,
"status_id": 2,
"status_string": "Checking In Soon",
"event_time": 1559696400
},
...
],
"checking_out": [
{
"id": "646",
"owner_id": "8",
"animal_id": "12",
"o_last": "Douris",
"a_first": "Sugar",
"type_id": "5",
"type": "Grooming Services",
"check_in_stamp": "1559657671",
"check_out_stamp": null,
"start_date": "1559656800",
"end_date": "1559664000",
"run_name": null,
"area_name": null,
"belonging_count": "0",
"belonging_area": null,
"status_id": 2,
"status_string": "Checking Out Soon",
"event_time": 1559664000
},
...
]
}
}
HTTP GET https://{your_app}.gingrapp.com/api/v1/quick_checkin
- checks in pet(s) for an existing reservation, if one does not exist it will create one and check it in.
- required parameters
- key
- optional parameters
- animal_id
- owner_id
- type_id -- if set, system will use this reservation type id for new reservations. if not set, it will default to your system's quick type
HTTP POST https://{your_app}.gingrapp.com/api/v1/receive_call
- Notify Gingr of an incoming phone call. This will trigger an in-app alert in Gingr as well as record the call.
- required parameters
- key
- From (phone number making the call)
- Called (phone number receiving the call)CallStatus (one of: initiated, ringing, answered, completed, in-progress, no-answer)
- CallSid (unique identifier for the call in the source system)
- optional parameters
- CallDuration (length of call in seconds)
- Retrieve an animal's feeding information
- required parameters
- key
- animal_id
- Retrieve an animal's medication information
- required parameters
- key
- animal_id
FAQ: Check this out!
Is there a daily API limit?
Nope, there is not!
Can we create custom queries based off the Gingr data points, or are we only allowed to use the ones in your documentation?
Only the documented API endpoints are currently available for public consumption, though we frequently add to our API!
Are the calls restricted for data for individual users?
Each API request must have an API key passed. API keys are issued per user. This key inherits all of that users permissions. Gingr has many types of permissions which can restrict data coming out of the API.
Can we generate lists of users and their contact information, most importantly email, to leverage for marketing automation?
Yes. Best route for this would be to use Gingr’s webhooks to listen for new/changed owner records.
Why do some Animals/Owners not have a "created_at" value?
Anything without a "created_at" value means that the customer profile was imported. On the other hand, any customers who were not imported (created in Gingr) will have a "created_at" value associated with the account.
This can also happen with Lead Forms. When a lead form is submitted, it creates a placeholder owner record without a "created_at" value. This is because the client isn't considered a customer yet, but rather a lead. Once they convert to a customer, which is done by adding an animal to their record, the "owners.created_at" field will be set. At this point, they are considered a customer in your app.
Comments
0 comments
Article is closed for comments.