Products

This page includes all endpoints available for the products module of Logiciel Actif.

List all products

GET https://app.gem-books.com/api/products

This endpoint allows you to get the list of your products. The products are returned sorted by creation date, with the most recent product appearing first.

Query Parameters

Headers

{
    "data": [
        {
            "id": 1,
            ...
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 4
    }
}

Retrieve a product

GET https://app.gem-books.com/api/products/:id

This endpoint allows you to get the details of the product.

Path Parameters

Headers

{
    "data": {
        "id": 1,
        ...
    }
}

Create a product

POST https://app.gem-books.com/api/products

This endpoint allows you to create a product. Returns the created product.

Headers

Request Body

{
    "data": {
        "id": 1,
        ...
    }
}

Body example

{
    "code": "demo",
    "category_id": 1,
    "name_fr": "Produit démo",
    "name_en": "Demo Prodcut"
}

Update a product

PUT https://app.gem-books.com/api/products/:id

This endpoint allows you to update a specific product. Returns the updated product.

Path Parameters

Headers

{
    "data": {
        "id": 1,
        ...
    }
}

Body example

{
    "name_fr": "Nouveau Produit démo",
    "name_en": "New Demo Prodcut"
}

Last updated