### Standard Field Filters Examples Source: https://developer.richpanel.com/reference/the-reports-object Examples demonstrating the usage of various operators with standard fields. ```APIDOC ### Standard Field Filters #### 1. Channel — any_of ```json { "field": "channel", "operator": "any_of", "value": ["email", "messenger"] } ``` #### 2. Channel — none_of ```json { "field": "channel", "operator": "none_of", "value": ["email"] } ``` #### 3. Agent — any_of ```json { "field": "agent", "operator": "any_of", "value": ["agent-uuid-1", "agent-uuid-2"] } ``` #### 4. Tags — any_of ```json { "field": "tags", "operator": "any_of", "value": ["tag-uuid-1", "tag-uuid-2"] } ``` #### 5. Store — any_of ```json { "field": "app_client_id", "operator": "any_of", "value": ["shopify1230", "shopify1231"] } ``` #### 6. Brand — any_of ```json { "field": "brand_id", "operator": "any_of", "value": ["shopify745b0", "shopify745b1"] } ``` #### 7. Brand — none_of ```json { "field": "brand_id", "operator": "none_of", "value": ["shopify745b0"] } ``` #### 8. Initiated By — Agent ```json { "field": "initiated_by", "operator": "any_of", "value": ["agent"] } ``` #### 9. Initiated By — Customer ```json { "field": "initiated_by", "operator": "any_of", "value": ["customer"] } ``` ``` -------------------------------- ### Custom Attribute Filters Examples Source: https://developer.richpanel.com/reference/the-reports-object Examples demonstrating the usage of various operators with custom attributes. ```APIDOC ### Custom Attribute Filters #### 10. Text — equal_to ```json { "field": "simCardNo", "operator": "equal_to", "value": "12345", "fieldType": "text", "isCustom": true } ``` #### 11. Text — contains ```json { "field": "poNumber", "operator": "contains", "value": "PO-", "fieldType": "text", "isCustom": true } ``` #### 12. Text — does_not_contain ```json { "field": "productName", "operator": "does_not_contain", "value": "test", "fieldType": "text", "isCustom": true } ``` #### 13. Number — equal_to ```json { "field": "dimensionsLength", "operator": "equal_to", "value": 100, "fieldType": "number", "isCustom": true } ``` #### 14. Number — more_than ```json { "field": "dimensionsWidth", "operator": "more_than", "value": 50, "fieldType": "number", "isCustom": true } ``` #### 15. Number — less_than ```json { "field": "hoursPerDay", "operator": "less_than", "value": 24, "fieldType": "number", "isCustom": true } ``` #### 16. Yes/No — yes ```json { "field": "areYouACustomer", "operator": "yes", "fieldType": "yesOrNo", "isCustom": true } ``` #### 17. Yes/No — no ```json { "field": "doYouAcceptTheCharge", "operator": "no", "fieldType": "yesOrNo", "isCustom": true } ``` #### 18. Dropdown — any_of ```json { "field": "purposeOfPurchase", "operator": "any_of", "value": ["Personal Use", "Gift"], "fieldType": "dropdownSelect", "isCustom": true } ``` ``` -------------------------------- ### List Tags Response Source: https://developer.richpanel.com/reference/the-tag-object Example response when retrieving all available tags from the workspace. ```json [ { "id": "0013c80b-dfd9-44d7-b1f3-0d6e14a79e19", "name": "urgent", "description": "High priority tickets requiring immediate attention", "created_at": "2025-12-14T13:34:43.827Z", "updated_at": "2025-12-14T13:34:43.827Z" }, { "id": "a7b8c9d0-1234-5678-90ab-cdef12345678", "name": "refund-request", "description": "Customer requesting a refund", "created_at": "2025-12-10T09:15:22.123Z", "updated_at": "2025-12-10T09:15:22.123Z" } ] ``` -------------------------------- ### Error Response Example (400 Bad Request) Source: https://developer.richpanel.com/reference/retrieve-a-conversation-using-users-email-or-phone This example illustrates a potential error response (400 Bad Request) from the API, typically indicating an issue with the request parameters. ```json {} ``` -------------------------------- ### Retrieve Conversations Example (JSON Response) Source: https://developer.richpanel.com/reference/retrieve-a-conversation-using-users-email-or-phone This example shows a successful response (200 OK) when retrieving conversations using a customer's email or phone number. It returns an array of conversation objects. ```json { [ { "id": "0f7c6fb1-2535-4f5a-91a5-5e9208a5ba9d", "createdAt": "1655218083079", "updatedAt": "1655233987323", "assignee": "2778d941-267b-416c-87ab-470a64422a58", "customerName": "Johnny Agent", "customerFirstName": "Johnny", "customerLastName": "Agent", "customerEmail": "rAgent123@gmail.com", ... }, { "id": "2778d941-2535-4f5a-91a5-470a64422a58", "createdAt": "1655218083079", "updatedAt": "1655233987323", "assignee": "0f7c6fb1-267b-416c-87ab-5e9208a5ba9d", "customerName": "Johnny Agent", "customerFirstName": "Johnny", "customerLastName": "Agent", "customerEmail": "rAgent123@gmail.com", ... } ] } ``` -------------------------------- ### Create Tag Request and Response Source: https://developer.richpanel.com/reference/the-tag-object Examples for creating a new tag and the resulting API response. ```json { "name": "high-value-customer", "description": "Customers with lifetime value over $5000" } ``` ```json { "id": "b9c8d7e6-5432-1098-76ab-fedc54321098", "name": "high-value-customer", "description": "Customers with lifetime value over $5000", "created_at": "2025-12-14T15:22:10.456Z", "updated_at": "2025-12-14T15:22:10.456Z" } ``` -------------------------------- ### List All Teams Response Example Source: https://developer.richpanel.com/reference/the-team-object A JSON array containing multiple team objects, each representing a team in the workspace. ```json [ { "id": "f9e8d7c6-5b4a-3210-9876-fedcba098765", "name": "Customer Support", "created_at": "2025-01-20T09:15:00.000Z", "updated_at": "2025-01-20T09:15:00.000Z" }, { "id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890", "name": "Technical Support", "created_at": "2025-01-18T11:30:00.000Z", "updated_at": "2025-01-18T11:30:00.000Z" }, { "id": "z9y8x7w6-5v4u-3210-9876-mnopqr123456", "name": "Sales Team", "created_at": "2025-01-15T14:45:00.000Z", "updated_at": "2025-01-15T14:45:00.000Z" } ] ``` -------------------------------- ### GET /users Source: https://developer.richpanel.com/reference/list-users Fetch the details of all users (agents) registered in the system. ```APIDOC ## GET /users ### Description Use this API to fetch the details of all the users(agents). ### Method GET ### Endpoint /users ### Response #### Success Response (200) - **users** (array) - A list of user objects containing id, name, created_at, and updated_at fields. #### Response Example { "users": [{ "id": "bc5650fd-e148-43ba-bd55-236e4cbe2f1c", "name": "Johnny Agent", "created_at": "2021-04-14T16:22:51.000Z", "updated_at": "2021-04-14T16:22:51.000Z" }] } ``` -------------------------------- ### GET /tasks Source: https://developer.richpanel.com/reference/list-tasks Retrieve a list of tasks with support for filtering, sorting, and pagination. ```APIDOC ## GET /tasks ### Description Use this API to list tasks with filtering, sorting, and pagination. ### Method GET ### Endpoint /tasks ### Parameters #### Query Parameters - **status** (string) - Optional - Filter by task status. Use `all` to include all statuses. Default: OPEN. Enum: OPEN, INPROGRESS, CLOSED, all. - **priority** (string) - Optional - Filter by priority. Use `all` to include all priorities. Enum: LOW, HIGH, all. - **assignee** (string) - Optional - Filter by assignee user ID. - **created_by** (string) - Optional - Filter by the user ID who created the task. - **conversation_id** (string) - Optional - Filter by conversation ID. - **search** (string) - Optional - Full-text search on task title and description. - **overdue** (boolean) - Optional - Filter for overdue tasks only. - **due_date_from** (string) - Optional - Filter tasks with due date on or after this ISO 8601 datetime. - **due_date_to** (string) - Optional - Filter tasks with due date on or before this ISO 8601 datetime. - **page** (integer) - Optional - Page number (starts at 1). Default: 1. - **limit** (integer) - Optional - Number of tasks per page. Default: 20. Min: 1, Max: 100. - **sort_by** (string) - Optional - Field to sort by. Default: created_at. Enum: created_at, updated_at, due_date. - **sort_order** (string) - Optional - Sort direction. Default: desc. Enum: asc, desc. ### Response #### Success Response (200) - **200** (object) - Successful retrieval of tasks. ``` -------------------------------- ### Example Team Object Source: https://developer.richpanel.com/reference/the-team-object Represents a team within the Richpanel workspace, including its ID, name, and timestamps. ```json { "id": "f9e8d7c6-5b4a-3210-9876-fedcba098765", "name": "Customer Support", "created_at": "2025-01-20T09:15:00.000Z", "updated_at": "2025-01-20T09:15:00.000Z" } ``` -------------------------------- ### Priority-Based Routing Logic Source: https://developer.richpanel.com/reference/the-tag-object Example of conditional logic to apply tags based on customer or order attributes. ```javascript // Check customer tier or order value if (customer.tier === 'VIP' || order.total > 1000) { const urgentTagId = "0013c80b-dfd9-44d7-b1f3-0d6e14a79e19"; const vipTagId = "0013c80b-dfd9-44d7-vvip-0d6e14a79e19-"; await addTagsToTicket(ticketId, [urgentTagId, vipTagId]); } ``` -------------------------------- ### Authentication Error Response Source: https://developer.richpanel.com/reference/use-cases-examples Example of an authentication error (401/403) returned when the x-richpanel-key header is missing or invalid. ```json { "errors": { "message": "Authentication failed." } } ``` -------------------------------- ### Assign Conversations to Agents Source: https://developer.richpanel.com/reference/the-user-object Example of fetching users and assigning a ticket to a specific agent based on email or name criteria. ```javascript // Get list of all users const usersResponse = await fetch('https://api.richpanel.com/v1/users', { headers: { 'x-richpanel-key': 'YOUR_API_KEY' } }); const users = await usersResponse.json(); // Find agent with specific role or name const techSupportAgent = users.find(user => user.email.includes('tech-support') || user.name.includes('Technical') ); // Assign ticket to this agent await fetch(`https://api.richpanel.com/v1/tickets/${ticketId}`, { method: 'PUT', headers: { 'x-richpanel-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ assignee_id: techSupportAgent.id }) }); ``` -------------------------------- ### GET /channel Source: https://developer.richpanel.com/reference/list-channels Retrieves a list of all communication channels configured in the Richpanel account. ```APIDOC ## GET /channel ### Description Retrieves a list of all communication channels associated with the account. ### Method GET ### Endpoint https://api.richpanel.com/v1/channel ### Response #### Success Response (200) - **channels** (array) - A list of channel objects. - **id** (string) - Unique identifier for the channel. - **created_at** (string) - Timestamp of channel creation. - **updated_at** (string) - Timestamp of last channel update. - **business_brand_name** (string) - The brand name associated with the channel. - **type** (string) - The type of channel (e.g., facebook). #### Response Example { "channels": [{ "id": "23765348273872643", "created_at": "2021-04-14T16:22:51.000Z", "updated_at": "2021-04-14T16:22:51.000Z", "business_brand_name": "↟ ABC Services ↟ ", "type": "facebook" }] } ``` -------------------------------- ### Define an Order Event JSON Source: https://developer.richpanel.com/reference/the-order-object A complete example of an order event payload including order details, user properties, and fulfillment information. ```json { "event": "order", "properties": { "orderId": "ORD-12345", "orderDbKey": 2589211394106, "amount": 169.97, "subTotalPrice": 159.97, "currency": "USD", "status": "processing", "fulfillmentStatus": "fulfilled", "financialStatus": "paid", "paymentMethod": "paypal", "processingMethod": "express", "discountAmount": 10.00, "shippingAmount": 10.00, "taxAmount": 10.97, "tipAmount": 0, "coupons": ["SAVE10"], "statusUrl": "https://store.com/orders/track/ORD-12345", "createdAt": 1706758898000, "processedAt": 1706758898000, "billingFirstName": "John", "billingLastName": "Doe", "billingAddressLine1": "123 Main Street", "billingCity": "San Francisco", "billingState": "California", "billingCountry": "United States", "billingPostcode": "94102", "shippingFirstName": "John", "shippingLastName": "Doe", "shippingAddressLine1": "123 Main Street", "shippingCity": "San Francisco", "shippingState": "California", "shippingCountry": "United States", "shippingPostcode": "94102", "shippingMethod": "Standard Shipping", "items": [ { "id": "PROD-001", "price": 49.99, "quantity": 2, "name": "Product Name - Size L", "optionId": "VAR-001", "sku": "SKU-12345", "grams": 454, "imageURL": ["https://example.com/product1.jpg"] } ], "fulfillment": [ { "id": "FULFILL-001", "status": "delivered", "createdAt": 1706858898000, "tracking": [ { "trackingNumber": "1Z999AA10123456784", "trackingCompany": "UPS", "shippingDate": 1706858898000, "trackingUrl": "https://ups.com/track/1Z999AA10123456784" } ], "items": [ { "id": "PROD-001", "price": 49.99, "quantity": 2, "name": "Product Name - Size L" } ] } ] }, "userProperties": { "uid": "CUST-67890", "email": "john.doe@example.com", "phone": "+1234567890", "firstName": "John", "lastName": "Doe", "billingAddress": { "firstName": "John", "lastName": "Doe", "address1": "123 Main Street", "city": "San Francisco", "state": "California", "stateCode": "CA", "country": "United States", "countryCode": "US", "postcode": "94102" }, "shippingAddress": { "firstName": "John", "lastName": "Doe", "address1": "123 Main Street", "city": "San Francisco", "state": "California", "stateCode": "CA", "country": "United States", "countryCode": "US", "postcode": "94102" } }, "time": { "sentAt": 1706758898000 }, "appClientId": "store_12345" } ``` -------------------------------- ### Create or Update Customer Request Body Source: https://developer.richpanel.com/reference/the-customer-object Example payload for the POST /v1/customer endpoint to sync or update customer data. ```json { "uid": "customer_abc123xyz", "appClientId": "store_12345", "email": "john.doe@example.com", "name": "John Doe", "phone": "+1234567890", "city": "San Francisco", "state": "California", "country": "United States" } ``` -------------------------------- ### List Teams cURL Request Source: https://developer.richpanel.com/reference/list-teams Example cURL command to retrieve the list of teams using the required API key header. ```curl curl --location --request GET 'https://api.richpanel.com/v1/teams' \ --header 'x-richpanel-key: secret-key' ``` -------------------------------- ### Troubleshooting Common Issues Source: https://developer.richpanel.com/reference/introduction Guidance on resolving common problems encountered when setting up or using HTTP Targets. ```APIDOC ### HTTP Target not sending data * Verify the URL is correct and accessible from Richpanel's servers. * Check that authentication headers are properly configured. * Ensure your endpoint returns a 200 status code. * Verify firewall rules allow incoming requests from Richpanel. ### Missing data in requests * Check that all required variables are configured in the HTTP Target settings. * Verify the conversation has the data fields you're trying to send. * Review your endpoint logs to see what data is actually being received. ### Authentication failures * Confirm API keys or tokens are correct and not expired. * Verify header names match your service's requirements (case-sensitive). * Check that the authentication method matches your endpoint's expectations. ``` -------------------------------- ### GET /v1/users Source: https://developer.richpanel.com/reference/the-user-object Retrieve a list of all agents in your Richpanel workspace. ```APIDOC ## GET /v1/users ### Description Retrieve a list of all agents in your Richpanel workspace. ### Method GET ### Endpoint /v1/users ### Response #### Success Response (200) - **id** (string) - Unique identifier for the user - **name** (string) - Full name of the agent - **email** (string) - Email address of the agent - **role** (string) - User role - **image_url** (string) - URL to the agent's profile picture - **created_at** (datetime) - Timestamp when the user was created - **updated_at** (datetime) - Timestamp when the user was last modified #### Response Example [ { "id": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6", "name": "John Smith", "email": "john.smith@example.com", "role": "TENANT_AGENT_FULL", "image_url": "https://example.com/avatars/agent-123.png", "created_at": "2025-01-15T10:30:00.000Z", "updated_at": "2025-01-15T10:30:00.000Z" } ] ``` -------------------------------- ### GET /tags Source: https://developer.richpanel.com/reference/list-tags Retrieves a list of all tags associated with the organization. ```APIDOC ## GET /tags ### Description Retrieves a list of all tags associated with the organization. ### Method GET ### Endpoint https://api.richpanel.com/v1/tags ### Response #### Success Response (200) - **tag** (array) - A list of tag objects. - **id** (string) - The unique identifier of the tag. - **updated_at** (string) - The timestamp when the tag was last updated. - **organization_id** (string) - The ID of the organization. - **created_at** (string) - The timestamp when the tag was created. - **description** (string) - A description of the tag. - **name** (string) - The name of the tag. #### Response Example { "tag": [ { "id": "0d42c3e0-6189-4157-91e4-a3f349c8e1ed", "updated_at": "2021-04-28T07:42:11.244Z", "organization_id": "idontknow436", "created_at": "2021-04-28T07:42:11.244Z", "description": "Not Available", "name": "damaged-items" } ] } ``` -------------------------------- ### GET /v1/tickets/{id} Source: https://developer.richpanel.com/reference/use-cases-examples Retrieve a single conversation by its unique ID. ```APIDOC ## GET /v1/tickets/{id} ### Description Retrieve a single conversation by its ID. ### Method GET ### Endpoint /v1/tickets/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the conversation. ### Response #### Success Response (200) - **ticket** (object) - The conversation object containing details like status, priority, subject, and metadata. #### Response Example { "ticket": { "id": "44671c32-be58-4cac-a88e-d90810b9a546", "status": "OPEN", "priority": "LOW", "subject": "Where is my order?" } } ``` -------------------------------- ### Track a product view event in JavaScript Source: https://developer.richpanel.com/docs/richpanel-event-details Log a product view event by providing the event name and a properties object containing product details. ```javascript const event = 'view_product' const properties = { "id": 407, "price": "19", "url": "http://omega3innovations.swiftpim.in/omega-cure-extra-strength/", "sku": "", "name": "Omega Cure Extra Strength", "image_url": [ "http://cdn.swiftpim.in/wp-content/uploads/sites/10/2016/11/06095459/2016-11-03-1.png" ], "categories": [ { "id": 232, "name": "Omega Cure", "parent": [ { "id": 252, "name": "Products" } ] } ] } richpanel.track(event, properties) ``` -------------------------------- ### Load Helpcenter with Encrypted User Data Source: https://developer.richpanel.com/docs/authorizing-user Append the generated encrypted user data to the helpcenter URL to authenticate the user. Removing these parameters will log the user out. ```url https://richpaneldemo.customerdesk.io/?encryptedUserParams= ``` -------------------------------- ### GET /v1/teams Source: https://developer.richpanel.com/reference/the-team-object Retrieves a list of all teams available in the Richpanel workspace. ```APIDOC ## GET /v1/teams ### Description Retrieve a list of all teams in your Richpanel workspace. ### Method GET ### Endpoint /v1/teams ### Response #### Success Response (200) - **id** (string) - Unique identifier for the team - **name** (string) - Name of the team - **created_at** (datetime) - Timestamp when the team was created (ISO 8601 format) - **updated_at** (datetime) - Timestamp when the team was last modified (ISO 8601 format) #### Response Example [ { "id": "f9e8d7c6-5b4a-3210-9876-fedcba098765", "name": "Customer Support", "created_at": "2025-01-20T09:15:00.000Z", "updated_at": "2025-01-20T09:15:00.000Z" } ] ``` -------------------------------- ### API Request - Monthly Team Performance Overview Source: https://developer.richpanel.com/reference/the-reports-object Use this `curl` command to query for monthly performance metrics, broken down by team. Replace 'YOUR_API_KEY' with your actual API key. ```bash curl --request POST \ --url 'https://api.richpanel.com/v1/reports/query' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header 'x-richpanel-key: YOUR_API_KEY' \ --data '{ \ "startDate": "2025-01-01", \ "endDate": "2025-01-31", \ "dimensions": "team", \ "metrics": ["new_conversations", "closed_conversations", "csat_score"] \ }' ``` -------------------------------- ### Initialize Richpanel Tracking Script Source: https://developer.richpanel.com/docs Load the Richpanel tracking script and Messenger on your page. Replace 'API_KEY' with your actual key from the Custom Connector settings. ```javascript window.richpanel||(window.richpanel=[]),window.richpanel.q=[],mth=["track","debug","atr"],sk=function(e){return function(){a=Array.prototype.slice.call(arguments);a.unshift(e);window.richpanel.q.push(a)}};for(var i=0;mth.length>i;i++){window.richpanel[mth[i]]=sk(mth[i])}window.richpanel.load=function(e){var t=document,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.type="text/javascript";r.async=true;r.src="https://api.richpanel.com/v2/j/"+e+"?version=2.0.0";n.parentNode.insertBefore(r,n)}; richpanel.load("API_KEY"); ``` -------------------------------- ### GET /v1/user/{id} Source: https://developer.richpanel.com/reference/the-user-object Retrieve details of a specific agent by their user ID. ```APIDOC ## GET /v1/user/{id} ### Description Retrieve details of a specific agent by their user ID. ### Method GET ### Endpoint /v1/user/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier for the user ### Response #### Success Response (200) - **id** (string) - Unique identifier for the user - **name** (string) - Full name of the agent - **email** (string) - Email address of the agent - **role** (string) - User role - **image_url** (string) - URL to the agent's profile picture - **created_at** (datetime) - Timestamp when the user was created - **updated_at** (datetime) - Timestamp when the user was last modified #### Response Example { "id": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6", "name": "John Smith", "email": "john.smith@example.com", "role": "TENANT_AGENT_FULL", "image_url": "https://example.com/avatars/agent-123.png", "created_at": "2025-01-15T10:30:00.000Z", "updated_at": "2025-01-15T10:30:00.000Z" } ``` -------------------------------- ### Example Subscription Event JSON Source: https://developer.richpanel.com/reference/the-subscription-object This JSON object represents a complete subscription event, including order details, user properties, and timestamps. It is useful for understanding the data structure sent for subscription-related activities. ```json { "event": "subscription", "properties": { "orderId": "SUB-12345", "orderDbKey": 9876543210, "amount": 49.99, "start": "2025-01-05T17:28:18+00:00", "trialEnd": "2025-01-12T17:28:18+00:00", "nextPayment": "2025-02-05T17:28:18+00:00", "lastPayment": "2025-01-05T17:28:18+00:00", "end": "", "status": "active", "createdAt": "2025-01-05T17:28:18+00:00", "shippingFirstName": "Jane", "shippingLastName": "Smith", "shippingAddressLine1": "456 Oak Avenue", "shippingAddressLine2": "Suite 200", "shippingCity": "Portland", "shippingState": "Oregon", "shippingCountry": "United States", "shippingPostcode": "97201", "shippingPhone": "+1234567890", "shippingEmail": "jane.smith@example.com", "items": [ { "id": "PROD-SUB-001", "price": 49.99, "quantity": 1, "name": "Monthly Subscription Box", "optionId": "VAR-SUB-001", "sku": "SUB-BOX-M", "grams": 1000, "imageURL": ["https://example.com/subscription-box.jpg"] } ] }, "user_properties": { "uid": "CUST-98765", "email": "jane.smith@example.com", "phone": "+1234567890", "firstName": "Jane", "lastName": "Smith", "billingAddress": { "firstName": "Jane", "lastName": "Smith", "address1": "456 Oak Avenue", "address2": "Suite 200", "city": "Portland", "state": "Oregon", "stateCode": "OR", "country": "United States", "countryCode": "US", "postcode": "97201", "phone": "+1234567890", "company": "" }, "shippingAddress": { "firstName": "Jane", "lastName": "Smith", "address1": "456 Oak Avenue", "address2": "Suite 200", "city": "Portland", "state": "Oregon", "stateCode": "OR", "country": "United States", "countryCode": "US", "postcode": "97201", "phone": "+1234567890", "email": "jane.smith@example.com" } }, "time": { "sentAt": "2025-01-05T17:28:18+00:00" }, "appClientId": "store_12345" } ``` -------------------------------- ### GET /v1/order/{conversationId} Source: https://developer.richpanel.com/reference/the-order-object Retrieves order details linked to a specific conversation. ```APIDOC ## GET /v1/order/{conversationId} ### Description Fetch order details that are linked to a specific conversation. Returns an empty object if no order is linked. ### Method GET ### Endpoint /v1/order/{conversationId} ### Parameters #### Path Parameters - **conversationId** (string) - Required - The unique identifier for the conversation. ### Response #### Success Response (200) - **orderId** (string) - The ID of the linked order. - **appClientId** (string) - The ID of the app associated with the order. ``` -------------------------------- ### Subscription Order Event JSON Source: https://developer.richpanel.com/docs/subscription-event-structure Example payload for a subscription event. Ensure all required fields are populated and replace 'API_KEY' with your actual app client ID. ```json { "event": "subscription", "properties": { "orderId": "11111", "email": "shubhanshu@gmail.com", "amount": 169.97, //required "start": "2025-01-05T17:28:18+00:00", "trialEnd": "2025-01-05T17:28:18+00:00", //leave it empty if not available "nextPayment": "2025-01-05T17:28:18+00:00", "lastPayment": "2025-01-05T17:28:18+00:00", //leave it empty if not available "end": "2025-02-05T17:28:18+00:00", //leave it empty if not available "shippingPhone": null, "shippingCity": "LOCKPORT", "shippingPostcode": "60441", "shippingState": "Illinois", "shippingCountry": "United States", "shippingAddressLine1": "201B, lotus CHS", "shippingAddressLine2": "", "shippingFirstName": "Shubhanshu", "shippingLastName": "Chouhan", "status": "active", "items": [{ //required "id": "2493989519418", "price": 49.99, //required "optionId": "31858336956474", "sku": "A31SSUJZ99COMTL1", "name": "My Product - L", "grams": 454, "quantity": 1, //required "imageURL": [ "https://cdn.abc.com/s/files/1/1067/2582/products/product1.jpg?v=1605207140" ] }, { "id": "4586759913530", "price": 49.99, "optionId": "32132068311098", "sku": "A31SSUGI85ODGDM1", "name": "My Product - M", "grams": 454, "quantity": 1, "imageURL": [ "https://cdn.abc.com/s/files/1/1067/2582/products/product2.jpg?v=1605207140" ] } ] }, "user_properties": { //required "uid": "shubhanshu@gmail.com", //required, Customer user id in database "phone": null, "email": "shubhanshu@gmail.com", "firstName": "Shubhanshu", "lastName": "Chouhan", "billingAddress": { "firstName": "Shubhanshu", "lastName": "Chouhan", "city": "LOCKPORT", "state": "Illinois", "stateCode": "IL", "country": "United States", "countryCode": "US", "postcode": "60441", "phone": null, "address1": "201B, lotus chs", "address2": "", "company": "" }, "shippingAddress": { "firstName": "Shubhanshu", "lastName": "Chouhan", "city": "LOCKPORT", "state": "Illinois", "stateCode": "IL", "country": "United States", "countryCode": "US", "postcode": "60441", "phone": null, "address1": "201B, lotus chs", "address2": "", "email": "shubhanshu@gmail.com" }, }, "time": { "sentAt": "2025-01-05T17:28:18+00:00" //when event occurred, use this property in case you're updating old orders, or synchronizing old orders }, "appClientId": "API_KEY" //change for each website, can be found in Richpanel app. } ``` -------------------------------- ### GET /conversations/{conversation_id} Source: https://developer.richpanel.com/reference/fetch-conversation Retrieves the details of a specific conversation by its unique ID. ```APIDOC ## GET /conversations/{conversation_id} ### Description Use this API to fetch a conversation using conversation id. ### Method GET ### Endpoint /conversations/{conversation_id} ### Parameters #### Path Parameters - **conversation_id** (string) - Required - The unique identifier of the conversation to retrieve. ``` -------------------------------- ### GET /v1/channels Source: https://developer.richpanel.com/reference/the-channel-object Retrieve a list of all communication channels connected to the Richpanel workspace. ```APIDOC ## GET /v1/channels ### Description Retrieve a list of all channels connected to your Richpanel workspace. ### Method GET ### Endpoint /v1/channels ### Response #### Success Response (200) - **channel** (array) - A list of channel objects. #### Response Example { "channel": [ { "id": "123456789012345", "type": "facebook", "business_name": "Support Page", "business_brand_id": "brand-abc-123", "created_at": "2025-01-10T14:30:00.000Z", "updated_at": "2025-01-10T14:30:00.000Z" } ] } ``` -------------------------------- ### Pagination Overview Source: https://developer.richpanel.com/reference/pagination Details on how to use query parameters to control result sets and navigate through paginated lists. ```APIDOC ## Pagination Overview ### Description Richpanel list endpoints utilize offset pagination. By default, endpoints return a maximum of 100 records per page. ### Query Parameters - **per_page** (integer) - Optional - Number of records to return per request (max 100). - **page** (integer) - Optional - The page number to retrieve. ### Response #### Success Response (200) - **next_page** (string) - URL for the next page of results. - **previous_page** (string) - URL for the previous page of results. - **count** (integer) - Total number of records available. #### Response Example { "users": [ ... ], "count": 1234, "next_page": "https://api.richpanel.com/v1/users?page=2", "previous_page": null } ``` -------------------------------- ### GET /tasks/{taskId} Source: https://developer.richpanel.com/reference/retrieve-task Retrieves a specific task using its unique identifier. ```APIDOC ## GET /tasks/{taskId} ### Description Use this API to fetch a task using its task ID. ### Method GET ### Endpoint /tasks/{taskId} ### Parameters #### Path Parameters - **taskId** (string) - Required - The unique identifier of the task ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **task_id** (string) - The unique identifier of the task - **conversation_id** (string) - The identifier of the conversation associated with the task - **title** (string) - The title of the task - **description** (string) - A detailed description of the task - **status** (string) - The current status of the task (e.g., OPEN, CLOSED) - **priority** (string) - The priority level of the task (e.g., HIGH, MEDIUM, LOW) - **assignee** (string) - The unique identifier of the user assigned to the task - **created_by** (string) - The unique identifier of the user who created the task - **due_date** (string) - The date and time when the task is due - **comment_count** (integer) - The number of comments on the task - **completed_at** (string) - The date and time when the task was completed (null if not completed) - **created_at** (string) - The date and time when the task was created - **updated_at** (string) - The date and time when the task was last updated #### Response Example { "task_id": "task_org123_1710345600000_a1b2c3", "conversation_id": "conv_abc123-def456", "title": "Follow up with customer about refund", "description": "Customer requested a refund for order #12345.", "status": "OPEN", "priority": "HIGH", "assignee": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6", "created_by": "x9y8z7w6-5v4u-3t2s-1r0q-p9o8n7m6l5k4", "due_date": "2024-03-15T16:00:00.000Z", "comment_count": 2, "completed_at": null, "created_at": "2024-03-13T12:00:00.000Z", "updated_at": "2024-03-13T13:00:00.000Z" } #### Error Response (404) - **statusCode** (integer) - The HTTP status code (404) - **message** (string) - A message indicating the error (e.g., "Task not found") - **error** (string) - The type of error (e.g., "Not Found") #### Response Example { "statusCode": 404, "message": "Task not found", "error": "Not Found" } ``` -------------------------------- ### List Available Metrics and Fields Source: https://developer.richpanel.com/reference/the-reports-object Retrieve a list of all available metrics, filterable fields, dimension fields, and custom attribute filter fields. It is recommended to cache this data as it does not change frequently. ```bash curl --request GET \ --url 'https://api.richpanel.com/v1/reports/metrics' \ --header 'accept: application/json' \ --header 'x-richpanel-key: YOUR_API_KEY' ``` -------------------------------- ### GET /channel/{id} Source: https://developer.richpanel.com/reference/fetch-a-channel Retrieves the details of a specific channel by its unique identifier. ```APIDOC ## GET /channel/{id} ### Description Retrieves the details of a specific channel by its unique identifier. ### Method GET ### Endpoint /channel/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the channel. ### Response #### Success Response (200) - **channel** (object) - The channel object containing details like id, created_at, updated_at, business_brand_name, and type. #### Response Example { "channel": { "id": "23765348273872643", "created_at": "2021-04-14T16:22:51.000Z", "updated_at": "2021-04-14T16:22:51.000Z", "business_brand_name": "↟ ABC Services ↟ ", "type": "facebook" } } ```