Gingr API Functions (Reference)

Article Details

Summary

Gingr offers a public API (Application Programming Interface) that lets you pull data and build extra features around the core product. If you need data from Gingr in a way the core product does not support, you can hire a third-party developer to decide if and how the Gingr API works for you.

Important: Gingr support and development teams cannot give guidance on how to use these functions.

What This Does

Each function below lists its method, URL, and parameters. Replace {your_app} with your Gingr subdomain.

HTTP POST https://{your_app}.gingrapp.com/api/v1/reservations

Retrieves a list of reservations in a date range, or all reservations that are checked in now.

  • Required parameter: key ('user_specific_api_key')
  • Required body: checked_in (true for checked-in pets only, false for all reservations that match the start and end dates)
  • Required body if checked_in is false: start_date (YYYY-MM-DD) and end_date (YYYY-MM-DD). The maximum range is 30 days. Gingr ignores these if checked_in is true.
  • Optional body: location_id (the ID of a location in your app, such as 1)

Example cURL call:

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 "checked_in=true" \
--data-urlencode "key={your_api_key_here}"

HTTP GET https://{your_app}.gingrapp.com/api/v1/reservation_widget_data

Retrieves a summary of reservations for a date, including the number of check-ins, check-outs, and overnights. This API powers the widget at the top center of your Gingr Dashboard.

  • Required parameters: key ('user_specific_api_key'), timestamp (a date in YYYY-MM-DD format)

HTTP POST https://{your_app}.gingrapp.com/api/v1/reservations_by_animal

Retrieves a list of reservations for an animal.

  • Required parameters: key (the user's API key), id (an animal's ID, such as 23)
  • Optional parameters: restrict_to ("pending_requests", "currently_checked_in", "future", "past", or "wait_listed")
  • Optional parameters: 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), and limit (a number that returns only that many records)

Reference: This call only pulls reservation data for the location the user's API is logged into now. If a pet has reservations at another location the user is not working in, that information does not show through the API.

HTTP POST https://{your_app}.gingrapp.com/api/v1/reservations_by_owner

Retrieves a list of reservations for an owner.

  • Required parameters: key (the user's API key), id (an owner's ID, such as 23)
  • Optional parameters: restrict_to and params, the same as reservations_by_animal

Reference: This call only pulls reservation data for the location the user's API is logged into now. If a pet has reservations at another location the user is not working in, that information does not show through the API.

HTTP GET https://{your_app}.gingrapp.com/api/v1/reservation_types

Retrieves a list of reservation types.

  • Required parameter: key
  • Optional parameters: id (reservation type ID), active_only (true or false)

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_services_by_type

Retrieves a list of allowed additional services for a reservation type.

  • Required parameters: key, type_id (reservation type ID, integer)
  • Optional parameter: location_id (location ID, integer, usually 1)

HTTP POST https://{your_app}.gingrapp.com/api/v1/authorize_owner

Checks that an owner account exists and that the password given matches the one on file.

  • Required parameters: email (customer email address), password (the customer's Gingr password), key

HTTP GET https://{your_app}.gingrapp.com/api/v1/report_card_files

Retrieves a list of recently uploaded report card files.

  • Required parameter: key
  • Optional parameters: number days (integer, today minus X days), limit (integer), location_id

HTTP POST https://{your_app}.gingrapp.com/api/v1/new_modified_owners

Retrieves customers created or changed in a date range.

  • Required parameters: key, start_date (YYYY-MM-DD), end_date (YYYY-MM-DD)
  • Optional parameter: location_id, which limits results to owners of that home location

HTTP POST https://{your_app}.gingrapp.com/api/v1/recently_cancelled_reservations

Retrieves reservations cancelled in a date range.

  • Required parameters: key, start_date (YYYY-MM-DD), end_date (YYYY-MM-DD)
  • Optional parameter: location_id, which limits results to owners of that home location

HTTP GET https://{your_app}.gingrapp.com/forms/get_form

Returns the data structure of the form for a type of record.

  • Required parameter: form ("owner_form" or "animal_form")

HTTP GET https://{your_app}.gingrapp.com/api/v1/owner

Retrieves information about one 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), email

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_locations

Retrieves a list of locations for this app. Required parameter: key.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_species

Retrieves a list of species for this app. Required parameter: key.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_breeds

Retrieves a list of breeds for this app. Required parameter: key.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_vets?vetFlag=true

Retrieves a list of vet names for this app. Required parameter: key. Optional parameter: vetFlag=true to return all vet information.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_temperaments

Retrieves a list of temperaments for this app. Required parameter: key.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_immunization_types

