Before using Data Gifting API you will first need to obtain a security token. To secure our API we use OAuth2 with password flow for all endpoints. Authorization header must always contain a Bearer token obtained using tokenURL.
## **Obtaining token URL for authorization**
|**client_id**||Name of the client||string|
|**grant_type**||Name of the flow: 'password' when obtaining a token using username and password, 'refresh_token' when refreshing an existing token||string|
|**username**||Your username, required when obtaining tokens via password flow.||string|
|**password**||Your password, required when obtaining tokens via password flow.||string|
|**refresh_token**||Your refresh token, required when obtaining tokens via refresh token flow.||string|
Once you have acquired the Bearer token you can use the following instructions to assign Data Gifting
## Assigning data
Once the data has been assigned you can use the following GET requests to check on the services, balance and transactions.
## Get transactions
Get a list of all data transactions for the given service key and msisdn. MSISDN is not required, in which case all transactions associated with the service are returned.
## Get Services
Get all services and packages for the merchant. If invoked via API Gateway, merchantId is not passed, but is read from Keycloak token.
## Get Balance
Get current state of all Service data pools associated with the given service key and operator (totalAmount, assignedAmount, expirationDate).