Pular para o conteúdo

Contexto do negócio como o modelo do Nexo lê

GET
/v1/deals/{dealId}/context
curl --request GET \
--url https://developers.nexo.winningsales.com.br/v1/deals/example/context \
--header 'Authorization: Bearer <token>'

A seção do negócio no contexto exatamente como qualquer análise deste negócio a recebe: fatos do CRM, campos personalizados em uso, pessoas e próximo passo, mais a parte estável com o significado de cada campo. Nada é enviado a um modelo nesta chamada. Só admin e líder de vendas, como no app.

dealId
required
string

Id do negócio no Nexo

O contexto compilado do negócio

Media typeapplication/json
object
dealId
required
string format: uuid
stable
required

Stable part of the context: company, and the meaning of each custom field in use

string
volatile
required

Deal part of the context, exactly as the model would read it

string
facts
required

The facts of the deal section, one by one

Array<object>
object
label
required

How the fact is named in the context, in pt-BR

string
value
required

The value as the model reads it: money in reais, dates as dd/mm/aaaa, options by their label

string
source
required

crm for a canonical field of the deal or company, field for a custom field in use

string
Allowed values: crm field
objectType
required

Object the value comes from

string
Allowed values: deal company contact
propertyName
required

CRM property of a custom field; null for canonical facts

string
nullable
people
required

People linked to the deal and their role

Array<object>
object
name
required
string
role
required
string
nextStep
required

Next step recorded in the CRM, when there is one

string
nullable

Example

{
"facts": [
{
"source": "crm",
"objectType": "deal"
}
]
}

Token ausente, inválido, expirado ou revogado

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "public_api.invalid_credential",
"title": "InvalidCredentialError",
"status": 401,
"detail": "Token de acesso inválido, expirado ou revogado. Crie um novo token de acesso no Nexo.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb"
}

Papel, escopo do token ou plano não permitem a operação

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "public_api.insufficient_scope",
"title": "InsufficientScopeError",
"status": 403,
"detail": "Este token não tem o escopo conversations:read, exigido por esta operação. Gere um token com esse escopo.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb",
"meta": {
"operation": "conversations.reading",
"scope": "conversations:read"
}
}

Negócio não encontrado

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"requestId": "example",
"meta": {
"additionalProperty": "example"
}
}

Limite de chamadas da empresa ou do token atingido

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "public_api.rate_limited",
"title": "PublicRateLimitedError",
"status": 429,
"detail": "Muitas chamadas em pouco tempo. Tente de novo em 12 segundos.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb",
"meta": {
"class": "content",
"limitedBy": "company",
"limit": 120,
"windowSeconds": 60,
"retryAfterSeconds": 12
}
}