---
title: "Atualizar item vinculado à oportunidade"
method: PUT
path: "/deals/{deal_id}/product/{id}"
---

# Atualizar item vinculado à oportunidade

`PUT /deals/{deal_id}/product/{id}`

## Path parameters

- `deal_id` integer, required
- `id` integer, required

## Request body

- object
  - `product_id` integer — ID do item.
  - `status` boolean — Status do relacionamento entre oportunidade e item / true = Vinculado e false = Não vinculado.
  - `quantity` integer — Quantidade de itens.
  - `value` integer — Valor unitário do item.
  - `custom_field_id` integer — ID do campos customizado.
  - `ipi_tax` integer — Percentual de taxa de IPI.
  - `discount_type` integer — Tipo de desconto (0= percentual / 1= monetário).
  - `discount_value` number, float — Valor do desconto.
  - `cost` number, float — Valor de custo preenchido quando markup está ativo.
  - `markup_type` integer — Tipo de markup (1= monetário / 2= percentual).
  - `markup_value` string — Valor de markup.
  - `duration` integer — Duração da recorrência (MRR).
  - `option_ids` integer[] — Array contendo os IDs das características do item.
  - `formula_text` string — Fórmula do campo customizado relacionado ao vínculo.

## Response `200`

200

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `id` integer
    - `deal_id` integer
    - `product_id` integer
    - `custom_field_id` unknown
    - `brand_id` unknown
    - `status` boolean
    - `quantity` integer
    - `value` integer
    - `ipi_tax` unknown
    - `ipi_value` integer
    - `discount_type` integer
    - `discount_value` integer
    - `discount_value_absolute` integer
    - `discount_value_percentage` integer
    - `sub_total_value` integer
    - `total_value` integer
    - `cost` integer
    - `markup_type` integer
    - `markup_value` integer
    - `markup_value_absolute` integer
    - `markup_value_percentage` integer
    - `duration` unknown
    - `formula_text` unknown
    - `characteristics` object[]
      - `id` integer
      - `name` string
      - `options` object[]
    - `item` object
      - `id` integer
      - `account_id` integer
      - `category_id` unknown
      - `name` string
      - `description` string
      - `minimum_value` unknown
      - `cost` unknown
      - `reference` string
      - `type` integer
      - `deleted` integer
      - `status` integer
      - `photo` unknown
      - `commission` unknown
      - `brand_id` unknown
      - `ipi_tax` unknown
      - `measurement_unit_id` unknown
      - `code` unknown
      - `fix_commission_value` unknown
      - `is_product_belong_deal` boolean

## Other responses

- `404` — 404
- `422` — 422

---

[API](https://skmtc.net/pipe/apis/application-json.md) · [All operations](https://skmtc.net/pipe/apis/application-json/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipe/application-json/revisions/0a130198f0a3/schema)
