Business - Account ================== .. Last update: 04/03/2022 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 :download:`here `. Retrieve user account --------------------- This API returns the account for the current user. .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/wallet 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 :ref:`enum-balanceunit` enumeration. List transactions on account ---------------------------- .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/wallet/transactions/{daysAgo} 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 :ref:`enum-transactiontype` enumeration. ``LastExecutionAttemptResult`` can be one of the :ref:`enum-paymentstatus` enumeration; possible values are only Pending, Failed, Expired or Payed. Get wallet movements -------------------- Gets the movement's :ref:`paged list` for the current user's wallet .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/wallet/movements 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 :ref:`enum-balanceunit` and :ref:`enum-movementtype` enumeration respectively Possible errors are: ``err_InvalidElement`` One of the provided filteredTypes or the provided filteredUnit does not map to any accepted value