UserHistory-GetHistory-v2: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
 
(15 intermediate revisions by 2 users not shown)
Line 8: Line 8:
}}
}}


The <code>/v2/UserHistory/GetHistory</code> API endpoint is used to query the transaction history from the Barion system.
The <code>/v2/UserHistory/GetHistory</code> API endpoint is used to query the transaction history from the Barion system for the authenticated wallet.
 
Prerequisites before use:
* [[Creating_an_account|Creating an account in Barion]]
* [[Calling_the_API|Calling the Barion API]]
 
{{NotificationBox|title=IMPORTANT|text=This API should not be used for reconciliation, use the [[Statement-Download-v2 | statement API]] instead.|color=#FF7A3D}}
{{NotificationBox|title=IMPORTANT|text=The item type of history elements does not correlate with the type of transactions exported through GUI or downloaded with[[Statement-Download-v2 | statement API]].|color=#FF7A3D}}
 
== Authentication ==
 
[[Barion Wallet Authentication]]


== Input properties ==
== Input properties ==
Line 19: Line 30:
* Optional
* Optional
  ||  
  ||  
The identifier of the most recent transaction.
The identifier of the oldest transaction. Only transactions before the defined transaction will be included in the response.
|-
|-


Line 26: Line 37:
*Universal Time Coordinated (UTC)
*Universal Time Coordinated (UTC)
||  
||  
The exact time of the last request.
The exact time of the last request. Only transactions after the defined request time will be included in the response.
|-
|-


| Limit || number ||  
| Limit || int ||  
* Optional
* Optional
* If not defined the default value is 20
* If not defined the default value is 20
Line 40: Line 51:
* Optional
* Optional
* Required length: 3 characters
* Required length: 3 characters
* Must be supplied in ISO 4217 format
Accepted values:  
Accepted values:  
{{CurrencyList}}
{{CurrencyList}}
|| The currency of the payment. Must be supplied in ISO 4217 format. This affects all transactions included in the payment; it is not possible to define multiple transactions in different currencies.
|| The currency of the transaction. If the currency is defined, then only transactions in the same currency will be included in the response.


|-
|-


|}
|}


== Output properties ==
== Output properties ==
Line 59: Line 69:
|-
|-


| Type || [[TransactionType]] || The type of the transaction.
| Type || [[HistoryItemType]] || The type of the transaction.


|-
|-
Line 71: Line 81:
|-
|-


| SourceAccount || [[UserHistoryAccount]] || The user who initiated the transaction or from whom the money originated.
| SourceAccount || [[UserHistoryParticipant]] || The user who initiated the transaction or from whom the money originated.


|-
|-


| TargetAccount || [[UserHistoryAccount]] || The user who will receive the amount of the transaction.
| TargetAccount || [[UserHistoryParticipant]] || The user who will receive the amount of the transaction.


|-
|-
Line 87: Line 97:
|-
|-


| Description || string || Description of the transaction. Max:640 characters.
| Description || string || Description of the transaction. Max: 640 characters.


|-
|-

Latest revision as of 13:44, 21 March 2023

Barion API: transaction history

GET /v2/UserHistory/GetHistory

The /v2/UserHistory/GetHistory API endpoint is used to query the transaction history from the Barion system for the authenticated wallet.

Prerequisites before use:

IMPORTANT
This API should not be used for reconciliation, use the statement API instead.
IMPORTANT
The item type of history elements does not correlate with the type of transactions exported through GUI or downloaded with statement API.

Authentication

Barion Wallet Authentication

Input properties

The input properties should be defined in the query string.

Property name Property type Limitations and constraints Description
LastVisibleItemId Guid
  • Optional

The identifier of the oldest transaction. Only transactions before the defined transaction will be included in the response.

LastRequestTime DateTime
  • Optional
  • Universal Time Coordinated (UTC)

The exact time of the last request. Only transactions after the defined request time will be included in the response.

Limit int
  • Optional
  • If not defined the default value is 20
  • If the defined value is greater than 20 the default value will be used

The expected number of transactions in the response.

Currency string
  • Optional
  • Required length: 3 characters
  • Must be supplied in ISO 4217 format

Accepted values:

  • "CZK" (Czech crown)
  • "EUR" (Euro)
  • "HUF" (Hungarian forint)
  • "USD" (U.S. dollar)
The currency of the transaction. If the currency is defined, then only transactions in the same currency will be included in the response.

Output properties

Property name Property type Description
Id Guid The identifier of the transaction.
Type HistoryItemType The type of the transaction.
HappenedAtUtc DateTime The exact time when the transaction happened.
ConcurrencyOrder int The order of the transaction when more than one transaction happened at the same time. The default value is 0.
SourceAccount UserHistoryParticipant The user who initiated the transaction or from whom the money originated.
TargetAccount UserHistoryParticipant The user who will receive the amount of the transaction.
Amount decimal The amount of the transaction.
Currency string The 3-character ISO 4217 currency code of the payment.
Description string Description of the transaction. Max: 640 characters.
IsInProgress bool This flag indicates that the transaction is not in the final state.