Pular para o conteúdo

POST /v1/deals/{id}/win

POST
/v1/deals/{id}/win
curl --request POST \
--url https://seu-endereco-da-api/v1/deals/example/win \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "winReasonId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "note": "example" }'

Permissão que a Chave de acesso precisa: Criar e mover negócios (deals:manage).

id
required
string
Media typeapplication/json
object
winReasonId
string format: uuid
note
string
<= 2000 characters

Example generated

{
"winReasonId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"note": "example"
}
Media typeapplication/json
object
id
required
string
number
required

Sequential per tenant, shown as #número

number
pipelineId
required
string
stageId
required
string
contactId
required
string
nullable
companyId
required
string
nullable
assigneeId
required
string
nullable
conversationId
required
string
nullable
title
required
string
nullable
value
required
number
note
required
string
nullable
expectedCloseAt
required

Data prevista de fechamento

string format: date-time
nullable
attributes
required

Valores dos campos personalizados do negocio (entity deal), pela chave do campo

object
status
required
string
Allowed values: open won lost
wonAt
required
string format: date-time
nullable
lostAt
required
string format: date-time
nullable
lossReason
required
object
id
required
string
name
required
string
lostNote
required
string
nullable
winReason
required
object
id
required
string
name
required
string
wonNote
required
string
nullable
intakeAt
required

When the deal arrived as a new lead through the intake

string format: date-time
nullable
stageEnteredAt
required
string format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
contact
required
object
id
required
string
name
required
string
phoneNumber
required
string
nullable
profilePicUrl
required

Presigned url for the contact’s whatsapp profile photo

string
nullable
provider
required
string
company
required
object
id
required
string
name
required
string
groupName
required
string
nullable
groupProvider
required
string
nullable
groupProfilePicUrl
required
string
nullable
createdBy
required
object
id
required
string
name
required
string
nullable
avatarUrl
required

Public url for the user’s photo

string
nullable
assignee
required
object
id
required
string
name
required
string
nullable
avatarUrl
required

Public url for the user’s photo

string
nullable
tagIds
required
Array<string>
products
required
Array<object>
object
id
required
string
name
required
string
price
required

Unit price in centavos

number
quantity
required
number

Example

{
"status": "open"
}

Unknown win reason, or the reason requires a note

Deal is already won, or pipeline_not_sales when the deal belongs to a management pipeline