Tasks

Import a CSV of usage events

Use to submit a CSV of usage events for async ingestion. The CSV must already have been uploaded to the Flexprice-managed imports bucket (currently via CSV Box) — pass the upload_id and the backend fetches the file from S3 and streams rows into ClickHouse. Returns the task ID and Temporal workflow IDs for polling.

post/tasks

Request body

entity_type'EVENTS' | 'PRICES' | 'CUSTOMERS' | 'FEATURES' required
file_namestring
file_providerstring required
file_type'CSV' | 'JSON' required
metadataobject
task_type'IMPORT' | 'EXPORT' required
upload_idstring required

Response

OK

messagestring
run_idstring
workflow_idstring

Changes

Changed in 7 of the 110 revisions of this API.242124

    • endpoint added

      endpoint-added

    • api removed without deprecation

      api-removed-without-deprecation

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new not_implemented enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new not_implemented enum value to the code response property for the response status 500

      response-property-enum-value-added

  • 7d57386313c78114See the full diff
    • request property file_type was restricted to a list of enum values

      request-property-became-enum

    • request property task_type was restricted to a list of enum values

      request-property-became-enum

    • the file_type request property type/format changed from / to string/

      request-property-type-changed

    • the task_type request property type/format changed from / to string/

      request-property-type-changed

    • the file_type response's property type/format changed from / to string/ for status 202

      response-property-type-changed

    • the status response's property type/format changed from / to string/ for status 202

      response-property-type-changed

    • the task_status response's property type/format changed from / to string/ for status 202

      response-property-type-changed

    • the task_type response's property type/format changed from / to string/ for status 202

      response-property-type-changed

    • added the new COMPLETED enum value to the task_status response property for the response status 202

      response-property-enum-value-added

    • added the new CSV enum value to the file_type response property for the response status 202

      response-property-enum-value-added

    • added the new EXPORT enum value to the task_type response property for the response status 202

      response-property-enum-value-added

    • added the new FAILED enum value to the task_status response property for the response status 202

      response-property-enum-value-added

    • added the new IMPORT enum value to the task_type response property for the response status 202

      response-property-enum-value-added

    • added the new JSON enum value to the file_type response property for the response status 202

      response-property-enum-value-added

    • added the new PENDING enum value to the task_status response property for the response status 202

      response-property-enum-value-added

    • added the new PROCESSING enum value to the task_status response property for the response status 202

      response-property-enum-value-added

    • added the new archived enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new deleted enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new published enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new CSV enum value to the request property file_type

      request-property-enum-value-added

    • added the new EXPORT enum value to the request property task_type

      request-property-enum-value-added

    • added the new IMPORT enum value to the request property task_type

      request-property-enum-value-added

    • added the new JSON enum value to the request property file_type

      request-property-enum-value-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 4b1a811c41791511See the full diff
    • removed the enum value CSV of the request property file_type

      request-property-enum-value-removed

    • removed the enum value EXPORT of the request property task_type

      request-property-enum-value-removed

    • removed the enum value IMPORT of the request property task_type

      request-property-enum-value-removed

    • removed the enum value JSON of the request property file_type

      request-property-enum-value-removed

    • the file_type request property type/format changed from string/ to /

      request-property-type-changed

    • the task_type request property type/format changed from string/ to /

      request-property-type-changed

    • the completed_at response's property type/format changed from string/date-time to string/ for status 202

      response-property-type-changed

    • the created_at response's property type/format changed from string/date-time to string/ for status 202

      response-property-type-changed

    • the failed_at response's property type/format changed from string/date-time to string/ for status 202

      response-property-type-changed

    • the file_type response's property type/format changed from string/ to / for status 202

      response-property-type-changed

    • the started_at response's property type/format changed from string/date-time to string/ for status 202

      response-property-type-changed

    • the status response's property type/format changed from string/ to / for status 202

      response-property-type-changed

    • the task_status response's property type/format changed from string/ to / for status 202

      response-property-type-changed

    • the task_type response's property type/format changed from string/ to / for status 202

      response-property-type-changed

    • the updated_at response's property type/format changed from string/date-time to string/ for status 202

      response-property-type-changed

    • removed the COMPLETED enum value from the task_status response property for the response status 202

      response-property-enum-value-removed

    • removed the CSV enum value from the file_type response property for the response status 202

      response-property-enum-value-removed

    • removed the EXPORT enum value from the task_type response property for the response status 202

      response-property-enum-value-removed

    • removed the FAILED enum value from the task_status response property for the response status 202

      response-property-enum-value-removed

    • removed the IMPORT enum value from the task_type response property for the response status 202

      response-property-enum-value-removed

    • removed the JSON enum value from the file_type response property for the response status 202

      response-property-enum-value-removed

    • removed the PENDING enum value from the task_status response property for the response status 202

      response-property-enum-value-removed

    • removed the PROCESSING enum value from the task_status response property for the response status 202

      response-property-enum-value-removed

    • removed the archived enum value from the status response property for the response status 202

      response-property-enum-value-removed

    • removed the deleted enum value from the status response property for the response status 202

      response-property-enum-value-removed

    • removed the published enum value from the status response property for the response status 202

      response-property-enum-value-removed

    This revision also has 121 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the optional property details from the response with the 400 status

      response-optional-property-removed

    • removed the optional property details from the response with the 500 status

      response-optional-property-removed

    • added the new too_many_requests enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new too_many_requests enum value to the code response property for the response status 500

      response-property-enum-value-added

    • removed the optional property error from the response with the 400 status

      response-optional-property-removed

    • removed the optional property error from the response with the 500 status

      response-optional-property-removed

    • removed the optional property success from the response with the 400 status

      response-optional-property-removed

    • removed the optional property success from the response with the 500 status

      response-optional-property-removed

    • added the optional property code to the response with the 400 status

      response-optional-property-added

    • added the optional property code to the response with the 500 status

      response-optional-property-added

    • added the optional property details to the response with the 400 status

      response-optional-property-added

    • added the optional property details to the response with the 500 status

      response-optional-property-added

    • added the optional property http_status_code to the response with the 400 status

      response-optional-property-added

    • added the optional property http_status_code to the response with the 500 status

      response-optional-property-added

    • added the optional property message to the response with the 400 status

      response-optional-property-added

    • added the optional property message to the response with the 500 status

      response-optional-property-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog