Leat Docs
OAuth APIBookings & Visits

Visits

https://api.piggy.eu/api/v3/oauth/clients/visits

List Visit

GET

https://api.piggy.eu/api/v3/oauth/clients/visits

Headers

Authorization

Accept

Bearer {{ personal_access_token }}

application/json

Input parameters

limit number

optional

Number of Visits to retrieve (min: 0, max: 500, default: 30)

page number

optional

Number of page to retrieve (default: 1)

contact_uuid string

optional

A contact's UUID to filter the Visits by

Response Example

{
   "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

{
    "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_uuid string

required

The UUID of the visiting Contact

shop_uuid string

required

The UUID of the Shop you want to create the Visit for

external_id string

optional

A unique, external identifier for the Visit

source string

optional

Source from where the Visit was created

starts_at string

optional

The start date and time of the Visit (in ISO 8601 format)

ends_at string

optional

The end date and time of the Visit (in ISO 8601 format)

Response Example

{
    "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_id string

optional

A unique, external identifier for the Visit

source string

optional

Source from where the Visit was created

starts_at string

optional

The start date and time of the Visit (in ISO 8601 format)

ends_at string

optional

The end date and time of the Visit (in ISO 8601 format)

Response Example

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

On this page