Skip to content

    Recommendations and visibility analyst

    Read a proposed action

    Read the approval state, approver and approved credit cap, along with any draft or run the action produced.

    GET /v2/recommendations

    • Query view is action.
    • Query action_id starts with analyst_action:.

    Authentication and access

    Authentication
    Bearer API key
    Scopes
    analytics:read
    Roles
    approver, editor, owner, publisher, service, viewer
    Plans
    Optimizer, Analyzer
    Credits
    No credit charge.
    • Action kind content_draft. Scopes analytics:read, optimizations:read. Plans Optimizer.
    • FAQ drafts also require this permission. Scope prompts:read.
    • Action kind fresh_check. Scopes analytics:read, collections:read. Plans Optimizer, Analyzer.

    Parameters

    Request parameters
    NameWhereTypeRequiredDescription
    brand_idquerystring (uuid)Yes
    viewquery"action"Yes
    action_idquerystringYes

    Request body

    Send this request without a body.

    Request examples

    Set AEO_API_BASE_URL to https://api.aeoapi.dev and AEO_API_KEY to your server-side API key. Set the other environment variables to the values for your request.

    curl --fail-with-body --get "$AEO_API_BASE_URL/v2/recommendations" \
      -H "Authorization: Bearer $AEO_API_KEY" \
      --data-urlencode "brand_id=$BRAND_ID" \
      --data-urlencode 'view=action' \
      --data-urlencode "action_id=$ACTION_ID"
    from os import environ
    from aeo_sdk import AeoClient
    
    with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
        response = client.v2_get_recommendations(
            brand_id=environ["BRAND_ID"],
            view="action",
            action_id=environ["ACTION_ID"],
        )
        print(response.body)
    import { AeoClient } from "@aeoapi/aeo-sdk";
    
    const client = new AeoClient(process.env.AEO_API_KEY!, {
      baseUrl: process.env.AEO_API_BASE_URL!,
    });
    const response = await client.v2GetRecommendations(
      {
        brand_id: process.env.BRAND_ID!,
        view: "action",
        action_id: process.env.ACTION_ID!,
      },
    );
    console.log(response.body);

    Responses

    HTTP 200

    Successful Response

    application/json

    Response fields are listed below.

    HTTP 200 response fields 1
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.action_idstringYes
    data.analyst_run_idstringYes
    data.approved_atstring | nullYes
    data.approved_bystring | nullYes
    data.approved_max_creditsinteger | nullYes
    data.brand_idstringYesIdentifies the brand this result belongs to.
    data.draftobject | nullYes
    data.draft_fingerprintstring | nullYes
    data.estimated_creditsintegerYesThe expected credit cost for this selection.
    data.finding_idstringYes
    data.kind"content_draft" | "fresh_check"Yes
    data.maximum_creditsintegerYesThe upper credit estimate for this selection.
    data.organization_facts_status"partner_confirmed" | "pending_partner_confirmation" | nullYes
    data.passage_idstring | nullYes
    data.proposed_atstringYes
    data.proposed_bystringYes
    data.quoteobject | nullYes
    data.runobject | nullYes
    data.run.brand_idstringConditional
    data.run.charged_creditsintegerConditional
    data.run.check_idstring | nullConditional
    data.run.check_urlstring | nullConditional
    data.run.citation_status"in_progress" | "completed"NoCitation preparation status for this run, when applicable.
    data.run.created_atstringConditional
    data.run.estimated_creditsintegerConditional
    data.run.failure_reasonsarray of "access_restricted" | "limit_reached" | "input_missing" | "approval_expired" | "cancelled" | "check_failed" | "check_incomplete"Conditional
    data.run.hold_reasonsarray of "retry_pending" | "under_review"Conditional
    data.run.phasestring | nullConditional
    data.run.progressobjectConditional
    data.run.progress.by_locationarray of objectNo
    data.run.progress.by_location[].by_sourcearray of objectConditional
    data.run.progress.by_location[].completed_stepsintegerConditional
    data.run.progress.by_location[].expected_stepsintegerConditional
    data.run.progress.by_location[].location_idstring (uuid)Conditional
    data.run.progress.by_sourcearray of objectConditional
    data.run.progress.completed_stepsintegerConditional
    data.run.progress.expected_stepsintegerConditional
    data.run.prompt_set_revisionstringConditional
    data.run.released_creditsintegerConditional
    data.run.report_idstring | nullConditional
    data.run.report_status"pending" | "ready" | "not_available"Conditional
    data.run.report_urlstring | nullConditional
    data.run.reserved_creditsintegerConditional
    data.run.run_idstringConditional
    data.run.statusstringConditional
    data.run.updated_atstringConditional
    data.run.websitestring | nullConditional
    data.run_idstring | nullYesIdentifies the run. Keep any prefix when using it in a request.
    data.status"proposed" | "approved"Yes
    data.v2_action_idstringNo
    metaobjectYesInformation about this response, including any warnings or pagination details.

    Errors

    Read code and message in the error response. Keep request_id when you contact support.

    Recommendations and visibility analyst reference