Методы API
DEVELOPER PLATFORM · v1

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

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

Скачать OpenAPI

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

GET

Статистика доставки Campaign

/api/v1/developer/analytics/campaigns/{campaignId}/delivery

Возвращает агрегированные попытки и последние результаты доставки известной Campaign со свежестью проекции; неизвестный id даёт пустой агрегат без раскрытия чужого проекта.

Право доступаanalytics.campaigns.read

Authorization: Bearer YOUR_PROJECT_TOKEN

Параметры

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

stringminLength: 1 · maxLength: 160

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

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

curl --request GET   'https://YOUR_NOVA_HOST/api/v1/developer/analytics/campaigns/CAMPAIGN_ID/delivery'   --header 'Authorization: Bearer YOUR_PROJECT_TOKEN'

Ответы

200 Aggregate Campaign Delivery statistics
application/json

object

campaignIdобязательно
stringminLength: 1 · maxLength: 160
projectedThroughобязательно
string | nullformat: "date-time"
observedRecipientsобязательно
integerminimum: 0
attemptsобязательно
integerminimum: 0
sentобязательно
integerminimum: 0
failedобязательно
integerminimum: 0
retryPendingобязательно
integerminimum: 0
terminalRecipientsобязательно
integerminimum: 0
deliverySuccessRateобязательно
number | nullminimum: 0 · maximum: 1
JSON Schema
{
  "type": "object",
  "properties": {
    "campaignId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "projectedThrough": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "observedRecipients": {
      "type": "integer",
      "minimum": 0
    },
    "attempts": {
      "type": "integer",
      "minimum": 0
    },
    "sent": {
      "type": "integer",
      "minimum": 0
    },
    "failed": {
      "type": "integer",
      "minimum": 0
    },
    "retryPending": {
      "type": "integer",
      "minimum": 0
    },
    "terminalRecipients": {
      "type": "integer",
      "minimum": 0
    },
    "deliverySuccessRate": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1
    }
  },
  "required": [
    "campaignId",
    "projectedThrough",
    "observedRecipients",
    "attempts",
    "sent",
    "failed",
    "retryPending",
    "terminalRecipients",
    "deliverySuccessRate"
  ],
  "additionalProperties": false,
  "$ref": "#/components/schemas/DeveloperCampaignDeliveryStatisticsResponse"
}
400 Invalid Campaign identifier
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 Campaign analytics 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"
  ]
}
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"
  ]
}