Transactions

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

List all transactions

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

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

Headers

NameTypeDescription

Authentification

string

Bearer token.

Accept

string

Should be application/json.

{
    "data": [
        {
            "id": 13033,
            "number": "13017",
            "reference": "test",
            "date": "2020-08-17",
            "user": "AAA",
            "creation_date": "2020-08-18",
            "creation_time": "11:18:31",
            "description": "This is a test!",
            "name": "test",
            "period": "Current",
            "code": null,
            "details": [
                {
                    "account": "1200",
                    "reference": "test",
                    "amount": "10.00",
                    "currency": "CAD",
                    "credit": "C"
                },
                {
                    "account": "4020",
                    "reference": "test",
                    "amount": "10.00",
                    "currency": "CAD",
                    "credit": "D"
                }
            ]
        },
        {
            "id": 13032,
            "number": "13016",
            "reference": "test",
            "date": "2020-08-17",
            "user": "AAA",
            "creation_date": "2020-08-18",
            "creation_time": "11:17:54",
            "description": "This is a test!",
            "name": "Test",
            "period": "Current",
            "code": null,
            "details": [
                {
                    "account": "1200",
                    "reference": "test",
                    "amount": "10.00",
                    "currency": "CAD",
                    "credit": "C"
                },
                {
                    "account": "4020",
                    "reference": "test",
                    "amount": "10.00",
                    "currency": "CAD",
                    "credit": "D"
                }
            ]
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 521,
        "per_page": 25,
        "total": 13021
    },
    "success": true
}

Retrieve a transaction

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

This endpoint allows you to access a specific transaction by its ID.

Path Parameters

NameTypeDescription

id

string

ID of transaction.

Headers

NameTypeDescription

Authentification

string

Bearer token.

Accept

string

Should be application/json.

{
    "data": {
        "id": 13033,
        "number": "13017",
        "reference": "test",
        "date": "2020-08-17",
        "user": "AAA",
        "creation_date": "2020-08-18",
        "creation_time": "11:18:31",
        "description": "This is a test!",
        "name": "test",
        "period": "99999",
        "code": null,
        "details": [
            {
                "account": "1200",
                "reference": "test",
                "amount": "10.00",
                "currency": "CAD",
                "credit": "C"
            },
            {
                "account": "4020",
                "reference": "test",
                "amount": "10.00",
                "currency": "CAD",
                "credit": "D"
            }
        ]
    },
    "success": true
}

Create a transaction

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

This endpoint allows you to create a new transaction. The new transaction will be returned.

Headers

NameTypeDescription

Authentification

string

Bearer token.

Accept

string

Should be application/json.

Content-Type

string

Should be application/json.

Request Body

NameTypeDescription

code

string

Provider or client code, this will be applied to all details using the provider or client's account. Only one provider or one client can be sent in a single call.

reference

string

Transaction reference.

date

string

Transaction date.

details

array

All transaction legs (account,amount,currency,credit,reference,projet_id).

description

string

Transaction description.

{
    "data": {
        "id": 13033,
        "number": "13017",
        "reference": "test",
        "date": "2020-08-17",
        "user": "AAA",
        "creation_date": "2020-08-18",
        "creation_time": "11:18:31",
        "description": "This is a test!",
        "name": "test",
        "period": "99999",
        "code": null,
        "details": [
            {
                "account": "1200",
                "reference": "test",
                "amount": "10.00",
                "currency": "CAD",
                "credit": "C"
            },
            {
                "account": "4020",
                "reference": "test",
                "amount": "10.00",
                "currency": "CAD",
                "credit": "D"
            }
        ]
    },
    "success": true
}

Body example

{
    "reference": "test",
    "date": "2020-08-17",
    "description": "This is a test!",
    "code": "TEST",
    "labels": "1,2,3"
    "details": [
        {
            "account" : "1200",
            "reference" : "test",
            "amount" : "10.00",
            "credit" : "C",
            "currency" : "CAD",
            "projet_id" : "0"
        },
        {
            "account" : "4020",
            "reference" : "test",
            "amount" : "10.00",
            "credit" : "D",
            "currency" : "CAD",
            "projet_id" : "0"
        }
    ]
}

Last updated