Business - Users
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 here
.
Get single payment data
Gets the data of a specified payment
- GET /v1/payments/{id}
Retrieves data on a single payment
- Parameters
id (integer) – The payment ID
- Status Codes
200 OK – Success
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 PaymentTypes enumeration.
The property Status
can assume values among the one defined in the PaymentStatuses enumeration.
The property CostType
can assume values among the one defined in the 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 Paged List APIs) of the payments still to be payed
- GET /v1/payments/to-pay
Gets a list of payments for a user to be payed
- Query Parameters
types (string) – An optional list of payments type
- Status Codes
200 OK – Success
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 PaymentTypes enumeration.
The property Status
can assume values among the one defined in the PaymentStatuses enumeration, and is always either
to be payed or failed.
The property CostType
can assume values among the one defined in the 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 Paged List APIs) of the executed payments
- GET /v1/payments/executed
Gets a list of already executed payments for a user
- Query Parameters
types (string) – An optional list of payments type
- Status Codes
200 OK – Success
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 PaymentTypes enumeration.
The property Status
can assume values among the one defined in the PaymentStatuses 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 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
- POST /v1/payments/pay/{paymentId}
Executes real-time the selected payment
- Parameters
paymentId (integer) – The payment to be executed
- Status Codes
200 OK – Success
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 Paged List APIs) of a payment’s transaction attempts
- GET /v1/payments/{id}/attempts
Retrieves every payment attempt for a single payment
- Parameters
id (integer) – The payment ID
- Status Codes
200 OK – Success
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 PaymentTypes enumeration.
The property TransactionType
can assume values among the one defined in the TransactionType enumeration.
Get user’s transaction attempts
Gets the paged list (see Paged List APIs) of all the transaction attempts made on the uers’s payments
- GET /v1/payments/attempt-history
Retrieves the payment attempt history for the current user
- Status Codes
200 OK – Success
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
},
{ ... }
]