API: Tender-Offer

Offer list

JWT Authorisation

GET /api/v3/tender-offer

Request parameter:

Filtering parameters:

ParameterTypeINExampleDescription
tenderintegerQUERYfilters[tender]=34Filtering by tender id = value
acceptedbooleanQUERYfilters[accepted]=1Filtering by offer is accepted (0=no, 1=yes)
valid_to_datestringQUERYfilters[valid_to_date]=2022-06-09Filtering by date = value
valid_to_datearray[from]QUERYfilters[valid_to_date][from]=2022-06-09Filtering by date >= from
valid_to_datearray[to]QUERYfilters[valid_to_date][to]=2022-06-09Filtering by date <= to
valid_to_datearray[from,to]QUERYfilters[valid_to_date][from]=2022-06-09&filters[valid_to_date][to]=2022-06-09Filtering by date between from and to

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
idintegerOffer id
nrstring|nullOffer nr
valid_to_datestring(date)|nullOffer valid to date
netto_amountstring(float)|nullOffer netto amount
brutto_amountstring(float)|nullOffer brutto amount
remarksstring|nullOffer remarks
is_acceptedbooleanIs offer accepted
contactarrayOffer insured person 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
insurancearrayOffer insurant API: Contact data
insurance[id]integer|nullContact id
insurance[name]string|nullContact name
insurance[name_1]string|nullContact first name
insurance[name_2]string|nullContact last name
policiesarray/wiki/spaces/BROK/pages/693051 related to offer
policies[id]integer|nullPolicy id
tenderarrayRelated /wiki/spaces/BROK/pages/693747
tender[id]integer|nullStatus id
attachmentarrayOffer related attachment API: File
attachment[id]string|nullFile id
attachment[name]string|nullFile name
attachment[size]string|nullFile size in bytes
attachment[created_at]string(date)File creation date

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}

/wiki/spaces/BROK/pages/693181 #Authentication defaults 

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


Response (Success)
200 OK    
{
    "count": "1",
    "data": [
        {
            "valid_to_date": "2022-12-30T00:00:00+01:00",
            "netto_amount": "12312.00",
            "brutto_amount": "3213.00",
            "remarks": null,
            "is_accepted": true,
            "policies": {
                "id": 5
            },
            "tender": {
                "id": 2
            },
            "contact": {
                "name": "Allianz Suisse Versicherungs-Gesellschaft AG",
                "name_1": "Allianz Suisse",
                "name_2": "Versicherungs-Gesellschaft AG",
                "id": 4
            },
            "insurance": {
                "name": "Allianz Suisse Versicherungs-Gesellschaft AG",
                "name_1": "Basler",
                "name_2": "Versicherung AG",
                "id": 7
            },
            "attachment": {
                "created_at": null,
                "id": null,
                "name": null,
                "size": null
            },
            "id": 5,
            "nr": "33"
        }
    ],
    "status": 200
}

Or one of 

Single Offer

JWT Authorisation

GET /api/v3/tender-offer/{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 all offers +



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


Response (Success)
200 OK  {
    "data": {
        "valid_to_date": null,
        "netto_amount": "123.00",
        "brutto_amount": "123.00",
        "remarks": "123",
        "is_accepted": false,
        "policies": {
            "id": null
        },
        "tender": {
            "id": 2
        },
        "contact": {
            "name": "Allianz Suisse Versicherungs-Gesellschaft AG",
            "name_1": "Allianz Suisse",
            "name_2": "Versicherungs-Gesellschaft AG",
            "id": 4
        },
        "insurance": {
            "name": "Allianz Suisse Versicherungs-Gesellschaft AG",
            "name_1": "Basler",
            "name_2": "Versicherung AG",
            "id": 7
        },
        "attachment": {
            "created_at": "2022-11-29T14:24:10+01:00",
            "id": 90,
            "name": "logo-file.png",
            "size": 8973
        },
        "id": 4,
        "nr": "12"
    },
    "status": 200
}
Response (Error)
404 Not found
{
	"error": "Entity not found",
	"code": 404
}
Response (Error)
403 Forbidden
{
	"error": "You have no access to contact id:123",
	"code": 403
}

Or one of 

Accept Offer

JWT Authorisation

POST /api/v3/tender-offer/{id}/accept

Request parameter:

ParameterTypeInDescription
idinturlid of requested policy


Response data:

Metadata: object.

ParameterTypeDescription
statusintResponse status (same as in http code)
messagestringAdditional info

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


Response (Success)
200 OK  
{
    "status": 200,
    "message": "Status changed to accepted"
}
Response (Error)
404 Not found
{
	"error": "Entity not found",
	"code": 404
}
Response (Error)
403 Forbidden
{
	"error": "You have no access to contact id:123",
	"code": 403
}

Or one of 

Reject Offer

JWT Authorisation

POST /api/v3/tender-offer/{id}/reject

Request parameter:

ParameterTypeInDescription
idinturlid of requested policy


Response data:

Metadata: object.

ParameterTypeDescription
statusintResponse status (same as in http code)
messagestringAdditional info

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


Response (Success)
200 OK  
{
    "status": 200,
    "message": "Status changed to rejected"
}
Response (Error)
404 Not found
{
	"error": "Entity not found",
	"code": 404
}
Response (Error)
403 Forbidden
{
	"error": "You have no access to contact id:123",
	"code": 403
}

Or one of