This API helps to Link an Address to a Lead.
Generated from cURL: curl --location 'https://qa.emotivesoft.io/api/method/frappe.desk.form.save.savedocs'
--header 'Accept: application/json'
--header 'Accept-Language: en-US,en-GB;q=0.9,en;q=0.8'
--header 'Connection: keep-alive'
--header 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8'
--header 'Origin: https://qa.emotivesoft.io'
--header 'Referer: https://qa.emotivesoft.io/app/address/new-address-nerudlqsqi'
--header 'Sec-Fetch-Dest: empty'
--header 'Sec-Fetch-Mode: cors'
--header 'Sec-Fetch-Site: same-origin'
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36'
--header 'X-Frappe-CSRF-Token: 5bc7aee5c4686bee4762ed1e6d1dadb02ee3b9b170fda722e219e1d2'
--header 'X-Requested-With: XMLHttpRequest'
--header 'sec-ch-ua: "Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138"'
--header 'sec-ch-ua-mobile: ?0'
--header 'sec-ch-ua-platform: "Windows"'
--header 'Cookie: sid=3ac373dd54b8dae61495d45885f74a2f53d8f07dff3afc2a338dbf79; system_user=yes; full_name=Harshavardhan Amara; user_id=[email protected]; user_image=; full_name=Harshavardhan Amara; sid=3ac373dd54b8dae61495d45885f74a2f53d8f07dff3afc2a338dbf79; system_user=yes; user_id=[email protected]; user_image='
--data 'doc={
"doctype": "Address",
"address_type": "Physical",
"address_status": "Current",
"country": "United States",
"payment_type": "No Primary Housing Expense",
"address_line1": "129",
"address_line2": "129",
"city": "Florida",
"state":"FL",
"county":"walton",
"pincode":"75001",
"is_primary_address": 0,
"is_shipping_address": 0,
"disabled": 0,
"is_your_company_address": 0,
"links": [
{
"idx": 1,
"link_doctype": "Lead",
"link_name": "2025-LEAD-07-0000011"
}
]
}&action=Save'
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Example Request
doc={
"doctype": "Address",
"address_type": "Physical",
"address_status": "Current",
"country": "United States",
"payment_type": "No Primary Housing Expense",
"address_line1": "129",
"address_line2": "129",
"city": "Florida",
"state":"FL",
"county":"walton",
"pincode":"75001",
"is_primary_address": 0,
"is_shipping_address": 0,
"disabled": 0,
"is_your_company_address": 0,
"links": [
{
"idx": 1,
"link_doctype": "Lead",
"link_name": "2025-LEAD-07-0000011"
}
]
}&action=Save
Response Explanation
A successful response includes the saved document’s details.
Response Body Parameters
-
docs (
string)
A JSON string representation of the created or updated Address document, including all request fields and linkage information. The string contains:-
doctype (
string)
The type of document, here always"Address". -
address_type (
string)
The type of address, e.g.,"Physical". -
address_status (
string)
Status of the address, e.g.,"Current". -
country (
string)
Country of the address, e.g.,"United States". -
payment_type (
string)
Indicates housing expense/payment type, e.g.,"No Primary Housing Expense". -
address_line1 (
string)
First line of the address, e.g.,"129". -
address_line2 (
string)
Second line of the address, e.g.,"129". -
city (
string)
City of the address, e.g.,"Florida". -
state (
string)
State abbreviation, e.g.,"FL". -
county (
string)
County, e.g.,"walton". -
pincode (
string)
Postal code/ZIP code, e.g.,"75001". -
is_primary_address (
integer)
Indicates if this is the primary address (0for false,1for true). -
is_shipping_address (
integer)
Indicates if this is a shipping address (0for false,1for true). -
disabled (
integer)
Indicates if the address is disabled (0for false,1for true). -
is_your_company_address (
integer)
Indicates if this is a company address (0for false,1for true). -
links (
array)
An array of objects showing which document(s) the Address is related to.
Each object contains:- idx (
integer) — Array index number. - link_doctype (
string) — Target document type, e.g.,"Lead". - link_name (
string) — Target document ID, e.g.,"2025-LEAD-07-0000011".
- idx (
-
action (
string)
Value is"Save"indicating the operation performed.
-
Example Response
{
"docs": "{ \"doctype\": \"Address\", \"address_type\": \"Physical\", \"address_status\": \"Current\", \"country\": \"United States\", \"payment_type\": \"No Primary Housing Expense\", \"address_line1\": \"129\", \"address_line2\": \"129\", \"city\": \"Florida\", \"state\":\"FL\", \"county\":\"walton\", \"pincode\":\"75001\", \"is_primary_address\": 0, \"is_shipping_address\": 0, \"disabled\": 0, \"is_your_company_address\": 0, \"links\": [ { \"idx\": 1, \"link_doctype\": \"Lead\", \"link_name\": \"2025-LEAD-07-0000011\" } ] }&action=Save"
}