Listar oportunidades
curl --request GET \
--url https://app.onixfy.com/api/v1/deals \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onixfy.com/api/v1/deals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.onixfy.com/api/v1/deals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legal_name": "<string>",
"trade_name": "<string>",
"cnpj": "<string>"
},
"value": 123,
"final_value": 123,
"currency": "BRL",
"funnel": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"stage": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"status": "open",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"expected_close_date": "2023-12-25",
"won_at": "2023-11-07T05:31:56Z",
"lost_at": "2023-11-07T05:31:56Z",
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 123,
"value": 123
}
],
"source": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"detail": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"loss_reason": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"notes": "<string>"
}
}
],
"pagination": {
"next_cursor": "<string>",
"has_more": true
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Oportunidades
Listar oportunidades
Oportunidades da organização, das mais antigas às mais recentes alterações (updated_at, id). Sem dados pessoais de contato: o título e as notas saem sem o nome, o e-mail, o telefone e o CPF do contato. Funis restritos que quem criou a chave não vê ficam de fora.
GET
/
deals
Listar oportunidades
curl --request GET \
--url https://app.onixfy.com/api/v1/deals \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onixfy.com/api/v1/deals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.onixfy.com/api/v1/deals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legal_name": "<string>",
"trade_name": "<string>",
"cnpj": "<string>"
},
"value": 123,
"final_value": 123,
"currency": "BRL",
"funnel": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"stage": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"status": "open",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"expected_close_date": "2023-12-25",
"won_at": "2023-11-07T05:31:56Z",
"lost_at": "2023-11-07T05:31:56Z",
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 123,
"value": 123
}
],
"source": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"detail": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"loss_reason": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"notes": "<string>"
}
}
],
"pagination": {
"next_cursor": "<string>",
"has_more": true
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}