# Get conversion by ID

GET https://services.leadconnectorhq.com/ad-publishing/google/conversions/{conversionId}

Retrieve a specific Google Ads conversion action by ID

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `adPublishing.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `conversionId` | string | Yes | Conversion identifier |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location identifier |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/ad-publishing/google/conversions/{conversionId}": {
      "get": {
        "summary": "Get conversion by ID",
        "operationId": "getConversionById",
        "description": "Retrieve a specific Google Ads conversion action by ID",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "conversionId",
            "required": true,
            "in": "path",
            "description": "Conversion identifier",
            "schema": {
              "example": "123456789",
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "description": "Location identifier",
            "schema": {
              "example": "HChooFuiyPpVYzeJ4HMe",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The conversion action, including removed ones",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleConversionDetailDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "adPublishing.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "GoogleConversionDetailDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Google Ads conversion action id",
            "example": "7142742902"
          },
          "resourceName": {
            "type": "string",
            "description": "Google Ads resource name",
            "example": "customers/6776452901/conversionActions/7142742902"
          },
          "name": {
            "type": "string",
            "description": "Conversion action name",
            "example": "Offline purchase"
          },
          "status": {
            "type": "string",
            "description": "Conversion action status. `REMOVED` actions are still readable by id.",
            "example": "ENABLED"
          },
          "type": {
            "type": "string",
            "description": "Conversion action type",
            "enum": [
              "UPLOAD_CLICKS",
              "UPLOAD_CALLS",
              "WEBPAGE",
              "LEAD_FORM_SUBMIT",
              "AD_CALL"
            ],
            "example": "UPLOAD_CLICKS"
          },
          "category": {
            "type": "string",
            "description": "Conversion action category",
            "enum": [
              "DEFAULT",
              "PAGE_VIEW",
              "PURCHASE",
              "SIGNUP",
              "LEAD",
              "DOWNLOAD",
              "ADD_TO_CART",
              "BEGIN_CHECKOUT",
              "SUBSCRIBE_PAID",
              "PHONE_CALL_LEAD",
              "IMPORTED_LEAD",
              "SUBMIT_LEAD_FORM",
              "BOOK_APPOINTMENT",
              "REQUEST_QUOTE",
              "GET_DIRECTIONS",
              "OUTBOUND_CLICK",
              "CONTACT",
              "ENGAGEMENT",
              "STORE_VISIT",
              "STORE_SALE",
              "QUALIFIED_LEAD",
              "CONVERTED_LEAD"
            ],
            "example": "PURCHASE"
          },
          "valueSettings": {
            "description": "Value configuration",
            "example": {
              "defaultValue": 0,
              "defaultCurrencyCode": "XXX",
              "alwaysUseDefaultValue": true
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "defaultValue": {
                    "type": "number",
                    "description": "Default conversion value, 0 when unset",
                    "example": 0
                  },
                  "defaultCurrencyCode": {
                    "type": "string",
                    "description": "ISO currency for the default value. `XXX` is the ISO code for \"no currency\" and appears when unset.",
                    "example": "XXX"
                  },
                  "alwaysUseDefaultValue": {
                    "type": "boolean",
                    "description": "Whether the default value overrides any value sent with the conversion",
                    "example": true
                  }
                },
                "required": [
                  "defaultValue",
                  "defaultCurrencyCode",
                  "alwaysUseDefaultValue"
                ],
                "title": "GoogleConversionValueSettingsDTO"
              }
            ]
          },
          "countingType": {
            "type": "string",
            "description": "How conversions are counted per click",
            "enum": [
              "ONE_PER_CLICK",
              "MANY_PER_CLICK"
            ],
            "example": "MANY_PER_CLICK"
          },
          "attributionModelSettings": {
            "description": "Attribution configuration",
            "example": {
              "attributionModel": "GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "attributionModel": {
                    "type": "string",
                    "description": "Attribution model applied to this conversion action",
                    "enum": [
                      "GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN",
                      "GOOGLE_ADS_LAST_CLICK"
                    ],
                    "example": "GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN"
                  }
                },
                "required": [
                  "attributionModel"
                ],
                "title": "GoogleConversionAttributionSettingsDTO"
              }
            ]
          },
          "includeInConversionsMetric": {
            "type": "boolean",
            "description": "Whether this action feeds the Conversions reporting metric",
            "example": true
          },
          "clickThroughLookbackWindowDays": {
            "type": "string",
            "description": "Click-through lookback window in days, returned as a string",
            "example": "90"
          },
          "viewThroughLookbackWindowDays": {
            "type": "string",
            "description": "View-through lookback window in days, returned as a string",
            "example": "1"
          }
        },
        "required": [
          "id",
          "resourceName",
          "name",
          "status",
          "type",
          "category",
          "valueSettings",
          "countingType",
          "attributionModelSettings",
          "includeInConversionsMetric",
          "clickThroughLookbackWindowDays",
          "viewThroughLookbackWindowDays"
        ],
        "title": "GoogleConversionDetailDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      },
      "InternalServerErrorDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code for an unexpected server error",
            "example": 500
          },
          "message": {
            "type": "string",
            "description": "Error message describing the server failure",
            "example": "Internal Server Error"
          }
        },
        "title": "InternalServerErrorDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/ad-publishing/google/conversions/{conversionId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

params = {
    "locationId": "<LOCATIONID>"
}

response = requests.get(url, params=params, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/ad-publishing/google/conversions/<conversionId>?locationId=<LOCATIONID>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
