> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/omnitron-openapis/reporting.md).

# Reporting

## GET /reporting/{id}/download/

> Download a report file

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"410":{"description":"The requested resource is no longer available."},"500":{"description":"Server Error"}}},"paths":{"/reporting/{id}/download/":{"get":{"summary":"Download a report file","tags":["Reporting"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Successful response, returns the report file","content":{"text/csv":{"schema":{"type":"string","format":"binary"}},"application/vnd.ms-excel":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"410":{"$ref":"#/components/responses/410"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## GET /reporting/remote/{channel\_id}/customer/

> Request a remote customer report

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"channel_path":{"name":"channel_id","in":"path","description":"The channel ID of the resource.","required":true,"schema":{"type":"integer"}},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"start_date":{"name":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start date for the data range."},"end_date":{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End date for the data range."},"email_allowed":{"name":"email_allowed","in":"query","description":"Indicates if the customer allows receiving emails","required":false,"schema":{"type":"boolean"}},"sms_allowed":{"name":"sms_allowed","in":"query","description":"Indicates if the customer allows receiving SMS","required":false,"schema":{"type":"boolean"}},"call_allowed":{"name":"call_allowed","in":"query","description":"Indicates if the customer allows receiving calls","required":false,"schema":{"type":"boolean"}},"export_format":{"name":"export_format","in":"query","description":"Export format for the report","required":false,"schema":{"type":"string","enum":["csv","xls"],"default":"csv"}}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"406":{"description":"A custom 406 error occurs due to different validation failures in viewset or service level, such as uniqueness checks or other service-related exceptions.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Detailed message of the 406 error."}}}}}},"500":{"description":"Server Error"}}},"paths":{"/reporting/remote/{channel_id}/customer/":{"get":{"summary":"Request a remote customer report","tags":["Reporting"],"parameters":[{"$ref":"#/components/parameters/channel_path"},{"$ref":"#/components/parameters/channel"},{"$ref":"#/components/parameters/start_date"},{"$ref":"#/components/parameters/end_date"},{"$ref":"#/components/parameters/email_allowed"},{"$ref":"#/components/parameters/sms_allowed"},{"$ref":"#/components/parameters/call_allowed"},{"$ref":"#/components/parameters/export_format"}],"responses":{"200":{"description":"Report request received","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## GET /reporting/sales/

> Request a sales report

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"start_date":{"name":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start date for the data range."},"end_date":{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End date for the data range."},"product__sku":{"name":"product__sku","in":"query","description":"Filter by SKU.","required":false,"schema":{"type":"string"}},"product__base_code":{"name":"product__base_code","in":"query","description":"Filter by base code.","required":false,"schema":{"type":"string"}},"export_format":{"name":"export_format","in":"query","description":"Export format for the report","required":false,"schema":{"type":"string","enum":["csv","xls"],"default":"csv"}}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"406":{"description":"A custom 406 error occurs due to different validation failures in viewset or service level, such as uniqueness checks or other service-related exceptions.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Detailed message of the 406 error."}}}}}},"500":{"description":"Server Error"}}},"paths":{"/reporting/sales/":{"get":{"summary":"Request a sales report","tags":["Reporting"],"parameters":[{"in":"query","name":"order__channel","schema":{"type":"integer"},"required":false},{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/product__sku"},{"$ref":"#/components/parameters/product__base_code"},{"$ref":"#/components/parameters/export_format"}],"responses":{"200":{"description":"Report request received","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## GET /reporting/order/

> Request an order report

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"cancel_status":{"name":"cancel_status","in":"query","description":"Filter by cancel status","required":false,"schema":{"type":"string","enum":["waiting","confirmation_waiting","confirmed","approved","rejected","waiting_for_payment","manuel_refund_need","completed"]}},"start_date":{"name":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start date for the data range."},"end_date":{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End date for the data range."},"export_format":{"name":"export_format","in":"query","description":"Export format for the report","required":false,"schema":{"type":"string","enum":["csv","xls"],"default":"csv"}}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"406":{"description":"A custom 406 error occurs due to different validation failures in viewset or service level, such as uniqueness checks or other service-related exceptions.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Detailed message of the 406 error."}}}}}},"500":{"description":"Server Error"}}},"paths":{"/reporting/order/":{"get":{"summary":"Request an order report","tags":["Reporting"],"parameters":[{"$ref":"#/components/parameters/channel"},{"$ref":"#/components/parameters/cancel_status"},{"$ref":"#/components/parameters/start_date"},{"$ref":"#/components/parameters/end_date"},{"$ref":"#/components/parameters/export_format"}],"responses":{"200":{"description":"Report request received","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/omnitron-openapis/reporting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
