v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Exports

POST - Trigger a base records export

Queues a base records export on behalf of the teammate identified by member_email. When omitted under OAuth2 with an actor token, the authenticated user's email is used. The export will be sent to that member's email address. The export is filtered to the base record types that the member can access; if none of the requested export_types are accessible a 403 is returned.

post/v2/exports/base_records

Request body

end_datestring nullable

Optional filter (YYYY-MM-DD) to limit end date of exported records

export_optionsstring[] nullable

Optional list of export types to include. When omitted, every export type the member has access to is included.

group_keysstring[] nullable

Optional filter to limit exported report data to user selected groups. If not provided, all groups will be included.

include_archived_partnersboolean nullable

Whether archived partners should be included in the export

member_emailstring email nullable

The email of the company member that the export is being triggered on behalf of. When omitted, the authenticated OAuth user's email is used. The user must have an active membership in your PartnerStack company; permissions, feature access, and group access are evaluated against that membership.

start_datestring nullable

Optional filter (YYYY-MM-DD) to limit starting date of exported records

timezonestring nullable

IANA timezone identifier used to bucket start_date / end_date

timezone_offsetinteger nullable

The end user's timezone offset in minutes, used for accurate datetime rendering in emails

webhook_target_urlstring nullable

The webhook target URL to send the export to

Example request

{
  "end_date": "2021-09-12",
  "export_options": [
    "partners",
    "partner_members",
    "customers",
    "transactions",
    "rewards",
    "leads",
    "deals",
    "applications",
    "training"
  ],
  "group_keys": [
    "grup_1234"
  ],
  "include_archived_partners": true,
  "member_email": "vladmir.tepes@wallachia.com",
  "start_date": "2021-09-10",
  "timezone": "America/Toronto",
  "timezone_offset": 240,
  "webhook_target_url": "https://your-server.com/webhook"
}

Response

Queues a base records export on behalf of the teammate identified by member_email. When omitted under OAuth2 with an actor token, the authenticated user's email is used. The export will be sent to that member's email address. The export is filtered to the base record types that the member can access; if none of the requested export_types are accessible a 403 is returned.

messagestring required
statusinteger required