FDRs
Request URL
POST /fdrs
Description
This API receives a list of new or modified FDRs from the user. Each FDR has a name and a date. The FDR names are checked against a list of protected names. If a modified FDR name is in the protected list the change is ignored. If the FDR name is not protected, and the FDR has a later date than the one already stored, the API stores the FDR. After processing any new or modified FDRs, an array of all FDRs is returned to the user.
Schema
| Property | Description | Required | Schema |
|---|---|---|---|
| :fdrProperty | A property which has a key matching the value of the FDR name. The value of this property is an FDR object. There may be multiple FDR property key: value pairs. | yes | object |
FDR Object Example
| Property | Description | Required | Schema |
|---|---|---|---|
| name | The name of the FDR | yes | string |
| dtsModified | The date/time stamp when the FDR is being modified | yes | dts |
| value | The value of the FDR. This may be an array, an object, or a primitive data type | yes | any |
Request Body
{
"moduleAcademy1": {
"name": "moduleAcademy1",
"dtsModified": "2022-08-08T16:00:01.075Z",
"value": {
"test": 12345,
"test2": "asd"
}
}
}
Snippet Examples
javascript
const axios = require('axios');
const data = {
"moduleAcademy1": {
"name": "moduleAcademy1",
"dtsModified": "2022-08-08T16:00:01.075Z",
"value": {
"test": 12345,
"test2": "asd"
}
}
};
const config = {
method: 'POST',
url: '${AMPLIFI_BASE_URL}/fdrs',
headers: {
'Content-Type': "application/json",
'token': "A long random string token received from /token request"
},
data
};
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/fdrs" --data "{ \"moduleAcademy1\":{ \"name\":\"moduleAcademy1\", \"dtsModified\":\"2022-08-08T16:00:01.075Z\", \"value\":{ \"test\":12345, \"test2\":\"asd\" } }}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request"
Successful Response Examples
200 FDRS SUCCESSFUL RESPONSE SYNCING FDRS
HEADERS
| Header | Value |
|---|---|
| Content-Type | application/json |
| token | A long random string token received from /token request |
REQUEST BODY
{
"moduleAcademy1": {
"name": "moduleAcademy1",
"dtsModified": "2022-08-08T16:00:01.075Z",
"value": {
"test": 12345,
"test2": "asd"
},
"isModified": true
}
}
RESPONSE BODY
{
"moduleTabapay": {
"name": "moduleTabapay",
"dtsModified": "1978-10-15T00:00:00.000Z",
"isModified": false,
"value": {
"isEnabled": true
}
},
"externalAccountsConfig": {
"name": "externalAccountsConfig",
"dtsModified": "1978-10-15T00:00:00.000Z",
"isModified": false,
"value": {
"minTopup": 20,
"maxTopup": 200
}
},
"defaultNewCardType": {
"name": "defaultNewCardType",
"dtsModified": "1978-10-15T00:00:00.000Z",
"isModified": false,
"value": "temporary"
},
"accountTypeIdsToInclude": {
"name": "accountTypeIdsToInclude",
"dtsModified": "1978-10-15T00:00:00.000Z",
"isModified": false,
"value": [
"505",
"2008",
"virtual",
"Standard",
"FLW_CHECKING"
]
},
"supportData": {
"name": "supportData",
"dtsModified": "1978-10-15T00:00:00.000Z",
"isModified": false,
"value": {
"email": "alibek@paygears.com",
"mobile": "+14345156001"
}
},
"onboardingSettings": {
"name": "onboardingSettings",
"dtsModified": "1978-10-15T00:00:00.000Z",
"isModified": false,
"value": {
"preSegent": "base_dsfcsdfjkladfdgllgg",
"PRESEGMENTS_ALLOWED": {
"demo_uoiuqwehflkipahgoqq": "GenericClient",
"base_dsfcsdfjkladfdgllgg": "GenericClient"
}
}
},
"moduleBlinkCard": {
"name": "moduleBlinkCard",
"value": {
"isEnabled": false,
"licensekeyAndroid": "INTENTIONALLY LEFT BLANK. REFER TO SECRETS.JSON5",
"licensekeyiOS": "INTENTIONALLY LEFT BLANK. REFER TO SECRETS.JSON5"
},
"isModified": false,
"isReadOnly": true,
"dtsModified": "2022-11-21T00:00:00.000Z"
},
"moduleAcademy1": {
"_id": "657c624218e95734fbf17e2e",
"AFiUserId": "qweaurl8kgtlv9pc",
"name": "moduleAcademy1",
"dtsModified": "2022-08-08T16:00:01.075Z",
"value": {
"test": 12345,
"test2": "asd"
},
"isModified": true
}
}