Restrictions
Request URL
GET /restrictions
Description
List all the restrictions related to transactions by the current user.
Snippet Examples
javascript
const axios = require('axios');
const config = {
method: 'GET',
url: '${AMPLIFI_BASE_URL}/restrictions',
headers: {
'token': "A long random string token received from /token request"
},
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "AMPLIFI_BASE_URL/restrictions" --header "token: A long random string token received from /token request"
Successful Response Examples
200 LIST ALL THE RESTRICTIONS IN JSON.
HEADERS
Header | Value |
---|---|
token | A long random string token received from /token request |
REQUEST BODY
RESPONSE BODY
{
"restrictions": [
{
"restrictionName": "disable all",
"description": "This transaction is disabled",
"txnTypes": [
"*"
],
"isAllowed": false,
"priority": 0
},
{
"restrictionName": "enable wires and ACH",
"txnTypes": [
"USA",
"USA_wire"
],
"transactionCurrencies": [
"USD"
],
"isAllowed": true,
"priority": 0
},
{
"restrictionName": "no transactions less than a cent",
"description": "Transaction amount can not be smaller than a single cent",
"toAmount": 0.01,
"toAmountCurrency": "USD",
"isAllowed": false,
"isIgnoreRest": true,
"priority": 0
},
{
"restrictionName": "no transactions more than a thousand",
"description": "Transaction amount exceeds the $1000 limit",
"fromAmount": 1000,
"fromAmountCurrency": "USD",
"isAllowed": false,
"priority": 0
},
{
"restrictionName": "enable wires and ACH",
"txnTypes": [
"USA",
"USA_wire"
],
"transactionCurrencies": [
"USD"
],
"toAmount": 100,
"toAmountCurrency": "USD",
"isAllowed": true,
"priority": 1
}
],
"proceduralRestrictionNames": [],
"allowedTransactionTypeNames": {
"1": {
"isAllowed": true,
"sourceAccountTypes": [
"*"
],
"destinationAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
},
"USA": {
"isAllowed": true,
"sourceAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
},
"USA_wire": {
"isAllowed": true,
"sourceAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
},
"tocard": {
"isAllowed": true,
"sourceAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
},
"cheque": {
"isAllowed": true,
"sourceAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
},
"paypal": {
"isAllowed": false,
"sourceAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
},
"international": {
"isAllowed": true,
"sourceAccountTypes": [
"*"
],
"allowedTransactionCurrencies": [
"USD"
]
}
}
}