Get Postpaid Bulk Traffic Reports

GET/customer-traffic-reports

Returns Postpaid Bulk Traffic Report in JSON or CSV format.

Max Period is 3 Months.

Supported formats:

  • json
  • csv

Filter Fields:

  • customerId
  • customerBriefName
  • customerExtRefId
  • billingAccountId
  • billingAccountName
  • countryId
  • countryName
  • operatorId
  • operatorName

Embed Fields (this is only for csv format):

  • countryCode2
  • billingTz

In Case of CSV here is the headers in order:

  • CUSTOMER_ID
  • CUSTOMER_NAME
  • CUSTOMER_REF_ID
  • PRICING_COND_ID
  • PRICING_COND_NAME
  • COUNTRY
  • OPERATOR
  • MCC
  • MNC
  • PRICE_PERIOD
  • SMS_COUNT
  • CURRENCY
  • PRICE
  • AMOUNT
  • COUNTRY_CODE (if countryCode2 is in the embed fields)
  • BILLING_TZ (if billingTz is in the embed fields)

Grouping Mode:

  • day (if day is selected, PRICE_PERIOD will be Replaced with DATE)
  • priceChange (this is the default)

Privilege:

  • bulk-traffic-report-view
  • bulk-traffic-report-own.view
Base URL
https://api-cpaas.sms.es/bulk/traffic-report/v3
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Query parameters

invoiceIdinteger (int64)

Invoice ID

Example: 15
outputFormatstringrequired

Format of the report

Possible values: json, csv · Default: "json"
operator(fieldName)string

Search criteria operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, endswith, contains, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween.

startDatestring (date)

Start date for the report

Example: 2024-01-01
endDatestring (date)

End date for the report

Example: 2024-01-31
groupingModestringrequired

Grouping mode

Possible values: day, priceChange · Default: "priceChange"
embedstring

Comma-separated list of extra fields to include in the result

Example: countryCode2,billingTz

Request example

cURL · cURL
curl -L -X GET "https://api-cpaas.sms.es/bulk/traffic-report/v3/customer-traffic-reports?outputFormat=OUTPUTFORMAT&groupingMode=GROUPINGMODE" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"

Responses

Postpaid Bulk Traffic Reports

application/json
dataobject[]
Show child attributes
countryCode2string
countryIdinteger (int64)
countryNamestring
inSmsCntinteger (int64)
mccstring
mncstring
operatorIdinteger (int64)
operatorNamestring
sellPricenumber (double)
billingAccountIdinteger (int64)
billingAccountNamestring
billingTzstring
customerBriefNamestring
customerExtRefIdstring
customerIdinteger (int64)
endDtstring (date-time)
sellCurrencyinteger (int64)
sellCurrencyCodestring
startDtstring (date-time)
totalAmountnumber (double)
metaobject
Show child attributes
paginationobjectrequired
Show child attributes
countintegerrequired
currentPageintegerrequired
perPageintegerrequired
totalintegerrequired
totalPagesintegerrequired
Example response
{
  "data": [
    {
      "countryCode2": "string",
      "countryId": 0,
      "countryName": "string",
      "inSmsCnt": 0,
      "mcc": "string",
      "mnc": "string",
      "operatorId": 0,
      "operatorName": "string",
      "sellPrice": 0,
      "billingAccountId": 0,
      "billingAccountName": "string",
      "billingTz": "string",
      "customerBriefName": "string",
      "customerExtRefId": "string",
      "customerId": 0,
      "endDt": "2026-01-01T12:00:00Z",
      "sellCurrency": 0,
      "sellCurrencyCode": "string",
      "startDt": "2026-01-01T12:00:00Z",
      "totalAmount": 0
    }
  ],
  "meta": {
    "pagination": {
      "count": 0,
      "currentPage": 0,
      "perPage": 0,
      "total": 0,
      "totalPages": 0
    }
  }
}
text/csv
Example response
string