Ошибки

При ошибке обработки запросов API возвращает такую структуру:

{
  "error_code": 1,
  "error_name": "REQUEST_VALIDATION_ERROR",
  "message": "request data validation error",
  "detail": {}
}

Ошибка с кодом 1 означает, что формат запроса не соответствует тому, что метод ожидает. Формат описан в схеме запросов в swagger'e.

Список кодов ошибок, которые могут встретиться при работе с API:

{
  "1": {
    "name": "REQUEST_VALIDATION_ERROR",
    "message": "request data validation error"
  },
  "10": {
    "name": "NOT_PAID",
    "message": "not paid"
  },
  "11": {
    "name": "NOT_IN_SUBSCRIPTION",
    "message": "not in subscription"
  },
  "413": {
    "name": "REQUEST_TOO_LARGE",
    "message": "request body is too large"
  },
  "429": {
    "name": "TOO_MANY_REQUESTS",
    "message": "too many requests"
  },
  "500": {
    "name": "INTERNAL_SERVER_ERROR",
    "message": "internal server error"
  },
  "1000": {
    "name": "CONTACT_NOT_FOUND",
    "message": "contact not found"
  },
  "1001": {
    "name": "CONTACT_PHONE_EMAIL_CONFLICT",
    "message": "a contact with the same phone or email already exists"
  },
  "1002": {
    "name": "CONTACT_TAG_NOT_EXISTS",
    "message": "contact tag not exists"
  },
  "2000": {
    "name": "NOTE_NOT_FOUND",
    "message": "note not found"
  },
  "3000": {
    "name": "TAG_NOT_FOUND",
    "message": "tag not found"
  },
  "3001": {
    "name": "TAG_ALREADY_EXISTS",
    "message": "a tag with the same name already exists"
  },
  "4000": {
    "name": "CHAT_NOT_FOUND",
    "message": "chat not found"
  },
  "5000": {
    "name": "MEMBER_NOT_FOUND",
    "message": "member not found"
  },
  "6000": {
    "name": "ITEM_NOT_FOUND",
    "message": "item not found"
  },
  "6001": {
    "name": "ITEM_DUPLICATE_ERROR",
    "message": "item already exists"
  },
  "7000": {
    "name": "TEMPLATE_NOT_FOUND",
    "message": "template not found"
  },
  "7001": {
    "name": "TEMPLATE_WABA_ERROR",
    "message": "generic waba error"
  },
  "7002": {
    "name": "TEMPLATE_WABA_ACCESS_ERROR",
    "message": "waba access error"
  },
  "7003": {
    "name": "TEMPLATE_WABA_PHONE_INVALID_ERROR",
    "message": "waba phone invalid"
  },
  "7004": {
    "name": "TEMPLATE_WABA_NOT_FOUND",
    "message": "waba template not found"
  },
  "8000": {
    "name": "COMPANY_NOT_FOUND",
    "message": "company not found"
  },
  "8001": {
    "name": "COMPANY_LIMIT_INCORRECT_TYPE",
    "message": "incorrect company limit type"
  },
  "10000": {
    "name": "CONNECTION_NOT_FOUND",
    "message": "connection not found"
  },
  "10001": {
    "name": "CONNECTION_ALREADY_EXISTS",
    "message": "connection with the same params already exists"
  },
  "10002": {
    "name": "CONNECTION_TYPE_MISMATCH",
    "message": "connection type and data type mismatch"
  },
  "10004": {
    "name": "CONNECTION_INCORRECT_CLIENT_DATA",
    "message": "incorrect client data"
  },
  "10005": {
    "name": "CONNECTION_AMOCRM_UNKNOWN_ERROR",
    "message": "amocrm unknown error"
  },
  "10006": {
    "name": "CONNECTION_AMOCRM_ACCESS_DENIED",
    "message": "amocrm access error"
  },
  "10007": {
    "name": "CONNECTION_BLACKLIST_CHAT_IS_ALREADY_BLACKLISTED",
    "message": "chat is already blacklisted"
  },
  "10008": {
    "name": "CONNECTION_BLACKLIST_CHAT_IS_NOT_BLACKLISTED",
    "message": "blacklist not contains this chat"
  },
  "10009": {
    "name": "CONNECTION_BLACKLIST_LIMIT_EXCEEDED",
    "message": "blacklist contains too many chats"
  },
  "10010": {
    "name": "CONNECTION_LIMIT_EXCEEDED",
    "message": "connection limit exceeded"
  },
  "10011": {
    "name": "CONNECTION_AMOCRM_INVOICE_CATALOG_NOT_FOUND",
    "message": "amocrm invoice catalog not found"
  },
  "10012": {
    "name": "CONNECTION_BOUND_TO_ANOTHER_COMPANY",
    "message": "connection bound to another company"
  },
  "11000": {
    "name": "UNAUTHORIZED",
    "message": "unauthorized"
  },
  "12000": {
    "name": "ENTITY_NOT_FOUND",
    "message": "legal entity was not found"
  },
  "12001": {
    "name": "ENTITY_INCORRECT_CLIENT_DATA",
    "message": "incorrect client data"
  },
  "12002": {
    "name": "ENTITY_SIGNER_NOT_FOUND",
    "message": "signer not found"
  },
  "13000": {
    "name": "INTEGRATION_NOT_FOUND",
    "message": "integration not found"
  },
  "13001": {
    "name": "INTEGRATION_INCORRECT_TYPE",
    "message": "incorrect integration type"
  },
  "13002": {
    "name": "INTEGRATION_UNSUPPORTED",
    "message": "unsupported integration type"
  },
  "13003": {
    "name": "INTEGRATION_DELETED",
    "message": "integration deleted"
  },
  "13004": {
    "name": "INTEGRATION_INVALID_STATE",
    "message": "invalid integration state"
  },
  "13005": {
    "name": "INTEGRATION_ALREADY_LINKED",
    "message": "integration is already linked to another company"
  },
  "13006": {
    "name": "INTEGRATION_LIMIT_EXCEEDED",
    "message": "integration limit exceeded"
  },
  "14000": {
    "name": "PROMOCODE_NOT_FOUND",
    "message": "promocode not found"
  },
  "14001": {
    "name": "PROMOCODE_ALREADY_EXISTS",
    "message": "promocode with this value already exists"
  },
  "14002": {
    "name": "PROMOCODE_LIMIT_EXCEEDED",
    "message": "promocodes count limit exceeded"
  },
  "15000": {
    "name": "MESSAGING_MODE_NOT_SUPPORTED",
    "message": "mode not supported"
  },
  "15001": {
    "name": "MESSAGING_UNABLE_TO_VALIDATE_PHONE",
    "message": "unable to validate phone number"
  },
  "15002": {
    "name": "MESSAGING_MESSAGE_NOT_FOUND",
    "message": "message not found"
  },
  "15003": {
    "name": "MESSAGING_PHONE_NO_WHATSAPP",
    "message": "phone is not registered in WhatsApp"
  },
  "15004": {
    "name": "MESSAGING_CONNECTION_TYPE_UNSUPPORTED",
    "message": "unsupported connection type"
  },
  "15005": {
    "name": "MESSAGING_INCORRECT_WABA_API_KEY",
    "message": "incorrect WABA api key"
  },
  "15006": {
    "name": "MESSAGING_CHATAPI_INSTANCE_NOT_AUTHORIZED",
    "message": "instance not authorized"
  },
  "15007": {
    "name": "MESSAGING_CHATAPI_INSTANCE_NOT_PAID",
    "message": "instance not paid"
  },
  "15008": {
    "name": "MESSAGING_CHATAPI_INSTANCE_NOT_AVAILABLE",
    "message": "instance not available"
  },
  "15009": {
    "name": "MESSAGING_TELEGRAM_CREATE_CHAT_ERROR",
    "message": "unable to create telegram chat"
  },
  "15010": {
    "name": "MESSAGING_WABA_TEMPLATE_NOT_FOUND",
    "message": "specified template is not found in specified locale"
  },
  "15011": {
    "name": "MESSAGING_FILE_URL_NOT_SUPPORTED",
    "message": "file url is invalid or not supported"
  },
  "15012": {
    "name": "MESSAGING_MARKUP_NOT_SUPPORTED",
    "message": "markup not supported for this connection type"
  },
  "16000": {
    "name": "FILE_MIME_TYPE_NOT_SUPPORTED",
    "message": "file mime type is not supported"
  },
  "17000": {
    "name": "TELEGRAM_GENERIC_ERROR",
    "message": "telegram error"
  },
  "17001": {
    "name": "TELEGRAM_VERIFICATION_CODE_EXPIRED",
    "message": "telegram verification code expired"
  },
  "17002": {
    "name": "TELEGRAM_FLOOD_ERROR",
    "message": "telegram flood control triggered"
  },
  "17003": {
    "name": "TELEGRAM_2FA_PASSWORD_NEEDED",
    "message": "telegram two-steps verification is enabled and a password is required"
  },
  "17004": {
    "name": "TELEGRAM_ALREADY_AUTHORIZED",
    "message": "telegram already authorized"
  },
  "17005": {
    "name": "TELEGRAM_CODE_EXPIRED",
    "message": "telegram code expired"
  },
  "17006": {
    "name": "TELEGRAM_2FA_PASSWORD_INCORRECT",
    "message": "telegram 2fa password incorrect"
  },
  "17007": {
    "name": "TELEGRAM_NOT_OCCUPIED_ERROR",
    "message": "telegram phone/username not occupied (or phone is hidden)"
  },
  "17008": {
    "name": "TELEGRAM_AUTH_ERROR",
    "message": "telegram authorization error (may need to re-login)"
  },
  "17009": {
    "name": "TELEGRAM_CODE_INVALID",
    "message": "the code provided is invalid"
  },
  "17010": {
    "name": "TELEGRAM_PHONE_INVALID",
    "message": "the phone number provided is invalid"
  },
  "17011": {
    "name": "TELEGRAM_PHONE_BANNED",
    "message": "the phone number provided is banned"
  },
  "18000": {
    "name": "INVOICE_GENERIC_ERROR",
    "message": "an error occurred while processing request"
  },
  "18001": {
    "name": "INVOICE_NOT_FOUND",
    "message": "invoice not found"
  },
  "18002": {
    "name": "INVOICE_UNSUPPORTED_VAT_VALUE",
    "message": "unsupported VAT value"
  },
  "18003": {
    "name": "INVOICE_PROVIDER_ERROR",
    "message": "provider error"
  },
  "19000": {
    "name": "BITRIX_UNKNOWN_ERROR",
    "message": "bitrix error"
  },
  "19001": {
    "name": "BITRIX_ACCESS_DENIED",
    "message": "bitrix access denied error"
  },
  "20000": {
    "name": "WEBHOOK_NOT_FOUND",
    "message": "webhook not found"
  },
  "20001": {
    "name": "WEBHOOK_VALIDATION_ERROR",
    "message": "webhook validation error"
  },
  "21000": {
    "name": "ROLE_ALREADY_EXISTS",
    "message": "a role with the same name already exists"
  },
  "21001": {
    "name": "ROLE_NOT_FOUND",
    "message": "role not found"
  },
  "21002": {
    "name": "ROLE_DEFAULT_ROLE_CANNOT_BE_UPDATED",
    "message": "default role cannot be updated"
  },
  "21003": {
    "name": "ROLE_PERMISSION_NOT_FOUND",
    "message": "permission not found"
  },
  "22001": {
    "name": "SUBSCRIPTION_NOT_FOUND",
    "message": "subscription not found"
  },
  "22002": {
    "name": "SUBSCRIPTION_NOT_ENOUGH_DAYS",
    "message": "not enough days to recalculate"
  },
  "22003": {
    "name": "SUBSCRIPTION_REQUISITE_NOT_FOUND",
    "message": "requisite not found"
  },
  "22004": {
    "name": "SUBSCRIPTION_PROMO_CODE_INVALID",
    "message": "invalid promo_code"
  },
  "22005": {
    "name": "SUBSCRIPTION_PAUSED",
    "message": "subscription paused"
  },
  "22006": {
    "name": "SUBSCRIPTION_PAYMENTS_LOCKED",
    "message": "subscription payments locked"
  },
  "22007": {
    "name": "SUBSCRIPTION_DATE_INVALID",
    "message": "invalid subscription date"
  },
  "22008": {
    "name": "SUBSCRIPTION_DIALOGS_LOCKED",
    "message": "dialogs payments are locked"
  },
  "23000": {
    "name": "SALES_SHOP_NOT_FOUND",
    "message": "shop not found"
  },
  "23001": {
    "name": "SALES_CATALOG_NOT_FOUND",
    "message": "catalog not found"
  },
  "23002": {
    "name": "SALES_PRODUCT_NOT_FOUND",
    "message": "product not found"
  },
  "24000": {
    "name": "BROADCAST_NOT_FOUND",
    "message": "broadcast not found"
  },
  "24001": {
    "name": "BROADCAST_UNSUPPORTED_CONNECTION",
    "message": "unsupported broadcast connection"
  },
  "24002": {
    "name": "BROADCAST_UNABLE_TO_UPDATE",
    "message": "unable to update broadcast"
  },
  "25000": {
    "name": "FACEBOOK_UNABLE_TO_BIND",
    "message": "unable to bind facebook account"
  },
  "25001": {
    "name": "FACEBOOK_TOKEN_EXPIRED",
    "message": "facebook token expired"
  },
  "25002": {
    "name": "FACEBOOK_CATALOG_NOT_FOUND",
    "message": "facebook catalog not found"
  },
  "25003": {
    "name": "FACEBOOK_ACCOUNT_NOT_LINKED",
    "message": "facebook account not linked to waba connection"
  },
  "25004": {
    "name": "FACEBOOK_UNHANDLED_EXCEPTION",
    "message": "facebook unhandled exception"
  },
  "25005": {
    "name": "FACEBOOK_INVALID_APP_ID",
    "message": "facebook invalid app id"
  },
  "25006": {
    "name": "FACEBOOK_INVALID_APP_SECRET",
    "message": "facebook invalid app secret"
  },
  "26000": {
    "name": "USER_FORM_ALREADY_FILLED",
    "message": "user form is already filled"
  },
  "26001": {
    "name": "USER_FORM_NOT_AVAILABLE",
    "message": "user form is not available"
  },
  "27000": {
    "name": "NOTIFICATION_CHANNEL_LIMIT_EXCEEDED",
    "message": "notification channel limit exceeded"
  },
  "27001": {
    "name": "NOTIFICATION_CHANNEL_DUPLICATE_ERROR",
    "message": "notification channel with the same chat ID already exists"
  },
  "28000": {
    "name": "PARTNER_PAYOUT_LOCKED",
    "message": "active payout already exists"
  },
  "28001": {
    "name": "PARTNER_PAYOUT_INSUFFICIENT_BALANCE",
    "message": "insufficient balance"
  },
  "29000": {
    "name": "WABA_SETTINGS_NOT_AVAILABLE",
    "message": "waba settings not available"
  },
  "99999": {
    "name": "OTHER",
    "message": "unknown error"
  }
}

Last updated