Appearance
REST API: CRM Deals
6 endpoints.
GET /api/v1/rest/pipelines
Pipelines and their stages
200 — Successful Response
json
{
"additionalProperties": true,
"type": "object",
"title": "Response List Pipelines Api V1 Rest Pipelines Get"
}GET /api/v1/rest/deals
List deals
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | |
per_page | query | no | integer | |
status | query | no | open | won | lost | |
stage_id | query | no | ||
created_since | query | no | ||
updated_since | query | no | ||
sort | query | no |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response List Deals Api V1 Rest Deals Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/rest/deals
Create a deal
Request body
json
{
"properties": {
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
],
"title": "Title"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"category": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
],
"title": "Category"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Value"
},
"currency": {
"anyOf": [
{
"type": "string",
"maxLength": 8
},
{
"type": "null"
}
],
"title": "Currency"
},
"probability": {
"anyOf": [
{
"type": "integer",
"maximum": 100,
"minimum": 0
},
{
"type": "null"
}
],
"title": "Probability"
},
"expected_close": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Expected Close"
},
"stage_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Stage Id"
},
"contact_name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Contact Name"
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 320
},
{
"type": "null"
}
],
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
],
"title": "Phone"
},
"company": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Company"
}
},
"type": "object",
"title": "DealCreateIn"
}201 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Create Deal Api V1 Rest Deals Post"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/rest/deals/stage-changes
Recent deal stage changes (polling)
The polling twin of the deal.stage_changed webhook, read from the stage-change activity every move writes. Newest first; id is the activity's, so a poller de-duplicates on it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
since | query | no | ||
limit | query | no | integer |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Deal Stage Changes Api V1 Rest Deals Stage Changes Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/rest/deals/{deal_id}
Get a deal
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
deal_id | path | yes | string |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Get Deal Api V1 Rest Deals Deal Id Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}PATCH /api/v1/rest/deals/{deal_id}
Update a deal / move its stage
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
deal_id | path | yes | string |
Request body
json
{
"properties": {
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
],
"title": "Title"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Value"
},
"currency": {
"anyOf": [
{
"type": "string",
"maxLength": 8
},
{
"type": "null"
}
],
"title": "Currency"
},
"probability": {
"anyOf": [
{
"type": "integer",
"maximum": 100,
"minimum": 0
},
{
"type": "null"
}
],
"title": "Probability"
},
"expected_close": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Expected Close"
},
"stage_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Stage Id",
"description": "Move the deal to this stage (same pipeline)"
}
},
"type": "object",
"title": "DealUpdateIn"
}200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Update Deal Api V1 Rest Deals Deal Id Patch"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}