Introduction
Repsly's APIs enable connectivity between Repsly and other systems, allowing Repsly to work hand-in-hand with the systems most used by our customers and seamlessly integrate into their business processes.
Repsly's APIs enable integration with both on-premise applications and cloud-based systems.
Connectivity to other Systems
Repsly's APIs enable you to do many important integration processes, such as importing or exporting records between Repsly and another system for:
- Client visits and notes
- Products & pricelists
- Purchase orders
- Forms
- Photos
- Users
- Schedules
- Daily working time
- And more
The data exchange rhythm is set according to your needs, typically daily or once an hour. This is completely under your control and you select what’s most appropriate for your situation.
Repsly's APIs have been used for integrations with ERPs, CRMs, OMSs, TPM, payroll, business intelligence, and reporting.
Import
Import is designed so that you can insert or update multiple records in a single request.
Any import into Repsly works in a way that you POST data, and Repsly decides for each record whether to insert or update it.
Implementing an import
Each import request can contain up to 200 records; split larger data sets into several requests. Imports are processed asynchronously. A successful request (HTTP 200) means the data was accepted, not that it was imported. The response message contains an ImportJobID, which you pass to the Status of the Import Job endpoint to get the result: the job status, the number of inserted, updated, deleted and invalid rows, and the reason each invalid row failed. Repsly doesn't send notifications about import results, so your integration should poll the job status after every request and handle the errors it reports. Send one import at a time per entity, and wait until the previous job is finished (Completed or Failed) before you send the next one. Sending the same data again while a job is still running can create duplicate records.
Every record is matched on the EntityCode field (for example: ScheduleCode). A key that already exists updates that record; a new key creates a new record. If using Code always send your own stable, unique key, and don't repeat the same key within one request. Code is optional, Repsly generates one if you don't provide it. Send only records that changed since your last import: every record you send is re-written and synced to your reps' mobile devices, even if nothing in it changed. Updates several times a day are supported. If a request fails with a timeout or an HTTP 5xx/429 response, retry with exponential backoff (for example: 1s, 2s, 4s, up to 5 attempts). Don't retry HTTP 4xx responses; fix the request first. For schedules, note two extra rules:
- An update replaces the whole entity, so any field you leave out (for example: Tasks) is cleared.
- If any record in the request is invalid, the whole request is rejected; fix the reported rows and send the request again.
Export
Export of entities returns a maximum of 50 records per batch. To fetch all records, customers may implement iterative logic.
Every response contains metadata with additional information, including the total number of records available and an argument for the next request.
Please note
Keys that determine which records to update or insert are marked with a blue diamond 🔹, while the required keys are marked with a red triangle 🔺.
Any planned changes to existing endpoints are marked with an orange diamond 🔸.