API Documentation
Working With Docx Files
Create a Docx using a template
POST /docx/template
| Parameter |
Type |
Description |
Required |
| inputFile |
file |
Basic template file |
**Required** |
| context |
object |
Mapping data |
**Required** |
Example Usage
curl -X POST "http:///docx/template" \
-F "inputFile=@path/to/template.docx" \
-F "context={\"placeholder1\": \"value1\", \"placeholder2\": \"value2\"}"
Working with FAX
Send a Fax
POST /fax/send
| Parameter |
Type |
Description |
Required |
| file |
file |
File to send |
**Required** |
| to |
string |
Number to send FAX to |
**Required** |
| file_name |
string |
Name of the file |
**Optional** |
Example Usage
curl -X POST "http:///fax/send" \
-H "Content-Type: application/json" \
-d '{
"to": "1234567890",
"file": "JVBERi0xLjQKJdP0zOEKMSAwIG9iaiA8PC9MaW5lYXJpemVkIDEvTCAxNDE4MS9PIDMvRSAxMjU3L04gMS9UIDEzMjk0L0ggWyA0NDMgMjldPj4KZW5kb2JqCjIgMCBvYmo...",
"file_name": "document.pdf"
}'
Check FAX Status
GET /fax/check_status
| Parameter |
Type |
Description |
Required |
| fax_id |
number |
FAX id |
**Required** |
Example Usage
curl -X GET "https://testing-wasilislam.pythonanywhere.com/fax/check_status?fax_id=12345" \
-H "Content-Type: application/json"
Resend a FAX
POST /fax/resend
| Parameter |
Type |
Description |
Required |
| fax_id |
number |
FAX id |
**Required** |
Example Usage
curl -X POST "https://testing-wasilislam.pythonanywhere.com/fax/resend?fax_id=12345" \
-H "Content-Type: application/json"
List Faxes
GET /fax/list
Example Usage
curl -X GET "https://testing-wasilislam.pythonanywhere.com/fax/list" \
-H "Content-Type: application/json"
Get a File from a FAX
GET /fax/file
| Parameter |
Type |
Description |
Required |
| fax_id |
number |
FAX id |
**Required** |
Example Usage
curl -X GET "https://testing-wasilislam.pythonanywhere.com/fax/file?fax_id=12345" \
-H "Content-Type: application/json"
Selenium
Automate a Website
POST /automate
| Parameter |
Type |
Description |
Required |
| url |
string |
URL of the site to automate |
**Required** |
| data |
object |
Values to populate |
**Required** |
| driverWait |
number |
Time to wait for element to be visible |
**Optional** |
| errorsClass |
string |
ClassName of error div |
**Optional** |
| submitBtn |
array |
ClassNames of possible submit buttons |
**Optional** |
| hurdles |
array |
ClassName of hurdles that can come |
**Optional** |
| decoders |
array |
Useful in select/checkbox elements |
**Optional** |
| screenshots |
boolean |
Whether to store SS |
**Optional** |
| ssWidth |
number |
Width of SS |
**Optional** |
| id |
string |
UID of the user |
**Required** |
Example Usage
curl -X POST "https://testing-wasilislam.pythonanywhere.com/automate" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.mass.gov/forms/apply-for-wic-online",
"errorsClass": "StyledErrorBanner-sc-lo45jw-0",
"submitBtn": [
"fsSubmitButton2949280"
],
"id": "k4xAOW2Sj635iAZdmzBx",
"hurdles": {
"fsrButton__inviteDecline": "click"
},
"data": {
"field60605056-first": "Rafael",
"field60605056-last": "Rivera",
"field60605057": "79 East Canton St, Apt10 Boston MA",
"field60605058": "-",
"field60605061": "02118",
"field61482470": "raphy1656@gmail.com",
"field61482470-confirmValue": "raph656@gmail.com",
"field60605064": "6177510012",
"field60605059": "Boston",
"field79314857-*": "20200222",
"field60605060": "Massachusetts",
"field97012203_1": true,
"Preferred Language": [
"English"
],
"bestTimeToContact": [
"morning"
],
"hearing": [
"WIC office"
]
},
"decoders": {
"Preferred Language": {
"english": "field60605066_1",
"spanish": "field60605066_2",
"cantonese": "field60605066_3",
"mandarin": "field60605066_4",
"french": "field60605066_5",
"portuguese": "field60605066_6",
"russian": "field60605066_7",
"arabic": "field60605066_8",
"haitian creole": "field60605066_9",
"other": "field60605066_10"
},
"bestTimeToContact": {
"early morning": "field60605408_1",
"morning": "field60605408_2",
"afternoon": "field60605408_3",
"late afternoon": "field60605408_4",
"evening": "field60605408_5",
"saturday morning": "field60605408_6"
},
"hearing": {
"facebook or internet search": "field60605069_1",
"wic office": "field60605069_2",
"friend/family member": "field60605069_3",
"advertisement (tv, radio, billboard)": "field60605069_4",
"doctor's office/clinic": "field60605069_5",
"dta office": "field60605069_6",
"other": "field60605069_7"
}
}
}'
Get Automated File
GET /automate/getFile
| Parameter |
Type |
Description |
Required |
| fileType |
string |
Could be ["fullPage","error","submitted","conclusion"] |
**Required** |
| uid |
string |
ID of user we automated before |
**Required** |
Example Usage
curl -X GET "https://testing-wasilislam.pythonanywhere.com/automate/getFile" \
-H "Content-Type: application/json" \
-d '{
"fileType": "fullPage",
"uid": "k4xAOW2Sj635iAZdmzBx"
}'
Execute Automated Actions
POST /automate/forms
| Parameter |
Type |
Description |
Required |
| actions |
array |
List of actions to perform automation |
**Required** |
| url |
string |
URL to navigate and perform the automation |
**Required** |
| uid |
string |
ID of the user for whom the automation is being performed |
**Required** |
Request Body Example:
{
"actions": [
{"pace": {"action":"wait","time":30}},
{"QID33-1-label": {"action":"click"}},
{"NextButton": {"action":"click"}},
{"wait": "5"},
{"QID6-1-label": {"action":"click"}},
{"QID15-1-label": {"action":"click"}},
{"QR~QID11~1": {"action":"text","value":"John"}},
{"QR~QID11~6": {"action":"text","value":"Doe"}},
{"QR~QID11~2": {"action":"text","value":"Earth"}},
{"QR~QID11~3": {"action":"text","value":"Sydney"}},
{"QR~QID11~4": {"action":"text","value":"03/15/2013"}},
{"QR~QID11~5": {"action":"text","value":"johnDoe@gmail.com"}},
{"QR~QID44~1": {"action":"text","value":5}},
{"QR~QID1": {"action":"dropdown","value":"ANDERSON"}},
{"QR~QID2": {"action":"text","value":54000}},
{"QR~QID5": {"action":"text","value":"John"}},
{"QID10-1-label": {"action":"click"}},
{"QID14-1-label": {"action":"click"}},
{"QID7-5-label": {"action":"click"}},
{"QID8-2-label": {"action":"click"}},
{"QR~QID22": {"action":"text","value":"-"}},
{"NextButton": {"action":"click"}},
{"wait": "5"},
{"QID23-3-label":{"action":"click"}},
{"NextButton": {"action":"click"}}
],
"url": "https://txwic.gov1.qualtrics.com/jfe/form/SV_8B46S0pZv1Qi2CW?Q_Language=EN&source=website-text-link&ahd-fill-me=JTdCJTdE&ahd-user-id=lXGLq97fKRxWuNgZ9Ab3&ahd-loc=tx",
"uid": "example-uid"
}
Response Example:
{
"success": true,
"ScreenshotSaved?": true,
"Instructions": "Find the file information by creating a request to EndPoint '/automate/getFile' with proper uid and fileType"
}
Generate a Graph
GET /generate/graphs
API
POST /generate/plotgraph
| Parameter |
Type |
Description |
Required |
| x |
list |
X-axis data points |
**Required** |
| y |
list |
Y-axis data points |
**Required** |
| title |
string |
Title of the graph |
**Optional** |
| x_label |
string |
Label for X-axis |
**Optional** |
| y_label |
string |
Label for Y-axis |
**Optional** |
| line_style |
string |
Line style for the plot (e.g., '-', '--', ':') |
**Optional** |
| line_color |
string |
Color of the line |
**Optional** |
| line_width |
number |
Width of the line |
**Optional** |
| marker_style |
string |
Style of the markers (e.g., 'o', '^', 's') |
**Optional** |
| marker_size |
number |
Size of the markers |
**Optional** |
| grid |
boolean |
Whether to display grid lines |
**Optional** |
| grid_style |
string |
Style of the grid lines |
**Optional** |
| x_limit |
list |
Limits for the X-axis |
**Optional** |
| y_limit |
list |
Limits for the Y-axis |
**Optional** |
| title_font_size |
number |
Font size for the title |
**Optional** |
| label_font_size |
number |
Font size for the axis labels |
**Optional** |
| tick_font_size |
number |
Font size for the axis ticks |
**Optional** |
| bg_color |
string |
Background color for the plot |
**Optional** |
| fig_size |
list |
Size of the figure |
**Optional** |
| legend |
boolean |
Whether to display a legend |
**Optional** |
| legend_loc |
string |
Location of the legend |
**Optional** |
| x_scale |
string |
Scale for the X-axis (e.g., 'linear', 'log') |
**Optional** |
| y_scale |
string |
Scale for the Y-axis (e.g., 'linear', 'log') |
**Optional** |
| plot_type |
string |
Type of plot (e.g., 'line', 'bar', 'scatter') |
**Optional** |
Example Usage
curl -X POST "https://testing-wasilislam.pythonanywhere.com/generate/plotgraph" \
-H "Content-Type: application/json" \
-d '{
"x": [1, 2, 3, 4, 5],
"y": [10, 20, 30, 40, 50],
"title": "Sample Graph",
"x_label": "X-Axis",
"y_label": "Y-Axis",
"line_style": "-",
"line_color": "blue",
"line_width": 2,
"marker_style": "o",
"marker_size": 6,
"grid": true,
"grid_style": "-",
"x_limit": [0, 6],
"y_limit": [0, 60],
"title_font_size": 14,
"label_font_size": 12,
"tick_font_size": 10,
"bg_color": "white",
"fig_size": [8, 6],
"legend": true,
"legend_loc": "best",
"x_scale": "linear",
"y_scale": "linear",
"plot_type": "line"
}'
Generate a Pie Chart
POST /generate/piechart
| Parameter |
Type |
Description |
Required |
| x |
list |
Data for the pie chart segments |
**Required** |
| colors |
list or string |
Colors for the segments (either a list of colors or a color map name) |
**Optional** |
| radius |
number |
Radius of the pie chart |
**Optional** |
| center |
tuple |
Center position of the pie chart |
**Optional** |
| wedge_linewidth |
number |
Line width of the wedges |
**Optional** |
| wedge_edgecolor |
string |
Edge color of the wedges |
**Optional** |
| frame |
boolean |
Whether to display a frame around the pie chart |
**Optional** |
| xlim |
tuple |
Limits for the X-axis |
**Optional** |
| xticks |
list |
Ticks for the X-axis |
**Optional** |
| ylim |
tuple |
Limits for the Y-axis |
**Optional** |
| yticks |
list |
Ticks for the Y-axis |
**Optional** |
Example Usage
curl -X POST "https://testing-wasilislam.pythonanywhere.com/generate/piechart" \
-H "Content-Type: application/json" \
-d '{
"x": [10, 20, 30, 40],
"colors": ["#ff9999","#66b3ff","#99ff99","#ffcc99"],
"radius": 3,
"center": [4, 4],
"wedge_linewidth": 1,
"wedge_edgecolor": "white",
"frame": true,
"xlim": [0, 8],
"xticks": [1, 2, 3, 4, 5, 6, 7],
"ylim": [0, 8],
"yticks": [1, 2, 3, 4, 5, 6, 7]
}'
Purchase Orders
GET /purchase_orders
API
POST /purchase_orders/api
| Parameter |
Type |
Description |
Required |
| file |
file |
The PDF file to process |
**Required** |
Example Usage
curl -X POST "https://testing-wasilislam.pythonanywhere.com/purchase_orders/api" \
-F "file=@path/to/yourfile.pdf"
GET /proxy/check
Description
Checks the IP address and authorization status of the incoming request.
Response
| Parameter |
Type |
Description |
| IP |
string |
The real IP address of the incoming request |
| authorized |
boolean |
Authorization status based on IP address |
| forwardedPeeps |
string |
Forwarded IP addresses, if any |
Example Usage
curl -X GET "https://testing-wasilislam.pythonanywhere.com/proxy/check"
Available Public API List
GET /proxy/api/v1
| Parameter |
Type |
Description |
Required |
| quantity |
integer |
The number of proxies to return |
**Optional** (Defaults to 0, which returns all available proxies) |
Example Usage
curl -X GET "http:///proxy/api/v1?quantity=5" \
-H "Content-Type: application/json"
Response
When `quantity` is provided:
[
{
"IP": "43.133.59.220",
"authorized": false,
"forwardedPeeps": "43.133.59.220",
"proxy": [
"43.133.59.220",
"3128",
"SG",
"Singapore",
"anonymous",
"no",
"yes",
"10 mins ago"
],
"working": true
},
...
]
When `quantity` is not provided:
[
[
"3.129.184.210",
"3128",
"US",
"United States",
"elite proxy",
"no",
"yes",
"3 hours 30 mins ago"
],
...
]
Response Details:
- IP: The IP address of the proxy.
- authorized: A boolean indicating if the IP is authorized.
- forwardedPeeps: The IP address that forwarded the request.
- proxy: An array containing the proxy's IP, port, country code, country name, anonymity level, whether it supports Google, HTTPS support, and the last checked time.
- working: A boolean indicating whether the proxy is currently working.
When `quantity` is not provided, the response is a simpler array containing just the proxy details:
- proxy: An array containing the proxy's IP, port, country code, country name, anonymity level, whether it supports Google, HTTPS support, and the last checked time.
Fetch Data
GET /fetch-data
Description
Fetches data from an external URL and returns the JSON response.
Response
| Parameter |
Type |
Description |
| data |
object |
JSON data fetched from the external URL |
| error |
string |
Error message, if the request failed |
Example Usage
curl -X GET "https://testing-wasilislam.pythonanywhere.com/fetch-data"
Generate CutHours PDF
GET /cuthours/pdf
API
POST /cuthours/pdf/api
| Parameter |
Type |
Description |
Required |
| data |
object |
'prompt' or 'html' |
**Required** |
Description
Generates a PDF document based on the provided JSON data.
Example Usage
curl -X POST "https://testing-wasilislam.pythonanywhere.com/cuthours/pdf" \
-H "Content-Type: application/json" \
-d '{
"data": {
"prompt": "Generate a graph"
}
}'