ACCESS Endpoint
Receive and Retrieve AIOS data from AIOS listings to Access
POST
/api/retrieve-aios-data
This endpoint is used to submit aios listings from wp-aios holding by listingParameters body. It can submit any kind of object and save it via array of map temporarily in a specific period of time and generate a temporary url that expires after use or leave in a specific period of time.
Body example:
{
"listingParameters": {
"dataSource": "aios-listings",
"homeurl": "http://ap-access-single-pagecom.bedrock.forge99.com",
"single_page_count": null,
"websiteID": "b45fc34660c29cb821ddddee4135ac1cb869c6fea387e1d927",
...otherAiosObjects
}
}
Response example:
{
"meta": {
"status": 201,
"message": "Success"
},
"data": {
"conversionUrl": "https://builder-develop.sandbox.access.com/aios-spp-conversion?id=cmb7be5o002fxniqu8799egov",
"id": "cmb7be5o002fxniqu8799egov"
}
}
The generated conversionUrl is the signup page of access, or if existing, it will redirect to the select theme page.
GET
/api/retrieve-aios-data?id={cuid}
This endpoint is used to get the value of submitted from aios wp to access. It will return the submitted listingParameters value for a certain period of time it will serve as a validator if the url is valid or not.
Response example:
{
"meta": {
"status": 200,
"message": "Success"
},
"data": {
"dataSource": "aios-listings",
"homeurl": "http://ap-access-single-pagecom.bedrock.forge99.com",
"single_page_count": null,
"websiteID": "b45fc34660c29cb821ddddee4135ac1cb869c6fea387e1d927",
...otherAiosObjects
}
}
NextAuth API
We use the NextAuth to validate authentication of the account is already existing or not. We created additional CredentialsProvider to accept the generated jwtToken from the validated url signed by builder itself and login.
Example Call:
signIn('aios-login', {
accessToken: jwtToken, // Generated signed jwtToken holding the already existing email and id
callbackUrl: SUCCESS_URL, // Response callback url for successfull login
redirect: true, // Redirect after response
});
Pages Invove
/aios-spp-conversion?id={cuid} // For signup & validator if account is existing. If the cuid is not valid/expires, it will return 404
// An authenticated page, which returns 404 if not authenticated, and return 404 if the page is access directly to the browser. This page is for selecting a theme.
Utilities created
// To convert the value of aios listings to access spp website.