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.

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": [] }