{
	"info": {
		"_postman_id": "033b42bb-c7c0-4b3a-9187-2e370b73adfa",
		"name": "crm-ventures",
		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
		"_exporter_id": "24312322",
		"_collection_link": "https://bold-meteor-54090.postman.co/workspace/Team-Workspace~e25aca89-6efb-4113-8601-9dde803124ed/collection/7701183-033b42bb-c7c0-4b3a-9187-2e370b73adfa?action=share&source=collection_link&creator=24312322"
	},
	"item": [
		{
			"name": "property finder",
			"item": [
				{
					"name": "Authentication",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"apiKey = \"MJKoK.eAhRrCEGzyu6DtWrLoSfXyhmZ9cJgv3eP2\";",
									"secreteKey = \"74e33904ce62c4d841eefa6273a4e716\";",
									"credentials = btoa(apiKey + ':' + secreteKey);",
									"pm.request.headers.add({",
									"    key: \"Authorization\",",
									"    value: \"Basic \" + credentials",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();",
									"var accessToken = jsonData.access_token;",
									"pm.environment.set('pf_accessToken', accessToken);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"scope\": \"openid\",\n    \"grant_type\": \"client_credentials\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://auth.propertyfinder.com/auth/oauth/v1/token"
					},
					"response": []
				},
				{
					"name": "Users",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [
							{
								"key": "",
								"value": "",
								"type": "text",
								"disabled": true
							}
						],
						"url": "{{pf_apiUrl}}/users"
					},
					"response": []
				},
				{
					"name": "Leads",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{pf_apiUrl}}/leads?filters[created][from]=2024-08-19&filters[created][to]=2024-09-20",
							"host": [
								"{{pf_apiUrl}}"
							],
							"path": [
								"leads"
							],
							"query": [
								{
									"key": "filters[created][from]",
									"value": "2024-08-19"
								},
								{
									"key": "filters[created][to]",
									"value": "2024-09-20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Call Tracking",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": "{{pf_apiUrl}}/calltrackings"
					},
					"response": []
				},
				{
					"name": "Whatsapp Leads",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{pf_apiUrl}}/whatsapp-leads?filters[date][from]=2024-09-19&filters[date][to]=2024-09-20",
							"host": [
								"{{pf_apiUrl}}"
							],
							"path": [
								"whatsapp-leads"
							],
							"query": [
								{
									"key": "filters[date][from]",
									"value": "2024-09-19"
								},
								{
									"key": "filters[date][to]",
									"value": "2024-09-20"
								},
								{
									"key": "filters[status]",
									"value": "delivered",
									"disabled": true
								},
								{
									"key": "page",
									"value": "2",
									"disabled": true
								},
								{
									"key": "per_page",
									"value": "100",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Properties",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": "{{pf_apiUrl}}/properties"
					},
					"response": []
				},
				{
					"name": "Client",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": "{{pf_apiUrl}}/clients/settings"
					},
					"response": []
				},
				{
					"name": "Locations",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [
							{
								"key": "",
								"value": "",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{pf_apiUrl}}/locations?filters[string]=Al Bustan Complex",
							"host": [
								"{{pf_apiUrl}}"
							],
							"path": [
								"locations"
							],
							"query": [
								{
									"key": "filters[paths][]",
									"value": "are.1.50.3092",
									"disabled": true
								},
								{
									"key": "filters[string]",
									"value": "Al Bustan Complex"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Property Options",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "OPTIONS",
						"header": [],
						"url": "{{pf_apiUrl}}/properties"
					},
					"response": []
				},
				{
					"name": "Create Property",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "[\n  {\n    \"property\": {\n      \"reference\": \"OPT37592\",\n      \"crm_reference\": 37592,\n      \"draft\": true,\n      \"bathrooms\": 5,\n      \"bedrooms\": 5,\n      \"size\": 875,\n      \"built_up_area\": 875,\n      \"type\": 10,\n      \"status\": \"available\",\n      \"location\": {\n        \"id\": \"are.1.46.11768\",\n        \"city\": \"Dubai\",\n        \"community\": \" Dubai Investment Park\",\n        \"sub_community\": \"Cloisall\"\n      },\n      \"amenities\": [25, 71, 72, 35, 34, 24],\n      \"views\": [\n        \"Sea/Water view\"\n      ],\n      \"price\": {\n        \"offering_type\": \"sale\",\n        \"value\": 1795000\n      },\n      \"languages\": {\n        \"en\": {\n          \"title\": \"Contemporary 5 Bedroom Villa Marbella\",\n          \"description\": \"Private pool. Solarium 160 sq.m.,  Pool house, Terrace 74 sq.m.,  Porch 123 sq.m. An unique setting offering high quality modern contemporary villas in a quiet, purely residential gated community with lush natural landscapes and a stimulating cosmopolitan center nearby. \\n\\nYou can retreat into your peaceful surroundings and engage with the excitement around you. A destination for natural beauty, socialization, activities and culture.\\n\\nPlease contact us for further information.\"\n        }\n      }\n    },\n     \"user\": 152993\n  }\n]",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "{{pf_apiUrl}}/properties"
					},
					"response": []
				},
				{
					"name": "Create Property Copy",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"property\": {\n        \"reference\": \"588332\",\n        \"draft\": true,\n        \"bathrooms\": 2,\n        \"bedrooms\": 2,\n        \"size\": 1225.25,\n        \"built_up_area\": 1225.25,\n        \"plot_size\": 390.04,\n        \"type\": 1,\n        \"status\": \"available\",\n        \"floor_number\": 3,\n        \"floors\": 9,\n        \"street_number\": \"4\",\n        \"street_name\": \"al saeed\",\n        \"parking\": 3,\n        \"location\": {\n            \"id\": \"are.2.9755\",\n            \"city\": \"Dubai\",\n            \"community\": \"Dubai Harbour\",\n            \"sub_community\": \"EMAAR Beachfront\"\n        },\n        \"occupancy\": \"vacant\",\n        \"project_status\": \"off_plan_primary\",\n        \"build_year\": 1996,\n        \"amenities\": {\n            \"0\": 28,\n            \"1\": 39,\n            \"2\": 25,\n            \"3\": 78,\n            \"6\": 61,\n            \"14\": 66,\n            \"15\": 69,\n            \"16\": 64,\n            \"17\": 65,\n            \"18\": 35,\n            \"19\": 74,\n            \"20\": 34,\n            \"21\": 91,\n            \"22\": 4,\n            \"23\": 83,\n            \"24\": 8,\n            \"25\": 23,\n            \"27\": 2\n        },\n        \"images\": [\n            {\n                \"image\": {\n                    \"order\": 1,\n                    \"id\": 340734468,\n                    \"token\": \"c04898ee-2a56-11ef-a2c2-d2387860723d\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 1,\n                    \"id\": 182647322,\n                    \"token\": \"c27975c9-2a56-11ef-a3f5-da17b436042e\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 2,\n                    \"id\": 182647321,\n                    \"token\": \"c3f48351-2a56-11ef-8e24-0ef1d106ec60\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 3,\n                    \"id\": 182647323,\n                    \"token\": \"c57a08ef-2a56-11ef-b88d-36ceb7b356b7\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 4,\n                    \"id\": 182647324,\n                    \"token\": \"c7041747-2a56-11ef-a2c2-d2387860723d\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 5,\n                    \"id\": 182647326,\n                    \"token\": \"c9217a58-2a56-11ef-88c1-32926490c6ce\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 6,\n                    \"id\": 182647325,\n                    \"token\": \"ca98ea5f-2a56-11ef-9a19-7a7483e359f7\"\n                }\n            },\n            {\n                \"image\": {\n                    \"order\": 7,\n                    \"id\": 182647327,\n                    \"token\": \"cc18f46b-2a56-11ef-a3f5-da17b436042e\"\n                }\n            }\n        ],\n        \"financial_status\": \"mortgage\",\n        \"fields\": {\n            \"basic\": \"basic value\"\n        },\n        \"price\": {\n            \"offering_type\": \"sale\",\n            \"value\": 3900000\n        },\n        \"languages\": {\n            \"en\": {\n                \"title\": \"Bright | SPACIOUS | BluWaters View | Huge Balcony\",\n                \"description\": \"Al Sayab Real Estate is pleased to present this two-bedroom apartment with fantastic Marina Views in Beach Mansion Tower 2, EMAAR beachfront.\\n\\nBeach Mansion offers a wide range of 1 to 4-bedroom luxury apartments, townhouses, and penthouses, all sharing the utmost elegance in contemporary architecture and interiors. Overlooking one of Dubai's most revered beaches, the promenade, and the lush greenery of the adjacent park, the luxurious apartments in Beach Mansion have been carefully orientated to best capture unmatched views.\\n\\nUNIT DETAILS:\\n- 2 Bedroom\\n- 2 Bathrooms\\n- Fully Fitted Luxury Kitchen with Appliances\\n- Post Handover Payment Plan\\n- Built-in Wardrobes\\n- Central A\\/C\\n- Interiors and Aesthetics by Emaar\\n\\nFEATURES:\\n- Private beach access\\n- Outdoor pool deck\\n- Retail outlets and restaurant\\n- Exclusive parking and guest parking\\n- Fully-equipped gym\\n- Children's play area\\n\\nFor details kindly Call or WhatsApp at 0551199426.\\n\\nAl Sayab Real Estate is based in Dubai with over 05 years of experience in Real Estate and Property Investments industry. We provide property consultation with a diverse portfolio of investment opportunities and real estate projects.\"\n            }\n        },\n        \"licenses\": {\n            \"rera_listing\": {\n                \"number\": \"71377151716\",\n                \"validation\": \"automatic\"\n            }\n        },\n        \"user\": 152993\n    }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "{{pf_apiUrl}}/properties"
					},
					"response": []
				},
				{
					"name": "Upload",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "POST",
						"header": [
							{
								"key": "content-type",
								"value": "multipart/form-data",
								"type": "text"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "file",
									"type": "file",
									"src": "/home/husnain/Pictures/pf/d9996788-8dd6-11ee-9e5a-02cc1e8b5896 (1).jpeg",
									"disabled": true
								},
								{
									"key": "file",
									"type": "file",
									"src": "/home/husnain/Pictures/pf/d9996788-8dd6-11ee-9e5a-02cc1e8b5896.jpeg"
								}
							]
						},
						"url": {
							"raw": "{{pf_apiUrl}}/upload?type=property_image&",
							"host": [
								"{{pf_apiUrl}}"
							],
							"path": [
								"upload"
							],
							"query": [
								{
									"key": "type",
									"value": "property_image"
								},
								{
									"key": "",
									"value": null
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Property",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": "{{pf_apiUrl}}/properties/8493495"
					},
					"response": []
				},
				{
					"name": "Update",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"property\": {\n        \"id\": 9069840,\n        \"bathrooms\": 5,\n        \"bedrooms\": 5,\n        \"size\": 368,\n        \"built_up_area\": 368,\n        \"plot_size\": 390.04,\n        \"floor_number\": 3,\n        \"floors\": 9,\n        \"type\": 1,\n        \"status\": \"available\",\n        \"languages\": {\n            \"en\": {\n                \"title\": \"Bright | SPACIOUS | BluWaters View | Huge Balcony\",\n                \"description\": \"Al Sayab Real Estate is pleased to present this two-bedroom apartment with fantastic Marina Views in Beach Mansion Tower 2, EMAAR beachfront.\\n\\nBeach Mansion offers a wide range of 1 to 4-bedroom luxury apartments, townhouses, and penthouses, all sharing the utmost elegance in contemporary architecture and interiors. Overlooking one of Dubai's most revered beaches, the promenade, and the lush greenery of the adjacent park, the luxurious apartments in Beach Mansion have been carefully orientated to best capture unmatched views.\\n\\nUNIT DETAILS:\\n- 2 Bedroom\\n- 2 Bathrooms\\n- Fully Fitted Luxury Kitchen with Appliances\\n- Post Handover Payment Plan\\n- Built-in Wardrobes\\n- Central A\\/C\\n- Interiors and Aesthetics by Emaar\\n\\nFEATURES:\\n- Private beach access\\n- Outdoor pool deck\\n- Retail outlets and restaurant\\n- Exclusive parking and guest parking\\n- Fully-equipped gym\\n- Children's play area\\n\\nFor details kindly Call or WhatsApp at 0551199426.\\n\\nAl Sayab Real Estate is based in Dubai with over 05 years of experience in Real Estate and Property Investments industry. We provide property consultation with a diverse portfolio of investment opportunities and real estate projects.\"\n            }\n        },\n        \"location\": {\n            \"id\": \"are.2.9755\",\n            \"city\": \"Dubai\",\n            \"community\": \"Dubai Harbour\",\n            \"sub_community\": \"EMAAR Beachfront\"\n        },\n        \"price\": {\n            \"offering_type\": \"sale\",\n            \"value\": 5900000\n        },\n        \"project_status\": \"off_plan_primary\",\n        \"documents\": [\n            {\n                \"document\": {\n                    \"token\": \"6b1a3e08-2a3f-11ef-bc6b-d6ed63e110fa\",\n                    \"order\": 1,\n                    \"title\": \"title_deed doc 2\",\n                    \"tag\": \"Title Deed\"\n                }\n            }\n        ]\n    }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "{{pf_apiUrl}}/properties/9075441"
					},
					"response": []
				},
				{
					"name": "Delete Property",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "DELETE",
						"header": [],
						"url": "{{pf_apiUrl}}/properties/9069840"
					},
					"response": []
				},
				{
					"name": "Document Submition",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{pf_accessToken}}"
							}
						},
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "multipart/form-data",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "document_type",
									"value": "title_deed",
									"type": "text"
								},
								{
									"key": "document",
									"type": "file",
									"src": "/home/husnain/Documents/gift-deed.pdf"
								}
							]
						},
						"url": "{{pf_apiUrl}}/properties/5920990"
					},
					"response": []
				}
			]
		},
		{
			"name": "Mailbox",
			"item": [
				{
					"name": "r=settings/send-email",
					"request": {
						"method": "GET",
						"header": []
					},
					"response": []
				}
			]
		},
		{
			"name": "External Services",
			"item": [
				{
					"name": "New Request",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"husnain Shabbir\",\n    \"email\": \"husnainshabbir1320@gmai.com\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://548a-206-42-124-182.ngrok-free.app/external-service/whatsapp-messages/webhook"
					},
					"response": []
				}
			]
		},
		{
			"name": "Bayut",
			"item": [
				{
					"name": "leads",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{bayut_ApiKey}}"
							}
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{bayut_leadUrl}}?type=whatsapp_leads&timestamp=2024-09-20 12:19:47",
							"host": [
								"{{bayut_leadUrl}}"
							],
							"query": [
								{
									"key": "type",
									"value": "phone_views",
									"disabled": true
								},
								{
									"key": "type",
									"value": "call_logs",
									"disabled": true
								},
								{
									"key": "type",
									"value": "sms_clicks",
									"disabled": true
								},
								{
									"key": "type",
									"value": "whatsapp_views",
									"disabled": true
								},
								{
									"key": "type",
									"value": "whatsapp_leads"
								},
								{
									"key": "type",
									"value": "leads",
									"disabled": true
								},
								{
									"key": "timestamp",
									"value": "2024-09-20 12:19:47"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "commercial-listing",
			"request": {
				"method": "GET",
				"header": []
			},
			"response": []
		},
		{
			"name": "WebLead",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n  \"forename\": \"John\",\n  \"surname\": \"Doe\",\n  \"phone\": \"+1234567890\",\n  \"message\": \"This is a test message.\",\n  \"email\": \"john.doe@example2.com\",\n  \"agency\": \"6638778d590a4028e504daf2\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": "{{local_node_api}}accounts/web-lead"
			},
			"response": []
		}
	],
	"variable": [
		{
			"key": "bayut_apiUrl",
			"value": "www.bayut.com/api-v7"
		},
		{
			"key": "local_yii_api",
			"value": "http://localhost:8082/ng-crm/yiiapp/frontend/web/index.php"
		}
	]
}