Skip to main content
POST
/
events
/
{event}
/
addons
Criar adicional
curl --request POST \
  --url http://localhost/api/v1/events/{event}/addons \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "price_cents": 1,
  "description": "<string>",
  "image_path": "<string>",
  "max_quantity": 500000,
  "is_active": true,
  "batch_ids": [
    123
  ]
}
'
{
  "data": {
    "id": 123,
    "event_id": 123,
    "name": "<string>",
    "description": "<string>",
    "image_path": "<string>",
    "image_url": "<string>",
    "price_cents": 123,
    "max_quantity": 123,
    "quantity_sold": 123,
    "is_active": true,
    "sort_order": 123,
    "batch_ids": [
      "<unknown>"
    ],
    "created_at": "<string>",
    "updated_at": "<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}/addons — cria order bump. Espelha EventSales::saveAddon. batch_ids é filtrado contra os lotes do evento no controller. Upload de imagem é via endpoint próprio (a API só aceita image_path já existente).

name
string
required
Maximum string length: 120
price_cents
integer
required
Required range: x >= 0
description
string | null
Maximum string length: 500
image_path
string | null
Maximum string length: 255
max_quantity
integer | null
Required range: 1 <= x <= 1000000
is_active
boolean
batch_ids
integer[] | null

Response

JsonResource

data
EventAddonResource · object
required