> For the complete documentation index, see [llms.txt](https://docs.spurtcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spurtcommerce.com/api-reference/vendor/dashboard/dashboard-analytics.md).

# Dashboard Analytics

Retrieve vendor dashboard metrics and analytics.

## Retrieve Order Graph

> Get /api/vendor/order-graph\
> \
> \*\*Authentication:\*\* Vendor bearer token required for protected operations; verify exact permission decorator in controller.\
> \
> \*\*Feature area:\*\* Order Analytics\
> \
> \*\*Implementation source:\*\* \`src/api/vendor/controllers/VendorController.ts\`\
> \
> \*\*Request example provenance:\*\* Illustrative response envelope only. This route inventory does not include its route-specific @apiSuccessExample; response fields and messages must be verified in the matching controller/service. The example is intended to show the common response-wrapper style, not to define a guaranteed response schema.\
> \
> \*\*Response example provenance:\*\* Illustrative response envelope only. This route inventory does not include its route-specific @apiSuccessExample; response fields and messages must be verified in the matching controller/service. The example is intended to show the common response-wrapper style, not to define a guaranteed response schema.\
> \
> \> \*\*Example status: Illustrative.\*\* The example is included to demonstrate request/response shape in the reference UI; verify the owning controller and request DTO before using it as a contract.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Vendor API","version":"6.0.0"},"tags":[{"name":"Dashboard analytics","description":"Retrieve vendor dashboard metrics and analytics."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste the JWT access token returned by the corresponding login endpoint."}}},"paths":{"/api/vendor/order-graph":{"get":{"operationId":"getApiVendorOrderGraph","summary":"Retrieve Order Graph","description":"Get /api/vendor/order-graph\n\n**Authentication:** Vendor bearer token required for protected operations; verify exact permission decorator in controller.\n\n**Feature area:** Order Analytics\n\n**Implementation source:** `src/api/vendor/controllers/VendorController.ts`\n\n**Request example provenance:** Illustrative response envelope only. This route inventory does not include its route-specific @apiSuccessExample; response fields and messages must be verified in the matching controller/service. The example is intended to show the common response-wrapper style, not to define a guaranteed response schema.\n\n**Response example provenance:** Illustrative response envelope only. This route inventory does not include its route-specific @apiSuccessExample; response fields and messages must be verified in the matching controller/service. The example is intended to show the common response-wrapper style, not to define a guaranteed response schema.\n\n> **Example status: Illustrative.** The example is included to demonstrate request/response shape in the reference UI; verify the owning controller and request DTO before using it as a contract.","tags":["Dashboard analytics"],"parameters":[{"name":"duration","in":"query","required":false,"schema":{"type":"integer"},"description":"Query parameter duration."}],"responses":{"200":{"description":"Successful response. Illustrative response envelope only. This route inventory does not include its route-specific @apiSuccessExample; response fields and messages must be verified in the matching controller/service. The example is intended to show the common response-wrapper style, not to define a guaranteed response schema. Example is illustrative and does not guarantee a stable response contract.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"orderCount":{"type":"integer"},"salesCount":{"type":"integer"}},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"description":"Error response example. Illustrative response envelope only. This route inventory does not include its route-specific @apiSuccessExample; response fields and messages must be verified in the matching controller/service. The example is intended to show the common response-wrapper style, not to define a guaranteed response schema.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}}}}}}}
```

## Retrieve Total Dashboard Counts

> Get /api/vendor/total-dashboard-counts\
> \
> \*\*Authentication:\*\* Vendor bearer token required for protected operations; verify exact permission decorator in controller.\
> \
> \*\*Feature area:\*\* Overview & Metrics\
> \
> \*\*Implementation source:\*\* \`src/api/vendor/controllers/VendorController.ts\`\
> \
> \*\*Request example provenance:\*\* Exact API comment example.\
> \
> \*\*Response example provenance:\*\* Exact API comment example.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Vendor API","version":"6.0.0"},"tags":[{"name":"Dashboard analytics","description":"Retrieve vendor dashboard metrics and analytics."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste the JWT access token returned by the corresponding login endpoint."}}},"paths":{"/api/vendor/total-dashboard-counts":{"get":{"operationId":"getApiVendorTotalDashboardCounts","summary":"Retrieve Total Dashboard Counts","description":"Get /api/vendor/total-dashboard-counts\n\n**Authentication:** Vendor bearer token required for protected operations; verify exact permission decorator in controller.\n\n**Feature area:** Overview & Metrics\n\n**Implementation source:** `src/api/vendor/controllers/VendorController.ts`\n\n**Request example provenance:** Exact API comment example.\n\n**Response example provenance:** Exact API comment example.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Dashboard analytics"],"responses":{"200":{"description":"Successful response. Exact API comment example.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"inActiveVendorProductList":{"type":"integer"},"activeProductCount":{"type":"integer"},"totalProductCount":{"type":"integer"},"totalOrderCount":{"type":"integer"},"salesCount":{"type":"integer"},"revenue":{"type":"integer"}},"additionalProperties":true}},"additionalProperties":true}}}},"500":{"description":"Error response example. Exact API comment example.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}}}}}}}
```
