Leat Docs
Register APIBookings

Visits

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

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