Create
Parameter | Type | Values / Description |
---|---|---|
eventId* | number | |
ticketBatchId | number | Required for ticket events |
firstName | string | |
lastName | string | |
email* | string | |
status* | string | attending invited |
phone | string | Mobile phone number with country code. Example: +46701234567 |
comment | string | |
sendEmailConfirmation* | boolean | If set to true, an email confirmation will be sent to the attendee / invitee. |
- JavaScript
- curl
const Confetti = require('confetti')
const confetti = new Confetti({ apiKey: 'your-key' })
const data = await confetti.tickets.create({
eventId: 16969,
ticketBatchId: 16090,
firstName: 'Foo',
lastName: 'Bar',
phone: '+46700000000',
status: 'attending',
email: 'foo@bar.com',
comment: 'Foo and bar',
sendEmailConfirmation: true,
})
curl -X POST "https://api.confetti.events/tickets"
-H "Content-Type: application/json"
-H "Authorization: apikey your-key"
-d '{
"data": {
"type": "ticket",
"attributes": {
"firstName": "Foo",
"lastName": "Bar",
"phone": "+46700000000",
"status": "attending",
"email": "foo@bar.se",
"comment": "Foo and bar"
},
"meta": {
"sendEmailConfirmation": true
},
"relationships": {
"event": {
"data": {
"id": "16969"
}
}
"ticketBatch": {
"data": {
"id": "16090"
}
}
}
}
}'