Repsly Visits API

Export visits, visit schedules, and realizations; import schedules.

OpenAPI Specification

repsly-visits-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Repsly Web Clients Visits API
  description: 'The Repsly Web API (v3) is a REST interface for exchanging data with the Repsly retail execution and field sales platform. It is designed for ERP/CRM integration: import (POST) moves clients and products into Repsly, and export (GET) pulls clients, client notes, visits, retail audits, purchase orders, document types, products, pricelists, forms, photos, daily working time, visit schedules, and representatives back out. All requests use HTTP Basic authentication (API credentials from the Repsly settings page, NOT the login username/password) over SSL, and accept or return JSON or XML. Export endpoints return a maximum of 50 records per call; clients iterate using a timestamp or last-ID cursor and stop when the response MetaCollectionResult.TotalCount is 0.

    Endpoint paths and verbs for the export/import surface are grounded in Repsly''s published v3 developer documentation. Request/response schemas below are modeled generically (the docs describe fields per entity but do not publish a machine-readable OpenAPI); treat property-level detail as modeled and confirm exact field names against the live reference at https://api.repsly.com/v3/help.'
  version: '3.0'
  contact:
    name: Repsly
    url: https://www.repsly.com
servers:
- url: https://api.repsly.com/v3
  description: Repsly Web API v3 (production)
security:
- basicAuth: []
tags:
- name: Visits
  description: Export visits, visit schedules, and realizations; import schedules.
paths:
  /export/visits/{lastTimestamp}:
    get:
      operationId: exportVisits
      tags:
      - Visits
      summary: Export visits
      description: Returns up to 50 visits changed since the given timestamp. Start with 0 and page using MetaCollectionResult.LastTimeStamp until TotalCount is 0.
      parameters:
      - $ref: '#/components/parameters/LastTimestamp'
      responses:
        '200':
          description: A batch of visits with collection metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /export/visitschedules/{beginDateTime}/{endDateTime}:
    get:
      operationId: exportVisitSchedules
      tags:
      - Visits
      summary: Export visit schedules
      description: Returns planned visit schedules between beginDateTime and endDateTime (inclusive), for all representatives.
      parameters:
      - name: beginDateTime
        in: path
        required: true
        description: Start of the date range (e.g. 2026-07-01).
        schema:
          type: string
      - name: endDateTime
        in: path
        required: true
        description: End of the date range (e.g. 2026-07-31).
        schema:
          type: string
      responses:
        '200':
          description: A collection of visit schedules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /export/visit-realizations:
    get:
      operationId: exportVisitRealizations
      tags:
      - Visits
      summary: Export visit schedule realizations
      description: Returns visit schedule realizations - how planned schedules were actually executed. Path grounded in Repsly's v3 reference; cursor parameters are modeled.
      responses:
        '200':
          description: A collection of visit realizations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /import/schedule:
    post:
      operationId: importSchedules
      tags:
      - Visits
      summary: Import visit schedules
      description: Insert or update visit schedules to plan representatives' routes. Returns an importJobID for status polling.
      requestBody:
        $ref: '#/components/requestBodies/ImportBody'
      responses:
        '200':
          $ref: '#/components/responses/ImportAccepted'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  requestBodies:
    ImportBody:
      required: true
      description: A batch of entities to insert or update. Repsly decides per record whether to insert or update. Accepts JSON or XML; field schema depends on the entity being imported.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: true
  schemas:
    GenericCollection:
      type: object
      description: Generic export collection envelope. Each export endpoint returns an entity array plus MetaCollectionResult; entity fields are documented per resource in the Repsly reference and are modeled here.
      properties:
        MetaCollectionResult:
          $ref: '#/components/schemas/MetaCollectionResult'
        Data:
          type: array
          items:
            type: object
            additionalProperties: true
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    ImportResult:
      type: object
      description: Result of an import (POST) call, including the job identifier.
      properties:
        importJobID:
          type: string
        status:
          type: string
    MetaCollectionResult:
      type: object
      description: Pagination metadata returned with export collections. Iterate until TotalCount is 0.
      properties:
        TotalCount:
          type: integer
          description: Total count of records in this batch (0 means no more records).
        LastTimeStamp:
          type: integer
          format: int64
          description: Timestamp cursor for the next request (timestamp-paged endpoints).
        FirstID:
          type: integer
          format: int64
          description: Unique ID of the first item in the list (ID-paged endpoints).
        LastID:
          type: integer
          format: int64
          description: Unique ID of the last item in the list (ID-paged endpoints).
  responses:
    Unauthorized:
      description: Missing or invalid Basic authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ImportAccepted:
      description: The import was accepted; the result includes an importJobID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ImportResult'
  parameters:
    LastTimestamp:
      name: lastTimestamp
      in: path
      required: true
      description: Timestamp cursor. Start at 0 for a full export, then pass the returned MetaCollectionResult.LastTimeStamp on each subsequent call.
      schema:
        type: integer
        format: int64
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication over SSL. Use the API username and password from the Repsly settings page (API Settings) - these differ from your Repsly login credentials.