Difference between revisions of "Glass America Omega Dashboard Details"
Ashley DeBon (talk | contribs) (→Get Glass America Sale Item Dashboard Details) |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 49: | Line 49: | ||
| salesman_4_id || string || No || Filter by salesman | | salesman_4_id || string || No || Filter by salesman | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/glass-america/sale-items/omega-dashboard-details' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "from_date": "YYYY-MM-DD", "to_date": "YYYY-MM-DD", "user": "", "date_type": "", "location_id": "", "territory_id": "", "salesman_4_id": "" }' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/glass-america/sale-items/omega-dashboard-details' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "from_date": "YYYY-MM-DD", "to_date": "YYYY-MM-DD", "user": "", "date_type": "", "location_id": "", "territory_id": "", "salesman_4_id": "" }' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 14:31, 21 July 2026
Contents
Mobile_API » Get Glass America Sale Item Dashboard Details
Base URL
https://apimobile.callproof.com
Endpoint
/api/glass-america/sale-items/omega-dashboard-details
Purpose
Retrieves Omega dashboard sales metrics for Glass America for a given date range, including net sales, total sales, average sales, gross margin, and sales by category. Optional filters (user, location, territory, salesman, date type) can be applied.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| from_date | date/string | Yes | Start date for the sales report |
| to_date | date/string | Yes | End date for the sales report |
| user | string | No | Filter by user |
| date_type | string | No | Date type filter for the Omega report |
| location_id | string | No | Filter by location |
| territory_id | string | No | Filter by territory |
| salesman_4_id | string | No | Filter by salesman |
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/glass-america/sale-items/omega-dashboard-details' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "from_date": "YYYY-MM-DD", "to_date": "YYYY-MM-DD", "user": "", "date_type": "", "location_id": "", "territory_id": "", "salesman_4_id": "" }'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/glass-america/sale-items/omega-dashboard-details' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "from_date": "YYYY-MM-DD", "to_date": "YYYY-MM-DD", "user": "", "date_type": "", "location_id": "", "territory_id": "", "salesman_4_id": "" }'
Successful Response (200)
Returns aggregated sales metrics and day-by-day series for the requested range.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| data | object | Dashboard sales payload |
| uri | string | Requested resource URI |
data
| Field | Type | Description |
|---|---|---|
| total_net_sales_count | string | Net sales total formatted with 2 decimal places (for display) |
| total_net_sales | number | Net sales total (numeric) |
| net_sales | object | Day-by-day net sales series grouped by source series keys |
| total_sales_count | number | Total sales count/sum used for averages |
| total_sales | object | Day-by-day total sales series |
| average_sales | number | Average sale amount (net sales ÷ total sales count), rounded to 2 decimals |
| total_gross_margin | number | Total gross margin amount |
| gross_margin | object | Day-by-day gross margin series |
| net_gross_margin | number | Gross margin as a percentage of net sales (0 when net sales is 0) |
| sales_by_category | object | Sales totals keyed by category name (lowercase, spaces replaced with underscores) |
data series format (net_sales / total_sales / gross_margin)
Each series value is an array of daily points:
| Field | Type | Description |
|---|---|---|
| [0] | string | Date in Y-m-d format
|
| [1] | number | Metric value for that date (0 when no data) |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – dashboard sale details could not be retrieved |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing or invalid
from_date/to_date. - 400 – Upstream Omega dashboard error or another failure while loading sale item details.
- 401 – Authentication failed or the access token is missing/expired.