{
  "info": {
    "name": "SmartMaps Address Search",
    "description": "SmartMaps Address Search API – geographic company / address search.\n\nSet the `basicAuthToken` variable in the collection's \"Variables\" tab to your HTTP Basic Auth token. The `baseUrl` variable is preset to the production base URL. The `<branchcode>` / `<base>` / `<code1>` placeholders in the example requests are category codes that are specific to your integration and are agreed upon when it is set up.\n\nDocs: https://docs.smartmaps.cloud/addresssearch/api/",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "Authorization", "type": "string" },
      { "key": "value", "value": "Basic {{basicAuthToken}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "variable": [
    { "key": "baseUrl", "value": "https://yellowmap.de/api_rst/v2/addresssearch", "type": "string" },
    { "key": "basicAuthToken", "value": "INSERT_BASIC_AUTH_TOKEN_HERE", "type": "string" }
  ],
  "item": [
    {
      "name": "Search",
      "item": [
        {
          "name": "ByBranchesAndAddress – Search by address",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ByBranchesAndAddress?Branches=<branchcode>&City=Karlsruhe&Zip=76131&Street=CAS-Weg%201&IsoCountryCode=DE&Top=50&MaxRadius=50000",
              "host": ["{{baseUrl}}"],
              "path": ["ByBranchesAndAddress"],
              "query": [
                { "key": "Branches", "value": "<branchcode>", "description": "Category code(s); AND-link with %26" },
                { "key": "City", "value": "Karlsruhe" },
                { "key": "Zip", "value": "76131" },
                { "key": "Street", "value": "CAS-Weg%201" },
                { "key": "IsoCountryCode", "value": "DE" },
                { "key": "Top", "value": "50", "description": "Results per page" },
                { "key": "MaxRadius", "value": "50000", "description": "Radius in metres" },
                { "key": "Page", "value": "1", "disabled": true },
                { "key": "OrderBy", "value": "MATRIX_COMPANY_NAME", "disabled": true },
                { "key": "IsoLocale", "value": "de-DE", "disabled": true },
                { "key": "Channel", "value": "", "disabled": true },
                { "key": "FreeFilter", "value": "", "disabled": true },
                { "key": "Addition", "value": "", "disabled": true }
              ]
            },
            "description": "Search around separate address fields (postal code, city, street)."
          }
        },
        {
          "name": "ByBranchesAndAddress – Multiple category codes (AND)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ByBranchesAndAddress?Branches=<base>%26<code1>%26<code2>&City=Karlsruhe&Zip=76131&Street=CAS-Weg%201&IsoCountryCode=DE&Top=50&MaxRadius=50000",
              "host": ["{{baseUrl}}"],
              "path": ["ByBranchesAndAddress"],
              "query": [
                { "key": "Branches", "value": "<base>%26<code1>%26<code2>", "description": "AND-linked category codes, URL-encoded as %26" },
                { "key": "City", "value": "Karlsruhe" },
                { "key": "Zip", "value": "76131" },
                { "key": "Street", "value": "CAS-Weg%201" },
                { "key": "IsoCountryCode", "value": "DE" },
                { "key": "Top", "value": "50" },
                { "key": "MaxRadius", "value": "50000" }
              ]
            },
            "description": "Search with several AND-linked category codes."
          }
        },
        {
          "name": "ByBranchesAndPosition – GPS coordinate + radius",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ByBranchesAndPosition?Branches=<branchcode>&LocX=8.41876&LocY=49.00923&MaxRadius=50000&Top=50",
              "host": ["{{baseUrl}}"],
              "path": ["ByBranchesAndPosition"],
              "query": [
                { "key": "Branches", "value": "<branchcode>" },
                { "key": "LocX", "value": "8.41876", "description": "Longitude (Karlsruhe)" },
                { "key": "LocY", "value": "49.00923", "description": "Latitude (Karlsruhe)" },
                { "key": "MaxRadius", "value": "50000" },
                { "key": "Top", "value": "50" },
                { "key": "CoordFormatIn", "value": "GEODECIMAL_POINT", "disabled": true },
                { "key": "OrderBy", "value": "DISTANCE", "disabled": true }
              ]
            },
            "description": "Radius search starting from a GPS coordinate."
          }
        },
        {
          "name": "ByBranchesAndRectangle – Bounding box",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ByBranchesAndRectangle?Branches=<branchcode>&Lux=8.3&Luy=49.1&Rlx=8.5&Rly=48.9&Top=50",
              "host": ["{{baseUrl}}"],
              "path": ["ByBranchesAndRectangle"],
              "query": [
                { "key": "Branches", "value": "<branchcode>" },
                { "key": "Lux", "value": "8.3", "description": "Upper-left: longitude" },
                { "key": "Luy", "value": "49.1", "description": "Upper-left: latitude" },
                { "key": "Rlx", "value": "8.5", "description": "Lower-right: longitude" },
                { "key": "Rly", "value": "48.9", "description": "Lower-right: latitude" },
                { "key": "Top", "value": "50" },
                { "key": "CoordFormatIn", "value": "GEODECIMAL_POINT", "disabled": true },
                { "key": "OrderBy", "value": "DISTANCE", "disabled": true }
              ]
            },
            "description": "Search inside a rectangle (e.g. the visible map section)."
          }
        }
      ]
    },
    {
      "name": "Detail",
      "item": [
        {
          "name": "ByIdentifier – Single record",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ByIdentifier?Identifier=<YMID-URL-ENCODED>",
              "host": ["{{baseUrl}}"],
              "path": ["ByIdentifier"],
              "query": [
                { "key": "Identifier", "value": "<YMID-URL-ENCODED>", "description": "Take the YMIDUrlEncoded value from a search response and paste it here" }
              ]
            },
            "description": "Fetch a single record by its identifier (YMID). Run a search first, copy a record's YMIDUrlEncoded into the Identifier value."
          }
        }
      ]
    }
  ]
}
