Our API

Input and output are currently supported JSON only. When making an API request, you must specify both the input data format in the body (only relevant to POST and PUT requests), and the output data format you expect in the response.

The responses returned by the API are accompanied by meaningful HTTP status codes which represent the status of the request. See Response status codes for details.

Contacts

Contains all the functionality you need to manage the Contacts for your account. From adding new contacts, deleting existing contacts, updating one to one data, updating addresses permissions and interests.

Get a Contact by given identifier

GET https://api.msp-cloud.com/CustomerAPI/v1/Contacts?id={id}
GET https://api.msp-cloud.com/CustomerAPI/v1/Contacts?email={email}
GET https://api.msp-cloud.com/CustomerAPI/v1/Contacts?externalId={externalId}
GET https://api.msp-cloud.com/CustomerAPI/v1/Contacts?mobile={mobile}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "id": 11866,
    "contactStatus": "ACTIVE",
    "contactType": "CUSTOMER",
    "dob": "1970-12-30T00:00:00",
    "email": "test@test.com",
    "externalId": "2013127684",
    "firstname": "Ole Petter",
    "gender": "M",
    "lastname": "Løvik",
    "organizationId": 0,
    "sourceType": "Api",
    "contactAddresses": [
        {
            "id": 11329,
            "addressType": "Gateadresse",
            "contactId": 11866,
            "sourceType": "Api"
        }
    ],
    "contactInterests": [],
    "contactPermissions": [
        {
            "id": 78328,
            "channelType": "EMAIL",
            "contactId": 11866,
            "optin": true,
            "optinType": "Single",
            "permissionGroupType": "Global",
            "permissionType": "GLobal",
            "sourceType": "Api"
        }
    ],
    "organizationEmployees": []
}
                        

Create a new Contact

POST https://api.msp-cloud.com/CustomerAPI/v1/Contacts
Example body request:
{
  "contactStatus": "ACTIVE",
  "contactType": "PROSPECT",
  "dob": "1985-06-17T02:00:00",
  "email": "test@test.com",
  "firstname": "Test",
  "gender": "F",
  "lastname": "User",
  "organizationId": 0,
  "phoneMobile": "90909090",
  "sourceType": "Api",
  "contactAddresses": [],
  "contactInterests": [],
  "contactPermissions": [],
  "organizationEmployees": []
}
                        
Expected response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": 48893,
  "contactStatus": "ACTIVE",
  "contactType": "PROSPECT",
  "dob": "1985-06-17T02:00:00",
  "email": "test@test.com",
  "firstname": "Test",
  "gender": "F",
  "lastname": "User",
  "organizationId": 0,
  "phoneMobile": "90909090",
  "sourceType": "Api",
  "contactAddresses": [],
  "contactInterests": [],
  "contactPermissions": [],
  "organizationEmployees": []
}
                        

Update a Contact

PUT https://api.msp-cloud.com/CustomerAPI/v1/Contacts
Example body request:
{
  "id": 48893,
  "contactStatus": "ACTIVE",
  "contactType": "PROSPECT",
  "dob": "1985-06-17T02:00:00",
  "email": "test@test.com",
  "firstname": "Test2",
  "gender": "F",
  "lastname": "User2",
  "organizationId": 0,
  "phoneMobile": "90909090",
  "sourceType": "Api",
  "contactAddresses": [],
  "contactInterests": [],
  "contactPermissions": [],
  "organizationEmployees": []
}
                        
Expected response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": 48893,
  "contactStatus": "ACTIVE",
  "contactType": "PROSPECT",
  "dob": "1985-06-17T02:00:00",
  "email": "test@test.com",
  "firstname": "Test2",
  "gender": "F",
  "lastname": "User2",
  "organizationId": 0,
  "phoneMobile": "90909090",
  "sourceType": "Api",
  "contactAddresses": [],
  "contactInterests": [],
  "contactPermissions": [],
  "organizationEmployees": []
  
}
                        

Delete a Contact

DELETE https://api.msp-cloud.com/CustomerAPI/v1/Contacts?id={id}
Expected response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
                        

Contact Lookup Tables

Contains all the functionality you need to manage lookup tables for foreign keys in Contact data. Use these to get correct values for FKs. I.e possible values for contactStatus you find in ContactStatus lookup.

GET https://api.msp-cloud.com/CustomerAPI/v1/ContactStatus
GET https://api.msp-cloud.com/CustomerAPI/v1/ContactTypes
GET https://api.msp-cloud.com/CustomerAPI/v1/ContactAddressTypes
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{... the corresponding Json object....}
                        

General Lookup Tables

Contains all the functionality you need to manage general lookup tables for foreign keys in data. Use these to get correct values for FKs.

GET https://api.msp-cloud.com/CustomerAPI/v1/Channels
GET https://api.msp-cloud.com/CustomerAPI/v1/InterestGroups
GET https://api.msp-cloud.com/CustomerAPI/v1/Interests
GET https://api.msp-cloud.com/CustomerAPI/v1/PermissionGroups
GET https://api.msp-cloud.com/CustomerAPI/v1/Permissions
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{... the corresponding Json object....}