Skip to content

Get customer

Get customer usage statitstic

URL: GET https://api.scriptix.io/api/v3/reseller/customer/{Id}/usage

Request headers

The following headers need to be present

Parameter Value Description
x-zoom-s2t-key Scriptix Reseller API Token API key of type Reseller needed for authorization

Request path arguments

Argument Description
Id ID of customer

Request query parameters

Argument Type Description
limit integer >= 1 <= 1000 Default: 10

(Optional) Limit the number of objects to return
offset integer >= 0 Default: 0

Sets the offset of all items to return. Mostly combined with limit
view string Default: invoice

Enum: invoice, day, week, month, year`. Show usage by period or invoice
split_by string (Optional) Enum: language, token, subscription, period. Split the results of different axes. For invoice view period can be used. Others can be used for periodic views.

Responses

Status code Description
200 Overview of usage
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Server Error

HTTP 200 OK

Content-type: application/json

Response: APIResultResponse<ResellerCustomerUsage>

JSON Response (split by week)

{
    "result": [
        {
            "units_used": 5926,
            "usage_period_start": "2020-12-22",
            "usage_period_end": "2020-12-24",
            "language": "fr-fr",
            "token_name": "TV",
            "subscription_id": 1414
        }
    ],
    "count": 1,
    "total_results": 1
}

JSON Response (split by invoice)

{
    "result": [
        {
            "usage_period_start": "2020-12-01",
            "usage_period_end": "2021-01-01",
            "units_used": 840000,
            "cost": 10000.01,
            "subscription_id": 1182
        }
    ],
    "count": 1,
    "total_results": 1
}