API: Premium Invoice

Premium Invoice list

JWT Authorisation

GET /api/v3/premium-invoice


Filtering parameters:

ParameterTypeINExampleDescription
idsstring|arrayQUERYfilters[ids]=34,55,123 
or
filters[ids][]=34&filters[ids][]=55 ...
Filtering by premium_invoice id = value (or values)
policiesstring|arrayQUERYfilters[policies]=34,55,123 
or
filters[policies][]=34&filters[policies][]=55 ...
Filtering by policy  id = value (or values)
statuses_invoicestring|arrayQUERYfilters[statuses_invoice]=1,2
or
filters[statuses_invoice][]=1&filters[policies][]=2 ...
Filtering by premium invoice status  id = value (or values)

API: _ Default behavior #List defaults


Response data:

Metadata: object.

ParameterTypeDescription
countintNumber of all results marching criteria 
statusintResponse status (same as in http code)

Data:  object.data[array]

ParameterTypeDescription
idintegerPremium invoice id
amount_bruttostring(float)|nullPremium invoice amount brutto
start_datestringPremium invoice start date
end_datestringPremium invoice end date
status_invoicearrayStatus of invoice
status_invoice[id]integer|nullStatus id
status_invoice[name]string|nullStatus name in DE language
status_invoice[name_e]string|nullStatus name in EN language
status_invoice[name_i]string|nullStatus name in IT language
status_invoice[name_f]string|nullStatus name in FR language

Response (Error):

ParameterTypeDescription
codeintegerAn error code
errorstringA message containing some information about the error 
errorsarrayList of errors devided by field in associative array {field_name:error message}

API: _ Default behavior #Authentication defaults 

Request
curl -X GET https://public.brokerstar.biz/api/v3/premium-invoice --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'


Response (Success)
200 OK   
{
    "count": "3",
    "data": [
        {
            "policy": {
                "id": 3051,
                "nr": "6881"
            },
            "start_date": "2021-01-01T00:00:00+01:00",
            "end_date": "2021-12-31T00:00:00+01:00",
            "amount_brutto": "39394.80",
            "status_invoice": {
                "name_e": "Open",
                "name_f": "Ouvert",
                "name_i": "Aperto",
                "id": 1,
                "name": "Offen"
            },
            "id": 15952
        }
    ],
    "status": 200
}

Or one of 

Single Premium Invoice

JWT Authorisation

GET /api/v3/premium-invoice/{id}

Request parameter:

ParameterTypeInDescription
idinturlid of requested policy

Response data:

Metadata: object.

ParameterTypeDescription
statusintResponse status (same as in http code)

Data:  object.data

ParameterTypeDescription
All columns from single premium invoice  +

Response (Error):

ParameterTypeDescription
codeintegerAn error code
errorstringA message containing some information about the error 
errorsarrayList of errors devided by field in associative array {field_name:error message}
Request
curl -X GET https://public.brokerstar.biz/api/v3/premium-invoice/15953 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'


Response (Success)
200 OK 
{
    "data": {
        "policy": {
            "id": 3051,
            "nr": "6881"
        },
        "start_date": "2022-01-01T00:00:00+01:00",
        "end_date": "2022-12-31T00:00:00+01:00",
        "amount_brutto": "39394.80",
        "status_invoice": {
            "name_e": "Controlled",
            "name_f": "Contrôlé",
            "name_i": "Controllato",
            "id": 3,
            "name": "Kontrolliert"
        },
        "id": 15953
    },
    "status": 200
}
Response (Error)
404 Not found
{
	"error": "Entity not found",
	"code": 404
}

Or one of 

Related pages