Products
This page includes all endpoints available for the sales products of Logiciel Actif.
List all sales products
GET
https://app.gem-books.com/api/sales_products
This endpoint allows you to get the list of your sales. The transactions are returned sorted by most recent number.
Headers
Authentication*
string
Bearer Token
Accept
string
Should be application/json
{
"data": [
{
"id": 2,
"sale_id": 5,
"product_id": 2,
"product_name": "Default service",
"product_description": "",
"product_quantity": "1.00",
"produit_quantite3": "0.00",
"produit_poids": "0.000",
"product_price": "100.0000",
"product_cost": "0.00",
"product_discount": "0.0000",
"product_serialnumber": "",
"produit_total": "100.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 9
},
{
"id": 1,
"sale_id": 5,
"product_id": 3,
"product_name": "PARTS",
"product_description": "",
"product_quantity": "1.00",
"produit_quantite3": "0.00",
"produit_poids": "0.000",
"product_price": "200.0000",
"product_cost": "0.00",
"product_discount": "0.0000",
"product_serialnumber": "",
"produit_total": "200.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 9
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 500,
"total": 2
},
"success": true
}
Retrieve a specific sale product
GET
https://app.gem-books.com/api/sales_products/:id
This endpoint allows you to get one specific sale product.
Path Parameters
id
integer
The ID of the sales product to retrieve.
Headers
Authentication*
string
Bearer Token
Accept
string
Should be application/json
{
"data": [
{
"id": 1,
"sale_id": 5,
"product_id": 3,
"product_name": "PARTS",
"product_description": "",
"product_quantity": "1.00",
"produit_quantite3": "0.00",
"produit_poids": "0.000",
"product_price": "200.0000",
"product_cost": "0.00",
"product_discount": "0.0000",
"product_serialnumber": "",
"produit_total": "200.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 9
}
],
"success": true
}
Create a sale product
POST
https://app.gem-books.com/api/sales_products
Headers
Authentication
string
Bearer Token
Content-type
string
Should be application/json
Accept
string
Should be application/json
Request Body
sale_id
string
Invoice ID
product_id
string
Payment method ID
{
"data": [
{
"id": 12,
"sale_id": 5,
"product_id": 1461,
"product_name": "Produit par défaut",
"product_description": "",
"product_quantity": "0.00",
"produit_quantite3": "0.00",
"produit_poids": "0.000",
"product_price": "0.0000",
"product_cost": "0.00",
"product_discount": "0.0000",
"product_serialnumber": "",
"produit_total": "0.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 9
}
],
"success": true
}
Body Example
{
"sale_id": 5,
"product_id": 1461
}
Update a sale product
PUT
https://app.gem-books.com/api/sales_products/:id
This endpoint allows you to update a specific sales product. Returns the updated sales product.
Path Parameters
id
integer
Sales product ID to update.
Headers
Authentication
string
Bearer Token
Content-Type
string
Should be application/json
Accept
string
Should be application/json
{
"data": [
{
"id": 12,
"sale_id": 5,
"product_id": 1461,
"product_name": "alignment",
"product_description": "",
"product_quantity": "1.00",
"produit_quantite3": "0.00",
"produit_poids": "0.000",
"product_price": "60.0000",
"product_cost": "0.00",
"product_discount": "0.0000",
"product_serialnumber": "",
"produit_total": "60.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 9
}
],
"success": true
}
Body Example
{
"product_name": "alignment",
"product_price": 60
}
Last updated