Skip to main content
POST
/
v1
/
deals
Create a deal
curl --request POST \
  --url https://api4.kinbox.com.br/v1/deals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "value": 123,
  "status": "open",
  "pipelineId": "<string>",
  "stageId": "<string>",
  "customFields": {},
  "contactId": 123,
  "lostReason": [
    "<string>"
  ],
  "productsLostReason": [
    {}
  ],
  "products": [
    {
      "id": "<string>",
      "name": "<string>",
      "price": 123,
      "quantity": 123,
      "discount": 123,
      "discountType": "percentage",
      "total": 123
    }
  ],
  "lostReasonObs": "<string>",
  "wonLostDate": "2023-11-07T05:31:56Z",
  "dueDate": "2023-11-07T05:31:56Z",
  "conversation": {
    "id": 123,
    "platformId": 123,
    "showPending": true,
    "lastMessageAt": "2023-11-07T05:31:56Z",
    "pendingAt": "2023-11-07T05:31:56Z"
  },
  "operatorId": 123,
  "groupId": 123,
  "origin": "<string>",
  "campaign": "<string>",
  "authorType": "user",
  "authorId": {},
  "tagIds": [
    123
  ],
  "position": 123,
  "focusedCounts": 123,
  "tasks": {},
  "timeInStage": {},
  "lastStageChanged": "2023-11-07T05:31:56Z",
  "comments": 123,
  "context": {
    "automationId": "<string>",
    "importId": "<string>"
  }
}
'
{
  "id": "<string>",
  "name": "<string>",
  "value": 123,
  "status": "open",
  "pipelineId": "<string>",
  "stageId": "<string>",
  "customFields": {},
  "lostReason": [
    "<string>"
  ],
  "productsLostReason": [
    {}
  ],
  "products": [
    {
      "id": "<string>",
      "name": "<string>",
      "price": 123,
      "quantity": 123,
      "discount": 123,
      "discountType": "percentage",
      "total": 123
    }
  ],
  "lostReasonObs": "<string>",
  "wonLostDate": "2023-11-07T05:31:56Z",
  "dueDate": "2023-11-07T05:31:56Z",
  "contact": {
    "id": 123,
    "name": "<string>",
    "avatar": "<string>",
    "phone": "<string>",
    "email": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "isPrivate": true
  },
  "conversation": {
    "id": 123,
    "platformId": 123,
    "showPending": true,
    "lastMessageAt": "2023-11-07T05:31:56Z",
    "pendingAt": "2023-11-07T05:31:56Z"
  },
  "operatorId": 123,
  "groupId": 123,
  "origin": "<string>",
  "campaign": "<string>",
  "authorType": "user",
  "authorId": {},
  "tagIds": [
    123
  ],
  "position": 123,
  "focusedCounts": 123,
  "tasks": {},
  "timeInStage": {},
  "lastStageChanged": "2023-11-07T05:31:56Z",
  "comments": 123,
  "context": {
    "automationId": "<string>",
    "importId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Nome do negócio

value
number
required

Valor em dinheiro do negócio

status
enum<string>
required

Status do negócio

Available options:
open,
won,
lost
pipelineId
string
required

ID do pipeline associado ao negócio

stageId
string
required
customFields
object
required
contactId
number
required

ID do contato associado ao negócio.

lostReason
string[]

Motivos de perda

productsLostReason
object[]

Motivos de perda por produto

products
object[]
lostReasonObs
string

Observação de perda

wonLostDate
string<date-time>

Data de perda ou ganho

dueDate
string<date-time>

Data de vencimento

conversation
object

Conversa associada ao negócio

operatorId
number

ID do usuário responsável pelo negócio

groupId
number

ID do grupo associado ao negócio

origin
string
campaign
string
authorType
enum<string>
Available options:
user,
bot,
automation,
workflow,
unknown,
cadence,
api
authorId
object
tagIds
number[]
position
number
focusedCounts
number
tasks
object
timeInStage
object
lastStageChanged
string<date-time>
comments
number
context
object

Response

201 - application/json
id
string
required
name
string
required

Nome do negócio

value
number
required

Valor em dinheiro do negócio

status
enum<string>
required

Status do negócio

Available options:
open,
won,
lost
pipelineId
string
required

ID do pipeline associado ao negócio

stageId
string
required
customFields
object
required
lostReason
string[]

Motivos de perda

productsLostReason
object[]

Motivos de perda por produto

products
object[]
lostReasonObs
string

Observação de perda

wonLostDate
string<date-time>

Data de perda ou ganho

dueDate
string<date-time>

Data de vencimento

contact
object

Contato associado ao negócio

conversation
object

Conversa associada ao negócio

operatorId
number

ID do usuário responsável pelo negócio

groupId
number

ID do grupo associado ao negócio

origin
string
campaign
string
authorType
enum<string>
Available options:
user,
bot,
automation,
workflow,
unknown,
cadence,
api
authorId
object
tagIds
number[]
position
number
focusedCounts
number
tasks
object
timeInStage
object
lastStageChanged
string<date-time>
comments
number
context
object