Categories
Categories are entities that group certain Products.
List Categories
Retrieve all Categories.
GET
https://api.piggy.eu/api//product-categoriesHeaders
Authorization
Bearer {{ access_token | api_key }}Accept
application/jsonResponse Example
Show more
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"data": [
{
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
}
],
"meta": {
"page": 1,
"limit": 10,
"viewing_from": 1,
"viewing_to": 10,
"last_page": 1,
"total": 1
}
}Create Category
Creates a new Category in the Leat system and returns the Category entity.
POST
https://api.piggy.eu/api/v3/oauth/clients/product-categoriesHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringrequiredA unique identifier from your system
namestringrequiredThe name of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
},
"meta": []
}Batch Create Categories
Creates a batch of Categories in the Leat system and returns the Category entities.
POST
https://api.piggy.eu/api/v3/oauth/clients/product-categories/batchHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
categoriesarray of objectsrequiredList of Categories
external_identifierstringrequiredA unique identifier from your system
namestringrequiredThe name of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"data": [
{
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
},
{
"uuid": "789bacs-asd1234-d8a6s7e",
"external_identifier": "B-12345-C",
"name": "Tea",
},
]
"meta": []
}Get Category
Get a specific Category in the Leat system.
GET
https://api.piggy.eu/api//product-categories/{uuid}Headers
Authorization
Bearer {{ access_token | api_key }}Accept
application/jsonResponse Example
Show more
1
2
3
4
5
6
7
8
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
},
"meta": []
}Find Category
Use the external_identifier to find a Category.
GET
https://api.piggy.eu/api/v3/oauth/clients/product-categories/findHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringrequiredA unique identifier from your system
Response Example
Show more
1
2
3
4
5
6
7
8
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
},
"meta": []
}Find or Create Category
Finds an existing Category or creates a new Category in the Leat system and returns the Category entity.
POST
https://api.piggy.eu/api/v3/oauth/clients/product-categories/find-or-createHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringrequiredA unique identifier from your system
namestringoptionalThe name of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
},
"meta": []
}Update Category
Updates a Category in the Leat system and returns the updated Category entity.
PUT
https://api.piggy.eu/api/v3/oauth/clients/product-categories/{uuid}Headers
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringoptionalA unique identifier from your system
namestringoptionalThe name of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Coffee",
},
"meta": []
}Delete Category
Delete a specific Category in the Leat system.
DELETE
https://api.piggy.eu/api//product-categories/{uuid}Headers
Authorization
Bearer {{ access_token | api_key }}Accept
application/jsonResponse Example
Show more
1
2
3
4
{
"data": null,
"meta": []
}