Common use cases
3rd Party Native App
10min
to set up your own third party native app to use aiq for sales and marketing, you'll need to follow these steps 1\ register your app with aiq contact aiq support reach out to aiq to get your app registered they will provide you with the necessary credentials and api keys 2\ get api credentials api key this is essential for authenticating your app's requests to the aiq endpoints secret key this will be used along with your api key for secure communication 3\ set up the api environment create api endpoints use aiq’s api documentation to understand the endpoints available for integration authentication set up authentication using the provided api and secret keys 4\ integrate with aiq endpoints aiq provides various endpoints for managing sales, marketing, and customer data here are some of the key endpoints add/update customer use this endpoint to add new customers or update existing customer details submit sales data use this endpoint to push sales data to aiq create campaign use this endpoint to create a new marketing campaign opt ins use this endpoint to set push notifications opt in status for contactids this does not send any opt in requests make sure that you are not breaking the law when using this endpoint and only using it as described in this document 5\ build your native app front end integration use the api endpoints to integrate aiq’s features into your app’s ui for example, show customer loyalty points, display personalized offers, etc backend processing ensure your backend system processes api calls to and from aiq, managing customer data, sales transactions, and marketing campaigns 6\ testing and deployment test end to end flow make sure to thoroughly test all integrations in a staging environment before moving to production monitor and optimize after deployment, continuously monitor the api usage and app performance use aiq’s analytics to optimize your marketing strategies and sales processes example code snippets python import requests url = "https //api alpineiq com/v1/customers" headers = { "authorization" "bearer your api key here", "content type" "application/json" } data = { "first name" "john", "last name" "doe", "email" "john doe\@example com", "phone" "1234567890", "loyalty member" true } response = requests post(url, headers=headers, json=data) print(response json()) javascript const axios = require('axios'); const url = 'https //api alpineiq com/v1/sales'; const headers = { 'authorization' 'bearer your api key here', 'content type' 'application/json' }; const data = { customer id 'customer id here', total amount 100 0, items \[ { item id 'item id here', quantity 2, price 50 0 } ], transaction date '2024 06 03t12 34 56z' }; axios post(url, data, { headers headers }) then(response => { console log(response data); }) catch(error => { console error(error); });