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.

Headers

Name
Type
Description

Authentication*

string

Bearer Token

Accept

string

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

Name
Type
Description

id

integer

The ID of the sales product to retrieve.

Headers

Name
Type
Description

Authentication*

string

Bearer Token

Accept

string

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

Headers

Name
Type
Description

Authentication

string

Bearer Token

Content-type

string

Should be application/json

Accept

string

Should be application/json

Request Body

Name
Type
Description

sale_id

string

Invoice ID

product_id

string

Product ID

{
  "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

Name
Type
Description

id

integer

Purchase product ID to update.

Headers

Name
Type
Description

Authentication

string

Bearer Token

Content-Type

string

Should be application/json

Accept

string

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
}

Last updated