Clients

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

List all clients

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

This endpoint allows you to get the list of your clients. The clients are returned sorted by code (A-Z).

Query Parameters

NameTypeDescription

page

integer

The number of the page you wish to see. Default is 1.

per_page

integer

The number of the desired result per page. Default is 20. Maximum is 100.

Headers

NameTypeDescription

Authentication

string

Bearer token.

Accept

string

Should be application/json.

{
    "data": [
        {
            "id": 2088,
            "code": "TEST1",
            "name": "TEST1",
            "inactive": 0,
            "creation_date": "2020-08-17",
            "address": "",
            "adresse2": "",
            "city": "",
            "state": "QC",
            "zipcode": "",
            "phone": "",
            "phone2": "",
            "fax": "",
            "email": "",
            "website": "",
            "phone_work": "",
            "credit": "0.00",
            "term": 37,
            "contacts": [
                {
                    "id": 1,
                    "nom": "Contact test",
                    "fonction": "",
                    "departement": "",
                    "email": "",
                    "telephone": "",
                    "cell": "",
                    "fax": ""
                }
            ]
        },
        {
            "id": 2,
            "code": "13559",
            "name": "1TEST2",
            "inactive": 1,
            "creation_date": "2020-07-06",
            "address": "",
            "adresse2": "",
            "city": "",
            "state": "QC",
            "zipcode": "",
            "phone": "",
            "phone2": "",
            "fax": "",
            "email": "",
            "website": "",
            "phone_work": "",
            "credit": "0.00",
            "term": 37,
            "contacts": [
                {
                    "id": 1,
                    "nom": "Contact test",
                    "fonction": "",
                    "departement": "",
                    "email": "",
                    "telephone": "",
                    "cell": "",
                    "fax": ""
                }
            ]
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 2
    },
    "success": true
}

Retrieve a client

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

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

Path Parameters

NameTypeDescription

id

integer

The ID of the client to retrieve.

Headers

NameTypeDescription

Authentication

string

Bearer token.

Accept

string

Should be application/json.

{
    "data": {
        "id": 2091,
        "code": "TEST11",
        "name": "Test Client",
        "inactive": 0,
        "creation_date": "2020-08-19",
        "address": null,
        "adresse2": null,
        "city": null,
        "state": "QC",
        "zipcode": null,
        "phone": null,
        "phone2": null,
        "fax": null,
        "email": null,
        "website": null,
        "phone_work": null,
        "credit": "0.00",
        "term": 0,
        "contacts": [
                {
                    "id": 1,
                    "nom": "Contact test",
                    "fonction": "",
                    "departement": "",
                    "email": "",
                    "telephone": "",
                    "cell": "",
                    "fax": ""
                }
            ]
    },
    "success": true
}

Create a client

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

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

Headers

NameTypeDescription

Authentication

string

Bearer token.

Content-Type

string

Should be application/json.

Accept

string

Should be application/json.

Request Body

NameTypeDescription

code

string

Client code.

name

string

Client name.

{
    "data": {
        "id": 2091,
        "code": "TEST11",
        "name": "Test Client",
        "inactive": 0,
        "creation_date": "2020-08-19",
        "address": null,
        "adresse2": null,
        "city": null,
        "state": "QC",
        "zipcode": null,
        "phone": null,
        "phone2": null,
        "fax": null,
        "email": null,
        "website": null,
        "phone_work": null,
        "credit": "0.00",
        "term": 0,
        "contacts": []
    },
    "success": true
}
{
    "code": "TEST11",
    "name": "Test Client",
    "creation_date" : "2020-08-19"
}

Update a client

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

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

Path Parameters

NameTypeDescription

id

integer

Client id to update.

Headers

NameTypeDescription

Authentication

string

Bearer token.

Content-Type

string

Should be application/json.

Accept

string

Should be application/json.

{
    "data": {
        "id": 2091,
        ...
    },
    "success": true
}
{
    "name": "Default client"
}

Last updated