Detailed report
GET https://api-sandbox.sunbit.com/reports/api/v1/detailed
Request Headers
Property | Required | Type | Description |
---|---|---|---|
sunbit-key | yes | text | Provided to you by Sunbit |
sunbit-secret | yes | text | Provided to you by Sunbit |
Body
Attribute | Required | Type | Description |
---|---|---|---|
location | no | text | If not provided, the response will include all locations of the partner |
fromDate | yes | date | Format: YYYY-MM-DD |
toDate | yes | date | Format: YYYY-MM-DD |
Response
Attribute | Type | Description |
---|---|---|
content | DetailedReport[] | Array of DetailedReport aggregate per location |
DetailedReport
Attribute | Type | Description |
---|---|---|
location | text | |
customerId | number | Customer id |
dateTime | LocalDateTime | Purchase date time as format : YYYY-MM-DD’T’hh:mm:ss |
status | text |
|
amount | number | Purchase amount |
fee | number | Fee collected by Sunbit |
Example
Request
'https://api-sandbox.sunbit.com/reports/api/v1/detailed'' \ -H 'Content-Type: application/json' \ -H 'sunbit-key: YOUR_KEY' \ -H 'sunbit-secret: YOUR_SECRET' \ -d '{ "fromDate":"2024-04-01", "toDate":"2024-04-15", "location": "sandbox" }
Response
{ "content": [ { "location": "sandbox", "customerId": 2731, "dateTime": "2024-04-10T09:45:39", "status": "PURCHASED", "amount": 341.46, "fee": 10.24 } ]}
Errors
Error Code | Message | Description |
---|---|---|
404 | Resource Not Found | Location was not found |
403 | Bad Credentials | sunbit-key and/or sunbit-secret do not match any alliance credentials |
500 | Internal Server Error | Something went wrong on Sunbit’s side |