OmniSegment External API
website·Indexed 33 days ago
https://devdocs.bebit-tech.comExternal Data Exchange APIs for OmniSegment, version 1.0.0. Provides endpoints for audience import, purchase and transaction data import, product guarantee and event registration data, gift voucher management, and AI-powered product recommendations. Includes capabilities for generating interaction and tracking event reports, triggering workflows, and integrating with Taiwan E-Invoice API systems.
What's inside OmniSegment
- Simple standalone pages can be written using Markdown without the need for React.
Retrieve a specific interaction report by ID
Use the GET/api/v1/interaction-report/:id/endpoint to retrieve detailed information about a specific interaction report. The response includes report details and a download URL if one is available.curl -X GET "https://<your-domain>/api/v1/interaction-report/{id}/" \ -H "Authorization: Bearer <your_token>"Retrieve a specific tracking event report by ID
Use the GET/api/v1/tracking-event-report/:id/endpoint to retrieve detailed information about a specific tracking event report. The response includes report details and a download URL if one is available.curl -X GET "https://{your-domain}/api/v1/tracking-event-report/{id}/"Batch import gift voucher data via Omnisegment API
Use the
POST /api/v2/voucher/batch-import/endpoint to import gift voucher data in batches. This endpoint supports multi-site organizations (by passing asiteparameter) and custom fields.Constraints and Requirements:
- Batch Size Limit: A maximum of 100 records can be included per request.
- Supported Identifier Fields: You must use one of the following fields as an identifier:
member_sn,line_id,email,phone, ormessenger_psid.
curl -X POST "https://{your-domain}/api/v2/voucher/batch-import/" \ -H "Content-Type: application/json" \ -d '{"site": "your_site_id", "data": [...] }'Trigger a workflow execution for specific members via API
Use the
POST /api/v1/workflow/trigger/endpoint to initiate workflow processes for a list of members. This allows external systems to target specific members using their serial numbers.Requirements and Constraints:
- The organization must have the
MemberDataUploadBySftpOrAPImodule permission. - All members provided in the
member_sn_listmust be valid for the organization. - The
node_idprovided must correspond to a valid workflow node.
POST /api/v1/workflow/trigger/- The organization must have the
Batch import audience blacklist data via API
Use the
POST /api/v2/audiences/batch-import-blacklist/endpoint to manage audience blacklist status in batches, allowing you to set audiences as either blacklisted or unblacklisted.Constraints and Requirements:
- Batch Size Limit: A maximum of 100 records are allowed per request.
- Supported Search Keys: You must use one of the following keys to identify users:
email,phone,line_id,messenger_psid, ormember_sn. - Permissions: The API caller must have both
BlacklistPermissionandExternalAPIPermission.
POST /api/v2/audiences/batch-import-blacklist/Parse OmniSegment API response formats
OmniSegment uses a standardized JSON response structure for all API calls.// Success Response (HTTP 200) { "SUCCESS": true, "PAYLOAD": "xxxxxx" } // Failure Response (HTTP 400, 403, 500) { "SUCCESS": false, "ERR_MSG": "xxxxxx" }Handle OmniSegment API rate limits and retries
Several high-traffic endpoints are subject to rate limiting. If the API returns a
429 (Too Many Requests)status code, implement retry logic with exponential backoff.Rate-limited endpoints include:
/api/v1/interaction-report//api/v1/tracking-event-report//api/v1/products/import-event-registration-data//api/v1/products/import-product-guarantee-data//api/v1/products/import//api/import-gift-voucher//omnidata/show-market-report//api/import-purchase-data//ma_audience/import-audience//api/v1/beacon/track-event/
Generate an asynchronous interaction report
Use thePOST /api/v1/interaction-report/endpoint to trigger the generation of a new interaction report. This process is asynchronous; the API creates a generation task and returns the report metadata. Note that the requested date range is limited to a maximum of 31 days.curl -X POST "https://{your-domain}/api/v1/interaction-report/" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer {your_token}"Import or update product data via OmniSegment API
Use the
POST /api/v1/products/import/endpoint to create or update product information in OmniSegment from external systems. The API supports asynchronous processing, price validation, and multi-site organization configurations.Configuration Requirements:
- Multi-site organizations: The
siteparameter is required. - Single-site organizations: The
siteparameter must be omitted. - Data Validation: All required fields must be present in the data object, and price fields must be in a proper numeric format.
POST /api/v1/products/import/- Multi-site organizations: The
Generate a tracking event report via Omnisegment API
Use thePOST /api/v1/tracking-event-report/endpoint to trigger the asynchronous generation of a tracking event report. This endpoint validates that the requested date range does not exceed 31 days. The process is asynchronous; the API returns report metadata immediately while the report is generated in the background. Key capabilities include custom report naming, the option to include anonymous users, and the option to include raw event data.POST /api/v1/tracking-event-report/Retrieve a list of recent interaction reports
Use theGET /api/v1/interaction-report/endpoint to retrieve a list of interaction reports that were created within the last day for the specified organization.curl -X GET "https://<your-domain>/api/v1/interaction-report/"