Методы API
DEVELOPER PLATFORM · v1

API, с которым удобно работать

CRM, кампании, аналитика и интеграции. Точные контракты, понятные примеры и подписанные вебхуки.

Скачать OpenAPI

Private preview: API доступен с проектным ключом. Публичные SLA и сроки поддержки ещё не установлены.

POST

Предпросмотр импорта интеграции

/api/v1/developer/integrations/{installationId}/preview

Выполняет read-only dry run и возвращает counts, unsupported fields, estimated changes и свежий fingerprint. Используйте fingerprint сразу: смена профиля делает его устаревшим.

Право доступаintegrations.operations.read

Authorization: Bearer YOUR_PROJECT_TOKEN

Параметры

installationIdобязательно · path

stringminLength: 1 · maxLength: 160

JSON Schema
{
  "type": "string",
  "minLength": 1,
  "maxLength": 160
}

Примеры запроса

curl --request POST 'https://YOUR_NOVA_HOST/api/v1/developer/integrations/INSTALLATION_ID/preview' --header 'Authorization: Bearer YOUR_PROJECT_TOKEN'

Ответы

200 Integration import preview
application/json

object

countsобязательно
object
Вложенная схема

object

contactобязательно
integerminimum: 0
organizationобязательно
integerminimum: 0
leadобязательно
integerminimum: 0
dealобязательно
integerminimum: 0
taskобязательно
integerminimum: 0
activityобязательно
integerminimum: 0
noteобязательно
integerminimum: 0
JSON Schema
{
  "type": "object",
  "properties": {
    "contact": {
      "type": "integer",
      "minimum": 0
    },
    "organization": {
      "type": "integer",
      "minimum": 0
    },
    "lead": {
      "type": "integer",
      "minimum": 0
    },
    "deal": {
      "type": "integer",
      "minimum": 0
    },
    "task": {
      "type": "integer",
      "minimum": 0
    },
    "activity": {
      "type": "integer",
      "minimum": 0
    },
    "note": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "contact",
    "organization",
    "lead",
    "deal",
    "task",
    "activity",
    "note"
  ],
  "additionalProperties": false
}
duplicateCountобязательно
integerminimum: 0
unsupportedFieldsобязательно
array
Вложенная схема

array

object

entityTypeобязательно
stringenum: ["contact","organization","lead","deal","task","activity","note"]
externalFieldобязательно
stringminLength: 1 · maxLength: 100
reasonобязательно
stringenum: ["not_mapped","unsupported_type","restricted"]
JSON Schema
{
  "type": "object",
  "properties": {
    "entityType": {
      "type": "string",
      "enum": [
        "contact",
        "organization",
        "lead",
        "deal",
        "task",
        "activity",
        "note"
      ]
    },
    "externalField": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "reason": {
      "type": "string",
      "enum": [
        "not_mapped",
        "unsupported_type",
        "restricted"
      ]
    }
  },
  "required": [
    "entityType",
    "externalField",
    "reason"
  ],
  "additionalProperties": false
}
JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "entityType": {
        "type": "string",
        "enum": [
          "contact",
          "organization",
          "lead",
          "deal",
          "task",
          "activity",
          "note"
        ]
      },
      "externalField": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "reason": {
        "type": "string",
        "enum": [
          "not_mapped",
          "unsupported_type",
          "restricted"
        ]
      }
    },
    "required": [
      "entityType",
      "externalField",
      "reason"
    ],
    "additionalProperties": false
  }
}
estimatedChangesобязательно
object
Вложенная схема

object

createобязательно
integerminimum: 0
updateобязательно
integerminimum: 0
skipобязательно
integerminimum: 0
JSON Schema
{
  "type": "object",
  "properties": {
    "create": {
      "type": "integer",
      "minimum": 0
    },
    "update": {
      "type": "integer",
      "minimum": 0
    },
    "skip": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "create",
    "update",
    "skip"
  ],
  "additionalProperties": false
}
profileVersionобязательно
integerminimum: 0
fingerprintобязательно
stringpattern: "^[a-f0-9]{64}$"
JSON Schema
{
  "type": "object",
  "properties": {
    "counts": {
      "type": "object",
      "properties": {
        "contact": {
          "type": "integer",
          "minimum": 0
        },
        "organization": {
          "type": "integer",
          "minimum": 0
        },
        "lead": {
          "type": "integer",
          "minimum": 0
        },
        "deal": {
          "type": "integer",
          "minimum": 0
        },
        "task": {
          "type": "integer",
          "minimum": 0
        },
        "activity": {
          "type": "integer",
          "minimum": 0
        },
        "note": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "contact",
        "organization",
        "lead",
        "deal",
        "task",
        "activity",
        "note"
      ],
      "additionalProperties": false
    },
    "duplicateCount": {
      "type": "integer",
      "minimum": 0
    },
    "unsupportedFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "contact",
              "organization",
              "lead",
              "deal",
              "task",
              "activity",
              "note"
            ]
          },
          "externalField": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "reason": {
            "type": "string",
            "enum": [
              "not_mapped",
              "unsupported_type",
              "restricted"
            ]
          }
        },
        "required": [
          "entityType",
          "externalField",
          "reason"
        ],
        "additionalProperties": false
      }
    },
    "estimatedChanges": {
      "type": "object",
      "properties": {
        "create": {
          "type": "integer",
          "minimum": 0
        },
        "update": {
          "type": "integer",
          "minimum": 0
        },
        "skip": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "create",
        "update",
        "skip"
      ],
      "additionalProperties": false
    },
    "profileVersion": {
      "type": "integer",
      "minimum": 0
    },
    "fingerprint": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "counts",
    "duplicateCount",
    "unsupportedFields",
    "estimatedChanges",
    "profileVersion",
    "fingerprint"
  ],
  "additionalProperties": false,
  "$ref": "#/components/schemas/DeveloperIntegrationPreview"
}
400 Invalid integration preparation request
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
401 Invalid developer credential
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
403 Integration preparation access unavailable
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
404 Integration installation not found
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
409 Integration is not ready for preview
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
429 Developer API rate limit exceeded
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}
503 Developer API rate limiter unavailable
application/problem+json

object

type
stringformat: "uri" · default: "about:blank"
titleобязательно
string
statusобязательно
integerminimum: 100 · maximum: 599
detail
string
instance
string
errors
object
JSON Schema
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "format": "uri",
      "default": "about:blank"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "errors": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "status"
  ]
}