POST api/v1/report
Request to generate specified report type for set period.
Requires authorization!
Requires scope ReportCreate
Response Codes
202
– Successfully accepted request. It may take some time until the reports are created.400
– Report type is not supported400
– PeriodStart or PeriodEnd is empty400
– PeriodStart is too small (less than 2009-01-01)400
– PeriodEnd is too large (more than 20 years from today)401
– User is not Authorized
Request Information
URI Parameters
None.
Body Parameters
ReportCreateRequestName | Description | Type | Additional information |
---|---|---|---|
ReportType | ReportType |
Required |
|
PeriodStart | date |
None. |
|
PeriodEnd | date |
None. |
Request Formats
application/json, text/json
Sample:
{ "ReportType": 1, "PeriodStart": "2024-09-18T02:10:17.2184868+03:00", "PeriodEnd": "2024-09-18T02:10:17.2184868+03:00" }
application/xml, text/xml
Sample:
<ReportCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Sobralaen.Api.Models"> <PeriodEnd>2024-09-18T02:10:17.2184868+03:00</PeriodEnd> <PeriodStart>2024-09-18T02:10:17.2184868+03:00</PeriodStart> <ReportType>IncomeReport</ReportType> </ReportCreateRequest>
application/x-www-form-urlencoded
Sample:
ReportType=IncomeReport&PeriodStart=9%2F18%2F2024%202%3A10%3A17%20AM&PeriodEnd=9%2F18%2F2024%202%3A10%3A17%20AM
Response Information
Resource Description
Request to generate specified report type for set period.
ApiResultCreateReportName | Description | Type | Additional information |
---|---|---|---|
Payload |
The payload of the response. Type depends on the API request. |
ReportResponse |
None. |
Success |
Indicates if the request was successfull or not.
|
boolean |
Required |
Errors |
Error(s) accociated with the API request. |
Collection of ApiError |
None. |
Response Formats
application/json, text/json
Sample:
{ "Payload": { "ReportId": "9a3a44ce-8106-49e6-a70f-9d6818f4334e" }, "Success": true, "Errors": [ { "Code": 1, "Message": "sample string-2", "Details": "sample string-3" }, { "Code": 1, "Message": "sample string-2", "Details": "sample string-3" } ] }
application/xml, text/xml
Sample:
<ApiResultCreateReport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Sobralaen.Api.Models"> <Errors> <ApiError> <Code>1</Code> <Details>sample string-3</Details> <Message>sample string-2</Message> </ApiError> <ApiError> <Code>1</Code> <Details>sample string-3</Details> <Message>sample string-2</Message> </ApiError> </Errors> <Success>true</Success> <Payload> <ReportId>9a3a44ce-8106-49e6-a70f-9d6818f4334e</ReportId> </Payload> </ApiResultCreateReport>