API: My-Reports
GET /api/v3/my-reports
Request parameter:
No Request parameter
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
count | int | Number of all results marching criteria |
status | int | Response status (same as in http code) |
Data: object.data[array]
Parameter | Type | Description |
---|---|---|
id | int | Report id |
date | string(date) | Report date |
amount | string(float) | Report db amount (it it calculation base) |
Response (Error):
Parameter | Type | Description |
---|---|---|
code | integer | An error code |
error | string | A message containing some information about the error |
errors | array | List 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/my-reports --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "count": "2", "data": [ { "id": 2, "date": "2022-07-25T00:00:00+02:00", "amount": "246.95" }, { "id": 17, "date": "2022-08-26T00:00:00+02:00", "amount": "321.00" } ], "status": 200 }
Response (Error)
403 Forbidden { "error": "This endpoint is accessible only for sharers", "code": 403 }
Or one of
- /wiki/spaces/BROK/pages/693181 #Authentication defaults
- /wiki/spaces/BROK/pages/693181 #List defaults
GET /api/v3/my-reports/{id}
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
id | int | url | id of requested report |
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
status | int | Response status (same as in http code) |
Data: object.data[array]
Parameter | Type | Description |
---|---|---|
id | int | Report id |
date | string(date) | Report date |
contact | array | Report contact (sharer) API: Contact |
contact[id] | id | Sharer id |
contact[name] | string | Sharer name |
contact[name_1] | string | Sharer first name or company name |
contact[name_2] | string|null | Sharer last name or company addiction |
amount | string(float)|null | Report db amount (it it calculation base) |
retention | string(float)|null | Retention amount |
expenses | string(float)|null | Expenses amount |
deduction_name | string|null | Deduction name |
deduction | string(float)|null | Deduction amount |
deduction_ahv | string(float)|null | Deduction AHV amount |
deduction_uvg | string(float)|null | Deduction UVG amount |
deduction_alu | string(float)|null | Deduction ALU amount |
Response (Error):
Parameter | Type | Description |
---|---|---|
code | integer | An error code |
error | string | A message containing some information about the error |
errors | array | List of errors devided by field in associative array {field_name:error message} |
Request
curl -X GET https://public.brokerstar.biz/api/v3/my-reports/1 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "data": { "date": "2022-07-25T00:00:00+02:00", "contact": { "name": "attentis (Vermittler) Attentis Digital AG", "name_1": "attentis (Vermittler)", "name_2": "Attentis Digital AG", "id": 17035 }, "amount": "246.95", "retention": "0.00", "expenses": null, "deduction_name": null, "deduction": null, "deduction_ahv": "5.30", "deduction_uvg": null, "deduction_alu": "1.10", "id": 2 }, "status": 200 }
Response (Error)
403 Forbidden { "error": "This endpoint is accessible only for sharers", "code": 403 }
Response (Error)
404 Not found { "error": "Entity not found", "code": 404 }
Or one of
- /wiki/spaces/BROK/pages/693181 #Authentication defaults
ET /api/v3/my-reports/{id}/download
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
id | int | url | id of requested contact |
options[logo] | int(0|1) | query | Download along with logo paper (if exists) - default 0 |
Response data:
BINARY FILE RESPONSE
Request
curl -X GET https://public.brokerstar.biz/api/v3/my-reports/1/download --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Request
curl -X GET https://public.brokerstar.biz/api/v3/my-reports/1/download?options[logo]=1 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Error)
404 Entity not found
Response (Error)
500 Unable to generate payout