Skip to main content
POST
/
opportunity
/
{id}
Edição de oportunidade
curl --request POST \
  --url https://fretatech.com.br/api/opportunity/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": "primeira",
  "customer": {
    "name": "Maria da Silva",
    "email": "[email protected]",
    "phone": null
  },
  "fields": [
    {
      "label": "Data de ida",
      "value": "20/05/2026"
    }
  ],
  "external_id": "abc123",
  "description": "a"
}
'
{
  "msg": "Oportunidade criada com sucesso",
  "opportunity": {
    "id": 12,
    "external_id": "abc123",
    "description": "a",
    "source": "primeira",
    "customer": {
      "name": "Maria da Silva",
      "email": "[email protected]",
      "phone": null
    },
    "fields": [
      {
        "label": "Data de ida",
        "value": "20/05/2026"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
integer<int64>
required

ID da oportunidade

Body

application/json

Atualiza oportunidade existente

source
string
required

Fonte da oportunidade

Example:

"primeira"

customer
object
required
fields
object[]
required
external_id
string | null
Example:

"abc123"

description
string | null
Example:

"a"

Response

Successful operation

msg
string
Example:

"Oportunidade criada com sucesso"

opportunity
object