Purchases
This page includes all endpoints available for the purchases module of Logiciel Actif.
List all purchases
GET
https://app.gem-books.com/api/purchases
This endpoint allows you to get the list of your purchases. The transactions are returned sorted by most recent number.
Headers
Name
Type
Description
Authentication*
string
Bearer Token
Accept
string
Should be application/json
{
"data": [
{
"id": 27,
"sale_number": 37,
"invoice_number": null,
"internal_number": "",
"external_number": "",
"quote_number": null,
"client_id": 1,
"active": 1,
"date": "2024-12-27",
"contact_name": "",
"contact_email": null,
"contact_phone": null,
"contact_address": "",
"contact_city": "",
"contact_state": "QC",
"contact_zip": "",
"arrondissement": "",
"contact_facturation": null,
"contact_facturation_email": null,
"contact_facturation_phone": null,
"facturation1": "",
"facturation2": null,
"facturation_ville": null,
"facturation_pays": 1,
"facturation_prov": "QC",
"facturation_cp": null,
"livraison_id": 0,
"delivery_name": null,
"livraison_client_id": 0,
"delivery_email": null,
"delivery_phone": null,
"delivery_address": "",
"delivery_city": null,
"delivery_state": "QC",
"delivery_zip": null,
"date_rec": null,
"date_liv": null,
"responsible": null,
"seller_id": 230,
"expediteur": null,
"expediteur_ref": null,
"tags": 0,
"invoice_receive": 0,
"subtotal": "0.00",
"total": "0.00",
"currency": 1,
"options": null,
"branch_id": 1,
"has_cc": 0,
"sale_id": 0,
"products_lines": [],
"documents": [],
"system_id": 99217
},
{
"id": 26,
"sale_number": 36,
"invoice_number": null,
"internal_number": "",
"external_number": "",
"quote_number": null,
"client_id": 1,
"active": 1,
"date": "2024-12-27",
"contact_name": "",
"contact_email": null,
"contact_phone": null,
"contact_address": "",
"contact_city": "",
"contact_state": "QC",
"contact_zip": "",
"arrondissement": "",
"contact_facturation": null,
"contact_facturation_email": null,
"contact_facturation_phone": null,
"facturation1": "",
"facturation2": null,
"facturation_ville": null,
"facturation_pays": 1,
"facturation_prov": "QC",
"facturation_cp": null,
"livraison_id": 0,
"delivery_name": null,
"livraison_client_id": 0,
"delivery_email": null,
"delivery_phone": null,
"delivery_address": "",
"delivery_city": null,
"delivery_state": "QC",
"delivery_zip": null,
"date_rec": null,
"date_liv": null,
"responsible": null,
"seller_id": 230,
"expediteur": null,
"expediteur_ref": null,
"tags": 0,
"invoice_receive": 0,
"subtotal": "0.00",
"total": "0.00",
"currency": 1,
"options": null,
"branch_id": 1,
"has_cc": 0,
"sale_id": 0,
"products_lines": [],
"documents": [],
"system_id": 99217
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 500,
"total": 2
},
"success": true
}
List a specific purchase
GET
https://app.gem-books.com/api/purchases/:id
This endpoint allows you to get one specific purchase.
Headers
Name
Type
Description
Authentication*
string
Bearer Token
Accept
string
Should be application/json
{
"data": {
"id": 26,
"sale_number": 36,
"invoice_number": null,
"internal_number": "",
"external_number": "",
"quote_number": null,
"client_id": 1,
"active": 1,
"date": "2024-12-27",
"contact_name": "",
"contact_email": null,
"contact_phone": null,
"contact_address": "",
"contact_city": "",
"contact_state": "QC",
"contact_zip": "",
"arrondissement": "",
"contact_facturation": null,
"contact_facturation_email": null,
"contact_facturation_phone": null,
"facturation1": "",
"facturation2": null,
"facturation_ville": null,
"facturation_pays": 1,
"facturation_prov": "QC",
"facturation_cp": null,
"livraison_id": 0,
"delivery_name": null,
"livraison_client_id": 0,
"delivery_email": null,
"delivery_phone": null,
"delivery_address": "",
"delivery_city": null,
"delivery_state": "QC",
"delivery_zip": null,
"date_rec": null,
"date_liv": null,
"responsible": null,
"seller_id": 230,
"expediteur": null,
"expediteur_ref": null,
"tags": 0,
"invoice_receive": 0,
"subtotal": "0.00",
"total": "0.00",
"currency": 1,
"options": null,
"branch_id": 1,
"has_cc": 0,
"sale_id": 0,
"products_lines": [],
"documents": [],
"system_id": 99217
},
"success": true
}
Create a purchase
POST
https://app.gem-books.com/api/purchases
Headers
Name
Type
Description
Authentication
string
Bearer Token
Accept
string
Should be application/json
{
"data": {
"id": 27,
"sale_number": 37,
"invoice_number": null,
"internal_number": "",
"external_number": "",
"quote_number": null,
"client_id": 1,
"active": 1,
"date": "2024-12-27",
"contact_name": "",
"contact_email": null,
"contact_phone": null,
"contact_address": "",
"contact_city": "",
"contact_state": "QC",
"contact_zip": "",
"arrondissement": "",
"contact_facturation": null,
"contact_facturation_email": null,
"contact_facturation_phone": null,
"facturation1": "",
"facturation2": null,
"facturation_ville": null,
"facturation_pays": 1,
"facturation_prov": "QC",
"facturation_cp": null,
"livraison_id": 0,
"delivery_name": null,
"livraison_client_id": 0,
"delivery_email": null,
"delivery_phone": null,
"delivery_address": "",
"delivery_city": null,
"delivery_state": "QC",
"delivery_zip": null,
"date_rec": null,
"date_liv": null,
"responsible": null,
"seller_id": 230,
"expediteur": null,
"expediteur_ref": null,
"tags": 0,
"invoice_receive": 0,
"subtotal": "0.00",
"total": "0.00",
"currency": 1,
"options": null,
"branch_id": 1,
"has_cc": 0,
"sale_id": 0,
"products_lines": [],
"documents": [],
"system_id": 99217
},
"success": true
}
Body Example
{
"client_id": "1",
"date": "2024-12-27"
}
Update a purchase
PUT
https://app.gem-books.com/api/purchase/:id
Headers
Name
Type
Description
Authentication
string
Bearer Token
Accept
string
Should be application/json
{
"data": {
"id": 27,
"sale_number": 37,
"invoice_number": null,
"internal_number": "",
"external_number": "",
"quote_number": null,
"client_id": 1,
"active": 1,
"date": "2024-12-28",
"contact_name": "John Smith",
"contact_email": null,
"contact_phone": null,
"contact_address": "",
"contact_city": "",
"contact_state": "QC",
"contact_zip": "",
"arrondissement": "",
"contact_facturation": null,
"contact_facturation_email": null,
"contact_facturation_phone": null,
"facturation1": "",
"facturation2": null,
"facturation_ville": null,
"facturation_pays": 1,
"facturation_prov": "QC",
"facturation_cp": null,
"livraison_id": 0,
"delivery_name": null,
"livraison_client_id": 0,
"delivery_email": null,
"delivery_phone": null,
"delivery_address": "",
"delivery_city": null,
"delivery_state": "QC",
"delivery_zip": null,
"date_rec": null,
"date_liv": null,
"responsible": null,
"seller_id": 230,
"expediteur": null,
"expediteur_ref": null,
"tags": 0,
"invoice_receive": 0,
"subtotal": "0.00",
"total": "0.00",
"currency": 1,
"options": null,
"branch_id": 1,
"has_cc": 0,
"sale_id": 0,
"products_lines": [],
"documents": [],
"system_id": 99217
},
"success": true
}
Body Example
{
"date": "2024-12-28",
"contact_name": "John Smith"
}
Last updated