Organization-Level Download API

Overview

Recently, we added the functionality for a download API to be set at the organization-level, meaning that the brand doesn't have to set it up across the board for all franchisees. A single franchisee can set up their own download API if they have third-party custom reporting set up.

You can download the excel reports and perform manual ETL (which takes time). If your intention is to automate this process via API downloads, you can set up bulk automated process using an API Key set up at the organization-level. 

Just be sure that "Status" is "Org". 

The data will still be CSV format so you'll have to do some conversion on your side to move it into tables. Here is a sample payload and instructions doc. 

Learn more about API Key Configuration. Once the configuration step is completed, that is the only aspect you need to do on the serviceminder side. 

If your brand is interested in custom reporting, please contact our Support team or your Account Manager at serviceminder to learn more about SM Insights. This is our solution to custom data reporting and allows franchisees and franchisors to see these reports directly in serviceminder.


Download API for Orgs

The overall flow is:

  1. Start Download
  2. Receive DownloadId in Response
  3. Check Status of download w/ the ID
  4. When complete, Get Download

For org-level downloads, the User Id is a required field in the payload. This can be found in SM, when you view or edit your user it’s the numbers at the end of the URL. As long as that user has access to/permission for Reports, the download will run.

Things to note:

  • There is a 25k limit to records on each download; if you believe you’ll be surpassing this, you can use pagination by using the RowId parameter
    • In your first request, set the RowId to 0
    • In your follow-up request, set the RowId to be the highest Id from the last download +1. This Id field is not the actual row #, but the Id of the record in that final row
  • These downloads will also be downloadable in SM in your download queue from the Reports/Downloads section

Start Download

POST https://serviceminder.com/api/download/startdownload

Payload example:

{

"ApiKey": "your-api-key",

"Kind": "contacts",

"CreatedFrom": "01/01/2023",

"UserId": your-user-id,

"Contacts":

{

"WithEmails": true,

"WithoutEmails": true,

"IncludeCustomFields": true

}

Additional “Kind”s can be requested, highlighted in yellow, and additional parameters can be set. The Kind should just be changed out, as well as the object.

Full list here (taken from the “download” section on the API documentation page: https://serviceminder.com/api)

CreatedFromdatetime
CreatedThroughdatetime
UpdatedFromdatetime
UpdatedThroughdatetime
DateFromdatetime
DateThroughdatetime
CompletedBeforedatetime
CompletedAfterdatetime
OrganizationIdint32
RowIdint32
Kindstring
UserIdint32
ApiKeystring
Appointmentsdownloadappointmentsettings
Contactsdownloadcontactsettings
Depositsdownloaddepositsettings
Invoicesdownloadinvoicesettings
InvoiceLinesdownloadinvoicelinesettings
Proposalsdownloadproposalsettings
Servicesdownloadservicesettings
CampaignBudgetsdownloadcampaignbudgetsettings
RevenueForecastsdownloadrevenueforecastsettings
ChannelsCampaignsdownloadchannelscampaignssettings

Download Status

POST https://serviceminder.com/api/download/downloadstatus

{

"ApiKey": "your-key-here",

"DownloadId": "download-id"

}


Get Download

POST https://serviceminder.com/api/download/getdo

wnload

{

"ApiKey": "your-key-here",

"DownloadId": "download-id"

}