Business - Account

Each end user on the Movens platform has at least one billing account. Accounts can be prepaid or with per-trip debting.

When prepaid, the user can either top-up the balance via direct payment (if the account is of balance unit “Money”) or can buy minute/trip packages, via Sales.

The base url for the APIs in this page is at:

/api/business-mobile/

A JSON file with OpenAPI data about all business-related mobile APIs can be downloaded here.

Retrieve user account

This API returns the account for the current user.

GET /v1/wallet

Retrieves the wallet status for a user

Status Codes

If there is an error the response will be negative without any further indications.

The response from the API is:

{
  ID: 1234,                               // Int
  CreatedDate: "2001-01-01T01:01:01Z",    // DateTime
  LastUsed: "2021-01-01T01:01:01Z",       // DateTime (nullable)
  TokenBalance: 1,                        // Int
  MinutesBalance: 0,                      // Decimal
  KmBalance: 10                           // Decimal
}

BalanceUnit can be one of the BalanceUnit enumeration.

List transactions on account

GET /v1/wallet/transactions/{daysAgo}

Lists all transaction in period for the user wallet

Parameters
  • daysAgo (integer) –

Status Codes

Lists all transactions on the user’s account for the last daysAgo days.

If there is an error the response will be negative without any further indications.

Response data is like this:

[
  {
    Id: 1,                                           // Int
    CreatedDate: "2001-01-01T01:01:01Z",             // DateTime
    Reference: "2001-01-01T01:01:01Z",               // DateTime
    LastExecutionAttempt: "2001-01-01T01:01:01Z",    // DateTime
    LastExecutionAttemptResult: 3,                   // Int
    IsExecuted: true,                                // Boolean
    TransactionType: 2,                              // enum
    Description: "60' Sale",                         // String
    Fees: 0,                                         // Decimal (nullable)
    Amount: 10,                                      // Decimal
    AdditionalData: "...",                           // String (nullable)
    GrossAmount: 10                                  // Decimal
  },
  ...
]

TransactionType can be one of the TransactionType enumeration. LastExecutionAttemptResult can be one of the PaymentStatuses enumeration; possible values are only Pending, Failed, Expired or Payed.

Get wallet movements

Gets the movement’s paged list for the current user’s wallet

GET /v1/wallet/movements

Gets the list of movements for a specific wallet

Query Parameters
  • filteredTypes (string) – An optional list of movement types to be filtered as integers divided by comma

  • filteredUnit (integer) – An optional integer specifying a balance unit to be filtered

Status Codes

The API accepts the following filters in the query params: * filteredTypes (comma separated list of movement types, as int value, to be extracted) * filteredUnit (single balance unit, as int value, to be extracted)

Returns a Json positive response with the list of movements limited by the page settings:

[
  {
    ID: 5,
    CreatedDate: "2001-01-01T01:00:00Z",
    BalanceUnit: 0,
    MovementType: 0,
    ExecutingUser: "user@test.com",
    TotalAmount: 10,
    Notes: "Some notes"
  },
  { ... }
]

where BalanceUnit and MovementType can be one of the BalanceUnit and MovementType enumeration respectively

Possible errors are:

err_InvalidElement

One of the provided filteredTypes or the provided filteredUnit does not map to any accepted value