# Introduction

The Docamatic API is a RESTful API based on HTTPS requests and JSON responses. The API provides 6 main endpoints:

# Quick Start

Here are some code samples to get you started. All requests must be made over HTTPS and must contain your API key in the header as a bearer token.

    
	$headers = [
'x-DomainKey: YOUR_API_KEY',
'Content-Type: application/json'
];

$data = [
'from_country' => '107',
'to_country' => '2',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://visaclap.com/visaclapapi/api/visacountry');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

$response = curl_exec($ch);

if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
var_dump(json_decode($response, true));
}

curl_close($ch);

# Response Codes

The status of a response can be determined from the HTTP status code.

Code Status Description
200 OK Request successful
400 Bad request Request was invalid
422 Unprocessable Entity Valid JSON but error encountered
429 Too Many Requests Client is rate limited
500 Internal Server Error Server error, please try again later or contact support

# Endpoints

The Docamatic API is accessed by making HTTPS requests to a specific version endpoint URL. The base URL for the API is: https://visaclap.com/visaclapapi/api . The following endpoints are available:

URL Method Description
/visacountry GET Get All Country
/Getcountryname POST Get Particular Country data
/visacountry POST Get Visa data
GET /visacountry
GET http://visaclap.com /visaclapapi/api/visacountry

This endpoint provides a summary of your API usage for the current billing period. Assuming a monthly limit of 1000 requests, after 250 production requests:

Response:
    
								{
	 "code": 200,
	"message": [
		{
			"id": "1",
			"name": "Andorra",
			"currency": "Euro (EUR)",
			"capital": "Andorra la Vella"
		},
		{
			"id": "2",
			"name": "United Arab Emirates",
			"currency": "Dirham (AED)",
			"capital": "Abu Dhabi"
		},
		{
			"id": "3",
			"name": "Afghanistan",
			"currency": "Afghani (AFN)",
			"capital": "Kabul"
		}
		]
}

POST /Getcountryname
POST http://visaclap.com /visaclapapi/api/Getcountryname

This endpoint allows you to generate a PDF document from a URL or HTML . The source parameter is the only mandatory body parameter. All other parameters are optional. Example requests can be found below this table.

Parameter Type Description
countryid number A valid URL or HTML.

# Description

The following request will create an A4 document using a URL passed via the source parameter. We have set the media type to print so that the resulting document will be generated using the CSS print rules that have been defined at this URL. We have set top and bottom margins on the page. As we did not specify margin_unit , margins will use default unit cm.

Request:
    
	{
"countryid": "235"
}

Response:
    
   {
"status": true,
"countrydata": [
	{
		"id": "235",
		"name": "United States",
		"currency": "Dollar (USD)",
		"capital": "Washington",
		"description": "The United States (U.S) is one of the most popular travel tourist destinations around the world. Each year, the country’s famous cities, national parks and entertainment options attract millions of visitors from around the world. From the skyscrapers of New York and Chicago, the natural wonders of Yellowstone and Alaska, to the sunny beaches of California, Florida, and Hawaii, the United States has an amazing amount of tourist destinations. The best time to visit u.s is either during spring (early march to late may) or autumn (early September to late October). Since these are the shoulder seasons before and after summer, these months tend to have warmer temperatures as well as fewer visitors to the most popular destinations."
	}
]
}

POST /GetCountryVisa
POST http://visaclap.com /visaclapapi/api/visacountry
Parameter Type Description
from_country number countrydata = id
to_country number countrydata = id

# Description

The following request will create an A4 document using a URL passed via the source parameter. We have set the media type to print so that the resulting document will be generated using the CSS print rules that have been defined at this URL. We have set top and bottom margins on the page. As we did not specify margin_unit , margins will use default unit cm.

Request:
    
   from_country:107
to_country:235

