Skip to main content
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/usage
Authentication requiredapi-key

curl example

curl -X GET "https://api.route4green.com/api/v1/partners/addons/route-optimization/usage" \
  -H "api-key: YOUR_API_KEY"

Parameters

NameInTypeRequiredDescription
fromquerystringNoFirst month of the range (YYYY-MM, Asia/Ho_Chi_Minh), inclusive; defaults to `to`
toquerystringNoLast month of the range (YYYY-MM, Asia/Ho_Chi_Minh), inclusive; defaults to the current month. The range may span at most 12 months
environmentquerysandbox | production | measurementNoOnly 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 data
400ROUTE_OPT_USAGE_RANGE_INVALID (from after to, or more than 12 months) or a validation error on the month format or environment
401ROUTE_OPT_API_KEY_REQUIRED
403ROUTE_OPT_NOT_ENABLED

Back to group: Route optimisation

GET /addons/route-optimization/usage | Route4Green