API Description

The API serves as the central interface between your CRM system and our platform. Its main purpose is to automatically import data from existing systems and integrate it into our system.

This ensures that:

  • Customer data can be imported without manual intervention
  • Data in the CRM is always kept up to date
  • Integrations with existing system landscapes can be easily implemented
  • Making processes in marketing, sales, and data analysis more efficient

In short: The API reduces manual work and creates a clean, automated database based on your CRM.

‍

Upload Data for Import

POST /imports

Uploads JSON data for import processing.

Request Header

curl -X POST https://crm.mainition.de/api/v1/imports \

 -H "Authorization: Bearer <Your Bearer>" \

 -H "Content-Type: application/json" \

 -H "Tenant ID: 1" \

‍

Request Body (JSON Example)

{
  "entity": "persons",  
  "data": [
    {
      "contact_type": "Customer",
      "entity_type": "Person",
      "firstname": "John",
      "lastname": "Doe",
      "company_name": "Doe Inc.",
      "email": "john.doe@example.com",
      "addresses": [
        {
          "external_id": "ADDR-001",
          "street": "123 Main St",
          "city": "New York",
          "postal_code": "10001",
          "country": "USA"
        }
      ],
      "email_bounce": false,
      "email_verified": false,
      "advertisement_consent": true,
      "advertisement_consent_date": "2025-02-07T12:00:00Z",
      "advertisement_ban": false,
      "is_control_group": false,
      "is_duplicate": false,
      "phone": "+1234567890",
      "is_deleted": false,
      "preferred_language": "en",
      "last_interaction_date": "2025-01-10T08:30:00Z",
      "dossier": {},
      "category": ["VIP", "Loyal Customer"],
      "qualification_status": "MQL",
      "interaction_status": "New",
      "is_verified": false,
      "is_blocked": false,
      "created_at": "2025-02-07T12:00:00Z",
      "updated_at": "2025-02-07T12:00:00Z",
      "source": "LinkedIn",
      "custom_fields": {},
      "external_id": "CONTACT-001",
    }
  ],
  "options": {
    "deduplication": "email",  
    "update_existing": true,  
    "update_key": "email"   
  }
}

Response

{

  "import_id": 1234,

  "status": "processing"

}

‍

Request Parameters

Parameters
Type
Description
entity

data

options.deduplication

options.update_existing

options.update_key
string

array

string

boolean

string
The type of data being imported (e.g., contacts, orders).
List of records to import.

Field to check for duplicates (e.g., email).

Whether to update existing records if they match.

Field to use for matching records when `update_existing` is true (e.g., email, id, external_id).

Check Import Status

GET /imports/{import_id}/status

Retrieves the status of an import job.

Path Parameters

Parameters
Type
Description
import_id
integer
The unique identifier of the import job.

Response Examples

In Progress Response
{
  "import_id": 1234,
  "status": "processing",
  "processed": 500,
  "total": 1000
}

Completed Response
{
  "import_id": 1234,
  "status": "completed",
  "success_count": 950,
  "error_count": 50
}

Response Fields

Parameters
Type
Description
import_id

status

processed

success_count

error_count

‍
integer

string

integer

integer

integer
The ID of the import job.

Current status (processing, completed, failed).

Number of processed records (if applicable).

Number of successfully imported records.

Number of records that failed to import.

Retrieve Import Errors

GET /imports/{import_id}/errors

Retrieves the list of errors from a completed import.

Path Parameters

Parameters
Type
Description
import_id
integer
The unique identifier of the import job.

Response Examples

{
  "import_id": 1234,
  "errors": [
    {
      "row": 15,
      "field": "email",
      "error": "Invalid email format"
    },
    {
      "row": 50,
      "field": "email",
      "error": "Missing required field"
    }
  ]
}

Response Fields

Parameters
Type
Description
import_id

errors

row




field


error
integer

array

integer




string


string
The ID of the import job.

List of errors encountered during import. Current status (processing, completed, failed).

The row number in the import file where the error occurred. Number of processed records (if applicable).

The field that caused the error. Number of successfully imported records.

A description of the error.

 Additional Considerations

Rate Limits

  • Maximum of 10,000 records per import request.‍
  • API rate limit: 100 requests per minute per user.

Authentication

  • An API key is required in the Authorization header.

Example Webhook Payload:

{
  "import_id": 1234,
  "status": "completed",
  "success_count": 980,
  "error_count": 20,
  "errors": [
    { "row": 15, "field": "email", "error": "Invalid format" }
  ]
}

Webhook for Import Completion

  • Webhook Event: IMPORT_COMPLETED

‍

‍

For API support, please contact support@mainition.de

Table of Contents

Contact person for the project

Dr. Andreas Alin
Dr. Andreas Alin
sales@mainition.de