Operation

POST /exports

Enqueues a chunked Excel/CSV export job. The response contains the new report's id and status (pending). Poll GET /exports/{id} until status=completed and use download_url for retrieval. Same-parameter requests within the dedupe window return the existing completed report with deduped=true; an in-flight duplicate returns 409 with the existing report attached so the caller can poll instead of double-firing.

Operation ID: createExportReport · Tags: Reports

Parameters

This operation does not define any parameters.

Request Body

Required: Yes
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "report_type": {
            "type": "string",
            "enum": [
              "advertisers_csv",
              "deals_excel",
              "hot_advertisers_excel",
              "clicks_details_excel"
            ],
            "description": "Which export to build."
          },
          "search_params": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional search filters mirrored from the /reports UI."
          },
          "index_params": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional sort/faceting parameters mirrored from the /reports UI."
          }
        },
        "required": [
          "report_type"
        ]
      }
    }
  }
}

Responses

Content Types

  • application/json
{
  "description": "Export report queued (or returned via dedupe)",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "export": {
            "type": "object",
            "description": "Generative export report (chunked Excel/CSV) summary.",
            "properties": {
              "id": {
                "type": "integer"
              },
              "report_type": {
                "type": "string",
                "enum": [
                  "advertisers_csv",
                  "deals_excel",
                  "hot_advertisers_excel",
                  "clicks_details_excel"
                ]
              },
              "display_name": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "completed",
                  "failed"
                ]
              },
              "status_display": {
                "type": "string"
              },
              "parameters": {
                "type": "object",
                "additionalProperties": true
              },
              "filename": {
                "type": "string",
                "nullable": true
              },
              "download_url": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Presigned S3 GET URL valid for download_expires_in_seconds."
              },
              "download_expires_in_seconds": {
                "type": "integer",
                "nullable": true
              },
              "error_message": {
                "type": "string",
                "nullable": true
              },
              "progress": {
                "type": "object",
                "nullable": true,
                "description": "Set on chunked export parents; reports completed-vs-total chunk counts.",
                "properties": {
                  "parts_ready": {
                    "type": "integer"
                  },
                  "total_parts": {
                    "type": "integer"
                  }
                }
              },
              "parent_report_id": {
                "type": "integer",
                "nullable": true
              },
              "chunked_export": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "started_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "completed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "status_url": {
                "type": "string",
                "format": "uri",
                "nullable": true
              }
            },
            "required": [
              "id",
              "report_type",
              "status"
            ]
          },
          "deduped": {
            "type": "boolean",
            "description": "True when the create request was answered by a previously-completed identical export within the dedupe window."
          }
        },
        "required": [
          "export"
        ]
      }
    }
  }
}

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

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

Content Types

  • application/json
{
  "description": "An identical in-flight export already exists; poll the returned report instead of re-creating it.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "export": {
            "type": "object",
            "description": "Generative export report (chunked Excel/CSV) summary.",
            "properties": {
              "id": {
                "type": "integer"
              },
              "report_type": {
                "type": "string",
                "enum": [
                  "advertisers_csv",
                  "deals_excel",
                  "hot_advertisers_excel",
                  "clicks_details_excel"
                ]
              },
              "display_name": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "completed",
                  "failed"
                ]
              },
              "status_display": {
                "type": "string"
              },
              "parameters": {
                "type": "object",
                "additionalProperties": true
              },
              "filename": {
                "type": "string",
                "nullable": true
              },
              "download_url": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Presigned S3 GET URL valid for download_expires_in_seconds."
              },
              "download_expires_in_seconds": {
                "type": "integer",
                "nullable": true
              },
              "error_message": {
                "type": "string",
                "nullable": true
              },
              "progress": {
                "type": "object",
                "nullable": true,
                "description": "Set on chunked export parents; reports completed-vs-total chunk counts.",
                "properties": {
                  "parts_ready": {
                    "type": "integer"
                  },
                  "total_parts": {
                    "type": "integer"
                  }
                }
              },
              "parent_report_id": {
                "type": "integer",
                "nullable": true
              },
              "chunked_export": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "started_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "completed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "status_url": {
                "type": "string",
                "format": "uri",
                "nullable": true
              }
            },
            "required": [
              "id",
              "report_type",
              "status"
            ]
          },
          "deduped": {
            "type": "boolean",
            "description": "True when the create request was answered by a previously-completed identical export within the dedupe window."
          }
        },
        "required": [
          "export"
        ]
      }
    }
  }
}

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
Kick off a generative export report POST /api/v1/exports OpenAPI operationId: createExportReport.

Example request (replace YOUR_API_KEY or sign in above):

curl -X POST "https://app.hienergy.ai/api/v1/exports" \
  -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.