API: Bill

Bill list

JWT Authorisation

GET /api/v3/bill

Filtering parameters:

ParameterTypeINExampleDescription
contactintegerQUERYfilters[contact]=34Filtering by contact id = value

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
idintegerBill id
nr_refstring|nullBill reference number
titlestring|nullBill title
statusarrayBill status
status[id]integer|nullStatus id
status[name]string|nullStatus name in DE language
status[name_e]string|nullStatus name in EN language
status[name_i]string|nullStatus name in IT language
status[name_f]string|nullStatus name in FR language
typearrayBill type
type[id]integer|nullType id
type[name]string|nullType name in DE language
type[name_e]string|nullType name in EN language
type[name_i]string|nullType name in IT language
type[name_f]string|nullType name in FR language
bill_statusarrayStatus data
bill_status[id]integer|nullStatus id
bill_status[date]string|nullStatus set up date
bill_status[date_valid_to]string|nullStatus valid to date
total_netfloatTotal value netto
totalfloatTotal value
show_vatintegerDoes it use vat
include_vatbooleanDoes total include vat
contactarrayPolicy API: Contact data
contact[id]integer|nullContact id
contact[name]string|nullContact name
contact[name_1]string|nullContact first name
contact[name_2]string|nullContact last name

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/bill --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'

Response (Success)
{
    "count": 1,
    "data": [
        {
            "nr_ref": 490134,
            "title": "Mitgliederbeitrag",
            "status": {
                "name_e": "Offer in the works",
                "name_f": "Offre en activité",
                "name_i": "Offerta in fase di trattamento",
                "id": 10,
                "name": "Offerte in Arbeit"
            },
 			"type": {
				"name_e": "Invoice",
				"name_f": "Facture",
				"name_i": "Fattura",
				"id": 2,
				"name": "Rechnung"
			},
            "bill_status": {
                "date_valid_to": "2024-06-24T00:00:00+02:00",
                "id": 857,
                "date": "2024-06-24T00:00:00+02:00"
            },
            "total_net": 100,
            "total": 100,
            "show_vat": 1,
            "include_vat": true,
            "contact": {
                "name": "Adsd Maciej ASD ",
                "name_1": "Adsd Maciej ASD",
                "name_2": null,
                "id": 258
            },
            "id": 527
        }
    ],
    "status": 200
}

Or one of 

Single Bill

JWT Authorisation

GET /api/v3/bill/{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 bill +
valutastringValuta date
currencyarrayBill payment type
currency[id]integer|nullCurrency type id
currency[name]string|nullCurrency name
currency[round_factor]float|nullCurrency rounding factor
client_bank_accountarrayClient bank account
client_bank_account[id]integer|nullBank account id
client_bank_account[bc_nr]string|nullBank account bc number
client_bank_account[bank_name]string|nullBank account bank name
client_bank_account[bank_name_add]string|nullBank account bank name addition
client_bank_account[bank_nr]string|nullBank account bank number
client_bank_account[account_nr]string|nullBank account - account number
client_bank_account[iban_nr]string|nullBank account IBAN number
logopaperarrayBill logopaper setup
logopaper[id]integer|nullLogopaper id
logopaper[name]string|nullLogopaper name
categoryarrayBill category
category[id]integer|nullcategory id
category[name]string|nullcategory name in DE language
category[name_e]string|nullcategory name in EN language
category[name_i]string|nullcategory name in IT language
category[name_f]string|nullcategory name in FR language
policy_payment_typearrayBill policy payment type
policy_payment_type[id]integer|nullPayment type id
policy_payment_type[name]string|nullPayment type name in DE language
policy_payment_type[name_e]string|nullPayment type name in EN language
policy_payment_type[name_i]string|nullPayment type name in IT language
policy_payment_type[name_f]string|nullPayment type name in FR language
client_advisorarrayClient advisor API: User
client_advisor[id]integer|nullClient advisor id
client_advisor[first_name]string|nullClient advisor first name
client_advisor[last_name]string|nullClient advisor last name
contact_personarrayContact person API: Contact data
contact_person[id]integer|nullContact person id
contact_person[name]string|nullContact person name
contact_person[name_1]string|nullContact person first name
contact_person[name_2]string|nullContact person last name
projectarrayBill related project
project[id]integer|nullProject id
project[title]string|nullProject title
reference_infostring|nullBill reference infomations
reminder_feefloatReminder fee
default_interestfloatDefault interest
default_interest_ratefloatDefault interest rate



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/bill/16448 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'


Response (Success)
200 OK 
{
    "data": {
        "nr_ref": 490134,
        "title": "Mitgliederbeitrag",
        "status": {
            "name_e": "Offer in the works",
            "name_f": "Offre en activité",
            "name_i": "Offerta in fase di trattamento",
            "id": 10,
            "name": "Offerte in Arbeit"
        },
 		"type": {
			"name_e": "Invoice",
			"name_f": "Facture",
			"name_i": "Fattura",
			"id": 2,
			"name": "Rechnung"
		},
        "bill_status": {
            "date_valid_to": "2024-06-24T00:00:00+02:00",
            "id": 857,
            "date": "2024-06-24T00:00:00+02:00"
        },
        "valuta": "2020-01-01T00:00:00+01:00",
        "currency": {
            "round_factor": 0.05,
            "id": 1,
            "name": "CHF"
        },
        "client_bank_account": {
            "bc_nr": "233",
            "bank_name": "UBS",
            "bank_name_add": "UBS-QR",
            "bank_nr": "UBSWCHZH80A",
            "account_nr": "233-774943.01 P",
            "iban_nr": "CH74 0023 3233 7749 4301 P",
            "id": 3
        },
        "logopaper": {
            "id": 1,
            "name": "Standard"
        },
        "category": {
            "name_e": null,
            "name_f": null,
            "name_i": null,
            "id": null,
            "name": null
        },
        "total_net": 100,
        "total": 100,
        "policy_payment_type": {
            "name_e": "Monthly",
            "name_f": "Mensuel",
            "name_i": "Mensile",
            "id": 5,
            "name": "Monatlich"
        },
        "show_vat": 1,
        "include_vat": true,
        "client_advisor": {
            "first_name": "WMC",
            "last_name": "WMC",
            "id": 1
        },
        "contact": {
            "name": "Adsd Maciej ASD ",
            "name_1": "Adsd Maciej ASD",
            "name_2": null,
            "id": 258
        },
        "contact_person": {
            "name": null,
            "name_1": null,
            "name_2": null,
            "id": null
        },
        "project": {
            "title": null,
            "id": null
        },
        "reference_info": "01.01.2020 - 31.01.2020",
        "id": 527,
        "reminder_fee": 0,
        "default_interest": 0,
        "default_interest_rate": 0
    },
    "status": 200
}
Response (Error)
404 Not found
{
	"error": "Entity not found",
	"code": 404
}
Response (Error)
403 Forbidden
{
	"error": "You have no access to bill id:123",
	"code": 403
}

Or one of