{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"f00dd6b6-9872-4b04-80a0-507dbe2b80ae","name":"OpenCRM API Developer Reference Guide","description":"# Before You Start\n\n## Intended Audience\n\nThis guide is aimed at developers wishing to integrate with OpenCRM via a REST API.\n\nYou should have a good knowledge of the concept of REST web services and JSON / JSON Serialization and how to implement this in your language of choice.\n\n## Data Security\n\nYou are exposing YOUR data (which could in turn mean data on YOUR customers) to another application to either pull or change information in OpenCRM and you need to plan and consider this carefully, as well as fully understand the code and methods you are working with.\n\nHave you considered any security implications? Accessing data via the API is secured by SSL encryption, but we have no control over what or how you control access/encryption of the data once it lands on your side. Make sure you have sufficient security and access protection in place to your data once it is taken from OpenCRM.\n\nConsider the security of the storage of the API keys or OpenCRM username and password that your application or code is using to connect to your OpenCRM system.\n\n## Data Validity / Integrity\n\nThe same level of data validation is not supported by the API at this time. Mandatory field checks are not in place and data validation (e.g. checking a number is entered into a number field, checking validity of email addresses etc is not supported). Duplication checks will not take place. You should make sure the data you are posting to the API is valid and sensible.\n\n**The API user has FULL access to view and edit all data.**\n\n# Enable API\n\nPlease contact support or your account manager to discuss .\n\n## Security & Logging\n\n**IP Restriction**  \nIt is possible to restrict access to the API to only certain IP addresses. Contact [support@opencrm.co.uk](https://mailto:support@opencrm.co.uk) if you wish to apply this restriction.\n\nPlease note that API restrictions setup in the web application settings do NOT apply to API access, API access needs to be restricted separately.\n\n**TLS**  \nFor security reasons the API will only accept connections from clients using TLS version 1.2 or higher. Please check the version of the client/programming language you intend to use can connect using TLS protocol 1.2 or above.\n\n**Request Recording/Logging/API Limits**  \nFor your info, security and peace of mind, all incoming REST API calls are recorded in your OpenCRM database. OpenCRM support has access to this. Your API requests are limited dependent on your subscription.\n\nIt is possible to restrict access to the API to only certain IP addresses. Contact [support@opencrm.co.uk](https://mailto:support@opencrm.co.uk) if you wish to apply this restriction.\n\nRecords modified or added by the API will show the following in their audit log:\n\nAdministrator (admin) 15-04-2016 15:54 Modified(API) Record modified by API call from IP: 12.34.45.56\n\n# Getting started\n\n## **Base URL and Methods**\n\nThe API is a standard REST based API. It is possible to change the response from the API to be sent in different formats based on your needs and preferences. The default and recommended response is JSON.\n\n_Base URL_  \n[https://yoursystemname.opencrm.co.uk/api/rest/{end_point}/](https://yoursystemname.opencrm.co.uk/api/rest/%7Bend_point%7D/)\n\n_User Agents_\n\nPlease note that for security reasons, the default user agent for \"curl\" connections is blocked by our web application firewall.\n\n# Authentication\n\n## API Keys\n\nPlease contact Support to generate a pair of API keys that you can then use to connect to the OpenCRM API.\n\nPlease keep API keys secure and do not share outside of your organisation or application without explicit requirement.\n\nAuthentication is done as part of every API call made. The endpoint documentation shows parameters for both methods- \\[API Key & API Pass Key\\] or \\[accesskey\\] which is generated by passing the API Key and Pass key to the login endpoint. You only need to provide either the key/passkey pair or the access key, not bot.\n\n_Method 1: API Keys_\n\nPass your API Key and API Passkey into every API call using the apikey and passkey parameters.\n\n_Method 2: Login & accesskey_\n\nCall the \"Login\" end point of the API which will generate and return a session/accesskey. The accesskey can then be provided as a parameter to the API calls instead of the API keys.\n\nPlease note that similar to an OpenCRM web session, the access key will time out if there is a period of no requests being received from that session.\n\n_Method 3: HTTP header variables_\n\nSome third party applications allow/require authentication details to be transmitted via HTTP header variables. OpenCRM's api can support that. You need to set the following  \nHTTP header variables:\n\n| **Name** | **Description** |\n| --- | --- |\n| KEY1 | Your API Key |\n| KEY2 | Your API pass key |\n\n# **Parameters & Field Names**\n\n## Parameters\n\nParameters can be passed as URL parameters, Form data fields or alternatively raw JSON payload in the body of the request. The documentation here provides examples for passing as form data.\n\n## Special Parameters\n\nThere are some additional parameters which can be passed in to all API end points which alter the format of the results returned.\n\n| **Name** | **Description** |\n| --- | --- |\n| dateOverride | Dates without the time in the format of 04-08-2015 can be converted in a similar way using dateOverride/ followed by the format.  <br>Both the above can be combined in the same endpoint url  <br>api/rest/get_project_list/dateTimeOverride/d_F_Y_H:i/dateOverride/d_F_Y  <br>For API requester's requiring ISO 8601 compliant dates and times (such as ClicData) we recommending using the following overrides, dates without the time will have 00:00:00 time appended  <br>api/rest/get_project_list/dateTimeOverride/c/dateOverride/c |\n| dateTimeOverride | Dates and Times in the format of 2015-08-04 15:04:01 can be converted to standard php date time formats by adding to the url dateTimeOverride/ followed by the format, replacing spaces with \"_\" underscores and forward slashed with \"\\*\" stars eg d_F_Y_H:i |\n| change_assignedidtouser | Change an Assigned User ID to a Username  <br>Insert a comma to affect multiple fields eg Project_Developer,Assigned_to |\n\n## Fields and Field Names\n\nWhen editing or creating records, each field is passed as a parameter to the request with the field name as the parameter name. Similarly, when you retrieve a record, each field is returned as a parameter with the field name as the parameter name.\n\nWhen using the query string parameter to filter results, you need to pass the correct field name here as well and this may differ from the field name you set/retrieve on a record. The following link gives you the list of fieldnames you will need to use: [https://help.opencrm.co.uk/article/20-rest-api-field-reference](https://help.opencrm.co.uk/article/20-rest-api-field-reference)\n\n## Support\n\nYou may need further information to achieve your goals with the API. Simple questions can be directed to [support@opencrm.co.uk](https://mailto:support@opencrm.co.uk), but if you have a more in depth API project, or your request is for something the API does not cover, this will be referred to your account manager to discuss with you further. Support requests on API functionality will be dealt with at a low priority and not within our usual contracted SLA times.\n\nContact Support:  \nEmail: [support@opencrm.co.uk](https://mailto:support@opencrm.co.uk)\n\n# API Reference\n\nAll API functions are listed below.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"8334131","team":3598293,"collectionId":"f00dd6b6-9872-4b04-80a0-507dbe2b80ae","publishedId":"Uz5NiCax","public":true,"publicUrl":"https://apidocs.opencrm.co.uk","privateUrl":"https://go.postman.co/documentation/8334131-f00dd6b6-9872-4b04-80a0-507dbe2b80ae","customColor":{"top-bar":"f9f9f9","right-sidebar":"707070","highlight":"B2D01B"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2022-06-15T08:06:45.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"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/94e9bc2775914cd288b4b2f07c355a1dc68db2f8d3609f3588f7d10eee8450c0","favicon":"https://res.cloudinary.com/postman/image/upload/v1654946058/team/cdedrrfgrnhw6vfe751v.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"}],"canonicalUrl":"https://apidocs.opencrm.co.uk/view/metadata/Uz5NiCax"}