{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"dea0846c-75a3-4bd9-a556-174cf82adfc4","name":"SyncVet Consumer API","description":"The SyncVet Consumer API provides a robust interface for seamless integration with the SyncVet platform, bridging various Practice Information Management Systems (PIMS) with data consumers. Through standardized data models, SyncVet ensures consistency and simplifies data consumption, eliminating the complexities of diverse PIMS implementations. The system utilizes Batch Sync to perform comprehensive nightly updates, ensuring all data remains synchronized on a consistent daily schedule. Real-time Notifications enable instant synchronization of select entities, allowing data consumers to receive timely updates via webhook notifications for swift decision-making. Additionally, the PIMS Writeback API empowers users to manipulate data within PIMS systems dynamically, supporting operations such as prescription creation, appointment confirmation, and patient data management for efficient workflow processes and data integrity maintenance.\n\n## Getting started\n\nGetting started with the SyncVet Consumer API is straightforward. Begin by importing our Postman collection into your workspace. From there, you can utilize Postman to seamlessly send requests and explore the API's functionalities.\n\n## Authentication\n\nThe SyncVet Consumer API utilizes the OAuth 2.0 protocol for authentication. To authenticate, you'll need to obtain a token from the token provider using your Client ID and Client Secret, along with an appropriate Scope value. Here's a breakdown of the required details to acquire an authorization token:\n\n| Parameter | Value |\n| --- | --- |\n| Token URL | [https://login.microsoftonline.com/37d2016b-9350-4cc7-bb6e-0d2507211ecd/oauth2/v2.0/token](https://login.microsoftonline.com/37d2016b-9350-4cc7-bb6e-0d2507211ecd/oauth2/v2.0/token) |\n| Client ID | (provided separately) |\n| Client Secret | (provided separately) |\n| Scope | [https://consumerapi.sync.vet/.default](https://consumerapi.sync.vet/.default) |\n\nUse the above information to obtain a standard OAUTH2 Bearer token that you can then use to authenticate to the SyncVet Consumer API. Specifically, make an HTTP POST call to the above Token URL with the following properties:\n\n- Headers\n    \n    - `Accept=application/json`\n        \n    - `Content-Type=application/x-www-form-urlencoded`\n        \n- Parameters\n    \n    - `client_id=`\\[Your Client ID\\]\n        \n    - `client_secret=`\\[Your Client Secret\\]\n        \n    - `scope=`[https://consumerapi.sync.vet/.default](https://consumerapi.sync.vet/.default)\n        \n    - `grant_type=client_credentials`\n        \n\nThis will return a JSON payload similar to the example below:\n\n``` json\n{\n   \"token_type\":\"Bearer\",\n   \"expires_in\":3599,\n   \"ext_expires_in\":3599,\n   \"access_token\":\"[long string of characters]\"\n}\n\n ```\n\nThe key piece of information you’ll need from this payload is the `access_token` value. Pass this value as a Bearer token in the authorization header for all calls to the SyncVet Consumer API:\n\n`authorization=Bearer`\\[insert access token here\\]\n\nKeep in mind that the `access_token` expires in one hour, so it's essential to implement token refresh logic if your processes require more than an hour to complete.\n\n### Authentication in Postman\n\nThis Postman collection is pre-configured for authentication. Simply enter your Client ID and Client Secret in the Variables tab, then navigate to the Authorization tab, click Get New Access Token, proceed, and use the token for authentication.\n\n### Authentication errors\n\nIf an access token is missing, malformed, or invalid, you will receive an HTTP `401 Unauthorized` response.\n\nIf you lack authorization to access a requested endpoint or retrieve data from a requested practice, you will receive an HTTP `403 Forbidden` response code.\n\n## Data Schemas\n\nThe Batch Sync data made available by the SyncVet platform adheres to the schemas below (no authentication required), based on the data source type:\n\n| Data Source Type | Documentation URL |\n| --- | --- |\n| PIMS Data | [https://documentation.sync.vet/pims/#](https://documentation.sync.vet/pims/) |\n| Supplier Data | [https://documentation.sync.vet/suppliers/#](https://documentation.sync.vet/suppliers/) |\n\n## Rate Limits\n\nTo protect platform stability and ensure fair usage, the SyncVet Consumer API enforces rate limits on selected endpoints.\n\nRate limits may vary by endpoint category, consumer profile, and environment, and may change over time. For that reason, exact threshold values are not published in the public documentation.\n\nIf a client exceeds an allowed request rate, the API returns `429 Too Many Requests`.\n\nWhen a `429` response is returned, clients must respect the `Retry-After` response header and wait the specified number of seconds before retrying.\n\nClients should also avoid sending duplicate or burst retries, as repeated rapid requests can increase the likelihood of rate limiting and service degradation.\n\n### Recommended client behavior:\n\n- Treat `429 Too Many Requests` as a transient condition\n    \n- Read and honor the `Retry-After` response header\n    \n- Retry only after the number of seconds specified in `Retry-After`\n    \n- Use bounded retry logic with backoff\n    \n- Avoid concurrent duplicate requests for the same operation\n    \n- Avoid aggressive polling where webhook- or status-based flows are available\n    \n\n## API Response Codes\n\nThis section outlines the various HTTP status codes that may be returned by the API endpoints and their meanings.\n\n### Success Codes\n\n#### 200 OK\n\n- Standard success response for successful HTTP requests\n    \n\n#### 202 Accepted\n\n- Request accepted but not yet processed\n    \n\n### Client Error Codes\n\n#### 400 Bad Request\n\n- Validation errors in the request payload\n    \n- Invalid client ID provided\n    \n- Entity not found or already exists\n    \n- Invalid appointment booking request\n    \n- JSON serialization errors\n    \n\n#### 401 Unauthorized\n\n- Missing authentication token\n    \n- Invalid or expired access token\n    \n- Malformed authentication credentials\n    \n\n#### 403 Forbidden\n\n- Insufficient permissions to access the resource\n    \n- Appointment booking disabled\n    \n- Real-time integration disabled\n    \n- Payments feature disabled\n    \n- Client access disabled\n    \n\n#### 405 Method Not Allowed\n\n- The requested HTTP method is not supported for this endpoint\n    \n- Action not permitted for the current resource state\n    \n\n#### 408 Request Timeout\n\n- Agent connection timeout\n    \n- Gateway timeout during request processing\n    \n\n#### 409 Conflict\n\n- Appointment slot already booked\n    \n- Duplicate user full name detected\n    \n- Resource state conflict\n    \n\n### 413 Payload Too Large\n\n- The request payload exceeds the configured maximum size for the API.\n    \n- Applies to attachment writeback endpoints:\n    \n    - `AddPatientAttachment`\n        \n    - `AddMedicalHistoryWithAttachment`\n        \n- Default limit: 30 MiB (31,457,280 bytes) per request, including form metadata and the uploaded file.\n    \n- API response: HTTP 413 with a message indicating the limit (e.g., \"Request payload too large. The maximum supported size is \\~30 MiB. Reduce the file size and try again.\")\n    \n\n#### 429 Too Many Requests\n\n- Rate limit exceeded\n    \n- Too many requests in a given time window\n    \n- Review the `Retry-After` response header and wait that many seconds before retrying\n    \n- See the `Rate Limits` section for client handling guidance\n    \n\n### Server Error Codes\n\n#### 500 Internal Server Error\n\n- Unexpected server error\n    \n- Database operation failure\n    \n- Unhandled exceptions\n    \n\n#### 501 Not Implemented\n\n- Invalid writeback data source\n    \n- Requested functionality not available\n    \n\n#### 503 Service Unavailable\n\n- External service integration unavailable\n    \n- System maintenance\n    \n- Temporary service outage","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"13217800","team":1414824,"collectionId":"dea0846c-75a3-4bd9-a556-174cf82adfc4","publishedId":"2s93RRxDub","public":true,"publicUrl":"https://apidocs.sync.vet","privateUrl":"https://go.postman.co/documentation/13217800-dea0846c-75a3-4bd9-a556-174cf82adfc4","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"78BB43"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"78BB43"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"78BB43"}}]}},"version":"8.10.1","publishDate":"2024-09-26T17:06:56.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"SyncVet PROD","id":"aeba0b78-6bf3-45a2-83b0-6019c5e352c0","owner":"13217800","values":[{"key":"ConsumerApiBaseUrl","value":"https://consumerapi.sync.vet/api/","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/1d9ca7d9c88623ce0514be9d741ad908c7bb8aa811027b014e715e48c36697ba","favicon":"https://res.cloudinary.com/postman/image/upload/v1656593743/team/xsg3tufypilmeb40lbcl.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"SyncVet PROD","value":"13217800-aeba0b78-6bf3-45a2-83b0-6019c5e352c0"}],"canonicalUrl":"https://apidocs.sync.vet/view/metadata/2s93RRxDub"}