External API

Integrating TARGPatrol with other systems can significantly expand your organization's functionality and improve efficiency. This guide will show you how to set up integration using the External API of TARGPatrol.

Obtaining an API Key

  1. Go to the web application https://app.targpatrol.com/ and log in with your account.

    Obtaining an API Key
  2. Navigate to the "Management" -> "External API" section (this section will only be available to users with the Owner role).

  3. Click the "Add Token" button.

    Obtaining an API Key
  4. Then click "Save", and the token will appear in the table.

  5. Next, click the copy token icon.

API Documentation and Testing

  1. Open the API documentation at https://api.targpatrol.com.

  2. Review the available endpoints and their capabilities. For example, you can find endpoints for creating tasks, managing users, and more.

  3. Use the testing capabilities directly in the documentation, or use third-party tools like Postman to ensure your API key works correctly.

API Documentation and Testing

User data

User requests and responses use locale to define the language and regional formatting. When creating a user, provide the first name, last name, locale, and at least one location. User data can also include externalId and gpsTracking. Use one of the locale values listed in the API reference.

Task step groups

Task requests and responses support stepGroups. Each group has an ID, name, optional description, color, order, and collapsedByDefault setting. A task step references its group through stepGroupId, while the step order remains global across the whole task.

Refer to the API 1.1 schemas and examples for the complete set of required fields, supported values, and request formats.

Conclusion

Integrating TARGPatrol with other systems using the External API allows you to automate numerous processes and ensure more efficient task management. Follow this guide to set up the integration and leverage all the benefits it offers. Remember to regularly check the documentation and API updates for the most current information.