Find all
Parameter | Default | Values / Description |
---|---|---|
page[size] | 50 | Maximum number of results |
page[number] | 1 | Page number |
- JavaScript
- curl
const Confetti = require('confetti')
const confetti = new Confetti({ apiKey: 'your-key' })
const contacts = await confetti.contacts.findAll({
page: {
size: 50,
number: 1
}
})
Result
[
{
"id": "588032",
"firstName": "Jonny",
"lastName": "Stromberg",
"email": "jonny@foo.bar",
"phone": "+46701122333",
"token": "gsd00876ec00cdef2233b4ace769c54sdf46",
"status": "active",
"comment": "Hey comment",
"lastSeen": "2022-01-05T15:33:13.171Z",
"createdAt": "2022-01-05T15:33:13.171Z",
"updatedAt": "2022-01-05T15:33:13.171Z",
"organisationId": 57,
"company": "Company AB",
"type": "contact"
},
{
"id": "588032",
"firstName": "Jonny",
"lastName": "Stromberg",
"email": "jonny@foo.bar",
"phone": "+46701122333",
"token": "gsd00876ec00cdef2233b4ace769c54sdf46",
"status": "active",
"comment": "Hey comment",
"lastSeen": "2022-01-05T15:33:13.171Z",
"createdAt": "2022-01-05T15:33:13.171Z",
"updatedAt": "2022-01-05T15:33:13.171Z",
"organisationId": 57,
"company": "Company AB",
"type": "contact"
}
]
curl "https://api.confetti.events/contacts?page[number]=1&page[size]=50"
-H "Authorization: apikey your-key"
Result
{
"data": [
{
"id": "588032",
"type": "contact",
"attributes": {
"firstName": "Jonny",
"lastName": "Stromberg",
"email": "jonny@foo.bar",
"phone": "+46701122333",
"token": "gsd00876ec00cdef2233b4ace769c54sdf46",
"status": "active",
"comment": "Hey comment",
"lastSeen": "2022-01-05T15:33:13.171Z",
"createdAt": "2022-01-05T15:33:13.171Z",
"updatedAt": "2022-01-05T15:33:13.171Z",
"organisationId": 57,
"company": "Company AB"
}
},
{
"id": "588032",
"type": "contact",
"attributes": {
"firstName": "Jonny",
"lastName": "Stromberg",
"email": "jonny@foo.bar",
"phone": "+46701122333",
"token": "gsd00876ec00cdef2233b4ace769c54sdf46",
"status": "active",
"comment": "Hey comment",
"lastSeen": "2022-01-05T15:33:13.171Z",
"createdAt": "2022-01-05T15:33:13.171Z",
"updatedAt": "2022-01-05T15:33:13.171Z",
"organisationId": 57,
"company": "Company AB"
}
}
]
}