API documentation

v1.0

Business lines

The business lines offer the possibility of labeling your budgets and invoices with the aim of generating statistical data grouped by the activities carried out.

Create a business line

This endpoint allows the creation of a new business line in your application.

HTTP Request

POST/business-lines

Parameters

NameTypeDescription
nameString / RequiredName of the business line

Playload

{
    "name": "System"
}

201Response

{
    "data": {
        "id": 86,
        "name": "System",
        "created_at": "2022-09-30T15:30:15+00:00",
        "updated_at": "2022-09-30T15:30:15+00:00"
    }
}

List business lines

This endpoint allows the query of the business lines of your application.

HTTP Request

GET/business-lines

GET Parameters

NameTypeDescription
pageInteger / Optional / Min:1Page
per_pageInteger / Optional / Min:1 Max:100Items per page

200 Response

{
    "data": [
        {
            "id": 86,
            "name": "Systems",
            "created_at": "2022-09-30T15:30:15+00:00",
            "updated_at": "2022-09-30T15:30:15+00:00"
        },
        {
            "id": 63,
            "name": "Desing",
            "created_at": "2022-09-29T15:30:15+00:00",
            "updated_at": "2022-09-29T15:30:15+00:00"
        },
        {
            "id": 50,
            "name": "Programing",
            "created_at": "2022-09-28T15:30:15+00:00",
            "updated_at": "2022-09-28T15:30:15+00:00"
        }
    ],
    "links": {
        "first": "http:\/\/api.orzame.com\/v1\/business-lines?page=1",
        "last": "http:\/\/api.orzame.com\/v1\/business-lines?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http:\/\/api.orzame.com\/v1\/business-lines",
        "per_page": 100,
        "to": 3,
        "total": 3
    }
}

Get a business line

This endpoint allows the query of a business line of your application.

HTTP Request

GET/business-lines/{id}

200 Response

{
    "data": {
        "id": 86,
        "name": "Systems",
        "created_at": "2022-09-30T15:30:15+00:00",
        "updated_at": "2022-09-30T15:30:15+00:00"
    }
}

Update a business line

This endpoint allows the update of a business line of your application.

HTTP Request

PATCH/business-lines/{id}

Parameters

NameTypeDescription
nameString / RequiredName of the business line

Playload

{
    "name": "System"
}

204 Response

Response without body.

Delete a business line

This endpoint allows the removal of a business line from your application.

It is not possible to delete if it is in use in the application.

HTTP Request

DELETE/business-lines/{id}

204 Response

Response without body.