Operation

POST /advertisers/{id}/sync_ai_normalization

Repairs an advertiser that is missing AI-enriched data. Runs the same in-process pipeline as the ai_advertiser_normalization:sync_missing rake task: sync from the most recent AI-normalized equivalent (or run AI normalization), backfill blank commission fields from the HiEnergy equivalent, and — for HiEnergy advertisers — pull HubSpot contacts. Synchronous (does not enqueue onto the :open_ai queue). Requires admin or paid-publisher access to the advertiser.

Operation ID: syncAdvertiserAiNormalization · Tags: Advertisers

Parameters

Name In Required Type Description
id path Yes string Advertiser ID or slug
dry_run query No boolean When true, returns what would happen without running the pipeline

Request Body

No request body is defined for this operation.

Responses

Content Types

  • application/json
{
  "description": "Pipeline result (non-dry-run) or dry-run preview. Blank/nil attributes are omitted from the response.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "attributes": {
                "type": "object",
                "description": "Dry runs return advertiser_id, dry_run, and message. Real runs return advertiser_id, slug, name, success, completed_steps, and (when present) failed_step, error, hubspot_message, and last_ai_normalization.",
                "properties": {
                  "advertiser_id": {
                    "type": "integer"
                  },
                  "dry_run": {
                    "type": "boolean"
                  },
                  "message": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "completed_steps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "failed_step": {
                    "type": "string",
                    "nullable": true
                  },
                  "error": {
                    "type": "string",
                    "nullable": true
                  },
                  "hubspot_message": {
                    "type": "string",
                    "nullable": true
                  },
                  "last_ai_normalization": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

{
  "$ref": "#/components/responses/Unauthorized"
}

{
  "$ref": "#/components/responses/Forbidden"
}

{
  "$ref": "#/components/responses/NotFound"
}

API Playground

The in-page tester only supports GET. For POST, use the sample curl below or the dedicated resource docs (e.g. Contacts, Link Builder). Sign in to enable live testing with your API key.

Action Method Endpoint Description
Sync/normalize advertiser AI data POST /api/v1/advertisers/1/sync_ai_normalization OpenAPI operationId: syncAdvertiserAiNormalization.

Example request (replace YOUR_API_KEY or sign in above):

curl -X POST "https://app.hienergy.ai/api/v1/advertisers/1/sync_ai_normalization" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
  -H "Content-Type: application/json" \
  -d '{}'
Ask Dex AIIntegration help

If this page feels TLDR, ask Dex AI.

Dex AI speaks your language, and all the other languages you may not. It will write the integration for you with the right endpoint and headers in one plain-English answer.