{
  "info": {
    "name": "Productmate Google Review Link API",
    "description": "Set base_url to https://productmate.com or http://localhost:8666. Successful requests record a generation event. Never send maps_url in the query string.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://productmate.com",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Review link created",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/v1/google-review-link",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"maps_url\": \"https://www.google.com/maps/place/PRODUCTMATE/data=!1s0x47b18f1cae867bab:0xb6f8b3a3753ba1a2!8m2\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [
        {
          "name": "Review link created",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/api/v1/google-review-link",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"maps_url\": \"https://www.google.com/maps/place/PRODUCTMATE/data=!1s0x47b18f1cae867bab:0xb6f8b3a3753ba1a2!8m2\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"place_id\": \"ChIJq3uGrhyPsUcRoqE7daOz-LY\",\n  \"review_url\": \"https://search.google.com/local/writereview?placeid=ChIJq3uGrhyPsUcRoqE7daOz-LY\",\n  \"verification\": \"not_verified\"\n}"
        }
      ]
    },
    {
      "name": "Invalid request",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/v1/google-review-link",
        "body": {
          "mode": "raw",
          "raw": "{\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [
        {
          "name": "Invalid request",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/api/v1/google-review-link",
            "body": {
              "mode": "raw",
              "raw": "{\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"error\": {\n    \"code\": \"invalid_request\",\n    \"message\": \"maps_url must be a non-empty string.\",\n    \"recovery\": \"Send JSON with one non-empty maps_url string.\"\n  }\n}"
        }
      ]
    }
  ]
}