Pular para o conteúdo

POST /v1/deal-goals

POST
/v1/deal-goals
curl --request POST \
--url https://seu-endereco-da-api/v1/deal-goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "scope": "general", "pipelineId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "won_value", "periodStart": "example", "targetValue": 1 }'

Permissão que a Chave de acesso precisa: Gerenciar metas (goals:manage).

Media typeapplication/json
object
scope
required
string
Allowed values: general pipeline user user_pipeline channel
pipelineId
string format: uuid
userId
string format: uuid
channelId
string format: uuid
metric
required
string
Allowed values: won_value won_count created_count service_volume conversion first_response
periodStart
required
string
targetValue
required
number
>= 1 <= 2147483647
Media typeapplication/json
object
id
required
string
scope
required
string
Allowed values: general pipeline user user_pipeline channel
pipelineId
required
string
nullable
userId
required
string
nullable
channelId
required
string
nullable
metric
required
string
Allowed values: won_value won_count created_count service_volume conversion first_response
periodStart
required
string
targetValue
required
number

Example

{
"scope": "general",
"metric": "won_value"
}

Scope shape does not match the informed ids

Pipeline or user not found

Goal already exists for this scope, metric and month