{
  "info": {
    "_postman_id": "6f2b6a3e-5b1d-4a77-9c35-0c1ed2a4b0a1",
    "name": "VelBEE lead intake",
    "description": "Send property-portal enquiries to a VelBEE workspace.\n\nSet the collection variable ingest_url to the secret address your customer gave you (it looks like https://api.velbee.com/v1/ingest/src_xxxxxxxxxxxxxxxxxxxx/vbu_xxxxxxxxxxxxxxxxxxxx), then send the requests. The address is the whole interface: no API key and no login. Treat it like a password.\n\nEvery request except 'Wrong address' creates a real lead in the customer's workspace, so use the name TEST and ask the customer to delete the leads afterwards.\n\nTechnical sheet: https://velbee.com/resources/portal-integration",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "VelBEE lead intake",
      "description": "The six requests, in the order to run them.",
      "item": [
        {
          "name": "Send one enquiry",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// A fresh enquiry id for every run, so each send is a new enquiry (the duplicate request below re-uses it on purpose).",
                  "pm.collectionVariables.set('enquiry_id', 'TEST-' + Date.now());"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Accepted (a 2xx answer)', function () { pm.expect(pm.response.code).to.be.within(200, 299); });",
                  "pm.test('The answer says ok', function () { pm.expect(pm.response.json().ok).to.eql(true); });",
                  "pm.test('It is a new enquiry, not a duplicate', function () { pm.expect(pm.response.json().duplicate).to.eql(false); });"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{ingest_url}}",
              "host": [
                "{{ingest_url}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}\",\n  \"name\": \"Asha Verma\",\n  \"mobile\": \"+919876543210\",\n  \"email\": \"asha@example.com\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"city\": \"Hyderabad\",\n  \"budget\": \"1.2 Cr\",\n  \"enquired_at\": \"2026-10-08T14:32:10+05:30\",\n  \"message\": \"Please call after 6 pm\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sends one enquiry as JSON to your address. Each run uses a new enquiry id, so each run creates one new lead. Expected answer: 200 with ok true and duplicate false. (Your customer can change the success code to 201 or 202, so any 2xx counts as success.) The enquiry is a real lead in your customer's workspace, so use the name TEST when you try this against a live address."
          },
          "response": [
            {
              "name": "Accepted (200)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{ingest_url}}",
                  "host": [
                    "{{ingest_url}}"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}\",\n  \"name\": \"Asha Verma\",\n  \"mobile\": \"+919876543210\",\n  \"email\": \"asha@example.com\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"city\": \"Hyderabad\",\n  \"budget\": \"1.2 Cr\",\n  \"enquired_at\": \"2026-10-08T14:32:10+05:30\",\n  \"message\": \"Please call after 6 pm\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"duplicate\": false,\n  \"message\": \"Thank you. We have received your details and will be in touch.\",\n  \"redirect\": null\n}"
            }
          ]
        },
        {
          "name": "Send three enquiries in one request (JSON list)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// A fresh enquiry id for every run, so each send is a new enquiry (the duplicate request below re-uses it on purpose).",
                  "pm.collectionVariables.set('enquiry_id', 'TEST-' + Date.now());"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Accepted (a 2xx answer)', function () { pm.expect(pm.response.code).to.be.within(200, 299); });",
                  "pm.test('All three were received', function () { var j = pm.response.json(); pm.expect(j.received).to.eql(3); pm.expect(j.refused).to.eql(0); pm.expect(j.created + j.duplicate).to.eql(3); });"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{ingest_url}}",
              "host": [
                "{{ingest_url}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "[\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-A\",\n    \"name\": \"Ravi Kumar\",\n    \"mobile\": \"9811100001\",\n    \"project_name\": \"Lakeview Residences, 3 BHK\"\n  },\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-B\",\n    \"name\": \"Meera Nair\",\n    \"mobile\": \"9811100002\",\n    \"email\": \"meera@example.com\"\n  },\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-C\",\n    \"name\": \"Kabir Shah\",\n    \"email\": \"kabir@example.com\",\n    \"message\": \"Email me the brochure\"\n  }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sends a JSON list of three enquiries in one request. A list may hold up to 100 enquiries and counts as one request towards the rate limit. Expected answer: 200 with received 3 and created 3. If some enquiries in a list are refused, the answer is 207 and says how many were created, duplicate and refused."
          },
          "response": [
            {
              "name": "All accepted (200)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{ingest_url}}",
                  "host": [
                    "{{ingest_url}}"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "[\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-A\",\n    \"name\": \"Ravi Kumar\",\n    \"mobile\": \"9811100001\",\n    \"project_name\": \"Lakeview Residences, 3 BHK\"\n  },\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-B\",\n    \"name\": \"Meera Nair\",\n    \"mobile\": \"9811100002\",\n    \"email\": \"meera@example.com\"\n  },\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-C\",\n    \"name\": \"Kabir Shah\",\n    \"email\": \"kabir@example.com\",\n    \"message\": \"Email me the brochure\"\n  }\n]",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"received\": 3,\n  \"created\": 3,\n  \"duplicate\": 0,\n  \"refused\": 0\n}"
            },
            {
              "name": "Some refused (207)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{ingest_url}}",
                  "host": [
                    "{{ingest_url}}"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "[\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-A\",\n    \"name\": \"Ravi Kumar\",\n    \"mobile\": \"9811100001\",\n    \"project_name\": \"Lakeview Residences, 3 BHK\"\n  },\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-B\",\n    \"name\": \"Meera Nair\",\n    \"mobile\": \"9811100002\",\n    \"email\": \"meera@example.com\"\n  },\n  {\n    \"enquiry_id\": \"{{enquiry_id}}-C\",\n    \"name\": \"Kabir Shah\",\n    \"email\": \"kabir@example.com\",\n    \"message\": \"Email me the brochure\"\n  }\n]",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Multi-Status",
              "code": 207,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": false,\n  \"received\": 3,\n  \"created\": 2,\n  \"duplicate\": 0,\n  \"refused\": 1\n}"
            }
          ]
        },
        {
          "name": "Send the same enquiry again (duplicate: true expected)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Accepted (a 2xx answer)', function () { pm.expect(pm.response.code).to.be.within(200, 299); });",
                  "pm.test('It is recognised as a repeat', function () { pm.expect(pm.response.json().duplicate).to.eql(true); });",
                  "pm.test('Nothing new was created', function () { pm.expect(pm.response.json().ok).to.eql(true); });"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{ingest_url}}",
              "host": [
                "{{ingest_url}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}\",\n  \"name\": \"Asha Verma\",\n  \"mobile\": \"+919876543210\",\n  \"email\": \"asha@example.com\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"city\": \"Hyderabad\",\n  \"budget\": \"1.2 Cr\",\n  \"enquired_at\": \"2026-10-08T14:32:10+05:30\",\n  \"message\": \"Please call after 6 pm\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sends the same enquiry id again. Run 'Send one enquiry' first (in Postman's runner the order is already right). Expected answer: 200 with duplicate true, and no second lead. This is why a portal should always send its own enquiry id: retries are then safe."
          },
          "response": [
            {
              "name": "Repeat ignored (200)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{ingest_url}}",
                  "host": [
                    "{{ingest_url}}"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}\",\n  \"name\": \"Asha Verma\",\n  \"mobile\": \"+919876543210\",\n  \"email\": \"asha@example.com\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"city\": \"Hyderabad\",\n  \"budget\": \"1.2 Cr\",\n  \"enquired_at\": \"2026-10-08T14:32:10+05:30\",\n  \"message\": \"Please call after 6 pm\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"duplicate\": true,\n  \"message\": \"Thank you. We have received your details and will be in touch.\"\n}"
            }
          ]
        },
        {
          "name": "Send as form data",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Accepted (a 2xx answer)', function () { pm.expect(pm.response.code).to.be.within(200, 299); });",
                  "pm.test('The answer says ok', function () { pm.expect(pm.response.json().ok).to.eql(true); });"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{ingest_url}}",
              "host": [
                "{{ingest_url}}"
              ]
            },
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "enquiry_id",
                  "value": "{{enquiry_id}}-FORM"
                },
                {
                  "key": "name",
                  "value": "Form Sender"
                },
                {
                  "key": "mobile",
                  "value": "9811100003"
                },
                {
                  "key": "email",
                  "value": "form@example.com"
                },
                {
                  "key": "project_name",
                  "value": "Lakeview Residences, 3 BHK"
                },
                {
                  "key": "message",
                  "value": "Sent as form data"
                }
              ]
            },
            "description": "Sends one enquiry as ordinary form data (application/x-www-form-urlencoded) instead of JSON. The same field names are understood. Expected answer: 200 with ok true. JSON is recommended where the sending system can do it."
          },
          "response": [
            {
              "name": "Accepted (200)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/x-www-form-urlencoded"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{ingest_url}}",
                  "host": [
                    "{{ingest_url}}"
                  ]
                },
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": [
                    {
                      "key": "enquiry_id",
                      "value": "{{enquiry_id}}-FORM"
                    },
                    {
                      "key": "name",
                      "value": "Form Sender"
                    },
                    {
                      "key": "mobile",
                      "value": "9811100003"
                    },
                    {
                      "key": "email",
                      "value": "form@example.com"
                    },
                    {
                      "key": "project_name",
                      "value": "Lakeview Residences, 3 BHK"
                    },
                    {
                      "key": "message",
                      "value": "Sent as form data"
                    }
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"duplicate\": false,\n  \"message\": \"Thank you. We have received your details and will be in touch.\",\n  \"redirect\": null\n}"
            }
          ]
        },
        {
          "name": "Missing phone and email (422 expected)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Refused with 422', function () { pm.response.to.have.status(422); });",
                  "pm.test('The answer says what is missing', function () { pm.expect(pm.response.json().message).to.include('phone number or an email'); });"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{ingest_url}}",
              "host": [
                "{{ingest_url}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}-NOCONTACT\",\n  \"name\": \"No Contact\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"message\": \"This enquiry has no phone number and no email\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sends an enquiry that has neither a phone number (at least 6 digits) nor a valid email address. Expected answer: 422 and nothing is saved. A portal should not retry this one: the data needs fixing."
          },
          "response": [
            {
              "name": "No phone or email (422)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{ingest_url}}",
                  "host": [
                    "{{ingest_url}}"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}-NOCONTACT\",\n  \"name\": \"No Contact\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"message\": \"This enquiry has no phone number and no email\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unprocessable Content",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Please give a phone number or an email address.\",\n  \"errors\": {\n    \"phone\": [\n      \"A phone number or email is required.\"\n    ]\n  }\n}"
            }
          ]
        },
        {
          "name": "Wrong address (404 expected)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// Builds an address that does not exist from your ingest_url, so nothing real is touched.",
                  "var u = String(pm.collectionVariables.get('ingest_url') || '');",
                  "pm.variables.set('wrong_url', u.replace(/\\/ingest\\/.*$/, '/ingest/src_doesnotexist00000000/vbu_doesnotexist0000000000'));"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Unknown address gives 404', function () { pm.response.to.have.status(404); });"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{wrong_url}}",
              "host": [
                "{{wrong_url}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}\",\n  \"name\": \"Asha Verma\",\n  \"mobile\": \"+919876543210\",\n  \"email\": \"asha@example.com\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"city\": \"Hyderabad\",\n  \"budget\": \"1.2 Cr\",\n  \"enquired_at\": \"2026-10-08T14:32:10+05:30\",\n  \"message\": \"Please call after 6 pm\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Posts to an address that does not exist. Expected answer: 404 'Unknown source.' A portal that gets 404 should stop and tell the customer. (A real source with a wrong or replaced secret answers 401, and a paused address answers 403.)"
          },
          "response": [
            {
              "name": "Unknown address (404)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{wrong_url}}",
                  "host": [
                    "{{wrong_url}}"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enquiry_id\": \"{{enquiry_id}}\",\n  \"name\": \"Asha Verma\",\n  \"mobile\": \"+919876543210\",\n  \"email\": \"asha@example.com\",\n  \"project_name\": \"Lakeview Residences, 3 BHK\",\n  \"city\": \"Hyderabad\",\n  \"budget\": \"1.2 Cr\",\n  \"enquired_at\": \"2026-10-08T14:32:10+05:30\",\n  \"message\": \"Please call after 6 pm\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Unknown source.\"\n}"
            }
          ]
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "ingest_url",
      "value": "https://api.velbee.com/v1/ingest/SOURCE/SECRET",
      "type": "string",
      "description": "Your secret address. Replace SOURCE/SECRET with the address from your customer."
    },
    {
      "key": "enquiry_id",
      "value": "TEST-0001",
      "type": "string",
      "description": "Set automatically before each run."
    }
  ]
}
