Методы API
DEVELOPER PLATFORM · v1

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

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

Скачать OpenAPI

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

GET

Карточка сделки CRM

/api/v1/developer/crm/deals/{dealId}

Возвращает одну сделку, текущий этап, организацию, позиции и до 20 задач.

Право доступаcrm.deals.read

Authorization: Bearer YOUR_PROJECT_TOKEN

Параметры

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

stringminLength: 1 · maxLength: 160

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

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

curl --request GET \
  'https://YOUR_NOVA_HOST/api/v1/developer/crm/deals/DEAL_ID' \
  --header 'Authorization: Bearer YOUR_PROJECT_TOKEN'

Ответы

200 Exact project CRM deal
application/json

object

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

object

idобязательно
stringminLength: 1 · maxLength: 160
contactIdобязательно
stringminLength: 1 · maxLength: 160
organizationIdобязательно
string | nullminLength: 1 · maxLength: 160
titleобязательно
stringminLength: 1
tagsобязательно
array
Вложенная схема

array

string

JSON Schema
{
  "type": "string"
}
JSON Schema
{
  "type": "array",
  "items": {
    "type": "string"
  }
}
pipelineIdобязательно
stringminLength: 1 · maxLength: 160
stageIdобязательно
stringminLength: 1 · maxLength: 160
budgetMinorобязательно
integerminimum: 0
expectedCloseDateобязательно
string | nullformat: "date"
statusобязательно
stringenum: ["open","won","lost"]
lifecycleобязательно
stringenum: ["active","archived"]
createdAtобязательно
stringformat: "date-time"
updatedAtобязательно
stringformat: "date-time"
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "contactId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "organizationId": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 160
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "pipelineId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "stageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "budgetMinor": {
      "type": "integer",
      "minimum": 0
    },
    "expectedCloseDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "won",
        "lost"
      ]
    },
    "lifecycle": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "contactId",
    "organizationId",
    "title",
    "tags",
    "pipelineId",
    "stageId",
    "budgetMinor",
    "expectedCloseDate",
    "status",
    "lifecycle",
    "createdAt",
    "updatedAt"
  ]
}
stageобязательно
object
Вложенная схема

object

idобязательно
stringminLength: 1 · maxLength: 160
nameобязательно
stringminLength: 1
categoryобязательно
stringenum: ["open","won","lost"]
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "category": {
      "type": "string",
      "enum": [
        "open",
        "won",
        "lost"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "category"
  ]
}
organizationобязательно
object | null
Вложенная схема

object | null

idобязательно
stringminLength: 1 · maxLength: 160
nameобязательно
stringminLength: 1
websiteобязательно
string | null
cityобязательно
string | null
JSON Schema
{
  "type": [
    "object",
    "null"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "website": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "website",
    "city"
  ]
}
lineItemsобязательно
array
Вложенная схема

array

object

idобязательно
stringminLength: 1 · maxLength: 160
productIdобязательно
stringminLength: 1 · maxLength: 160
nameобязательно
stringminLength: 1
quantityобязательно
integerexclusiveMinimum: 0
unitPriceMinorобязательно
integerminimum: 0
totalMinorобязательно
integerminimum: 0
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "productId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "quantity": {
      "type": "integer",
      "exclusiveMinimum": 0
    },
    "unitPriceMinor": {
      "type": "integer",
      "minimum": 0
    },
    "totalMinor": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "id",
    "productId",
    "name",
    "quantity",
    "unitPriceMinor",
    "totalMinor"
  ]
}
JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160
      },
      "productId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160
      },
      "name": {
        "type": "string",
        "minLength": 1
      },
      "quantity": {
        "type": "integer",
        "exclusiveMinimum": 0
      },
      "unitPriceMinor": {
        "type": "integer",
        "minimum": 0
      },
      "totalMinor": {
        "type": "integer",
        "minimum": 0
      }
    },
    "required": [
      "id",
      "productId",
      "name",
      "quantity",
      "unitPriceMinor",
      "totalMinor"
    ]
  }
}
tasksобязательно
arraymaxItems: 20
Вложенная схема

arraymaxItems: 20

object

idобязательно
stringminLength: 1 · maxLength: 160
titleобязательно
stringminLength: 1
dueAtобязательно
string | nullformat: "date-time"
priorityобязательно
stringenum: ["normal","high"]
statusобязательно
stringenum: ["open","in_progress","done"]
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "dueAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "priority": {
      "type": "string",
      "enum": [
        "normal",
        "high"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "in_progress",
        "done"
      ]
    }
  },
  "required": [
    "id",
    "title",
    "dueAt",
    "priority",
    "status"
  ]
}
JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160
      },
      "title": {
        "type": "string",
        "minLength": 1
      },
      "dueAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "priority": {
        "type": "string",
        "enum": [
          "normal",
          "high"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "open",
          "in_progress",
          "done"
        ]
      }
    },
    "required": [
      "id",
      "title",
      "dueAt",
      "priority",
      "status"
    ]
  },
  "maxItems": 20
}
JSON Schema
{
  "type": "object",
  "properties": {
    "deal": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "contactId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "organizationId": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 160
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pipelineId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "stageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "budgetMinor": {
          "type": "integer",
          "minimum": 0
        },
        "expectedCloseDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "won",
            "lost"
          ]
        },
        "lifecycle": {
          "type": "string",
          "enum": [
            "active",
            "archived"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "contactId",
        "organizationId",
        "title",
        "tags",
        "pipelineId",
        "stageId",
        "budgetMinor",
        "expectedCloseDate",
        "status",
        "lifecycle",
        "createdAt",
        "updatedAt"
      ]
    },
    "stage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "category": {
          "type": "string",
          "enum": [
            "open",
            "won",
            "lost"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "category"
      ]
    },
    "organization": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "website": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "website",
        "city"
      ]
    },
    "lineItems": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "productId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "quantity": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "unitPriceMinor": {
            "type": "integer",
            "minimum": 0
          },
          "totalMinor": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "productId",
          "name",
          "quantity",
          "unitPriceMinor",
          "totalMinor"
        ]
      }
    },
    "tasks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "priority": {
            "type": "string",
            "enum": [
              "normal",
              "high"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "done"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "dueAt",
          "priority",
          "status"
        ]
      },
      "maxItems": 20
    }
  },
  "required": [
    "deal",
    "stage",
    "organization",
    "lineItems",
    "tasks"
  ],
  "$ref": "#/components/schemas/DeveloperCrmDealDetailResponse"
}
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"
  ]
}
404 CRM deal 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"
  ]
}
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"
  ]
}