Reports

The /reports resource is used to work with reports.

List all reports

Get the list of all reports.

Responses
200

OK

get/reports
Request samples
curl -i -X GET \
  https://app.leadconduit.com/reports
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Create a new report

Create a new report, adding it to the list of all reports in the account.

Request
Request Body schema: application/json

Create a new Report

name
string

required name of the report

description
string

optional extra description

columns
Array of strings (ReportColumn)

Array of report columns

Items Enum: "source-submitted" "source-success" "source-failure" "source-error" "recipient-submitted" "recipient-success" "recipient-failure" "recipient-error" "return-received-submitted" "return-received-success" "return-received-failure" "return-received-error" "return-sent-submitted" "return-sent-success" "return-sent-failure" "return-sent-error" "conversion-received-submitted" "conversion-received-success" "conversion-received-failure" "conversion-received-error" "conversion-sent-submitted" "conversion-sent-success" "conversion-sent-failure" "conversion-sent-error" "ping-submitted" "ping-success" "ping-success-rate" "ping-win-rate" "cost" "revenue" "profit" "cost-per-conversion-received-success" "avg-cost-per-lead" "avg-revenue-per-lead"
Array of objects (ReportRule)

rules to match events to include

group_by
Array of strings

group results by these event properties

token
string

identifier used for sharing

created_at
string <date-time> (Timestamp)
updated_at
string <date-time> (Timestamp)
Responses
201

created

post/reports
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "columns": [
    • "source-submitted"
    ],
  • "rules": [
    • {
      • "lhv": null,
      • "op": "is equal to",
      • "rhv": null
      }
    ],
  • "group_by": [
    • "string"
    ],
  • "token": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Fetch a single report

Get the report definition for an individual report. The parameter can be a report id, which requires passing the api_key or a report token, which does not.

Request
path Parameters
required
object (Report)

ID or token of the report to fetch

Responses
200

OK

get/reports/{id}
Request samples
curl -i -X GET \
  https://app.leadconduit.com/reports/:id
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Update an existing report

Update an existing report. Note that the token cannot be updated with this call. Use the /share endpoint to generate a new token and /unshare to clear it.

Request
path Parameters
required
object (Report)

ID or token of the report to fetch

Request Body schema: application/json

Update an existing report

name
string

required name of the report

description
string

optional extra description

columns
Array of strings (ReportColumn)

Array of report columns

Items Enum: "source-submitted" "source-success" "source-failure" "source-error" "recipient-submitted" "recipient-success" "recipient-failure" "recipient-error" "return-received-submitted" "return-received-success" "return-received-failure" "return-received-error" "return-sent-submitted" "return-sent-success" "return-sent-failure" "return-sent-error" "conversion-received-submitted" "conversion-received-success" "conversion-received-failure" "conversion-received-error" "conversion-sent-submitted" "conversion-sent-success" "conversion-sent-failure" "conversion-sent-error" "ping-submitted" "ping-success" "ping-success-rate" "ping-win-rate" "cost" "revenue" "profit" "cost-per-conversion-received-success" "avg-cost-per-lead" "avg-revenue-per-lead"
Array of objects (ReportRule)

rules to match events to include

group_by
Array of strings

group results by these event properties

token
string

identifier used for sharing

created_at
string <date-time> (Timestamp)
updated_at
string <date-time> (Timestamp)
Responses
200

created

put/reports/{id}
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "columns": [
    • "source-submitted"
    ],
  • "rules": [
    • {
      • "lhv": null,
      • "op": "is equal to",
      • "rhv": null
      }
    ],
  • "group_by": [
    • "string"
    ],
  • "token": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Delete a report

Delete an existing report.

Request
path Parameters
required
object (Report)

ID or token of the report to delete

Responses
200

OK

delete/reports/{id}
Request samples
curl -i -X DELETE \
  https://app.leadconduit.com/reports/:id
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Fetch a report's token

Share a report by generating a new token for a report. Once the token is retrieved, you can use it in place of the ID in the /reports/:id endpoint.

Request
path Parameters
required
object (Report)

ID of the report to share

Responses
200

OK

put/reports/{id}/share
Request samples
curl -i -X PUT \
  https://app.leadconduit.com/reports/:id/share
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Clear's a reports share token

Unshare a report by clearing the report's token.

Request
path Parameters
required
object (Report)

ID of the report to unshare

Responses
200

OK

put/reports/{id}/unshare
Request samples
curl -i -X PUT \
  https://app.leadconduit.com/reports/:id/unshare
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Create a report without saving it

Create a report but don't save it. The report definition is provided in the post body and the time range is provided as query parameters.

Request
query Parameters
start
required
string <date-time> (Timestamp)

limit events counted in report to those recorded at or after this time

end
required
string <date-time> (Timestamp)

limit events counted in report to those recorded at or before this time

columns
required
Array of strings (ReportColumn)

Array of report columns to display

Items Enum: "source-submitted" "source-success" "source-failure" "source-error" "recipient-submitted" "recipient-success" "recipient-failure" "recipient-error" "return-received-submitted" "return-received-success" "return-received-failure" "return-received-error" "return-sent-submitted" "return-sent-success" "return-sent-failure" "return-sent-error" "conversion-received-submitted" "conversion-received-success" "conversion-received-failure" "conversion-received-error" "conversion-sent-submitted" "conversion-sent-success" "conversion-sent-failure" "conversion-sent-error" "ping-submitted" "ping-success" "ping-success-rate" "ping-win-rate" "cost" "revenue" "profit" "cost-per-conversion-received-success" "avg-cost-per-lead" "avg-revenue-per-lead"
Responses
200

OK

post/reports/preview
Request samples
curl -i -X POST \
  'https://app.leadconduit.com/reports/preview?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z&columns=source-submitted'
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Run a report

Run a report that was previously created. The parameter can be an id or token. The time range is provided as query parameters.

Request
path Parameters
required
object (Report)

ID or token of the report to run

query Parameters
start
required
string <date-time> (Timestamp)

limit events counted in report to those recorded at or after this time

end
required
string <date-time> (Timestamp)

limit events counted in report to those recorded at or before this time

Responses
200

OK

get/reports/{id}/run
Request samples
curl -i -X GET \
  'https://app.leadconduit.com/reports/:id/run?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z'
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Get report metadata

Get the metadata for a report that was shared.

Request
path Parameters
required
object (ReportMeta)

Token of the report to retrieve metadata for

Responses
200

OK

get/reports/{token}/meta
Request samples
curl -i -X GET \
  https://app.leadconduit.com/reports/:token/meta
Response samples
application/json
[
  • {
    • "name": "string",
    • "description": "string",
    • "columns": [
      • "source-submitted"
      ],
    • "rules": [
      • {
        • "lhv": null,
        • "op": "is equal to",
        • "rhv": null
        }
      ],
    • "group_by": [
      • "string"
      ],
    • "token": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]