Syncro REST API - Build Custom Extensions/Apps/Add-ons
Table of Contents
Syncro's API is very simple. It is RESTful, which means it's centered around data and simple operations to manage the data.
Our API documentation uses Swagger so you can easily create and test our various web requests. We've documented more than 30 API entities, like Ticket, Estimate, Appointment, etc. to be used.
Notes:
- The API Rate Limit is 180 requests per minute (per IP address).
- You can access the JSON data here: https://api-docs.syncromsp.com/swagger.json
To get set up with our API Docs, follow the steps described in this documentation.
Obtain an API key
Note: If you already have a Syncro API key handy, copy it and skip to the next section.
If you need an API key, follow these steps to generate one:
- Navigate to Admin > API - API Tokens (Admin may be under the More menu).
- In the upper right, click +New Token.
- Click the Custom Permissions subtab.
- Enter a Name for your API Token.
- Optionally, enter an Expiration date.
- Check the boxes next to the permissions you want to use.
Tip: See Security Permissions Reference for more information. - Scroll to the bottom and click Create API Token.
- Copy the key and save it in a secure place; you won't be able to see it in Syncro again.
- Click Done.
See also: API Tokens.
Authorize Swagger
To authorize the use of Swagger, follow these steps:
- Go to Swagger API Docs: https://api-docs.syncromsp.com/.
Tip: Alternatively, you can access Swagger by navigating to Admin > API - Documentation in Syncro. - In the Server Variables section, enter your Syncro subdomain:
- Click Authorize.
- In the Available Authorizations pop-up window, paste the API key you generated into the Value field:
- Click Authorize, then click Close. You can now use Swagger.
Use API Docs
Once you've authorized your subdomain on the Swagger API docs site, follow these steps to use them:
IMPORTANT: This connects to and can modify your actual site data, so be careful with Delete, Post and Put commands.
- Click a row for any web request to view its details, then click Try It Out:
- Enter any required parameters, if necessary.
Note: "(query)" is not an actual SQL query, but rather, refers to parameters you enter that the system will use to assemble a query. In the above screenshot, the first parameter you enter, as an integer, is a customer ID to request a specific Customer. - Click Execute to run the request:
- Swagger shows if the request was successful and the response, along with several details. For example:
- cURL: A URL that can be used from the command line or code to get the same response as the one you see in Swagger.
-
Request URL: Copy this into the address bar and append your API key to load the results there. Here are two examples:
- https://yoursubdomain.syncromsp.com/api/v1/contacts?api_key=APIKEY&?customer_id=22040879&page=1
-
https://yoursubdomain.syncromsp.com/api/v1/tickets/44050842?api_key=APIKEY
Note: Replace yoursubdomain with your Syncro subdomain and APIKEY with your actual key. Also note that ?apikey= must come before any other parameters.
- Response Code: See the Responses section (f) for an explanation of the code shown here.
- Response Body: The results of the request. Click Download to download a JSON text file of the response body.
- Response Headers: The header results of the request.
- Responses: Explanation of response codes and an example of what successful results will look like.