Payments

This page includes all endpoints available for the sales pay of Logiciel Actif.

List all sales payments

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

This endpoint allows you to get the list of your clients.

Query Parameters

Name
Type
Description

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 500.

Headers

Name
Type
Description

Authentication

string

Bearer token.

Accept

string

Should be application/json.

{
    "data": [
        {
            "id": 5,
            "invoice_id": 8,
            "method_id": 104,
            "amount": 56.40,
            "date_payment": "2024-09-23"
        },
        {
            "id": 4,
            "invoice_id": 7,
            "method_id": 104,
            "amount": 500.00,
            "date_payment": "2024-08-26"
        },
        {
            "id": 3,
            "invoice_id": 23,
            "method_id": 102,
            "amount": 47.49,
            "date_payment": "2024-08-26"
        },
        {
            "id": 2,
            "invoice_id": 104,
            "method_id": 101,
            "amount": 214.98,
            "date_payment": "2024-08-22"
        },
        {
            "id": 1,
            "invoice_id": 16,
            "method_id": 69,
            "amount": "29.50",
            "date_payment": "2024-08-21"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 500,
        "total": 5
    },
    "success": true
}

Retrieve a sales payment

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

This endpoint allows you to get the details of the sales payment.

Path Parameters

Name
Type
Description

id

integer

The ID of the sales payment to retrieve.

Headers

Name
Type
Description

Authentication

string

Bearer token.

Accept

string

Should be application/json.

{
    "data": [
        {
            "id": 4,
            "invoice_id": 7,
            "method_id": 104,
            "amount": 500.00,
            "date_payment": "2024-08-26"
        }
    ],
    "success": true
}

Create a sales payment

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

This endpoint allows you to create a sales payment. Returns the created sales payment.

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

invoice_id

string

Invoice ID

method_id

string

Payment method ID

amount

string

Payment amount

date_payment

string

Payment date

{
    "data": [
        {
            "id": 6,
            "invoice_id": 10,
            "method_id": 101,
            "amount": "250.00",
            "date_payment": "2024-10-30"
        }
    ],
    "success": true
}
{
    "invoice_id": 10,
    "method_id": 101,
    "amount": 250.00,
    "date_payment": "2024-10-30"
}

Update a sales payment

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

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

Path Parameters

Name
Type
Description

id

integer

Sales payment 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": 6,
            "invoice_id": 10,
            "method_id": 101,
            "amount": "100.00",
            "date_payment": "2024-10-31"
        }
    ],
    "success": true
}
{
"invoice_id": 15,
"method_id": 101,
"amount": 100.00,
"date_payment": "2024-10-31"
}

Last updated