Skip to content

Retrieve Detailed Usage Events for a Specific Company

Request

Retrieve detailed usage events for a specific company with filters.

Security
api_key
Query
fromstring, (date-time)required

Start date of the usage data to retrieve, expressed in UTC timezone (format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

untilstring, (date-time)required

End date of the usage data to retrieve, expressed in UTC timezone (format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

departmentsArray of strings

Optional list of department IDs. When provided, only department-scoped usage data for those departments is returned. Company-level usage data is excluded.

afterstring

Cursor for pagination. Indicates that the API should return the Usage details which are immediately after this one in the list (the next page)

maxItemsnumber, [ 1 .. 1000 ]

Maximum number (1 - 1000) of Usage details that might be returned. It is possible that the response contains fewer elements. Default to 100

Default:100
Headers
x-managed-company-idstring

Optional: the ID of the managed company on behalf of which the request is made

curl -i -X GET \
  'https://doc.acc.connect.easypost.eu/_mock/public-api/openapi/usage/details?from=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z&departments=string&after=string&maxItems=100' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-managed-company-id: string'

Responses

Scrollable list of usage events

Bodyapplication/json
itemsArray of anyrequired

Array of usage events for the current page

totalItemsnumberrequired

Total number of items available (without pagination)

Response
{ "items": [ { … } ], "totalItems": 0 }