Logo
Getting started
    • Overview
    • Authentication
    • Testing
    • Error handling
    • Webhooks
    • Loyalty Tokens
    • Register API
Tutorials
API Reference
Please note: the Visits API is now in beta. Some functionalities may not yet be available at that time. Please note that the API may be subject to change.

List Visit

GET
https://api.piggy.eu/api/v3/oauth/clients/visits
Headers
Authorization
Accept
Bearer {{ personal_access_token }}
application/json
Input parameters
limitnumber
optional
Number of Visits to retrieve (min: 0, max: 500, default: 30)
pagenumber
optional
Number of page to retrieve (default: 1)
contact_uuidstring
optional
A contact's UUID to filter the Visits by
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 { "data": [ { "uuid": "87824d97-a0a0-4764-9cd2-9df88579fd47", "contact": { "uuid": "6e8ec5a8-0eb7-4e5f-ad20-c0d271d97d92", "email": "spongebob@bikinibottom.sea" }, "external_id": "1a10fef3-cbee-47cb-af4c-8bfbd09d88af", "source": "Website", "starts_at": "2001-01-23T00:00:00+00:00", "ends_at": "2002-02-24T00:00:00+00:00", "created_at": "2025-04-07T13:47:34+00:00", }, { "uuid": "af0078fb-39d4-4ffe-a9a8-2b86edd6f71e", "contact": { "uuid": "3da1b8ed-161e-4733-909d-fc3e65205be3", "email": "mrkrabs@bikinibottom.sea" }, "external_id": "f1e86b94-eb91-4f20-88ec-67d6cb68f034", "source": "Kiosk", "starts_at": "2024-05-01T20:00:00+00:00", "ends_at": "2024-05-01T22:30:00+00:00", "created_at": "2024-04-25T13:35:09+00:00" }, ], "meta": { "current_page": 1, "last_page": 1, "per_page": 30, "total": 5 } }

Show Visit

GET
https://api.piggy.eu/api/v3/oauth/clients/visits/{{uuid}}
Headers
Authorization
Accept
Bearer {{ personal_access_token }}
application/json
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "data": { "uuid": "1e32b995-b339-4da8-93a1-f2783b2c80c4", "contact": { "uuid": "6e8ec5a8-0eb7-4e5f-ad20-c0d271d97d92", "email": "spongebob@bikinibottom.sea" }, "external_id": "b100ce2c-6abb-4670-b416-abe41bf680c0", "source": "Kiosk", "starts_at": "2001-01-23T00:00:00+00:00", "ends_at": "2002-02-24T00:00:00+00:00", "created_at": "2025-04-07T13:47:34+00:00", }, "meta": [] }

Create Visit

Create a new Visit in the Leat system and returns the Visit entity.

POST
https://api.piggy.eu/api/v3/oauth/clients/visits
Headers
Authorization
Accept
Bearer {{ personal_access_token }}
application/json
contact_uuidstring
required
The UUID of the visiting Contact
shop_uuidstring
required
The UUID of the Shop you want to create the Visit for
external_idstring
optional
A unique, external identifier for the Visit
sourcestring
optional
Source from where the Visit was created
starts_atstring
optional
The start date and time of the Visit (in ISO 8601 format)
ends_atstring
optional
The end date and time of the Visit (in ISO 8601 format)
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "data": { "uuid": "bfada889-6a69-4fcf-aed6-42933ae9084d", "contact": { "uuid": "15ead936-0d0a-40ed-877b-39f22b34be53", "email": "spongebob@bikinibottom.sea" }, "external_id": "ee33d7e5-6cf8-445a-abd8-81e70bf4c8ad", "source": "Website", "starts_at": "2024-05-01T20:00:00+00:00", "ends_at": "2024-05-01T22:30:00+00:00", "created_at": "2024-04-25T13:35:09+00:00" }, "meta": [] }

Update Visit

Updates the attributes of a Visit. Shop and contact cannot be updated.

PUT
https://api.piggy.eu/api/v3/oauth/clients/visits/{{uuid}}
Headers
Authorization
Accept
Bearer {{ personal_access_token }}
application/json
external_idstring
optional
A unique, external identifier for the Visit
sourcestring
optional
Source from where the Visit was created
starts_atstring
optional
The start date and time of the Visit (in ISO 8601 format)
ends_atstring
optional
The end date and time of the Visit (in ISO 8601 format)
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "data": { "uuid": "1e32b995-b339-4da8-93a1-f2783b2c80c4", "contact": { "uuid": "6e8ec5a8-0eb7-4e5f-ad20-c0d271d97d92", "email": "spongebob@bikinibottom.sea" }, "external_id": "b100ce2c-6abb-4670-b416-abe41bf680c0", "source": "Kiosk", "starts_at": "2001-01-23T00:00:00+00:00", "ends_at": "2002-02-24T00:00:00+00:00", "created_at": "2025-04-07T13:47:34+00:00", }, "meta": [] }