Products
This page includes all endpoints available for the purchase products of Logiciel Actif.
List all purchase products
GET
https://app.gem-books.com/api/purchases_products
This endpoint allows you to get the list of your purchase products.
Should be application/json
{
"data": [
{
"id": 1,
"sale_id": 2,
"product_id": "5",
"produit_compte": "67",
"product_name": "Breaks",
"product_description": "",
"produit_projet": null,
"product_quantity": "8.00",
"produit_quantite_receive": "0.00",
"produit_quantite_onhold": "8.00",
"produit_poids": "0.000",
"produit_poids_receive": "0.000",
"produit_poids_onhold": "0.000",
"product_price": "30.0000",
"product_discount": "0.00",
"product_serialnumber": "",
"produit_total": "240.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 0,
"system_id": 99217
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 500,
"total": 1
},
"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
The ID of the sales product to retrieve.
Should be application/json
{
"data": [
{
"id": 1,
"sale_id": 2,
"product_id": "5",
"produit_compte": "67",
"product_name": "Breaks",
"product_description": "",
"produit_projet": null,
"product_quantity": "8.00",
"produit_quantite_receive": "0.00",
"produit_quantite_onhold": "8.00",
"produit_poids": "0.000",
"produit_poids_receive": "0.000",
"produit_poids_onhold": "0.000",
"product_price": "30.0000",
"product_discount": "0.00",
"product_serialnumber": "",
"produit_total": "240.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 0,
"system_id": 99217
}
],
"success": true
}
Create a purchase product
POST
https://app.gem-books.com/api/purchases_products
Should be application/json
Should be application/json
Request Body
{
"data": [
{
"id": 2,
"sale_id": 5,
"product_id": "3",
"produit_compte": "67",
"product_name": "timing belt",
"product_description": "",
"produit_projet": null,
"product_quantity": "0.00",
"produit_quantite_receive": "0.00",
"produit_quantite_onhold": "0.00",
"produit_poids": "0.000",
"produit_poids_receive": "0.000",
"produit_poids_onhold": "0.000",
"product_price": "0.0000",
"product_discount": "0.00",
"product_serialnumber": "",
"produit_total": "0.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 0,
"system_id": 99217
}
],
"success": true
}
Body Example
{
"sale_id": 5,
"product_id": 3,
"product_name": "timing belt"
}
Update a purchase product
PUT
https://app.gem-books.com/api/purchases_products/:id
This endpoint allows you to update a specific purchase product.
Returns the updated purchase product.
Path Parameters
Purchase product ID to update.
Should be application/json
Should be application/json
{
"data": [
{
"id": 2,
"sale_id": 5,
"product_id": "3",
"produit_compte": "67",
"product_name": "Timing Belt",
"product_description": "",
"produit_projet": null,
"product_quantity": "10.00",
"produit_quantite_receive": "0.00",
"produit_quantite_onhold": "0.00",
"produit_poids": "0.000",
"produit_poids_receive": "0.000",
"produit_poids_onhold": "0.000",
"product_price": "30.0000",
"product_discount": "0.00",
"product_serialnumber": "",
"produit_total": "300.00",
"taxes_rules_id": 2,
"gestion_taxes": "[]",
"province_id": 0,
"system_id": 99217
}
],
"success": true
}
Body Example
{
"product_name": "Timing Belt",
"product_quantity": 10,
"product_price": 30
}