How to retrieve customer details on AYAN PDF?
User can retrieve details of an existing customer using two ways:
- Login via AYAN PDF: User can navigate to “AYAN PDF” page and can click a button (on top right corner) “Login” to login to an existing account for AYAN PDF. Once the login information is filled up, it will redirect user on to dashboard page of AYAN PDF account.
- Using AYAN Retrieve Customer API: User can use the retrieve customer api of AYAN PDF to retrieve the details for any existing customer of AYAN PDF. Once the request is made with all the required information, the api will return the customer details in the callout response.
Parameter |
Value |
Description |
Endpoint URL |
https://sf.filezipo.io:3003/api/getCustomer |
The API endpoint url on which request will be sent |
Method |
POST |
Set the Callout method as POST |
Content-Type |
application/json |
Set “application/json” as content type for this request |
Request Body (JSON) |
{
“username”:”mohitbansal@gmail.com”,
“password”:”Today@2023″
}
|
All the information in the JSON Body are mandatory. Each attribute represents as below:
- username – customer’s email with which customer account was created (Required)
- password – a password set for the customer account (Required)
|
Response with Code =1 |
{
“message”: “ok”,
“data”: {
“customer_name”: “Mohit Bansal”,
“company_name”: “AYAN Softwares”,
“company_address”: “NIT Faridabad”,
“username”: “mohitbansal3@gmail.com”,
“active_plan”: “Free”,
“storage_location”: “asia”,
“account_status”: “active”,
“companyInformationkeys”: [
{
“start_date”: “2023-02-06T04:49:31.822Z”,
“end_date”: “2023-02-13T04:49:31.822Z”,
“key_code”: “<<API Key Code>>”,
“token”: “<<Token>>”,
“total_connects”: 50,
“connects_used”: 6,
“connects_remaining”: 44,
“key_type”: “Free”}
]
},
“code”: 1
} |
If the response “code” is 1, then it represents your request is successfully submitted and api returns the below the parameters:
- Basic Customer Details
- Customer name – the name of the customer
- Company name – the name of the customer ‘s company
- Company Address – the customer’s address information
- Username / Email – the customer email
- Current Plan (Free or Paid) – it defines the type of the plan for which the customer is registered
- S3 Storage Location – it defines the S3 server location where the final merged files are stored
- Account Status – it defines when the customer account is active or expired
- Active Key Information
- Key Start Date – Date on which API key was activated
- Key End Date – Date on which the API key will expire
- Key Code – API Key which is used to make any api callouts to merge files
- Token – API key along with the token is required to make any api callout for merging files
- Total Connects – Every connect represent a file. So the number of connects defines the number of files which a customer can merge in its API key duration. The api key duration defines the time for which the api key is active.
- Connects Used – it defines the number of connects which are already used for merging the files
- Connect Remaining – it defines the number of connects which are remaining
- Key Type – defines whether the key is free or paid
|
Response with code=0 |
{
“message”: “error”,
“data”: {
“message”: “Invalid customer information.”
},
“code”: 0
} |
- If “code” is 0 with message=”error”, then it represents your request is failed due to either of below reasons:
- “Invalid Username” – The Customer doesn’t exists in the system with this email”
- “Invalid Password details” – the password doesn’t matches with the customer password.
|
An API Key is must to use any API on AYAN PDF. If you are facing any issues in retrieve account or finding an api key, you can reach us at support@ayansoftwares.com.
How to get an API Key details in AYAN PDF?
In order to use AYAN PDF apis, customer need to have two key attributes to use apis for different type of actions on documents. The key attributes are:
- API Key – a unique alphanumeric key assigned to every customer. This is fixed key and cannot be changed or modified.
- API token – an alphanumeric token assigned to every customer which can re-generated as when required.
User can get the API key using two ways:
- Login into AYAN PDF Account: Customer can navigate to “AYAN PDF” home page and can click on “Login” button (on top right corner) to login in to their AYAN PDF account. Once the customer is successfully logged in, it will redirect to dashboard page of AYAN PDF account where they can get the API Key assigned to a customer.
- Using AYAN Retrieve API Key api’s: Customer can use the AYAN PDF apis to get the API Key assigned to a customer. Once the HTTP request is made with all the required information, it will retrieve the API key in the callout response.
Parameter |
Value |
Description |
Endpoint URL |
https://sf.filezipo.io:3003/api/getAPIKey |
The API endpoint url on which request will be sent |
Method |
POST |
Set the Callout method as POST |
Content-Type |
application/json |
Set “application/json” as content type for this request |
Request Body (JSON) |
{
“username”: “<<enter username>>”,
“password”: “<<enter password>>”,
}
|
All the information in the JSON Body are mandatory. Each attribute represents as below:
- username – the username of the customer (Required)
- password – the password of the customer (Required)
|
Response with Code =1 |
{
“message”: “ok”,
“data”: {
“key”: “<<API key>>”
},
“code”: 1
} |
- If the response “code” is 1, then it represents your request is successfully and an “API key” is returned in the response.
|
Response with code=0 |
{
“message”: “error”,
“data”: {
“message”: “Invalid Customer details”
},
“code”: 0
} |
- If the response “code” is 0 with message=”error”, then it represents your request is failed due to below reason:
- “Invalid Customers details” – it defines that the customer information provided by the customer is wrong. Kindly try with the correct details.
|
An API Key is must to use any API on AYAN PDF. If you are facing any issues in generating API token or finding an api key, you can reach us at support@ayansoftwares.com.
How to get an API token in AYAN PDF?
In order to use AYAN PDF apis, users need to have two key attributes to use apis for different type of actions on documents. The key attributes are:
- API Key – a unique alphanumeric key assigned to every customer. This is fixed key and cannot be changed or modified.
- API token – an alphanumeric token assigned to every customer which can re-generated as when required.
User can get the API token using two ways:
- Login into AYAN PDF Account: User can navigate to “AYAN PDF” home page and can click on “Login” button (on top right corner) to login in to their AYAN PDF account. Once the user is successfully logged in, it will redirect user on to dashboard page of AYAN PDF account where they can get the API token for a customer.
- Using AYAN Generate Token API: User can use the generate token api of AYAN PDF to generate a new token. Once the HTTP request is made with all the required information, it will generate a new token and will share the API Token in the callout response
Parameter |
Value |
Description |
Endpoint URL |
https://sf.filezipo.io:3003/api/getToken |
The API endpoint url on which request will be sent |
Method |
POST |
Set the Callout method as POST |
Content-Type |
application/json |
Set “application/json” as content type for this request |
Request Body (JSON) |
{
“key”: “<<API Key>>”
}
|
All the information in the JSON Body is mandatory. Each attribute represents as below:
- key – the api key assigned to every customer (Required)
|
Response with Code =1 |
{
“message”: “ok”,
“data”: {
“token”: “<<API token generated>>”
},
“code”: 1
} |
- If the response “code” is 1, then it represents your request is successfully and an “API Token” is generated.
|
Response with code=0 |
{
“message”: “error”,
“data”: {
“message”: “Invalid Key details”
},
“code”: 0
} |
- If the response “code” is 0 with message=”error”, then it represents your request is failed due to below reason:
- “Invalid Key details” – it defines that the key information provided by the customer is wrong. Kindly try with the correct api code.
|
An API Token is must to use any API on AYAN PDF. If you are facing any issues in generating API token or finding an api key, you can reach us at support@ayansoftwares.com.
How to create a merge Header using AYAN PDF apis?
User can retrieve details of an existing customer using two ways:
- Login via AYAN PDF: User can navigate to “AYAN PDF” page and can click a button (on top right corner) “Login” to login to an existing account for AYAN PDF. Once the login information is filled up, it will redirect user on to dashboard page of AYAN PDF account.
- Using AYAN Retrieve Customer API: User can use the retrieve customer api of AYAN PDF to retrieve the details for any existing customer of AYAN PDF. Once the request is made with all the required information, the api will return the customer details in the callout response.
Parameter |
Value |
Description |
Endpoint URL |
https://sf.filezipo.io:3003/api/mergeHeader |
The API endpoint url on which request will be sent |
Method |
POST |
Set the Callout method as POST |
Content-Type |
application/json |
Set “application/json” as content type for this request |
Authorization |
Bearer <<API Token>> |
Use the API token of a customer. Customer can find the token in AYAN PDF account or they can re-generate a new token using Generate Token API. |
Request Body (JSON) |
{
“name”:”Pankaj”,
“custom_fileName”:”testMergeFile”,
“email”:”mohit.bansal@ayansoftwares.com”,
“cc”:”mohit.bansal@ayansoftwares.com”,
“merge_id”:”6767″,
“no_of_files”: “2”,
“organisation_id”:”test101″
}
|
All the information in the JSON Body are not mandatory. Each attribute represents as below:
- name – represents the customer first name (Optional)
- custom_fileName – the name of the final merged file (Optional). The default file name is: “AYANPDF_mergedFile”
- email – represents the email on which merged file will be sent once the process to merge files is completed (Required)
- cc – represents the email which will be added as CC address, once the process to merge files is completed (Optional)
- merge_id- this is required field and its should be a unique number (Required)
- no_of_files- represents the total number of files which will be merged in this merge request. This number should be greater than 1. (Required)
- organisation_id – represents a system through which request was made. (Optional)
|
Response with Code =1 |
{
“message”: “ok”,
“data”: {
“merge_id”: “67671”,
“merge_date”: “2023-02-06T21:34:16.519Z”,
“expire_at”: “2023-02-13T21:34:16.519Z”,
“no_of_files”: 2,
“download_link”: “”,
“merge_by”: “Mohit”,
“merge_file_name”: “testMergeFile”,
“merge_folder_name”: “testMergeFile67671”,
“email_sent_to”: “mohit.bansal@ayansoftwares.com”,
“connect_used”: “”,
“organisation_id”: “test101”,
“merge_status”: “open”,
“email_sent”: “pending”,
},
“code”: 1
} |
If the response “code” is 1, then it represents your request is successfully submitted and api returns the below the parameters:
|
Response with code=0 |
{
“message”: “error”,
“data”: {
“message”: “<<error message>>.”
},
“code”: 0
} |
- If “code” is 0 with message=”error”, then it represents your request is failed due to either of below reasons:
- Number of Files requested to merge should be greater than 1
- The merge_id is not unique. Kindly check your code and try again
- “You have consumed your connects limit. Kindly contact your administrator for more details
.
|
An API Key is must to use any API on AYAN PDF. If you are facing any issues in retrieve account or finding an api key, you can reach us at support@ayansoftwares.com.