Skip to content

Usage

Entity representing usage data within a Company.

Retrieve Usage Data for a Specific Company

Request

Retrieve usage data 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.

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?from=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z&departments=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-managed-company-id: string'

Responses

Bodyapplication/json
companyIdstringrequired

Company identifier

periodobject(UsagePeriod)required

Period of usage data

usageobject(Usage)required

Channel and Addon usage count

Response
{ "companyId": "string", "period": { "from": "string", "until": "string" }, "usage": { "channels": [ … ], "additionalFeatures": [ … ] } }