Create custom report
reports.writeBetaBeta: This endpoint is currently in beta and is not available to all API integrations.
Creates a custom report that appears in the reporting UI.
source selects the report type. filters uses the same camel-cased structure as the reporting UI. Omitted filter properties default to an unfiltered report.
api.superfiliate.com/api/v1/reportsBody parametersapplication/json
namestringrequiredMust be unique among the shop's custom reports.
sourceenum<string>requiredThe dataset used by the report.
"conversions""superfiliates"The filters for this resource.
hiddenColumnIdsarray of stringsColumn identifiers hidden in the report.
programIdsarray of stringsProgram identifiers included in the report.
customerIdsarray of stringsCustomer identifiers included in the report.
tagIdsarray of stringsCustomer tag identifiers included in the report.
Absolute or relative reporting period.
The startDate for this resource.
option 1stringAn absolute date in YYYY-MM-DD format.
unitenum<string>The unit for this resource.
"days"valuenumberThe value for this resource.
ruleenum<string>The rule for this resource.
"week_to_date""month_to_date""quarter_to_date""year_to_date"
The endDate for this resource.
option 1stringAn absolute date in YYYY-MM-DD format.
unitenum<string>The unit for this resource.
"days"valuenumberThe value for this resource.
ruleenum<string>The rule for this resource.
"week_to_date""month_to_date""quarter_to_date""year_to_date"
Column-level filters. Values for
is_inandis_not_inmay be arrays.columnstringrequiredThe column for this resource.
conditionenum<string>requiredThe condition for this resource.
"contains""does_not_contain""ends_with""greater_than""greater_than_or_equal_to""is""is_empty""is_not""is_not_empty""is_in""is_not_in""less_than""less_than_or_equal_to""starts_with"valueobject | nullValue to compare. Omit for empty/not-empty conditions.
Absolute or relative period for one date column, such as
created_at.columnstringrequiredThe column for this resource.
The startDate for this resource.
option 1stringAn absolute date in YYYY-MM-DD format.
unitenum<string>The unit for this resource.
"days"valuenumberThe value for this resource.
ruleenum<string>The rule for this resource.
"week_to_date""month_to_date""quarter_to_date""year_to_date"
The endDate for this resource.
option 1stringAn absolute date in YYYY-MM-DD format.
unitenum<string>The unit for this resource.
"days"valuenumberThe value for this resource.
ruleenum<string>The rule for this resource.
"week_to_date""month_to_date""quarter_to_date""year_to_date"
Responses
Custom report created
idintegernamestringHuman-readable name for this resource.
sourceenum<string>The source for this resource.
"conversions""superfiliates"filtersobjectThe saved report filters. See the create report request for the supported properties.
is_custombooleanThe is custom for this resource.
created_atstringISO 8601 timestamp when this resource was created.
updated_atstringISO 8601 timestamp when this resource was last updated.