Get Postpaid Out Traffic Reports

GET/control-traffic-reports

Returns Postpaid Out Traffic Report in JSON or CSV format.

Max Period is 3 Months.

Supported formats:

  • json
  • csv

Filter Fields:

  • supplierId
  • supplierBriefName
  • supplierExtRefId
  • 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:

  • SUPPLIER_ID
  • SUPPLIER_NAME
  • SUPPLIER_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
  • 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/control-traffic-reports?outputFormat=OUTPUTFORMAT&groupingMode=GROUPINGMODE" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"

Responses

Postpaid Out Traffic Reports

application/json
dataobject[]
Show child attributes
buyPricenumber (double)
countryCode2string
countryIdinteger (int64)
countryNamestring
mccstring
mncstring
operatorIdinteger (int64)
operatorNamestring
outSmsCntinteger (int64)
billingAccountIdinteger (int64)
billingAccountNamestring
billingTzstring
buyCurrencyinteger (int64)
buyCurrencyCodestring
endDtstring (date-time)
startDtstring (date-time)
supplierBriefNamestring
supplierExtRefIdstring
supplierIdinteger (int64)
totalAmountnumber (double)
metaobject
Show child attributes
paginationobjectrequired
Show child attributes
countintegerrequired
currentPageintegerrequired
perPageintegerrequired
totalintegerrequired
totalPagesintegerrequired
Example response
{
  "data": [
    {
      "buyPrice": 0,
      "countryCode2": "string",
      "countryId": 0,
      "countryName": "string",
      "mcc": "string",
      "mnc": "string",
      "operatorId": 0,
      "operatorName": "string",
      "outSmsCnt": 0,
      "billingAccountId": 0,
      "billingAccountName": "string",
      "billingTz": "string",
      "buyCurrency": 0,
      "buyCurrencyCode": "string",
      "endDt": "2026-01-01T12:00:00Z",
      "startDt": "2026-01-01T12:00:00Z",
      "supplierBriefName": "string",
      "supplierExtRefId": "string",
      "supplierId": 0,
      "totalAmount": 0
    }
  ],
  "meta": {
    "pagination": {
      "count": 0,
      "currentPage": 0,
      "perPage": 0,
      "total": 0,
      "totalPages": 0
    }
  }
}
text/csv
Example response
string