Logo
Getting started
    • Overview
    • Authentication
    • Testing
    • Error handling
    • Webhooks
    • Loyalty Tokens
    • Register API
Tutorials
API Reference
Please note: the Shift Types 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 Shift Types

Returns a paginated list of Shift Types.

GET
https://api.piggy.eu/api//shift-types
Headers
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json

Body

pageinteger
OPTIONAL
The page number.
limitinteger
OPTIONAL
The maximum number of Shift Types to retrieve (default: 30, max: 100).
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 { "data": [ { "uuid": "8880c45e-36ef-4ef5-ac10-8dd428260907", "name": "Night", "description": "Shifts between 23:00 and 06:00.", "created_at": "2024-12-08T09:00:00+00:00", "updated_at": "2024-12-08T17:30:00+00:00", }, { "uuid": "ec92b3cd-d896-43ac-ae8c-c8eafeb90288", "name": "Weekend", "description": "Shifts on Saturday or Sunday.", "created_at": "2024-12-01T09:00:00+00:00", "updated_at": "2024-12-08T09:00:00+00:00", }, ], "meta": { "page": 1, "per_page": 30, "last_page": 10, "total": 300 } }

Create Shift Type

Creates a new Shift Type.

POST
https://api.piggy.eu/api//shift-types
Headers
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json

Body

namestring
REQUIRED
The Name of the Shift Type you want to create.
descriptionstring
REQUIRED
The Description of the Shift Type you want to create.
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 { "data": { "uuid": "8880c45e-36ef-4ef5-ac10-8dd428260907", "name": "Night", "description": "Shifts between 23:00 and 06:00", "created_at": "2024-12-08T09:00:00+00:00", "updated_at": "2024-12-08T17:30:00+00:00", }, "meta": {} }

Find Shift Type by Name

Returns all relevant information for a Shift Type.

GET
https://api.piggy.eu/api//shift-types/find
Headers
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json

Body

namestring
REQUIRED
The Name of this Shift Type.
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 { "data": { "uuid": "8880c45e-36ef-4ef5-ac10-8dd428260907", "name": "Night", "description": "Shifts between 23:00 and 06:00", "created_at": "2024-12-08T09:00:00+00:00", "updated_at": "2024-12-08T17:30:00+00:00", }, "meta": {} }

Get Shift Type

Retrieve a Shift Type using its UUID.

GET
https://api.piggy.eu/api//shift-types/{{uuid}}
Headers
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
uuidstring
REQUIRED
The UUID for this Shift Type.
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 { "data": { "uuid": "8880c45e-36ef-4ef5-ac10-8dd428260907", "name": "Night", "description": "Shifts between 23:00 and 06:00", "created_at": "2024-12-08T09:00:00+00:00", "updated_at": "2024-12-08T17:30:00+00:00", }, "meta": {} }

Update Shift Type

Updates the attributes of a Shift Type.

PUT
https://api.piggy.eu/api//shift-types/{{uuid}}
Headers
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
uuidstring
REQUIRED
The UUID for this Shift Type.

Body

namestring
REQUIRED
The Name for this Shift Type.
descriptionstring
REQUIRED
The Description for this Shift Type.
Response Example
Show more
1 2 3 4 5 6 7 8 9 10 { "data": { "uuid": "8880c45e-36ef-4ef5-ac10-8dd428260907", "name": "Night", "description": "Shifts between 23:00 and 06:00", "created_at": "2024-12-08T09:00:00+00:00", "updated_at": "2024-12-08T17:30:00+00:00", }, "meta": {} }