LogoLogo
  • Set up UserFlux
    • What is UserFlux?
  • Create an account
  • Start collecting data
  • View your data in UserFlux
  • Plan remaining implementation
  • Integration
    • Identify users
    • Send events
  • Enrich your data
  • Feature Guides
    • Insights
      • Series
      • Funnel
      • User Composition
      • Custom SQL
      • AI Insight Editor
  • Reports
  • Segments & Computed Properties
  • User Flows
    • User Flows Dashboard Overview
    • Creating a New User Flow
    • Adding a Trigger
    • Workflow Editor Actions Panel
    • Adding a Step
    • Adding Actions
    • Connecting Workflow Components
    • Saving Workflows
  • Destinations
  • Metrics API
  • Email Insights
  • Security
    • API Authentication
    • Trust Center
  • SDKs
    • Browser SDK
    • React SDK
    • Backend JS SDK
  • APIs
    • Profiles API
    • Events API
    • Metrics API
    • Workflow API
    • Products API
Powered by GitBook
On this page
  1. APIs

Products API

PreviousWorkflow API

Last updated 8 days ago

  • POSTCreate or update a product
  • DELETEDelete a product
  • POSTFetch the recommendations for a user

Delete a product

delete

Deletes a product with the provided details

Authorizations
Path parameters
typeIdstringRequired

ID of the Product Type

productIdstringRequired

ID of the Product

delete
DELETE /product/{typeId}/{productId} HTTP/1.1
Host: integration-api.userflux.co
Authorization: Bearer JWT
Accept: */*

Create or update a product

post

Creates or updates a product with the provided details

Authorizations
Body
idstringRequired

Unique identifier for the product

Example: product-id
typeIdstringRequired

Type identifier for the product

Example: type-id
propertiesUpdateTypestringOptional

The type of update. Valid values are either FULL_UPDATE or INCREMENTAL_UPDATE. When using full update mode, any pre-existing properties not included in the request will be removed. Defaults to INCREMENTAL_UPDATE.

Example: INCREMENTAL_UPDATE
Responses
204
Product created successfully (No Content)
400
Bad Request - Invalid input parameters
401
Unauthorized - Authentication credentials are missing or invalid
403
Forbidden - Insufficient permissions to perform the operation
500
Internal Server Error - Unexpected server error occurred
post
POST /product HTTP/1.1
Host: integration-api.userflux.co
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "id": "product-id",
  "typeId": "type-id",
  "properties": {},
  "propertiesUpdateType": "INCREMENTAL_UPDATE"
}

No content

Fetch the recommendations for a user

post

Fetch the recommendations for a user

Authorizations
Body
profileIdstringOptional

Unique identifier of the profile

Example: abcd-1234-abcd-1234
productTypeIdstringOptional

Type identifier for the product

Example: events
topNintegerOptional

Number of results to retrieve

Example: 10
Responses
200
Fetched recommendations successfully
400
Bad Request - Invalid input parameters
401
Unauthorized - Authentication credentials are missing or invalid
403
Forbidden - Insufficient permissions to perform the operation
500
Internal Server Error - Unexpected server error occurred
post
POST /recommendations HTTP/1.1
Host: integration-api.userflux.co
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "profileId": "abcd-1234-abcd-1234",
  "productTypeId": "events",
  "filter": {
    "propertyFilters": [
      {
        "propertyPath": "props.category",
        "operator": "EQUALS",
        "value": "business"
      }
    ],
    "geoFilter": {
      "type": "PROFILE_LOCATION",
      "distance": 25000
    }
  },
  "topN": 10
}

No content