Skip to main content
PATCH
/
v1
/
deals
/
{id}
Update a deal
curl --request PATCH \
  --url https://api4.kinbox.com.br/v1/deals/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "value": 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",
  "status": "open",
  "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,
  "pipelineId": "<string>",
  "stageId": "<string>",
  "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>"
  },
  "customFields": {}
}
'
{
  "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.

Path Parameters

id
string
required

Body

application/json
name
string

Nome do negócio

value
number

Valor em dinheiro do 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

status
enum<string>

Status do negócio

Available options:
open,
won,
lost
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

pipelineId
string

ID do pipeline associado ao negócio

stageId
string
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
customFields
object

Response

200 - 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