Exports

Creates an export and starts generating the requested CSV file asynchronously. The export is returned with status created and is then processed in the background; poll it until its status is completed before requesting a download URL.

post/v1/exports

Request

  • Base URL
    https://api.withflex.com
  • URL
    https://api.withflex.com/v1/exports
  • Auth
    HTTP bearer

Request body

Example request

{
  "export": {
    "description": "Premium SPF 50 mineral sunscreen",
    "filters": {
      "payment": {
        "limit": 0,
        "status": "canceled",
        "starting_after": "string",
        "ending_before": "string",
        "customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA"
      },
      "checkout_session": {
        "limit": 0,
        "offset": 0,
        "payment_intent": "fpi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
        "client_reference_id": "string",
        "start_date": "string",
        "end_date": "string"
      },
      "subscription": {
        "limit": 0,
        "offset": 0,
        "start_date": "string",
        "end_date": "string"
      },
      "customer": {
        "limit": 0,
        "offset": 0,
        "starting_after": "string",
        "ending_before": "string"
      },
      "product": {
        "limit": 0,
        "offset": 0,
        "starting_after": "string",
        "ending_before": "string"
      },
      "charge_reconciliation": {
        "start_date": "string",
        "end_date": "string"
      },
      "payout": {
        "start_date": "string",
        "end_date": "string"
      },
      "dispute": {
        "start_date": "string",
        "end_date": "string"
      },
      "line_item": {
        "start_date": "string",
        "end_date": "string"
      },
      "line_item_revenue": {
        "start_date": "string",
        "end_date": "string"
      },
      "balance_activity": {
        "start_date": "string",
        "end_date": "string"
      }
    },
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "type": "product"
  }
}

Response

An envelope wrapping a single export object.

Example response

{
  "export": {
    "export_id": "fxprt_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "description": "Premium SPF 50 mineral sunscreen",
    "type": "product",
    "status": "created",
    "created_at": "2026-06-15T14:30:00Z",
    "started_at": "2026-06-15T14:30:00Z",
    "completed_at": "2026-06-15T14:30:00Z",
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "filters": {
      "payment": {
        "limit": 0,
        "status": "canceled",
        "starting_after": "string",
        "ending_before": "string",
        "customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA"
      },
      "checkout_session": {
        "limit": 0,
        "offset": 0,
        "payment_intent": "fpi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
        "client_reference_id": "string",
        "start_date": "string",
        "end_date": "string"
      },
      "subscription": {
        "limit": 0,
        "offset": 0,
        "start_date": "string",
        "end_date": "string"
      },
      "customer": {
        "limit": 0,
        "offset": 0,
        "starting_after": "string",
        "ending_before": "string"
      },
      "product": {
        "limit": 0,
        "offset": 0,
        "starting_after": "string",
        "ending_before": "string"
      },
      "charge_reconciliation": {
        "start_date": "string",
        "end_date": "string"
      },
      "payout": {
        "start_date": "string",
        "end_date": "string"
      },
      "dispute": {
        "start_date": "string",
        "end_date": "string"
      },
      "line_item": {
        "start_date": "string",
        "end_date": "string"
      },
      "line_item_revenue": {
        "start_date": "string",
        "end_date": "string"
      },
      "balance_activity": {
        "start_date": "string",
        "end_date": "string"
      }
    },
    "test_mode": false
  }
}

Changes

    • warning

      the /////// request property's max was set to 9007199254740991.00

    • warning

      the /////// request property's max was set to 9007199254740991.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's max was set to 2147483647.00

    • warning

      the /////// request property's min was set to -9007199254740991.00

    • warning

      the /////// request property's min was set to -9007199254740991.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      the /////// request property's min was set to -2147483648.00

    • warning

      removed the request property ///////

    • warning

      removed the request property ///////

    • warning

      removed the optional property /////// from the response with the status

    • warning

      removed the optional property /////// from the response with the status

    • warning

      added the new balance_activity enum value to the / response property for the response status

    • info

      added the new optional request property //////

    • info

      added the new balance_activity enum value to the request property /

    • info

      added the optional property ////// to the response with the status