Business - Users ================ .. Last update: 15/02/2022 The Admin interface handles web service calls from the Mobile web gui. The base url for this is at:: /api/business-mobile A JSON file with OpenAPI data about all business-related mobile app can be downloaded :download:`here `. Get single payment data ----------------------- Gets the data of a specified payment .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/payments/{id} | id: Payment id The API responds with a plain error, or with the following format:: { ID: 1, // Int Type: 0, // Int Status: 0, // Int Amount: 12.3, // Decimal CreatedDate: "2021-01-01T05:00:00Z", // Date LastExecutionAttempt: "2021-01-01 06:00:00", // Date (nullable) LastExecutedBy: "Administrator", // String (nullable) Note: "Notes on the payment", // String ExtUserGuid: "1414dec6-31a1-403d-a426-446147e807b2", // Guid ExtUser: "User Name", // String TripGuid: "be9896c4-8feb-4daa-aa3a-0170a8702b18", // Guid (nullable) StartLocationName: "Milan", // String (nullable) StartTimestamp: "2021-01-01 06:00:00:", // Date (nullable) EndLocationName: "Milan", // String (nullable) EndTimestamp: "2021-01+01 06:00:00", // Date (nullable) CostType: 0, // Int (nullable) CostLabel: "Speed Fine", // String (nullable) ArticleID: 3, // Int (nullable) ArticleQuantity: 1, // Int (nullable) ArticleLabels: Article Name" // String (nullable) } The property ``Type`` can assume values among the one defined in the :ref:`enum-paymenttype` enumeration. The property ``Status`` can assume values among the one defined in the :ref:`enum-paymentstatus` enumeration. The property ``CostType`` can assume values among the one defined in the :ref:`enum-additionalcosttypes` enumeration. The trip related properties (guid, location names and timestamp) are valorized only if the ``Type`` property is either TripPayment, Fine or AdditionalCost. The cost related properties (type and label) are valorized only if the ``Type`` property is either Fine or AdditionalCost. The article related properties (ID, quantity and labels) are valorized only if if the ``Type`` property is ArticlePurchase. Get payments to be payed ------------------------ Gets the paged list (see :ref:`paged-list-api`) of the payments still to be payed .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/payments/to-pay The API accepts the following filters in the query params: * types (comma separated list of payment types, as int value, to be extracted) and responds with a plain error, or with the following format:: [ { ID: 1, // Int Type: 0, // Int Status: 0, // Int Amount: 12.3, // Decimal CreatedDate: "2021-01-01T05:00:00Z", // Date LastExecutionAttempt: "2021-01-01 06:00:00", // Date (nullable) LastExecutedBy: "Administrator", // String (nullable) Note: "Notes on the payment", // String ExtUserGuid: "1414dec6-31a1-403d-a426-446147e807b2", // Guid ExtUser: "User Name", // String TripGuid: "be9896c4-8feb-4daa-aa3a-0170a8702b18", // Guid (nullable) StartLocationName: "Milan", // String (nullable) StartTimestamp: "2021-01-01 06:00:00:", // Date (nullable) EndLocationName: "Milan", // String (nullable) EndTimestamp: "2021-01+01 06:00:00", // Date (nullable) CostType: 0, // Int (nullable) CostLabel: "Speed Fine", // String (nullable) ArticleID: 3, // Int (nullable) ArticleQuantity: 1, // Int (nullable) ArticleLabels: Article Name" // String (nullable) }, { ... } ] The property ``Type`` can assume values among the one defined in the :ref:`enum-paymenttype` enumeration. The property ``Status`` can assume values among the one defined in the :ref:`enum-paymentstatus` enumeration, and is always either to be payed or failed. The property ``CostType`` can assume values among the one defined in the :ref:`enum-additionalcosttypes` enumeration. The trip related properties (guid, location names and timestamp) are valorized only if the ``Type`` property is either TripPayment, Fine or AdditionalCost. The cost related properties (type and label) are valorized only if the ``Type`` property is either Fine or AdditionalCost. The article related properties (ID, quantity and labels) are valorized only if if the ``Type`` property is ArticlePurchase. Get executed payments --------------------- Gets the paged list (see :ref:`paged-list-api`) of the executed payments .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/payments/executed The API accepts the following filters in the query params: * types (comma separated list of payment types, as int value, to be extracted) and responds with a plain error, or with the following format:: [ { ID: 1, // Int Type: 0, // Int Status: 4, // Int Amount: 12.3, // Decimal CreatedDate: "2021-01-01T05:00:00Z", // Date LastExecutionAttempt: "2021-01-01 06:00:00", // Date (nullable) LastExecutedBy: "Administrator", // String (nullable) Note: "Notes on the payment", // String ExtUserGuid: "1414dec6-31a1-403d-a426-446147e807b2", // Guid ExtUser: "User Name", // String TripGuid: "be9896c4-8feb-4daa-aa3a-0170a8702b18", // Guid (nullable) StartLocationName: "Milan", // String (nullable) StartTimestamp: "2021-01-01 06:00:00:", // Date (nullable) EndLocationName: "Milan", // String (nullable) EndTimestamp: "2021-01+01 06:00:00", // Date (nullable) CostType: 0, // Int (nullable) CostLabel: "Speed Fine", // String (nullable) ArticleID: 3, // Int (nullable) ArticleQuantity: 1, // Int (nullable) ArticleLabels: Article Name" // String (nullable) }, { ... } ] The property ``Type`` can assume values among the one defined in the :ref:`enum-paymenttype` enumeration. The property ``Status`` can assume values among the one defined in the :ref:`enum-paymentstatus` enumeration, and is always either payed, failed, on hold by system or on hold by operator. The property ``CostType`` can assume values among the one defined in the :ref:`enum-additionalcosttypes` enumeration. The trip related properties (guid, location names and timestamp) are valorized only if the ``Type`` property is either TripPayment, Fine or AdditionalCost. The cost related properties (type and label) are valorized only if the ``Type`` property is either Fine or AdditionalCost. The article related properties (ID, quantity and labels) are valorized only if if the ``Type`` property is ArticlePurchase. Execute payment --------------- Allows the user to request the execution of a payment without waiting for the nightly payment execution .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/payments/pay/{paymentId} No request body or specific answer is expected. The API will return OK if the transaction was correctly executed or one of the following errors: ``err_CannotExecute`` Validation errors occurred in the Movens platform or in the payment gateway platform Get a payment's transaction attempts ------------------------------------ Gets the paged list (see :ref:`paged-list-api`) of a payment's transaction attempts .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/payments/{id}/attempts | id: Payment id The API responds with a plain error, or with the following format:: [ { LastExecutionAttempt: "2021-01-01 06:00:00", // Date LastExecutionAttemptResult: true, // Boolean ExecutedBy: "Administrator", // String PaymentType: 0, // Int TransactionType: 0, // Int PaymentDescription: "...", // String (nullable) PayedAmount: 12.3 // Decimal }, { ... } ] The property ``PaymentType`` can assume values among the one defined in the :ref:`enum-paymenttype` enumeration. The property ``TransactionType`` can assume values among the one defined in the :ref:`enum-transactiontype` enumeration. Get user's transaction attempts ------------------------------- Gets the paged list (see :ref:`paged-list-api`) of all the transaction attempts made on the uers's payments .. openapi:: /openapi/srv-business-base/api-src-WebMobile.json :paths: /v1/payments/attempt-history The API responds with a plain error, or with the following format:: [ { LastExecutionAttempt: "2021-01-01 06:00:00", // Date LastExecutionAttemptResult: true, // Boolean ExecutedBy: "Administrator", // String PaymentType: 0, // Int TransactionType: 0, // Int PaymentDescription: "...", // String (nullable) PayedAmount: 12.3 // Decimal }, { ... } ]