Skip to main content
PUT
/
integrations
/
external
/
proposals
/
{id}
Atualização de proposta
curl --request PUT \
  --url https://api.wegly.com.br/integrations/external/proposals/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "lead_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deal_code": "<string>",
  "title": "<string>",
  "notes": "<string>",
  "status": 1,
  "discount_type": 0,
  "discount_value": 1,
  "valid_until": "2023-11-07T05:31:56Z",
  "approved_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "approved_at": "2023-11-07T05:31:56Z",
  "archived_at": "2023-11-07T05:31:56Z",
  "rejected_at": "2023-11-07T05:31:56Z",
  "items": [
    {
      "id": "<string>",
      "delete": true,
      "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sku": "<string>",
      "name": "<string>",
      "description": "<string>",
      "quantity": 1.001,
      "unit_price": 1,
      "unit": 0,
      "discount_type": 0,
      "discount_value": 1,
      "notes": "<string>",
      "is_recurring_default": true,
      "billing_interval_default": 0,
      "contract_term_months": 2,
      "start_date": "2023-11-07T05:31:56Z",
      "end_date": "2023-11-07T05:31:56Z",
      "billing_cycles": 2
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "lead": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>"
  },
  "deal": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>"
  },
  "code": 123,
  "version": 123,
  "title": "<string>",
  "status": 1,
  "notes": "<string>",
  "is_primary": true,
  "discount_type": 0,
  "discount_value": 123,
  "subtotal": 123,
  "total": 123,
  "items_count": 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",
  "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>",
      "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"
    }
  ]
}

Authorizations

Authorization
string
header
required

Utilize o token de integração no header Authorization: Bearer {token}. O domínio de origem (Origin/Referer) deve respeitar allowed_domain, quando configurado na chave.

Path Parameters

id
string<uuid>
required

UUID da proposta.

Body

application/json
lead_id
string<uuid> | null
deal_id
string<uuid> | null
deal_code
string
Maximum string length: 50
title
string | null
Maximum string length: 150
notes
string | null
status
enum<integer>

1 = negociação, 2 = aprovada, 3 = rejeitada, 4 = arquivada, 5 = dispensada.

Available options:
1,
2,
3,
4,
5
discount_type
enum<integer>

0 = percentual, 1 = valor fixo.

Available options:
0,
1
discount_value
number | null
Required range: x >= 0
valid_until
string<date-time> | null
approved_by
string<uuid> | null
approved_at
string<date-time> | null
archived_at
string<date-time> | null
rejected_at
string<date-time> | null
items
object[]

Response

Proposta atualizada.

id
string<uuid>
lead
object
deal
object
code
integer
version
integer
title
string | null
status
enum<integer>

1 = negociação, 2 = aprovada, 3 = rejeitada, 4 = arquivada, 5 = dispensada.

Available options:
1,
2,
3,
4,
5
notes
string | null
is_primary
boolean
discount_type
enum<integer>

0 = percentual, 1 = valor fixo.

Available options:
0,
1
discount_value
number | null
subtotal
number
total
number
items_count
integer
valid_until
string<date-time> | null
created_by
object
approved_by
object
approved_at
string<date-time> | null
archived_at
string<date-time> | null
rejected_at
string<date-time> | null
created_at
string<date-time>
updated_at
string<date-time>
items
object[]