Skip to main content
POST
/
events
/
{event}
/
products
Adicionar produto ao evento
curl --request POST \
  --url http://localhost/api/v1/events/{event}/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_id": 123,
  "quantity": 2,
  "applied_unit_price": 1,
  "discount_total": 1,
  "sale_reference": "<string>",
  "notes": "<string>"
}
'
{
  "data": {
    "id": 123,
    "event_id": 123,
    "product_id": 123,
    "parent_id": 123,
    "quantity": 123,
    "table_unit_price": 123,
    "table_total": 123,
    "applied_unit_price": 123,
    "discount_total": 123,
    "final_total": 123,
    "difference_total": 123,
    "unit_cost": 123,
    "attributes_schema": [
      "<unknown>"
    ],
    "sale_reference": "<string>",
    "notes": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "product": {
      "id": 123,
      "name": "<string>",
      "type": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

API key do hub com escopo manage. Header: Authorization: Bearer <api_key>.

Path Parameters

event
string
required

Body

application/json

POST /api/v1/events/{event}/products — adiciona uma linha de produto/serviço ao evento (Management API · Domínio 4). Espelha EventProductsTab::save().

product_id é validado contra o catálogo do hub autenticado (Product tem HubScope, mas Rule::exists ignora o scope global — por isso filtramos por hub_id aqui).

product_id
integer
required
quantity
integer
required
Required range: x >= 1
applied_unit_price
number
required
Required range: x >= 0
discount_total
number | null
Required range: x >= 0
sale_reference
string | null
Maximum string length: 100
notes
string | null
Maximum string length: 500

Response

JsonResource

data
EventProductResource · object
required