{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"66812cf6-6342-43ab-ab30-6cf51b53b665","name":"Relycomply Integration","description":"# Relycomply integration\n\nThese docs will walk you through a basic integration into Relycomply from getting your authorization token to creating customers and running them through assessments.\n\nRelycomply exposes the majority of it's functionality via a GraphQL API. That allows the developer to to have the freedom to request only relevant data when querying Relycomply, and allows for data mutation via GraphQL mutations.\n\nNote that the mutations return direct access to the newly created object making it queryable in the same request as per the graphQL standard. This means that when for example a customer is created via the `createCustomer` mutation, the customer object is queryable in the same request.\n\nAnother note about the graphQL implementation on Relycomply is that it adheres to the Relay specification which is useful for managing pagination. This is the reason that relationships and objects are explicitly referred to as `edges` and `nodes` respectively in queries and results.\n\n### Getting started with these docs\n\nThese docs can be imported into [Postman ](https://www.postman.com/) and used to make requests to the Relycomply API. This is made easier with the help of Postman [environments.](https://learning.postman.com/docs/sending-requests/variables/managing-environments/)\n\nPostman environments allow you to set some environment variables to be used when making requests, and for more advanced users, you can script the responses of requests to set environment variables. (Explaining that is out of scope for these docs, however.)\n\n#### Environment variables you will need\n\n- token: this is your authentication token. See below on how to retreive yours.\n    \n- assessment_config: this is the name of the assessment config you want to run against the customer. (e.g. \"individual_onboarding_assessment\" or \"business_onboarding_assessment\")\n    \n\n##### Authentication\n\nThe url for the GraphQL api is: `https://app.relycomply.com/graphql/`\n\nRelycomply uses bearer tokens for authentication and authorization.\n\n#### Retreiving a token\n\nLog in to app.relycomply.com and head to _Administration_ > _Developer Tools_. Here you can generate and copy an API key for your user.\n\n## Overview\n\n#### Step 1: Create customer\n\nTo start we need a customer to be created in Relycomply. The customer can be either an individual or an organisation is ultimately what is run through an assessment for verification or some other screening.\n\nA customer in Relycomply has a set of defined fields such as first name, last name etc but additionally has a concept of \"Customer Data\" which is a set of key value pairs which can be attached to a customer to allow for more enriched data which can then be used in assessments as required.\n\n#### Step 1a: Create customer relationship (Optional)\n\nIf the customer is being onboarded as part of some collective that requires relationship modelling this is the mutation to handle it. It allows for a relationship between two customer entities.\n\nFor example between a Business and it's directors. If the relationship is created in Relycomply then the outcome of assessments on the director will impact the status of the business. i.e. if a director is confirmed as a Sanctions match, then the Business customer object will reflect that too.\n\n#### Step 2: Upload documents\n\nIf the customer is going to be run through a screening that requires supporting documents upload those. (For example a selfie for identity verification)\n\n#### Step 2a: Update customer (Optional)\n\nIf the integration workflow requires that customer data is collected at different times it is up to the developer to decide if they want to create the customer with all required data in one go or they can update the customer as more data is collected via the update customer mutation.\n\n#### Step 3: Create assessment\n\nOnce all the relevant data for the customer has been collected and created in Relycomply the assessment can be run.\n\n#### Step 3a: Link assessment (Optional)\n\nThere are some instances where it is desired that the outcome of one assessment should impact the outcome of another. Although this can be handled via a customer relationship this offers a more granular level of control in terms of handling those relationships between assessments.\n\nFor example, in the case of a PTY company where a non-director entity is signing up to trade on behalf of the company, and they need to be screened. It may be desired that the outcome of their assessment impacts the outcome of the assessment on the company.\n\nIf the non-director entity turns out to be a sanctioned individual, that should reflect on the company.\n\nTo create that relationship mechanic, the link assessment mutation can be used to do so.\n\n#### Step 4a: Wait for webhook (No cases, everything passed)\n\nOnce the assessment has completed successfully i.e. has run successfully with all customer details verified and screenings passed without issues, a webhook will be sent to notify the integrating system of the update to the status of the assessment.\n\n#### Step 4b: Wait for webhook (case created, human intervention required)\n\nIn the event that one of the screenings generate a case, (i.e. an individual's identity cannot be verified via automated means or there is a potential hit on a sanctions list. ) a webhook will be fired to notify the integrating system that a case has been created.\n\nAt this point a human case worker would need to work the case on the Relycomply system to ultimately determine whether or not the customer is someone the business is comfortable to do business with.\n\nOnce all cases are worked the status of the assessment will be updated and the webhook referred to in _**Step 4a**_ will be sent to the integrating system to notify it of the change in status of the assessment. Note this status could be one which means the business is happy to work with the customer or a status that indicates the opposite depending on the outcome of the cases worked.\n\n#### Step 5: Query Assessment status\n\nOnce the webhook has been received, the integrating system should query Relycomply to check the status of the assessment before deciding on what to do next. (i.e. to allow the customer to trade or not.)\n\n## Webhooks\n\nRelycomply is capable of sending webhooks for a number of events. These simply notify the integrating system of the update in Relycomply, the integrating system then needs to decide how to action that. e.g when a case is created, do they fire internal comms to the team who needs to action it. Or when an assessment is updated the system should interrogate Relycomply to check what that status is.\n\n#### Case Created\n\nA webhook can be configured to be fired when a case is created.\n\nIn that case the body of the webhook will look like:\n\n``` json\n{\n    \"event\": \"CaseCreated\",\n    \"detail\": {\n        \"id\": <case_id>,\n        \"screening_id\": <screening_id>,\n        \"assessment_id\": <assessment_id>\n    }\n}\n\n ```\n\n#### Assessment updated\n\nWhen an assessment status is updated a webhook will be fired with the following body:\n\n``` json\n{\n    \"event\": \"UpdateAssessmentStatus\",\n    \"detail\": {\n        \"id\": <assessment_id>,\n        \"updated\": <date_time>,\n    }\n}\n\n ```\n\n## Assessment outcomes\n\nThere are a number of possible outcomes for an assessment, dependent on the outcome of the screenings that are run as part of that assessment. These will be agreed upon when setting up the assessment configurations; however, below is an example of commonly setup assessment outcomes.\n\n| **Outcome** | **Sentiment** |\n| --- | --- |\n| SanctionsListMatch | Negative |\n| PoliticallyExposed | Negative |\n| IdentityInconclusive | Negative |\n| CompanyInconclusive | Negative |\n| AcceptableRisk | Positive |\n\n#### Screening outcomes\n\nEach screening has a possible positive outcome or negative outcome in terms of sentiment. i.e. if a negative sentiment then the risk is high or some verification could not be done even after a case was worked. Below is a subset of screenings as well as their outcomes.\n\n|  | **Negative sentiment/Outcome** | **Positive sentiment/Outcome** |\n| --- | --- | --- |\n| Sanctions Screening | IsMatch | NotMatch |\n| PEP Screening | IsMatch | NotMatch |\n| Identity verification | IdentityInconclusive | IdentityConfirmed |\n| CIPC KYB | CompanyInconclusive | CompanyConfirmed |\n| Address verification | AddressInconclusive | AddressConfirmed |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"24454690","team":1663704,"collectionId":"66812cf6-6342-43ab-ab30-6cf51b53b665","publishedId":"2sA3s4kq6n","public":true,"publicUrl":"https://docs.relycomply.com","privateUrl":"https://go.postman.co/documentation/24454690-66812cf6-6342-43ab-ab30-6cf51b53b665","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"43b02a"},"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":"43b02a"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"43b02a"}}]}},"version":"8.10.1","publishDate":"2026-01-22T09:26:21.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"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/49f1d2547cd8fcc4a89aa77724bafb64eb60ac6ffbf459ddbaa2bd08fd8ac904","favicon":"https://res.cloudinary.com/postman/image/upload/v1724752494/team/4c313dcf718f8a5b0b134081f836e2a5.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://docs.relycomply.com/view/metadata/2sA3s4kq6n"}