---
title: Omoto CRM API
slug: omoto-crm-api
docTags: 
createdAt: 2020-05-20T07:31:32.000Z
---

## Introduction

The CRM API offers a standard way to push CRM data from any third party CRM or customer platform into Omoto.

Omoto consumes the customer data sent in each trigger and, after performing basic validation and executing business rules, sends out the relevant survey invite to the customer.

We appreciate that every CRM would have their own API structure, and therefore this document standardises the JSON structure in which Omoto can consume data from any third party CRM.

## API Definition

The API is made available on a custom end-point that follows the below structure. The customer contact and qualifying information is sent as JSON payload in the body of the POST request. The JSON structure is also shared below.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://{{domain}}.omoto.io/omoto/receivecustomerinfo.htm?key={{apikey}}",
  "name": "CRM API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "key",
        "type": "string",
        "description": "API key for the CRM integration provided by Omoto team"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "Olomtky-T1VhM9BS81GDc",
        "code": "{\n    \"status\": \"success\"\n}",
        "language": "200"
      },
      {
        "id": "Mc5yhpqsEbuAPFSjpig6S",
        "code": "{\n    \"response\": \"KEYMISMATCH\"\n}",
        "language": "401"
      }
    ],
    "selectedLanguageId": "Olomtky-T1VhM9BS81GDc"
  },
  "examples": {
    "languages": [
      {
        "id": "SPOVx6jdmLnZ9OwKlYwga",
        "code": "[\n  {\n    \"personalinfo\": {\n      \"firstname\": \"Bertram\",\n      \"lastname\": \"Wooster\",\n      \"email\": \"bertie@jeeves.com\",\n      \"mobileno\": \"9835132376\"\n      \"transactionid\": \"202005201623\",\n      \"regid\": \"TST202005201144\"\n    },\n    \"qualifyinginfo\": [\n      {\n        \"name\": \"unitname\",\n        \"value\": \"Book club\"\n      },\n      {\n        \"name\": \"genre\",\n        \"value\": \"Comedy\"\n      },\n      {\n        \"name\": \"author\",\n        \"value\": \"PG Wodehouse\"\n      },\n      {\n        \"name\": \"publisher\",\n        \"value\": \"Jenkins\"\n      },\n      {\n        \"name\": \"country\",\n        \"value\": \"UK\"\n      }\n    ]\n  }\n]",
        "language": "json"
      }
    ],
    "selectedLanguageId": "SPOVx6jdmLnZ9OwKlYwga"
  },
  "description": "Send customer details to Omoto",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

### JSON payload to be sent in the POST request body

![](https://p112.p2.n0.cdn.getcloudapp.com/items/P8uEqGg2/Image%202020-05-20%20at%2013.26.33.png?v=2ffb23f0c9e1dee86bd2de6329c3a1c3 "JSON structure with explanation")

**Sample JSON**

```javascript
[
  {
    "personalinfo": {
      "firstname": "Bertram",
      "lastname": "Wooster",
      "email": "bertie@jeeves.com",
      "mobileno": "9835132376"
      "transactionid": "202005201623",
      "regid": "TST202005201144"
    },
    "qualifyinginfo": [
      {
        "name": "unitname",
        "value": "Book club"
      },
      {
        "name": "genre",
        "value": "Comedy"
      },
      {
        "name": "author",
        "value": "PG Wodehouse"
      },
      {
        "name": "publisher",
        "value": "Jenkins"
      },
      {
        "name": "country",
        "value": "UK"
      }
    ]
  }
]
```

:::hint{type="info"}
## Important notes

1\. Set content-type to 'application/json'.
2\. API keys are used for both authentication and campaign identification. Make sure you use the right API key for the right campaign.
3\. Omoto sends out the survey invite immediately after receiving the trigger. Scheduling and timing must be managed your end - trigger when invite has to be sent.
:::