Response:
    {
"status": true,
"message": [
	{
		"id": "3508",
		"origin_country": "107",
		"destination_country": "79",
		"process": "Do payment,Enter Information,Get E-Visa",
		"price": "100-$",
		"visa_type_id": "199",
		"visa_validity": "6-Month",
		"length_of_stay": "180-Days",
		"time_to_get_visa": "20-Days",
		"entry_type": "Multiple",
		"description": "For visiting family and friends and for tourism",
		"service_charge": "500-$",
		"type_of_visa": "Standard Visitor Visa",
		"all_document_id": "111",
		"all_document_name": "65,67,88,107",
		"visaformcompare": "235",
		"process_docu": "8,9,12",
		"visa_type_form_id": "235"
	}
],
"documents": [
	[
		{
			"id": "111",
			"name": "united kingdom standard visitor visa",
			"document_id": "65,67,88,107",
			"date": "2023-09-11 22:26:33",
			"document_name": "Bank Account Statement,Hotel confirmation (if you dont have any friends or family or business associates),Invitation From your Family or Friends,Passport front and back picture"
		}
	]
],
"process": [
	[
		{
			"id": "8",
			"text": "Enter Information",
			"image": "assets/uploads/apply.jpg"
		}
	],
	[
		{
			"id": "9",
			"text": "Do payment",
			"image": "assets/uploads/payment.jpg"
		}
	],
	[
		{
			"id": "12",
			"text": "Get E-Visa",
			"image": "assets/uploads/evisa-min.jpg"
		}
	]
],
"notes": [
	[
		{
			"id": "3508",
			"notes": "58",
			"note_name": "Uk Standard Visitor Visa notes",
			"notes_desc": "If you are applying for a visa where you can stay in the UK for more than 6 months you may need to get a TB test depending on where you are applying from"
		}
	]
]
}
POST /getform_visa
POST http://visaclap.com /visaclapapi/api/getform_visa
Parameter Type Description
gid number countrydata = id
visaid number countrydata = id
visatype number countrydata = id
origincountry number countrydata = id
destinationcountry number countrydata = id

# Description

The following request will create an A4 document using a URL passed via the source parameter. We have set the media type to print so that the resulting document will be generated using the CSS print rules that have been defined at this URL. We have set top and bottom margins on the page. As we did not specify margin_unit , margins will use default unit cm.

Request:
    
gid:2899
visaid:127
visatype:205
origincountry:107
destinationcountry:235

