Get Mobile Crediting Reports

Use these operations to retrieve the following reports:

  • Crediting Log View: This report provides a list of all the Credits you've submitted, within a specific date range.
  • Crediting Outcome: This report provides the state of Credit events, by brand.

Descriptions of the fields found in these reports can be found in the section Response from OpenMarket.

Quick facts

Method

GET

Returns

CSV file

Prerequisites

You must have Mobile Crediting provisioned.

More information

See Overview.

Try It Out

Once you're provisioned with an OpenMarket account, you can try out the operation using cURL.

Making a Request

Definition

The endpoints below identify which report you want to download. You can download one report per request.

Crediting Outcome

GET https://credit-reporting.openmarket.com/csv/outcome?

Crediting Log View

GET https://credit-reporting.openmarket.com/csv/log?

Query parameters

You must encode parameters in request URLs for URL/UTF-8.

Parameter

Description

fromTime

The date and time for the start date of the report period. You must specify the timezone. The format is:

YYYY-MM-DD HH:MM:SS Z

Required: yes

toTime

The date and time of the ending date of the report period. You must specify the timezone. The format is:

YYYY-MM-DD HH:MM:SS Z

Required: yes

brand

The brand that you want a report for. If no brand is supplied, you get the data for all brands linked to the customer account with which you have authenticated.

Required: no

Default: all applicable brands

Header fields

You must provide your authentication details using Basic authentication in the header. For example:

GET /csv/outcome HTTP/1.1
Host: credit-reporting.openmarket.com
Authorization: Basic VXNlcm5hbWU6cGFzc3dvcmQ=

Field

Description

Authorization

Your account ID and password, separated by a colon, and then base64 encoded. Your account ID and password are case-sensitive. For help with Basic authentication see Authenticate with OpenMarket.

Required: Always

Example requests

Log View request

https://credit-reporting.openmarket.com/csv/log?fromTime=2013-09-15%2013:57:00%20UTC&toTime=2013-10-15%2013:57:00%20UTC&brand=MyBrand

Outcome request

https://credit-reporting.openmarket.com/csv/outcome?fromTime=2013-09-15%2013:00:00%20UTC&toTime=2013-10-15%2013:00:00%20UTC&brand=MyBrand

Response from OpenMarket

If your request is accepted then OpenMarket sends a CSV file. You can find details of the report fields here:

Crediting Log View field descriptions

Field

Description

Credit ID

The unique identifier for a credit request. This is a 64-bit unsigned integer returned by OpenMarket for accepted credit requests.

Time (UTC)

The date and time (in UTC) the request was made.

Phone Number

(MSISDN in the CSV file)

The end user's mobile phone number, including the country code.

Network

The name of the mobile operator.

Outcome

The state of the credit transaction:

  • SUCCESS — The credit succeeded.
  • FAILED — The credit failed. This can occur for several reasons, such as the phone number being unrecognised or the number's billing account not accepting credits.

Amount

(Amount and Currency in the CSV)

The amount of the credit. The UI specifies this in the related currency using the standard format for that currency. For example, if the entry is for a credit for £1.50 then the UI will display "£1.50".

The CSV file breaks this down into both amount and currency columns. The amount column shows the amount as a fraction of a pound, such as £1.50 is shown as "1.5". The currency column will show the currency, such as GBP.

Crediting Outcome field descriptions

Field

Description

Brand

The name of the brand.

Amount

(Amount and Currency in the CSV file)

The amount of the credit. The UI specifies this in the related currency using the standard format for that currency. E.g., if the entry is for a credit for £1.50 then the UI will display "£1.50".

The CSV file breaks this down into both amount and currency columns. The amount column shows the amount as a fraction of a pound, e.g. £1.50 is shown as "1.5". The currency column will show the currency, e.g. GBP.

Success

The number of credits that were successful (i.e., have a state of SUCCESS).

Failed

The number of credits that failed. This can occur for a number of reasons including the phone number being unrecognized or the number's billing account not accepting credits.

Credit Applied

The total monetary amount credited during the period. This is shown as a fraction of the pound to four decimal places; e.g. £25.50 is displayed as 25.5000.