Consulta de proposta
curl --request GET \
--url https://api.wegly.com.br/integrations/external/proposals/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.wegly.com.br/integrations/external/proposals/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegly.com.br/integrations/external/proposals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wegly.com.br/integrations/external/proposals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wegly.com.br/integrations/external/proposals/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wegly.com.br/integrations/external/proposals/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wegly.com.br/integrations/external/proposals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lead": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": 1,
"archived_at": "2023-11-07T05:31:56Z",
"negotiation_mode": 123
},
"deal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": 1,
"archived_at": "2023-11-07T05:31:56Z",
"negotiation_mode": 123
},
"code": 123,
"version": 123,
"title": "<string>",
"status": 1,
"notes": "<string>",
"is_primary": true,
"discount_type": 0,
"discount_value": 123,
"subtotal": 123,
"total": 123,
"valid_until": "2023-11-07T05:31:56Z",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
},
"approved_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"approved_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"rejected_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"notes_format": "MARKDOWN",
"projected_values": {
"6": 123,
"12": 123,
"18": 123,
"24": 123
},
"has_recurring_value": true,
"has_indefinite_recurring_value": true,
"has_rolling_projection": true,
"projection_calculated_at": "2023-11-07T05:31:56Z",
"projection_calculation_version": 123,
"projection_source": "<string>",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"image": "<string>"
},
"name": "<string>",
"description": "<string>",
"unit": 123,
"quantity": 123,
"unit_price": 123,
"discount_type": 0,
"discount_value": 123,
"subtotal": 123,
"total": 123,
"notes": "<string>",
"internal_notes": "<string>",
"is_recurring_default": true,
"billing_interval_default": 123,
"contract_term_months": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"billing_cycles": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"position": 123,
"billing_interval_count": 123,
"recurring_payment_method": 1,
"custom_fields": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "TEXT",
"position": 123,
"is_required": true,
"is_visible_in_documents": true,
"options": [
"<string>"
],
"value": "<string>"
}
],
"category_values": [
{
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category_name": "<string>",
"category_type": "TEXT",
"position": 123,
"options": [
"<string>"
],
"value": "<string>"
}
]
}
],
"payment_options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"position": 123,
"discount_type": 0,
"discount_value": 123,
"subtotal": 123,
"total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"installments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"position": 123,
"amount": 123,
"percentage": 123,
"due_date": "2023-11-07T05:31:56Z",
"due_in_days": 123,
"notes": "<string>",
"payment_method": 1,
"payment_method_installments": 123,
"card_receipt_mode": 1,
"payment_method_notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"custom_fields": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_name": "<string>",
"field_type": 0,
"position": 123,
"is_required": true,
"min_checkbox_selections": 123,
"max_checkbox_selections": 123,
"section_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"section": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"position": 123
}
],
"answers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"option_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"option_value": "<string>",
"boolean_value": true
}
]
}
],
"delivery_schedule": {
"starts_on": "2023-12-25",
"effective_starts_on": "2023-12-25",
"is_dynamic": true,
"timezone": "<string>",
"calculation_version": 123,
"final_qualifier": "EXACT",
"declared_total": "<string>",
"declared_totals": [
{
"quantity": 123,
"unit": "DAYS",
"counting_mode": "CALENDAR"
}
],
"estimated_delivery_date": "2023-12-25",
"estimated_delivery_is_business_day": true,
"suggested_next_business_date": "2023-12-25",
"elapsed_calendar_days": 123,
"business_days_notice": "Dias úteis consideram somente segunda a sexta-feira; feriados não são considerados.",
"deadlines": [
{
"unit": "DAYS",
"quantity": 18263,
"counting_mode": "CALENDAR",
"stage": "<string>",
"qualifier": "EXACT",
"notes": "<string>",
"position": 123,
"cumulative_qualifier": "EXACT",
"estimated_start_date": "2023-12-25",
"estimated_end_date": "2023-12-25",
"estimated_end_is_business_day": true,
"suggested_next_business_date": "2023-12-25"
}
]
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Propostas
Consulta de proposta
Retorna os detalhes completos de uma proposta da empresa da chave que esteja visível para o usuário criador da chave. Os anexos não fazem parte do retorno; consulte a listagem de anexos da proposta.
GET
/
integrations
/
external
/
proposals
/
{id}
Consulta de proposta
curl --request GET \
--url https://api.wegly.com.br/integrations/external/proposals/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.wegly.com.br/integrations/external/proposals/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegly.com.br/integrations/external/proposals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wegly.com.br/integrations/external/proposals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wegly.com.br/integrations/external/proposals/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wegly.com.br/integrations/external/proposals/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wegly.com.br/integrations/external/proposals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lead": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": 1,
"archived_at": "2023-11-07T05:31:56Z",
"negotiation_mode": 123
},
"deal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": 1,
"archived_at": "2023-11-07T05:31:56Z",
"negotiation_mode": 123
},
"code": 123,
"version": 123,
"title": "<string>",
"status": 1,
"notes": "<string>",
"is_primary": true,
"discount_type": 0,
"discount_value": 123,
"subtotal": 123,
"total": 123,
"valid_until": "2023-11-07T05:31:56Z",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
},
"approved_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"approved_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"rejected_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"notes_format": "MARKDOWN",
"projected_values": {
"6": 123,
"12": 123,
"18": 123,
"24": 123
},
"has_recurring_value": true,
"has_indefinite_recurring_value": true,
"has_rolling_projection": true,
"projection_calculated_at": "2023-11-07T05:31:56Z",
"projection_calculation_version": 123,
"projection_source": "<string>",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"image": "<string>"
},
"name": "<string>",
"description": "<string>",
"unit": 123,
"quantity": 123,
"unit_price": 123,
"discount_type": 0,
"discount_value": 123,
"subtotal": 123,
"total": 123,
"notes": "<string>",
"internal_notes": "<string>",
"is_recurring_default": true,
"billing_interval_default": 123,
"contract_term_months": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"billing_cycles": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"position": 123,
"billing_interval_count": 123,
"recurring_payment_method": 1,
"custom_fields": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "TEXT",
"position": 123,
"is_required": true,
"is_visible_in_documents": true,
"options": [
"<string>"
],
"value": "<string>"
}
],
"category_values": [
{
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category_name": "<string>",
"category_type": "TEXT",
"position": 123,
"options": [
"<string>"
],
"value": "<string>"
}
]
}
],
"payment_options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"position": 123,
"discount_type": 0,
"discount_value": 123,
"subtotal": 123,
"total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"installments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"position": 123,
"amount": 123,
"percentage": 123,
"due_date": "2023-11-07T05:31:56Z",
"due_in_days": 123,
"notes": "<string>",
"payment_method": 1,
"payment_method_installments": 123,
"card_receipt_mode": 1,
"payment_method_notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"custom_fields": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_name": "<string>",
"field_type": 0,
"position": 123,
"is_required": true,
"min_checkbox_selections": 123,
"max_checkbox_selections": 123,
"section_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"section": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"position": 123
}
],
"answers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"option_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"option_value": "<string>",
"boolean_value": true
}
]
}
],
"delivery_schedule": {
"starts_on": "2023-12-25",
"effective_starts_on": "2023-12-25",
"is_dynamic": true,
"timezone": "<string>",
"calculation_version": 123,
"final_qualifier": "EXACT",
"declared_total": "<string>",
"declared_totals": [
{
"quantity": 123,
"unit": "DAYS",
"counting_mode": "CALENDAR"
}
],
"estimated_delivery_date": "2023-12-25",
"estimated_delivery_is_business_day": true,
"suggested_next_business_date": "2023-12-25",
"elapsed_calendar_days": 123,
"business_days_notice": "Dias úteis consideram somente segunda a sexta-feira; feriados não são considerados.",
"deadlines": [
{
"unit": "DAYS",
"quantity": 18263,
"counting_mode": "CALENDAR",
"stage": "<string>",
"qualifier": "EXACT",
"notes": "<string>",
"position": 123,
"cumulative_qualifier": "EXACT",
"estimated_start_date": "2023-12-25",
"estimated_end_date": "2023-12-25",
"estimated_end_is_business_day": true,
"suggested_next_business_date": "2023-12-25"
}
]
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Chave de integração com prefixo wegly_, enviada em Authorization: Bearer . Não é JWT. A chave deve estar ativa, não excluída e dentro da validade. Com allowed_domain, Origin (ou Referer na ausência de Origin) precisa informar o hostname permitido. A empresa e as permissões são obtidas pela chave.
Response
Detalhes completos da proposta.
Retorno de POST, PUT e GET por ID. Inclui itens, condições de pagamento, campos personalizados e cronograma; não inclui items_count nem payment_options_count.