Response:
    {
    "status": true,
    "visaname": {
        "name": "Visting visa"
    },
    "formdata": {
        "General information": [
            {
                "label_id": "386",
                "label_name": "Gender",
                "field_type": "radio",
                "list_value": [
                    {
                        "id": "110",
                        "form_attribute_id": "386",
                        "name": "Male",
                        "value": null
                    },
                    {
                        "id": "111",
                        "form_attribute_id": "386",
                        "name": "Female",
                        "value": null
                    }
                ]
            },
            {
                "label_id": "443",
                "label_name": "Given name",
                "field_type": "text"
            },
            {
                "label_id": "332",
                "label_name": "Surname",
                "field_type": "text"
            }
        ]
    },
    "countrylist": [
        {
            "id": "1",
            "name": "Andorra"
        },
        {
            "id": "2",
            "name": "United Arab Emirates"
        },
        {
            "id": "3",
            "name": "Afghanistan"
        },
        {
            "id": "4",
            "name": "Antigua and Barbuda"
        },
        {
            "id": "5",
            "name": "Anguilla"
        },
        {
            "id": "6",
            "name": "Albania"
        },
        {
            "id": "7",
            "name": "Armenia"
        },
        {
            "id": "8",
            "name": "Netherlands Antilles"
        },
        {
            "id": "9",
            "name": "Angola"
        },
        {
            "id": "10",
            "name": "Antarctica"
        },
        {
            "id": "11",
            "name": "Argentina"
        },
        {
            "id": "12",
            "name": "American Samoa"
        },
        {
            "id": "13",
            "name": "Austria"
        },
        {
            "id": "14",
            "name": "Australia"
        },
        {
            "id": "15",
            "name": "Aruba"
        },
        {
            "id": "16",
            "name": "Ã…land"
        },
        {
            "id": "17",
            "name": "Azerbaijan"
        },
        {
            "id": "18",
            "name": "Bosnia and Herzegovina"
        },
        {
            "id": "19",
            "name": "Barbados"
        },
        {
            "id": "20",
            "name": "Bangladesh"
        },
        {
            "id": "21",
            "name": "Belgium"
        },
        {
            "id": "22",
            "name": "Burkina Faso"
        },
        {
            "id": "23",
            "name": "Bulgaria"
        },
        {
            "id": "24",
            "name": "Bahrain"
        },
        {
            "id": "25",
            "name": "Burundi"
        },
        {
            "id": "26",
            "name": "Benin"
        },
        {
            "id": "27",
            "name": "Saint Barthélemy"
        },
        {
            "id": "28",
            "name": "Bermuda"
        },
        {
            "id": "29",
            "name": "Brunei"
        },
        {
            "id": "30",
            "name": "Bolivia"
        },
        {
            "id": "31",
            "name": "Bonaire, Sint Eustatius, and Saba"
        },
        {
            "id": "32",
            "name": "Brazil"
        },
        {
            "id": "33",
            "name": "Bahamas"
        },
        {
            "id": "34",
            "name": "Bhutan"
        },
        {
            "id": "35",
            "name": "Bouvet Island"
        },
        {
            "id": "36",
            "name": "Botswana"
        },
        {
            "id": "37",
            "name": "Belarus"
        },
        {
            "id": "38",
            "name": "Belize"
        },
        {
            "id": "39",
            "name": "Canada"
        },
        {
            "id": "40",
            "name": "Cocos [Keeling] Islands"
        },
        {
            "id": "41",
            "name": "DR Congo"
        },
        {
            "id": "42",
            "name": "Central African Republic"
        },
        {
            "id": "43",
            "name": "Congo Republic"
        },
        {
            "id": "44",
            "name": "Switzerland"
        },
        {
            "id": "45",
            "name": "Ivory Coast"
        },
        {
            "id": "46",
            "name": "Cook Islands"
        },
        {
            "id": "47",
            "name": "Chile"
        },
        {
            "id": "48",
            "name": "Cameroon"
        },
        {
            "id": "49",
            "name": "China"
        },
        {
            "id": "50",
            "name": "Colombia"
        },
        {
            "id": "51",
            "name": "Costa Rica"
        },
        {
            "id": "52",
            "name": "Serbia and Montenegro"
        },
        {
            "id": "53",
            "name": "Cuba"
        },
        {
            "id": "54",
            "name": "Cabo Verde"
        },
        {
            "id": "55",
            "name": "Curaçao"
        },
        {
            "id": "56",
            "name": "Christmas Island"
        },
        {
            "id": "57",
            "name": "Cyprus"
        },
        {
            "id": "58",
            "name": "Czechia"
        },
        {
            "id": "59",
            "name": "Germany"
        },
        {
            "id": "60",
            "name": "Djibouti"
        },
        {
            "id": "61",
            "name": "Denmark"
        },
        {
            "id": "62",
            "name": "Dominica"
        },
        {
            "id": "63",
            "name": "Dominican Republic"
        },
        {
            "id": "64",
            "name": "Algeria"
        },
        {
            "id": "65",
            "name": "Ecuador"
        },
        {
            "id": "66",
            "name": "Estonia"
        },
        {
            "id": "67",
            "name": "Egypt"
        },
        {
            "id": "68",
            "name": "Western Sahara"
        },
        {
            "id": "69",
            "name": "Eritrea"
        },
        {
            "id": "70",
            "name": "Spain"
        },
        {
            "id": "71",
            "name": "Ethiopia"
        },
        {
            "id": "72",
            "name": "Finland"
        },
        {
            "id": "73",
            "name": "Fiji"
        },
        {
            "id": "74",
            "name": "Falkland Islands"
        },
        {
            "id": "75",
            "name": "Micronesia"
        },
        {
            "id": "76",
            "name": "Faroe Islands"
        },
        {
            "id": "77",
            "name": "France"
        },
        {
            "id": "78",
            "name": "Gabon"
        },
        {
            "id": "79",
            "name": "United Kingdom"
        },
        {
            "id": "80",
            "name": "Grenada"
        },
        {
            "id": "81",
            "name": "Georgia"
        },
        {
            "id": "82",
            "name": "French Guiana"
        },
        {
            "id": "83",
            "name": "Guernsey"
        },
        {
            "id": "84",
            "name": "Ghana"
        },
        {
            "id": "85",
            "name": "Gibraltar"
        },
        {
            "id": "86",
            "name": "Greenland"
        },
        {
            "id": "87",
            "name": "Gambia"
        },
        {
            "id": "88",
            "name": "Guinea"
        },
        {
            "id": "89",
            "name": "Guadeloupe"
        },
        {
            "id": "90",
            "name": "Equatorial Guinea"
        },
        {
            "id": "91",
            "name": "Greece"
        },
        {
            "id": "92",
            "name": "South Georgia and South Sandwich Islands"
        },
        {
            "id": "93",
            "name": "Guatemala"
        },
        {
            "id": "94",
            "name": "Guam"
        },
        {
            "id": "95",
            "name": "Guinea-Bissau"
        },
        {
            "id": "96",
            "name": "Guyana"
        },
        {
            "id": "97",
            "name": "Hong Kong"
        },
        {
            "id": "98",
            "name": "Heard Island and McDonald Islands"
        },
        {
            "id": "99",
            "name": "Honduras"
        },
        {
            "id": "100",
            "name": "Croatia"
        },
        {
            "id": "101",
            "name": "Haiti"
        },
        {
            "id": "102",
            "name": "Hungary"
        },
        {
            "id": "103",
            "name": "Indonesia"
        },
        {
            "id": "104",
            "name": "Ireland"
        },
        {
            "id": "105",
            "name": "Israel"
        },
        {
            "id": "106",
            "name": "Isle of Man"
        },
        {
            "id": "107",
            "name": "India"
        },
        {
            "id": "108",
            "name": "British Indian Ocean Territory"
        },
        {
            "id": "109",
            "name": "Iraq"
        },
        {
            "id": "110",
            "name": "Iran"
        },
        {
            "id": "111",
            "name": "Iceland"
        },
        {
            "id": "112",
            "name": "Italy"
        },
        {
            "id": "113",
            "name": "Jersey"
        },
        {
            "id": "114",
            "name": "Jamaica"
        },
        {
            "id": "115",
            "name": "Jordan"
        },
        {
            "id": "116",
            "name": "Japan"
        },
        {
            "id": "117",
            "name": "Kenya"
        },
        {
            "id": "118",
            "name": "Kyrgyzstan"
        },
        {
            "id": "119",
            "name": "Cambodia"
        },
        {
            "id": "120",
            "name": "Kiribati"
        },
        {
            "id": "121",
            "name": "Comoros"
        },
        {
            "id": "122",
            "name": "St Kitts and Nevis"
        },
        {
            "id": "123",
            "name": "North Korea"
        },
        {
            "id": "124",
            "name": "South Korea"
        },
        {
            "id": "125",
            "name": "Kuwait"
        },
        {
            "id": "126",
            "name": "Cayman Islands"
        },
        {
            "id": "127",
            "name": "Kazakhstan"
        },
        {
            "id": "128",
            "name": "Laos"
        },
        {
            "id": "129",
            "name": "Lebanon"
        },
        {
            "id": "130",
            "name": "Saint Lucia"
        },
        {
            "id": "131",
            "name": "Liechtenstein"
        },
        {
            "id": "132",
            "name": "Sri Lanka"
        },
        {
            "id": "133",
            "name": "Liberia"
        },
        {
            "id": "134",
            "name": "Lesotho"
        },
        {
            "id": "135",
            "name": "Lithuania"
        },
        {
            "id": "136",
            "name": "Luxembourg"
        },
        {
            "id": "137",
            "name": "Latvia"
        },
        {
            "id": "138",
            "name": "Libya"
        },
        {
            "id": "139",
            "name": "Morocco"
        },
        {
            "id": "140",
            "name": "Monaco"
        },
        {
            "id": "141",
            "name": "Moldova"
        },
        {
            "id": "142",
            "name": "Montenegro"
        },
        {
            "id": "143",
            "name": "Saint Martin"
        },
        {
            "id": "144",
            "name": "Madagascar"
        },
        {
            "id": "145",
            "name": "Marshall Islands"
        },
        {
            "id": "146",
            "name": "North Macedonia"
        },
        {
            "id": "147",
            "name": "Malibu"
        },
        {
            "id": "148",
            "name": "Myanmar"
        },
        {
            "id": "149",
            "name": "Mongolia"
        },
        {
            "id": "150",
            "name": "Macao"
        },
        {
            "id": "151",
            "name": "Northern Mariana Islands"
        },
        {
            "id": "152",
            "name": "Martinique"
        },
        {
            "id": "153",
            "name": "Mauritania"
        },
        {
            "id": "154",
            "name": "Montserrat"
        },
        {
            "id": "155",
            "name": "Malta"
        },
        {
            "id": "156",
            "name": "Mauritius"
        },
        {
            "id": "157",
            "name": "Maldives"
        },
        {
            "id": "158",
            "name": "Malawi"
        },
        {
            "id": "159",
            "name": "Mexico"
        },
        {
            "id": "160",
            "name": "Malaysia"
        },
        {
            "id": "161",
            "name": "Mozambique"
        },
        {
            "id": "162",
            "name": "Namibia"
        },
        {
            "id": "163",
            "name": "New Caledonia"
        },
        {
            "id": "164",
            "name": "Niger"
        },
        {
            "id": "165",
            "name": "Norfolk Island"
        },
        {
            "id": "166",
            "name": "Nigeria"
        },
        {
            "id": "167",
            "name": "Nicaragua"
        },
        {
            "id": "168",
            "name": "Netherlands"
        },
        {
            "id": "169",
            "name": "Norway"
        },
        {
            "id": "170",
            "name": "Nepal"
        },
        {
            "id": "171",
            "name": "Nauru"
        },
        {
            "id": "172",
            "name": "Niue"
        },
        {
            "id": "173",
            "name": "New Zealand"
        },
        {
            "id": "174",
            "name": "Oman"
        },
        {
            "id": "175",
            "name": "Panama"
        },
        {
            "id": "176",
            "name": "Peru"
        },
        {
            "id": "177",
            "name": "French Polynesia"
        },
        {
            "id": "178",
            "name": "Papua New Guinea"
        },
        {
            "id": "179",
            "name": "Philippines"
        },
        {
            "id": "180",
            "name": "Pakistan"
        },
        {
            "id": "181",
            "name": "Poland"
        },
        {
            "id": "182",
            "name": "Saint Pierre and Miquelon"
        },
        {
            "id": "183",
            "name": "Pitcairn Islands"
        },
        {
            "id": "184",
            "name": "Puerto Rico"
        },
        {
            "id": "185",
            "name": "Palestine"
        },
        {
            "id": "186",
            "name": "Portugal"
        },
        {
            "id": "187",
            "name": "Palau"
        },
        {
            "id": "188",
            "name": "Paraguay"
        },
        {
            "id": "189",
            "name": "Qatar"
        },
        {
            "id": "190",
            "name": "Réunion"
        },
        {
            "id": "191",
            "name": "Romania"
        },
        {
            "id": "192",
            "name": "Serbia"
        },
        {
            "id": "193",
            "name": "Russia"
        },
        {
            "id": "194",
            "name": "Rwanda"
        },
        {
            "id": "195",
            "name": "Saudi Arabia"
        },
        {
            "id": "196",
            "name": "Solomon Islands"
        },
        {
            "id": "197",
            "name": "Seychelles"
        },
        {
            "id": "198",
            "name": "Sudan"
        },
        {
            "id": "199",
            "name": "Sweden"
        },
        {
            "id": "200",
            "name": "Singapore"
        },
        {
            "id": "201",
            "name": "Saint Helena"
        },
        {
            "id": "202",
            "name": "Slovenia"
        },
        {
            "id": "203",
            "name": "Svalbard and Jan Mayen"
        },
        {
            "id": "204",
            "name": "Slovakia"
        },
        {
            "id": "205",
            "name": "Sierra Leone"
        },
        {
            "id": "206",
            "name": "San Marino"
        },
        {
            "id": "207",
            "name": "Senegal"
        },
        {
            "id": "208",
            "name": "Somalia"
        },
        {
            "id": "209",
            "name": "Suriname"
        },
        {
            "id": "210",
            "name": "South Sudan"
        },
        {
            "id": "211",
            "name": "São Tomé and Príncipe"
        },
        {
            "id": "212",
            "name": "El Salvador"
        },
        {
            "id": "213",
            "name": "Sint Maarten"
        },
        {
            "id": "214",
            "name": "Syria"
        },
        {
            "id": "215",
            "name": "Eswatini"
        },
        {
            "id": "216",
            "name": "Turks and Caicos Islands"
        },
        {
            "id": "217",
            "name": "Chad"
        },
        {
            "id": "218",
            "name": "French Southern Territories"
        },
        {
            "id": "219",
            "name": "Togo"
        },
        {
            "id": "220",
            "name": "Thailand"
        },
        {
            "id": "221",
            "name": "Tajikistan"
        },
        {
            "id": "222",
            "name": "Tokelau"
        },
        {
            "id": "223",
            "name": "Timor-Leste"
        },
        {
            "id": "224",
            "name": "Turkmenistan"
        },
        {
            "id": "225",
            "name": "Tunisia"
        },
        {
            "id": "226",
            "name": "Tonga"
        },
        {
            "id": "227",
            "name": "Turkey"
        },
        {
            "id": "228",
            "name": "Trinidad and Tobago"
        },
        {
            "id": "229",
            "name": "Tuvalu"
        },
        {
            "id": "230",
            "name": "Taiwan"
        },
        {
            "id": "231",
            "name": "Tanzania"
        },
        {
            "id": "232",
            "name": "Ukraine"
        },
        {
            "id": "233",
            "name": "Uganda"
        },
        {
            "id": "234",
            "name": "U.S. Minor Outlying Islands"
        },
        {
            "id": "235",
            "name": "United States"
        },
        {
            "id": "236",
            "name": "Uruguay"
        },
        {
            "id": "237",
            "name": "Uzbekistan"
        },
        {
            "id": "238",
            "name": "Vatican City"
        },
        {
            "id": "239",
            "name": "St Vincent and Grenadines"
        },
        {
            "id": "240",
            "name": "Venezuela"
        },
        {
            "id": "241",
            "name": "British Virgin Islands"
        },
        {
            "id": "242",
            "name": "U.S. Virgin Islands"
        },
        {
            "id": "243",
            "name": "Vietnam"
        },
        {
            "id": "244",
            "name": "Vanuatu"
        },
        {
            "id": "245",
            "name": "Wallis and Futuna"
        },
        {
            "id": "246",
            "name": "Samoa"
        },
        {
            "id": "247",
            "name": "Kosovo"
        },
        {
            "id": "248",
            "name": "Yemen"
        },
        {
            "id": "249",
            "name": "Mayotte"
        },
        {
            "id": "250",
            "name": "South Africa"
        },
        {
            "id": "251",
            "name": "Zambia"
        },
        {
            "id": "252",
            "name": "Zimbabwe"
        },
        {
            "id": "253",
            "name": "Cape Verde"
        },
        {
            "id": "254",
            "name": "Republic of the Congo"
        },
        {
            "id": "255",
            "name": "Democratic Republic of the Congo"
        },
        {
            "id": "256",
            "name": "Czech Republic"
        },
        {
            "id": "257",
            "name": "Saint Kitts and Nevis"
        },
        {
            "id": "258",
            "name": "Saint Vincent and the Grenadines"
        }
    ],
    "total_visa_charge": "150",
    "origincountry": "India",
    "destinationcountry": "United States",
    "documentname": "USA Visiting Visa Required Documents",
    "documents": "Invitation From your Family or Friends,Medical Insurance,Original Passport Issued by your country,Passports must have a validity of 6 months and at least 2 blank pages\t",
    "allnotes": [
        {
            "notes": "54",
            "name": "united states visiting visa notes",
            "all_note": "Need to have the vaccination certificate for sure and must carry"
        }
    ],
    "process_visa": [
        {
            "all_precess": "Enter Information, Do payment, Just fly"
        }
    ],
    "all_data": [
        {
            "id": "205",
            "country_id": "235",
            "visa_type_id": "127",
            "price": "160-$",
            "visa_validity": "10-Year",
            "length_of_stay": "180-Days",
            "time_to_get_visa": "15-30-Days",
            "entry_type": "Multiple",
            "description": "With this visa you can visit your Family and friends. This visa is valid for 10 years and you can stay in usa for 10 years.",
            "service_charge": "150-$",
            "date": "2022-11-06 00:24:23"
        }
    ]
}