Docs menu
GET
/addons/route-optimization/usage
Monthly usage of the API-key client
Jobs that ended SUCCEEDED or PARTIAL and their optimised (billable) orders, per Asia/Ho_Chi_Minh month and key environment. Only the client of the API key is ever reported.
Path
GET
/api/v1/partners/addons/route-optimization/usageAuthentication required
api-keycurl example
curl -X GET "https://api.route4green.com/api/v1/partners/addons/route-optimization/usage" \
-H "api-key: YOUR_API_KEY"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | string | No | First month of the range (YYYY-MM, Asia/Ho_Chi_Minh), inclusive; defaults to `to` |
| to | query | string | No | Last month of the range (YYYY-MM, Asia/Ho_Chi_Minh), inclusive; defaults to the current month. The range may span at most 12 months |
| environment | query | sandbox | production | measurement | No | Only count jobs submitted with keys of this environment |
Request body
This endpoint takes no request body.
Responses
200Usage summary wrapped in the success envelope; read it at data400ROUTE_OPT_USAGE_RANGE_INVALID (from after to, or more than 12 months) or a validation error on the month format or environment401ROUTE_OPT_API_KEY_REQUIRED403ROUTE_OPT_NOT_ENABLED