# Dashboard

## Get chart data

> Fetches chart data for visualization.

```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."},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/chart/":{"get":{"summary":"Get chart data","description":"Fetches chart data for visualization.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved chart data.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"count":{"type":"integer","description":"Count of orders."},"time":{"type":"string","description":"Time representation for the chart. Hour of the day."}}}}}}}}}}}}
```

## Get top cities

> Retrieves a list of cities with the highest order volumes.

```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."},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/top_cities/":{"get":{"summary":"Get top cities","description":"Retrieves a list of cities with the highest order volumes.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved top cities.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"City name."},"item_count":{"type":"integer","description":"Number of items sold in the city."},"city_count":{"type":"integer","description":"Number of orders in the city."},"price":{"type":"number","format":"float","description":"Total sales amount for the city."}}}}}}}}}}}}
```

## Get top categories

> Retrieves a list of top-selling categories.

```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."},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/top_categories/":{"get":{"summary":"Get top categories","description":"Retrieves a list of top-selling categories.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved top categories.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","description":"ProductCategory ID."},"name":{"type":"string","description":"Category name."},"item_count":{"type":"integer","description":"Total number of sales for the category."},"price":{"type":"number","format":"float","description":"Total sales amount for the category."}}}}}}}}}}}}
```

## Get product details

> Retrieves total product count and stock for the given channel.

```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"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/":{"get":{"summary":"Get product details","description":"Retrieves total product count and stock for the given channel.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved product details.","content":{"application/json":{"schema":{"type":"object","properties":{"total_product_count":{"type":"integer"},"total_product_stocks":{"type":"integer"}}}}}}}}}}}
```

## Get products sales data.

> Fetches a list of products sale data for a given period.

```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."},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/orders_by_product/":{"get":{"summary":"Get products sales data.","description":"Fetches a list of products sale data for a given period.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved products sale data.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sold":{"type":"integer","description":"Total number of products sold."},"total":{"type":"number","format":"float","description":"Total sales amount."},"stock":{"type":"integer","description":"Total stock."},"base_code":{"type":"string","description":"Product base code."},"sku":{"type":"string","description":"Product SKU."},"name":{"type":"string","description":"Product name."},"channel":{"type":"string","description":"Channel name."}}}}}}}}}}}}
```

## Get top products

> Fetches a list of top products based on sales or quantity.

```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."},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/top_products/":{"get":{"summary":"Get top products","description":"Fetches a list of top products based on sales or quantity.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved top products.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"orderitem__product":{"type":"integer","description":"Product ID."},"product_count":{"type":"integer","description":"Total quantity sold."},"price":{"type":"number","format":"float","description":"Total sales amount."},"name":{"type":"string","description":"Product name."}}}}}}}}}}}}
```

## Get overall data

> Fetches overall dashboard data such as turnover, sales, and refunds.

```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."},"channel":{"name":"channel","in":"query","description":"ID of the channel the customer belongs to","required":false,"schema":{"type":"integer"}},"payment_option_slug":{"name":"payment_option_slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by payment option slug."}}},"paths":{"/api/v1/dashboard/overall_data/":{"get":{"summary":"Get overall data","description":"Fetches overall dashboard data such as turnover, sales, and refunds.","tags":["Dashboard"],"parameters":[{"$ref":"#/components/parameters/start_date","required":true},{"$ref":"#/components/parameters/end_date","required":true},{"$ref":"#/components/parameters/channel","required":true},{"$ref":"#/components/parameters/payment_option_slug"}],"responses":{"200":{"description":"Successfully retrieved overall data.","content":{"application/json":{"schema":{"type":"object","properties":{"turnover":{"type":"number","format":"float"},"total_order_quantity":{"type":"integer"},"total_orderitem_quantity":{"type":"integer"},"average_sale_price":{"type":"number","format":"float"},"average_basket_price":{"type":"number","format":"float"},"total_shipping_amount":{"type":"number","format":"float"},"total_discount":{"type":"number","format":"float"},"updated_at":{"type":"string","format":"date-time"},"total_sale_amount":{"type":"number","format":"float"},"total_refund_amount":{"type":"number","format":"float"},"total_cancel_amount":{"type":"number","format":"float"},"total_cancel_quantity":{"type":"integer"},"total_refund_quantity":{"type":"integer"},"currency_type":{"type":"string","enum":["TL","EUR","USD","EGP","GBP","MAD","PLN","SAR","RON","UAH","CZK","HUF","RUB","BGN","IQD","KWD","BHD","OMR","QAR","AED","NGN","INR","LEI","KZT","JOD","RSD"]}}}}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://apidocs.akinon.com/omnitron-openapis/dashboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
