Categories
This page includes all endpoints available for the categories of Logiciel Actif.
List all categories
GET
https://app.gem-books.com/api/categories
This endpoint allows you to get the list of your categories.
Headers
Authentication*
string
Bearer Token
Accept
string
Should be application/json
{
"data": [
{
"id": 3,
"code": "500",
"name_fr": "Job",
"name_en": "Job"
},
{
"id": 2,
"code": "200",
"name_fr": "Pieces",
"name_en": "Parts"
},
{
"id": 1,
"code": "DEFAULT",
"name_fr": "DEFAULT",
"name_en": "Default"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 500,
"total": 3
},
"success": true
}
Retrieve a specific sale product
GET
https://app.gem-books.com/api/categories/:id
This endpoint allows you to get one specific category.
Path Parameters
id
integer
The ID of the category to retrieve.
Headers
Authentication*
string
Bearer Token
Accept
string
Should be application/json
{
"data": [
{
"id": 2,
"code": "200",
"name_fr": "Pieces",
"name_en": "Parts"
}
],
"success": true
}
Create a category
POST
https://app.gem-books.com/api/categories
Headers
Authentication
string
Bearer Token
Content-type
string
Should be application/json
Accept
string
Should be application/json
Request Body
code
string
Code
name_fr
string
Category name in French
name_en
string
Category name in English
{
"data": [
{
"id": 5,
"code": "005",
"name_fr": "La Franchise",
"name_en": "Franchise"
}
],
"success": true
}
Body Example
{
"code": "005",
"name_fr": "La Franchise",
"name_en": "Franchise"
}
Update a category
PUT
https://app.gem-books.com/api/categories/:id
This endpoint allows you to update a specific category. Returns the updated category.
Path Parameters
id
integer
Category ID to update.
Headers
Authentication
string
Bearer Token
Content-Type
string
Should be application/json
Accept
string
Should be application/json
{
"data": [
{
"id": 4,
"code": "100",
"name_fr": "Entreposage de pneus",
"name_en": "Tire storage"
}
],
"success": true
}
Body Example
{
"code": "100",
"name_fr": "Entreposage de pneus",
"name_en": "Tire storage"
}
Last updated