Products
Products are used for the Line Items of Orders.
List Products
Lists all Products in the Leat system.
Note: This endpoint is not yet live and is here for reference only, and may be subject to change.
GET
https://api.piggy.eu/api//productsHeaders
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
18
19
{
"data": [
{
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
"categories": []
}
],
"meta": {
"page": 1,
"limit": 10,
"viewing_from": 1,
"viewing_to": 10,
"last_page": 1,
"total": 1
}
}Create Product
Creates a new Product in the Leat system and returns the Product entity.
POST
https://api.piggy.eu/api/v3/oauth/clients/productsHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringrequiredA unique identifier from your system
namestringrequiredThe name of the Product
descriptionstringoptionalThe description of the Product
categoriesarray of objectsoptionalList of Categories that the product belongs to
uuidstringoptionalUUID of the Category
external_identifierstringoptionalExternal identifier of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
9
10
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
"categories": []
},
"meta": []
}Batch Create Products
Creates a batch of Products in the Leat system and returns the Product entities.
POST
https://api.piggy.eu/api/v3/oauth/clients/products/batchHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
productsarray of objectsrequiredList of Products
external_identifierstringrequiredA unique identifier from your system
namestringrequiredThe name of the Product
descriptionstringoptionalThe description of the Product
categoriesarray of objectsoptionalList of Categories that the product belongs to
uuidstringoptionalUUID of the Category
external_identifierstringoptionalExternal identifier of the Category
Response 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": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
},
{
"uuid": "789bacs-asd1234-d8a6s7e",
"external_identifier": "B-12345-C",
"name": "Seaweed Tea",
"description": "A cup of Seaweed Tea",
},
]
"meta": []
}Get Product
Get a specific Product in the Leat system.
GET
https://api.piggy.eu/api//products/{{uuid}}Headers
Authorization
Bearer {{ access_token | api_key }}Accept
application/jsonResponse Example
Show more
1
2
3
4
5
6
7
8
9
10
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
"categories": []
},
"meta": []
}Find Product
Use the external_identifier to find a Product.
GET
https://api.piggy.eu/api/v3/oauth/clients/products/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
9
10
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
"categories": []
},
"meta": []
}Find or Create Product
Finds an existing Product or creates a new Product in the Leat system and returns the Product entity.
POST
https://api.piggy.eu/api/v3/oauth/clients/products/find-or-createHeaders
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringrequiredA unique identifier from your system
namestringoptionalThe name of the Product
descriptionstringoptionalThe description of the Product
categoriesarray of objectsoptionalList of Categories that the product belongs to
uuidstringoptionalUUID of the Category
external_identifierstringoptionalExternal identifier of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
9
10
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
"categories": []
},
"meta": []
}Update Product
Updates a Product in the Leat system and returns the updated Product entity.
PUT
https://api.piggy.eu/api/v3/oauth/clients/products/{uuid}Headers
Authorization
Accept
Bearer {{ personal_access_token }}application/jsonInput parameters
external_identifierstringoptionalA unique identifier from your system
namestringoptionalThe name of the Product
descriptionstringoptionalThe description of the Product
categoriesarray of objectsoptionalList of Categories that the product belongs to
uuidstringoptionalUUID of the Category
external_identifierstringoptionalExternal identifier of the Category
Response Example
Show more
1
2
3
4
5
6
7
8
9
10
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"external_identifier": "A-12345-B",
"name": "Kelp Shake",
"description": "A Kelp Shake with extra foam",
"categories": []
},
"meta": []
}Delete Product
Delete a specific Product in the Leat system.
DELETE
https://api.piggy.eu/api//products/{uuid}Headers
Authorization
Bearer {{ access_token | api_key }}Accept
application/jsonResponse Example
Show more
1
2
3
4
{
"data": null,
"meta": []
}