Simulate Subscription Usage

To test usage notifications, simulate usage on any active test subscription.

curl --request "POST" \
  --url https://api.gigs.com/testing/projects/${GIGS_PROJECT}/subscriptions/${SUBSCRIPTION_ID}/usage \
  --header "Accept: application/json" \
  --header "Authorization: Bearer ${GIGS_TOKEN}" \
  --header "Content-Type: application/json" \
  --data '{
    "data": 18883100,
    "voice": 240,
    "sms": 15,
    "country": "US"
  }'

In the request body you can pass data used in bytes, voice usage in seconds, sms sent and received or country. The country refers to the country code to assign to the simulated usage. If not provided, the usage will be assigned to the home country of the provider.

The response contains the subscriptions' daily aggregated usage for the requested country. To see the full list of usages, list the usages instead.

{
  "object": "usageRecord",
  "data": 18883100,
  "end": "2021-02-15T00:00:00Z",
  "labels": {
    "country": "US",
    "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
  },
  "sms": 15,
  "start": "2021-02-14T00:00:00Z",
  "voice": 240
}