Superfiliate

Create custom report

Bearer authreports.writeBeta
Beta: 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.

POSTapi.superfiliate.com/api/v1/reports

Body parametersapplication/json

  • namestringrequired

    Must be unique among the shop's custom reports.

  • sourceenum<string>required

    The dataset used by the report.

    "conversions""superfiliates"

  • The filters for this resource.

    • hiddenColumnIdsarray of strings

      Column identifiers hidden in the report.

    • programIdsarray of strings

      Program identifiers included in the report.

    • customerIdsarray of strings

      Customer identifiers included in the report.

    • tagIdsarray of strings

      Customer tag identifiers included in the report.

    • Absolute or relative reporting period.

      • The startDate for this resource.

        • option 1string

          An absolute date in YYYY-MM-DD format.

          • unitenum<string>

            The unit for this resource.

            "days"

          • valuenumber

            The 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 1string

          An absolute date in YYYY-MM-DD format.

          • unitenum<string>

            The unit for this resource.

            "days"

          • valuenumber

            The 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_in and is_not_in may be arrays.

      • columnstringrequired

        The column for this resource.

      • conditionenum<string>required

        The 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 | null

        Value to compare. Omit for empty/not-empty conditions.

    • Absolute or relative period for one date column, such as created_at.

      • columnstringrequired

        The column for this resource.

      • The startDate for this resource.

        • option 1string

          An absolute date in YYYY-MM-DD format.

          • unitenum<string>

            The unit for this resource.

            "days"

          • valuenumber

            The 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 1string

          An absolute date in YYYY-MM-DD format.

          • unitenum<string>

            The unit for this resource.

            "days"

          • valuenumber

            The 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

  • idinteger
  • namestring

    Human-readable name for this resource.

  • sourceenum<string>

    The source for this resource.

    "conversions""superfiliates"

  • filtersobject

    The saved report filters. See the create report request for the supported properties.

  • is_customboolean

    The is custom for this resource.

  • created_atstring

    ISO 8601 timestamp when this resource was created.

  • updated_atstring

    ISO 8601 timestamp when this resource was last updated.