[{"data":1,"prerenderedAt":346},["ShallowReactive",2],{"page:\u002Ftroubleshooting":3},{"id":4,"title":5,"body":6,"description":336,"extension":337,"meta":338,"navigation":339,"operation":340,"path":341,"rawbody":342,"seo":343,"stem":344,"__hash__":345},"docs\u002Ftroubleshooting.md","Troubleshooting",{"type":7,"value":8,"toc":318},"minimark",[9,14,23,70,74,87,91,98,109,120,124,149,157,191,195,240,244,255,259,262,266,273,277,299,303,306,310],[10,11,13],"h2",{"id":12},"every-request-returns-401","Every request returns 401",[15,16,17,18,22],"p",{},"Read the ",[19,20,21],"code",{},"detail"," of the response — it names the cause. The most common ones:",[24,25,26,44,52],"ul",{},[27,28,29,35,36,39,40,43],"li",{},[30,31,32],"strong",{},[19,33,34],{},"API key required"," — the header did not reach the API. Check its name (",[19,37,38],{},"X-Api-Key","), and that no proxy, gateway or HTTP library drops custom headers. ",[19,41,42],{},"Authorization: Bearer"," is not accepted.",[27,45,46,51],{},[30,47,48],{},[19,49,50],{},"Invalid API key format"," — the value was cut, or includes quotes or whitespace. Environment files often add quotes; print the length of the value you send.",[27,53,54,59,60,65,66,69],{},[30,55,56],{},[19,57,58],{},"API key expired"," or ",[30,61,62],{},[19,63,64],{},"API key is revoked"," — create a new key or reactivate it in ",[30,67,68],{},"Settings → API",".",[10,71,73],{"id":72},"a-working-key-gets-401-lack-of-permissions","A working key gets 401 \"Lack of permissions\"",[15,75,76,77,82,83,69],{},"The key is valid but lacks the endpoint's scope. Call ",[78,79,81],"a",{"href":80},"\u002Fme","Retrieve key context"," to see the scopes it has. Scopes are fixed at creation, so create a new key with the right ones — see ",[78,84,86],{"href":85},"\u002Fauthentication#scopes","scopes",[10,88,90],{"id":89},"a-property-is-in-vestta-but-not-in-the-api","A property is in Vestta but not in the API",[15,92,93,94,97],{},"The API only returns the ",[30,95,96],{},"public catalogue",". Check in Vestta that the property:",[24,99,100,103,106],{},[27,101,102],{},"is marked as public;",[27,104,105],{},"is not sold, rented or withdrawn;",[27,107,108],{},"belongs to the workspace of the key you are using.",[15,110,111,112,116,117,69],{},"The same rules make ",[78,113,115],{"href":114},"\u002Fproperties\u002Fretrieve","Retrieve a property"," return ",[19,118,119],{},"404",[10,121,123],{"id":122},"a-property-has-no-address","A property has no address",[15,125,126,129,130,133,134,129,137,140,141,144,145,69],{},[19,127,128],{},"address",", ",[19,131,132],{},"postal_code"," and the coordinates follow the property's address privacy setting: with a hidden location only ",[19,135,136],{},"city",[19,138,139],{},"province"," and ",[19,142,143],{},"country"," are returned, and with an approximate location the coordinates are rounded to about 1 km. See ",[78,146,148],{"href":147},"\u002Fproperties#address-privacy","Address privacy",[10,150,152,153,156],{"id":151},"rent-prices-are-missing-or-price-is-0","Rent prices are missing or ",[19,154,155],{},"price"," is 0",[15,158,159,161,162,165,166,140,169,172,173,176,177,129,180,140,183,186,187,69],{},[19,160,155],{}," is the ",[30,163,164],{},"sale"," price. Monthly rent and transfer prices live in ",[19,167,168],{},"specs.price_calc.price_alq",[19,170,171],{},"specs.price_calc.price_trasp",". Filter with ",[19,174,175],{},"operation=alquiler"," to make ",[19,178,179],{},"min_price",[19,181,182],{},"max_price",[19,184,185],{},"sort"," use the rent. See ",[78,188,190],{"href":189},"\u002Fproperties#operations-and-prices","Operations and prices",[10,192,194],{"id":193},"a-map-filter-returns-nothing-or-everything","A map filter returns nothing, or everything",[24,196,197,208,226,229],{},[27,198,199,200,203,204,207],{},"If ",[19,201,202],{},"locations"," is not valid JSON, it is ignored and you get every property. Check ",[19,205,206],{},"filters.locations"," in the response: it lists the areas that were applied.",[27,209,210,211,214,215,218,219,222,223,225],{},"Areas need a ",[19,212,213],{},"geometry"," (or ",[19,216,217],{},"\"type\": \"point\"","): ",[19,220,221],{},"{ \"name\": \"Madrid\" }"," is ignored. Use the ",[19,224,136],{}," filter for names.",[27,227,228],{},"Properties with a hidden location never match an area, and approximate ones are matched by their rounded coordinates.",[27,230,231,232,235,236,239],{},"Coordinates are ",[19,233,234],{},"lat","\u002F",[19,237,238],{},"lng"," in degrees; swapping them puts the area in another part of the world.",[10,241,243],{"id":242},"a-rental-lead-returns-200-but-does-not-appear","A rental lead returns 200 but does not appear",[15,245,246,250,251,254],{},[78,247,249],{"href":248},"\u002Fleads\u002Fingest","Ingest a rental lead"," does not create a lead when the workspace already has one with the same phone, and still returns ",[19,252,253],{},"200",". Search for the phone in Vestta: the existing lead is the one the agency will work with.",[10,256,258],{"id":257},"create-an-inquiry-returns-409","Create an inquiry returns 409",[15,260,261],{},"A lead with the same primary phone already exists in the workspace. The contact is already in Vestta; do not retry.",[10,263,265],{"id":264},"a-lead-request-fails-with-422-for-the-phone","A lead request fails with 422 for the phone",[15,267,268,269,272],{},"Send numbers in international format, such as ",[19,270,271],{},"+34600111222",". Numbers without a prefix are read as Spanish, so foreign numbers need their prefix.",[10,274,276],{"id":275},"a-rental-lead-fails-with-500","A rental lead fails with 500",[15,278,279,280,283,284,287,288,291,292,59,295,298],{},"Check ",[19,281,282],{},"search.budget",": it must be a whole number (",[19,285,286],{},"1200",") or a range of whole numbers (",[19,289,290],{},"900-1200","). Values like ",[19,293,294],{},"1.200",[19,296,297],{},"1200€"," cause a server error.",[10,300,302],{"id":301},"the-lead-did-not-get-a-whatsapp-message","The lead did not get a WhatsApp message",[15,304,305],{},"The automatic first message is only sent when the workspace has WhatsApp connected in Vestta, and only once per lead. Lead creation does not depend on it.",[10,307,309],{"id":308},"requests-from-the-browser","Requests from the browser",[15,311,312,313,317],{},"The API answers cross-origin requests, but calling it from front-end code exposes your key to every visitor. Send requests from your server. For public forms, post to your backend and call ",[78,314,316],{"href":315},"\u002Fleads\u002Finquiries","Create an inquiry"," from there.",{"title":319,"searchDepth":320,"depth":320,"links":321},"",3,[322,324,325,326,327,329,330,331,332,333,334,335],{"id":12,"depth":323,"text":13},2,{"id":72,"depth":323,"text":73},{"id":89,"depth":323,"text":90},{"id":122,"depth":323,"text":123},{"id":151,"depth":323,"text":328},"Rent prices are missing or price is 0",{"id":193,"depth":323,"text":194},{"id":242,"depth":323,"text":243},{"id":257,"depth":323,"text":258},{"id":264,"depth":323,"text":265},{"id":275,"depth":323,"text":276},{"id":301,"depth":323,"text":302},{"id":308,"depth":323,"text":309},"Fixes for the problems integrations with the Vestta API run into most often.","md",{},true,null,"\u002Ftroubleshooting","---\ntitle: Troubleshooting\ndescription: Fixes for the problems integrations with the Vestta API run into most often.\n---\n\n## Every request returns 401\n\nRead the `detail` of the response — it names the cause. The most common ones:\n\n- **`API key required`** — the header did not reach the API. Check its name (`X-Api-Key`), and that no proxy, gateway or HTTP library drops custom headers. `Authorization: Bearer` is not accepted.\n- **`Invalid API key format`** — the value was cut, or includes quotes or whitespace. Environment files often add quotes; print the length of the value you send.\n- **`API key expired`** or **`API key is revoked`** — create a new key or reactivate it in **Settings → API**.\n\n## A working key gets 401 \"Lack of permissions\"\n\nThe key is valid but lacks the endpoint's scope. Call [Retrieve key context](\u002Fme) to see the scopes it has. Scopes are fixed at creation, so create a new key with the right ones — see [scopes](\u002Fauthentication#scopes).\n\n## A property is in Vestta but not in the API\n\nThe API only returns the **public catalogue**. Check in Vestta that the property:\n\n- is marked as public;\n- is not sold, rented or withdrawn;\n- belongs to the workspace of the key you are using.\n\nThe same rules make [Retrieve a property](\u002Fproperties\u002Fretrieve) return `404`.\n\n## A property has no address\n\n`address`, `postal_code` and the coordinates follow the property's address privacy setting: with a hidden location only `city`, `province` and `country` are returned, and with an approximate location the coordinates are rounded to about 1 km. See [Address privacy](\u002Fproperties#address-privacy).\n\n## Rent prices are missing or `price` is 0\n\n`price` is the **sale** price. Monthly rent and transfer prices live in `specs.price_calc.price_alq` and `specs.price_calc.price_trasp`. Filter with `operation=alquiler` to make `min_price`, `max_price` and `sort` use the rent. See [Operations and prices](\u002Fproperties#operations-and-prices).\n\n## A map filter returns nothing, or everything\n\n- If `locations` is not valid JSON, it is ignored and you get every property. Check `filters.locations` in the response: it lists the areas that were applied.\n- Areas need a `geometry` (or `\"type\": \"point\"`): `{ \"name\": \"Madrid\" }` is ignored. Use the `city` filter for names.\n- Properties with a hidden location never match an area, and approximate ones are matched by their rounded coordinates.\n- Coordinates are `lat`\u002F`lng` in degrees; swapping them puts the area in another part of the world.\n\n## A rental lead returns 200 but does not appear\n\n[Ingest a rental lead](\u002Fleads\u002Fingest) does not create a lead when the workspace already has one with the same phone, and still returns `200`. Search for the phone in Vestta: the existing lead is the one the agency will work with.\n\n## Create an inquiry returns 409\n\nA lead with the same primary phone already exists in the workspace. The contact is already in Vestta; do not retry.\n\n## A lead request fails with 422 for the phone\n\nSend numbers in international format, such as `+34600111222`. Numbers without a prefix are read as Spanish, so foreign numbers need their prefix.\n\n## A rental lead fails with 500\n\nCheck `search.budget`: it must be a whole number (`1200`) or a range of whole numbers (`900-1200`). Values like `1.200` or `1200€` cause a server error.\n\n## The lead did not get a WhatsApp message\n\nThe automatic first message is only sent when the workspace has WhatsApp connected in Vestta, and only once per lead. Lead creation does not depend on it.\n\n## Requests from the browser\n\nThe API answers cross-origin requests, but calling it from front-end code exposes your key to every visitor. Send requests from your server. For public forms, post to your backend and call [Create an inquiry](\u002Fleads\u002Finquiries) from there.\n",{"title":5,"description":336},"troubleshooting","iKbtvKWHsuO9o4J1t8sUSwQaB9Xd60cF0lpXToep7Uc",1791110048573]