Retrieves a list of immunizations for a species. Required parameters: key, species_id.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_animal_immunizations

Retrieves a list of immunization records for an animal. Required parameters: key, animal_id.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_all_retail_items

Retrieves a list of all retail items for sale. Required parameter: key.

HTTP GET https://{your_app}.gingrapp.com/api/v1/existing_reservation_estimate

Retrieves an estimated cost for a future reservation. Required parameters: key, id (reservation ID).

HTTP GET https://{your_app}.gingrapp.com/api/v1/list_transactions

Retrieves a list of transactions. This endpoint only returns POS transactions before August 1, 2019.

  • Required parameters: key, from_date (YYYY-MM-DD), to_date (YYYY-MM-DD)

HTTP GET https://{your_app}.gingrapp.com/api/v1/list_invoices

Retrieves a list of transactions. This endpoint only returns invoices created on or after August 1, 2019.

  • Required parameter: key
  • Optional parameter: per_page (integer, the number of results to return; with page, it allows pagination; requires page; default null)
  • Optional parameter: page (integer, the result number to start the page with; requires per_page; default null)
  • Optional parameter: complete (boolean; true returns only invoices, false returns only estimates; default false)
  • Optional parameter: closed_only (boolean; true returns only closed invoices, false returns open and closed invoices; default false)
  • Optional parameters: from_date (YYYY-MM-DD), to_date (YYYY-MM-DD)

Reference: You must use per_page and page together. page is the result number the page starts with. Raise it by per_page each time. For example, when per_page=10, the second page of results starts at page=11 and the third at page=21.

HTTP POST https://{your_app}.gingrapp.com/api/v1/transaction

Retrieves a transaction and its payment details. Required parameters: key, id (POS transaction ID).

HTTP GET https://{your_app}.gingrapp.com/api/v1/timeclock_report

Retrieves 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 (an array of user IDs)

HTTP GET https://{your_app}.gingrapp.com/api/v1/owners

Retrieves a list of owners.

  • Required parameter: key
  • Optional parameter: 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"

HTTP GET https://{your_app}.gingrapp.com/api/v1/animals

Retrieves a list of animals.

  • Required parameter: key
  • Optional parameter: 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}"

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_subscription

Retrieves one subscription by its ID. Required parameters: key, id (ID of a subscription).

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_subscriptions

Retrieves a list of subscriptions.

  • Required parameter: key
  • Optional parameters: include_deleted (true or false, whether canceled or deleted subscriptions are returned), bill_day_of_month (subscriptions set to renew on a day of the month), owner_id (limits the response to that owner's subscriptions), limit (how many results to return), offset (use with limit to paginate), location_id (limits the response to a location), package_id (the ID of a package)

HTTP GET https://{your_app}.gingrapp.com/api/v1/custom_field_search

Retrieves custom field information for an owner or animal.

  • key: your API key
  • form_id: ID of the form to search (owner_form = 1, animal_form = 2)
  • field_name: technical name of the field to search
  • search: the search term to find on that field_name and form_id

Example URL:

https://{your_app}.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]

Example result (shortened):

{"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": "[password]","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 (also called the Digital Whiteboard)

Retrieves the data that powers Gingr's digital whiteboard.

  • key: your API key
  • location_id (required)
  • type_ids (required, an array of reservation_type_ids)
  • mins_future (optional; if set, limits results to the next and last X minutes)
  • full_day (optional; if set, Gingr ignores mins_future and includes all reservations checking in or 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 (shortened):

{"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 pets for an existing reservation. If no reservation exists, Gingr creates one and checks it in.

  • Required parameter: key
  • Optional parameters: animal_id, owner_id, type_id (if set, Gingr uses this reservation type ID for new reservations; if not, it uses your system's quick type)

HTTP POST https://{your_app}.gingrapp.com/api/v1/receive_call

Tells Gingr about an incoming phone call. This triggers an in-app alert in Gingr and records the call.

  • Required parameters: key, From (the phone number making the call), Called (the phone number receiving the call), CallStatus (one of: initiated, ringing, answered, completed, in-progress, no-answer), CallSid (a unique identifier for the call in the source system)
  • Optional parameter: CallDuration (length of the call in seconds)

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_feeding_info

Retrieves an animal's feeding information. Required parameters: key, animal_id.

HTTP GET https://{your_app}.gingrapp.com/api/v1/get_medication_info

Retrieves an animal's medication information. Required parameters: key, animal_id.

Where to Find It

To use the API, you need your API key. See Access API Keys.

Related Articles

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.