Lumminary API
Introduction
The Lumminary API was built to allow third parties to interact with Lumminary customers and gain access to their genetic data. The Lumminary API is fast, scalable and highly secure. All requests to the Lumminary API take place over SSL, which means all communication of Customer data is encrypted.
Before we dive in, some definitions. This is what we mean by:
Let's dive in, now.
Overview
In order to use Lumminary services, you'll need to install the Lumminary API Client or Toolkit. The Lumminary API Client and Toolkit are available in multiple programming languages, and we also provide a sandbox environment which you can use for integration and tests.
There are a couple of differences between the API Client and the Toolkit. Mainly, it's about the ease of use for integration. The Toolkit is basically a stand-alone application that facilitates the integration with the Lumminary API without the need to modify your already existing code.
You use the Lumminary API Client when you want to integrate it inside your own application. This means it gives you full flexibility regarding the integration into your own workflow.
You use the Lumminary Toolkit for an integration where the Toolkit is placed alongside your own application. You can use the Toolkit from the CLI - for example, to run a cronjob that processes incoming orders. The Toolkit uses the Lumminary API Client.
Install Lumminary API Client and/or Toolkit
We provide the Lumminary API Client and Toolkit in multiple programming languages - default are PHP (minimum version 7.0), Python2.7 and Python3. However, if you need them in another language (Java, Obj-C, JavaScript, C#, Perl, CURL), please contact us.
How to install the Lumminary API Client
PHP example:
The PHP Lumminary API Client is available at:
If you are already using , you can import the project by adding the following to your composer.json
Then run composer update lumminary/api-client-php
Python example:
The Python Lumminary API Client is available at:
To install directly, run
Or add the following line in your requirements.txt
How to install the Lumminary Toolkit
PHP example:
The PHP Lumminary Toolkit is available at:
To install the Lumminary Toolkit, run the following command where 'lumminary-toolkit-directory' is the directory where you want to install the Lumminary Toolkit:
git clone git@github.com:Lumminary/lumminary-toolkit-php.git lumminary-toolkit-directory
PYTHON example:
The Python Lumminary Toolkit is available at:
To install the Lumminary Toolkit, run the following command where 'lumminary-toolkit-directory' is the directory where you want to install the Lumminary Toolkit:
Note that before running the toolkit, you should have the virtualenv enabled, like so : source lumminary-toolkit-directory/env/bin/activate
Toolkit Setup
We recommend to run the Toolkit in a cronjob; at every run it will check for new Authorizations (Orders) and will download them; afterwards it will check for a new reports folder inside the old authorizations, process the reports, and delete the processed Authorizations and Reports from your server.
The first step after you clone the Lumminary Toolkit project for your language is to configure it with your credentials.
Go to the Lumminary Toolkit base diretory cd lumminary-toolkit-directory. Under the Toolkit directory, you will find a file config/config_template.json which has the following structure:
You should copy this config cp config/config_template.json config/my-product1-config.json then edit it vim config/my-product1-config.json to contain the following values:
After updating the config file for your Toolkit, it should look similar to (Note that these are all dummy values) :
You can now save and exit the text editor :wq and start polling the API for new Authorizations :
Python
PHP
When your Product receives new Authorizations, the Toolkit will pull all the relevant data and save it in the following files:
The contents of the files pulled when processing an Authorization are as follows:
After the Toolkit downloaded the Authorizations, you need to process the Customer genetic data file and the Customer details, individually. The Lumminary API supports multiple types of products:
Note
For each scenario above, we recommend you use a temporary directory to avoid uploading incomplete files or reports. So your workflow should be:
- create a temporary directory inside the
<output_root>/<authorization_uuid>, such as<output_root>/<authorization_uuid>/tmp_reports/ - place your result file(s) in the
tmp_reportsdirectory (as in the above table) - rename the directory from
tmp_reportstoreports
We recommend running the Toolkit in a cronjob, wrapped by some locking mechanism. Also, Toolkit logs are very minimal but can be very helpful when debugging an issue, so please consider saving them to a file. For example, the following cronjob runs the Toolkit every minute:
PHP Toolkit
Python Toolkit
API endpoints
Lumminary provides two endpoint APIs, sandbox and production. You can use the sandbox for your integration and testing, simulate orders, upload genetic data, and generate reports. The sandbox works exactly like the production environment, and you can test your end-to-end integration.
In order to simulate a complete order, you need to use this test credit card:
Sandbox
website:
api-hostname:
Production
website:
api-hostname:
Obtaining credentials
To obtain credentials, you need to register as a Lumminary partner. You can do this by .
You will then receive the following:
Each product or service needs to have its own product UUID and API key, which means you have to fill in the form for all products and services that require access to Lumminary customer data.
Configure the credentials to the Lumminary API Client
The easiest way to set up your credentials is to use an environment file.
For this, you must create a file named env.json (but any name will do) in your project directory, which should contain:
In order to load the Credentials from the env.json, you can use the following code:
PHP example:
Python example:
Alternative credentials configuration
You also have the option of passing the credentials as constructor parameters when instantiating the Credentials class.
PHP example:
Python example:
Create an API instance
With the credentials configured and loaded, you can create an API client like so :
PHP example
Python example
Query customers authorizations
An Authorization represents permission from a client to access their personal and genetic data.
There are 2 situations where customers grant you access to their data:
- when a customer buys your product from the Lumminary DNA App Store
- when a customer clicks on the "Connect with Lumminary" button on your website
Each time either of the above situations happens, our platform creates an Authorization UUID. You can reliably assume that if you have an Authorization UUID, you automatically have access to all the personal information and genetic data needed by your products and services. After you process an Authorization you need to mark it as processed; processed Authorizations will no longer be on the list of new authorizations.
There are two ways to obtain the Authorization UUID:
- polling - this method allows you to periodically interrogate our API and pulls the list of Authorization UUIDs.
- webhooks (coming soon) - this method allows our API to push the Authorization UUIDs into your platform.
Poll method
To use the polling method, your servers periodically interrogate for new Authorization UUIDs. Please keep in mind that Authorizations not marked as processed will always be returned when polling for new Authorizations. This means there's a risk of parallel processing the same Authorization. To avoid this, you can, for example, consider using locking when processing.
A PHP example of using the polling API looks like:
A Python example of using the polling API looks like:
Based on the Authorization object obtained previously, we can now query the customer's information (personal details and genetic data).
PHP example:
Python example:
authorizationMetadata object object structure
By present only if requested we mean this attribute will be returned if at the time of configuring either the "Connect with Lumminary" button or your product, you have explicitly requested for that particular set of data.
Query customer genetic data
Based on the Authorization object obtained previously, now we have authorizationMetadata which contains the customer's information (personal details and genetic data). Let's use this information to extract some customer genetic data.
Get individual SNPs
Out of all the available SNPs in the dataset, you can only access those for which the customer has previously granted permission.
For example, fetching details for a particular SNP:
PHP example:
Python example:
The snpDetails object will contain these important attributes:
When trying to access any customer's SNP for which you don't have permission, an Unauthorized exception will be raised.
Get all authorized SNPs
The function below returns all SNPs your product has access to. These are all the SNPs configured as mandatory for your product, as well as all SNPs that are configured as optional and available in the customer's data set. We encourage you to use this option if you need to get all available SNPs, because it is faster than fetching SNP details one by one.
For example, fetching all authorized SNPs:
PHP example:
Python example:
The datasetSnps variable will be a list of objects each having the following attributes:
When trying to access any customer's SNP for which you don't have permission, an Unauthorized exception will be raised.
Get Genes
Along with individual SNPs, you can also get all the authorized SNPs from a particular gene, that are available in the customer's dataset.
Here, by genes, we refer strictly to the genomic region that produces some protein, without considering regulatory or noncoding regions that influence gene expression.
The gene name (known as symbol) can be from either of these two databases - NCBI and Ensembl.
For example, fetching details for a gene symbol:
PHP example
Python example
All the geneDetails object attributes are
Molecular location attributes
SNP object structure
Get customer genetic data in 23andMe tsv format
If your platform is already compatible with 23andMe genotype data files, you can use this specific function to generate data in the 23andMe format - list of rows in tab separated values.
PHP example:
Python example
authorizationDnaData contains a list of rows in a tsv (tab delimited values)/csv format (23andme-compatible)
Submit reports
After you finish analysing the customer's genetic data, we need to inform the customer their analysis is complete. To do this, you will notify us using the function below. Finally, the customer will then:
- access their report file through a written electronic document (eg. .pdf or .doc)
- access their report on your website under an account with a username and a password or
- receive a physical product
How to submit a report file
When you submit such a report file, Lumminary will save this document into the customer's account, from which the customer will then be able to access it directly.
PHP example
Python example
If you need to upload multiple files, you have to call the function for each file, one at a time.
How to submit a report so the customer can access it on your website
If the customer's results can be accessed on your website, you will need to create a customer account on your platform, generating a user and password which will be sent through the Lumminary API into the customer's Lumminary account.
In case you don't generate a user and a password for the customer to access their report, use the function below with "null" value to username and password. We recommend you use the URL for customer reports on a dedicated page for reports only, rather than your homepage or some other generic page.
PHP example:
Python example:
How to submit a physical product
In case you only send the customer a physical product and you don't generate any reports, you need to run the function below so we can mark the order as fulfilled and can inform the client.
PHP example:
Python example:
The Connect with Lumminary button
The "Connect with Lumminary" functionality allows you to get customer details and genetic data from the Lumminary platform for free, anytime you want, for as long the customer grants you access. This functionality offers your customers the option to share their genetic data and other personal information (e.g. name, address, email etc.) stored on the Lumminary platform.
Having this button on your website makes it very easy for the customer to share their genetic data with you, as they don't have to download and re-upload their data on your site. The customer always has the option to revoke your access to both their personal details and their genetic data.
To protect the customer's privacy, you are not allowed to save their data anywhere. You can, however, always access their data on the Lumminary platform, for as long as they grant you access. If you generate a report based on customer data, you are allowed to save that report on your platform.
In order to implement this functionality on your website, this is what you need to know:
- Register your product on the Lumminary platform
- Add the "Connect with Lumminary" button to your website
- Configure your website to retrieve customer data
- Possible errors
Register your product on the Lumminary platform
If you're new to the Lumminary platform and don't already have any products in the DNA App Store, then you need to register by .
You have to fill in the form for all products and services that require access to Lumminary customers' genetic data.
Add the Connect with Lumminary button to your website
Since the CWL flow involves encrypting and decrypting data, we recommend installing the Lumminary API Client, where you'll find some specific helper functions.
In order to enable the button, you have to include the following script in the <head> tag of all the pages where you want to enable the “Connect with Lumminary” button:
The Javascript creates a CSRF token and attaches it to the button to be transmitted and verified on our servers each time a user clicks on the button. The CSRF token expires after 5 minutes. In case the CSRF token is expired or tampered, the user will be redirected to your website where it's up to you to decide what to do next - reload the page with the button or show the customer an error message.
The cwl.js file is loaded as a deferred resource, which means that it will load after all the webpage code execution has been finished, so it will not have any impact on your website load speed.
Chose a button colour
There are two type of buttons, so you can pick one that matches your branding. The buttons are SVG images, which means that you can scale them up or down to fit your design, without compromising on image quality. You can do this by changing the image height.
a. White button version
b. Black button version
Button configuration
Each button has 2 attributes which need to be configured:
- data-partner-uuid where you have to add your partner UUID (you have received the partner UUID after filling in the form for product registration).
- data-request which is a string obtained by encrypting a serialized JSON (you have received the CWL encryption key after filling in the form for product registration). See details below.
Data-request object
The data-request object has a standard format which needs to be preserved. It is formed of two types of data, some mandatory and some optional. You can use the optional fields to add any metadata or other information for your own use. The data-request object is going to be returned with the response from the authentication without being altered.
Mandatory information
The mandatory information is a list of scopes which you ask the client to grant permission for. These scopes are comma delimited, and the possible options are: address, email, dataset.
The scopes address, email, and dataset can be used in any combination; you must request at least one scope.
PHP example:
Python example:
Product UUID is your productUuid for which you ask customer permissions.
PHP example:
Python example:
Optional information
In the optional part of the object, you can add any useful data, such as customer ID, session ID, or any parameter which can help you identify the response from Lumminary.
PHP example:
Python example:
See below a complete example for a data-request object:
PHP example:
Python example:
Creating the Authorization Request
The previously generated object (objAuthorizationRequest) will now need to be encrypted. In order to be able to encrypt the object and also query the Lumminary API to obtain the customer details and genetic data, you need to have the Lumminary API Client installed. If you haven't done this already, please follow these .
Add data-request attribute
After you have the Lumminary API Client installed correctly you can use the command below:
PHP example:
Python example:
The resulting string should be added in the data-request attribute of the <a> tag of the "Connect with Lumminary" button.
Add data-partner-uuid attribute
Add the data-partner-uuid in the data-partner-uuid attribute of the <a> tag of the "Connect with Lumminary" button. You have received the partner UUID after filling in the form for product registration.
An example of a button correctly configured should look like this:
Connect with Lumminary summary of user interaction
When a customer clicks on the “Connect with Lumminary” button, a pop-up window opens. After they choose which genetic file to share, the pop-up will automatically close and the user will be redirected to your callback URL in the parent window. Your callback URL needs to be predefined in the Lumminary partner portal.
The GET request from the client to your callback URL will contain two querystring parameters - request and response:
request– this is exactly the same request that you previously sent in thedata-requestfield. You can decrypt it with the CWL encryption key which you used to encrypt it.response– the response is an urlencoded encrypted serialized JSON object which contains the Authorization UUID and the Authorization UTC unix timestamp. You will use the Authorization UUID to get the customer's data with the Lumminary API Client. The response string is encrypted with your CWL encryption key, the same as thedata-requestparameter.
In order to decrypt the response parameter, you can use the following function:
PHP example:
Python example:
The cwlReturnObject will now contain an object like the example below:
With the Authorization UUID (authorizationUuid) you can from the Lumminary platform.
Possible errors
When an error occurs, the customer is redirected to your callback URL. The redirect contains two querystring parameters - request and response - exactly like a regular response, but the response parameter contains an error object (see below) instead of an Authorization object.
PHP example:
Python example:
Example of a return object (cwlReturnObject) containing an error message:
"repositories": [ { "type": "git", "url": "https://github.com/Lumminary/lumminary-api-client-php.git", "reference": "master" }],"require": { "lumminary/api-client-php": "v1.0.6"}pip install git+https://git@github.com/Lumminary/lumminary-api-client-python.git@v1.0.7#egg=lumminary-api-clientgit+https://git@github.com/Lumminary/lumminary-api-client-python.git@v1.0.7#egg=lumminary-api-clientgit clone git@github.com:Lumminary/lumminary-toolkit-python.git lumminary-toolkit-directorycd lumminary-toolkit-directoryvirtualenv envsource env/bin/activatepip install -r requirements.txt{ "api_key": <your-api-key>, "product_uuid": <your-product-uuid>, "api_host": "https:\/\/api.lumminary.com\/v1", "output_root": <your-authorization-data-basepath>, "export_handler": <your-export-handler-class>, "product_name": <your-product-name>, "operations": [ "pull_datasets", "push_reports" ], "optional": { "dna_data_filename": "dna-data.tsv", "authorization_metadata_filename": "authorization-metadata.json" }}{ "api_key": "TiiU...bqg==", "product_uuid": "1234-1234-1234-1234", "api_host": "https:\/\/api.lumminary.com\/v1", "output_root": "\/var\/lumminary-orders\/product1\/", "export_handler": "export_handler_tsv", "product_name": "product 1", "operations": [ "pull_datasets", "push_reports" ], "optional": { "dna_data_filename": "dna-data.tsv", "authorization_metadata_filename": "authorization-metadata.json" }}# While still in the <lumminary-toolkit> directorysource env/bin/activate;python lumminary_partner_toolkit.py --config-path config/my-lumminary-product1-config.json# While still in the <lumminary-toolkit> directoryphp lumminary-partner-toolkit.php --config-path config/my-lumminary-product1-config.json# The DNA data file. Format compatible with 23AndMe by default<output_root>/<authorization_uuid>/dna-data.tsv
# The Authorization metadata<output_root>/<authorization_uuid>/authorization.json$ head -n 5 <output_root>/<authorization_uuid>/dna-data.tsv# rsid chromosome position genotypers12070387 1 6267531 CCrs149124387 1 12025561 CCrs116458387 1 14920119 AArs4436387 1 15498452 CC
$ cat <output_root>/<authorization_uuid>/authorization.json { "authorization": <authorization_uuid>, "created_timestamp_utc": 1542920184, "customer": <customer_uuid>, "customer_address": { "address1": <address1>, "address2": <address2>, "city": <city>, "country": <country>, "state": <state>, "zipcode": <zipcode> }, "customer_email": <customer_email>, "customer_name": { "first_name": <customer_first_name>, "last_name": <customer_last_name> }, "dataset": <dataset_uuid>, "product": <your_product_uuid>}# Open the crontabcrontab -e# Add the following line (replace <lumminary-toolkit-directory> with the absolute path of the Lumminary Toolkit)* * * * * flock /var/lock/lumminary-toolkit.lock php <lumminary-toolkit-directory>/lumminary-partner-toolkit.php --config-path <lumminary-toolkit-directory>/config/my-product1-config.json >> /var/log/lumminary-toolkit.log# Add the following line (replace <lumminary-toolkit-directory> with the absolute path of the Lumminary Toolkit)* * * * * flock /var/lock/lumminary-toolkit.lock source env/bin/activate; python <lumminary-toolkit-directory>/lumminary_partner_toolkit.py --config-path <lumminary-toolkit-directory>/config/my-product1-config.json{ "product_uuid": <your_product_uuid>, "api_key": <your_product_api_key>, "role": "role_product", "api_host": <lumminary_api_hostname_endpoint>}require_once(__DIR__."/vendor/autoload.php");$credentials = new Lumminary\Client\Credentials();$credentials->loadJSONCredentials(__DIR__."/env.json");import lumminary_sdk as lumminaryimport os
credentials = lumminary.Credentials()credentials.load_json_credentials( os.path.join( os.getcwd(), "env.json" ))require_once(__DIR__."/vendor/autoload.php");$credentials = new Lumminary\Client\Credentials( <lumminary_api_hostname_endpoint>, <your_product_uuid>, <your_product_api_key>);import lumminary_sdk as lumminary
credentials = lumminary.Credentials( product_uuid = <your_product_uuid>, api_key = <your_product_api_key>, api_host = <lumminary_api_hostname_endpoint>, role = "role_product")$apiClient = new Lumminary\Client\ApiClient($credentials);apiClient = lumminary.LumminaryApi(credentials)$productAuthorizations = $apiClient->getAuthorizationsQueue( $apiClient->getCredentials()->getProductUuid(),);
foreach($productAuthorizations as $productAuthorization){ /** * Add your code for processing customer data here **/ // Mark Authorization as processed $apiClient->postProductAuthorization( $productAuthorization["productUuid"], $productAuthorization["authorizationUuid"] );}productAuthorizations = apiClient.get_authorizations_queue( apiClient.get_credentials().product_uuid)
for productAuthorization in productAuthorizations: ####### # Add your code for processing customer data here #######
# Mark Authorization as processed apiClient.post_product_authorization( productAuthorization.product_uuid, productAuthorization.authorization_uuid )$authorizationMetadata = $apiClient->authorizationMetadata($productAuthorization["authorizationUuid"]);authorizationMetadata = apiClient.authorization_metadata(productAuthorization.authorization_uuid)$rsId = "rs114326054";$snpDetails = null;
// check to see if you have access to the customer genetic dataif (isset($productAuthorization["scopes"]["dataset"])){ // get SNP information $snpDetails = $apiClient->getClientSnp( $productAuthorization["clientUuid"], $productAuthorization["scopes"]["dataset"], $rsId );}rsId = "rs114326054"snpDetails = None
# check to see if you have access to the customer genetic dataif hasattr(productAuthorization.scopes, "dataset"): # get SNP information snpDetails = apiClient.get_client_snp( productAuthorization.client_uuid, productAuthorization.scopes.dataset, rsId )$datasetSnps = null;
// check to see if you have access to the customer genetic dataif (isset($productAuthorization["scopes"]["dataset"])){ // get all authorized SNPs $datasetSnps = $apiClient->getClientSnpGroup( $productAuthorization["clientUuid"], $productAuthorization["scopes"]["dataset"] );}datasetSnps = None
# check to see if you have access to the customer genetic dataif hasattr(productAuthorization.scopes, "dataset"): # get all authorized SNPs datasetSnps = apiClient.get_client_snp_group( productAuthorization.client_uuid, productAuthorization.scopes.dataset )$geneSymbol = "C1ORF159";$geneDetails = null;// check to see if you have access to the customer genetic dataif (isset($productAuthorization["scopes"]["dataset"])){ // get all authorized SNPs within a gene $geneDetails = $apiClient->getClientGene( $productAuthorization["clientUuid"], $productAuthorization["scopes"]["dataset"], $geneSymbol );}geneSymbol = "C1ORF159"geneDetails = None# check to see if you have access to the customer genetic dataif hasattr(productAuthorization.scopes, "dataset"): # get all authorized SNPs within a gene geneDetails = apiClient.get_client_gene( productAuthorization.client_uuid, productAuthorization.scopes.dataset, geneSymbol )$authorizationDnaData = $apiClient->authorizationDnaData($productAuthorization["authorizationUuid"]);authorizationDnaData = apiClient.authorization_dna_data(productAuthorization.authorization_uuid)$pathToReportFile = <path_to_report_file>;$fileReport = new \SplFileObject($pathToReportFile); $friendlyFileName = "report_file_name"; //optional, give a friendly name to your report file$apiClient->postAuthorizationResultFile( $productAuthorization["productUuid"], $productAuthorization["authorizationUuid"], $fileReport, $friendlyFileName);pathToReport = <path_to_report_file>originalFilename = "report_file_name" #optional, give a friendly name to your report fileapiClient.post_authorization_result_file( productAuthorization.product_uuid, productAuthorization.authorization_uuid, pathToReport, originalFilename)$apiClient->postAuthorizationResultCredentials( $productAuthorization["productUuid"], $productAuthorization["authorizationUuid"], <username_generated_by_you>, //optional, default null <password_generated_by_you>, //optional, default null <report_on_your_website_url> // https://partnerwebsite.com/reports.php?reportid=a7508);apiClient.post_authorization_result_credentials( productAuthorization.product_uuid, productAuthorization.authorization_uuid, <username_generated_by_you>, # optional, default null <password_generated_by_you>, # optional, default null <report_on_your_website_url> # https://partnerwebsite.com/reports.php?reportid=a7508)$apiClient->postProductAuthorization( $productAuthorization["productUuid"], $productAuthorization["authorizationUuid"]);apiClient.post_product_authorization( productAuthorization.product_uuid, productAuthorization.authorization_uuid)<head> <script defer src="https://lumminary.com/cwl/cwl.js"></script></head><a class="lumminary-connect-btn" data-partner-uuid="<partner-UUID>" data-request="<request>" style="cursor:pointer; text-decoration:none;" href="https://lumminary.com"> <img src="https://lumminary.com/cwl/connect-with-lumminary-white.svg" alt="Lumminary DNA tests" height="50" title="Connect with Lumminary"/></a><a class="lumminary-connect-btn" data-partner-uuid="<partner-UUID>" data-request="<request>" style="cursor:pointer; text-decoration:none;" href="https://lumminary.com"> <img src="https://lumminary.com/cwl/connect-with-lumminary-black.svg" alt="Lumminary DNA tests" height="50" title="Connect with Lumminary"/></a>$objAuthorizationRequest ["scopes"] = "address,dataset,email";objAuthorizationRequest ["scopes"] = "address,dataset,email"$objAuthorizationRequest["productUuid"] = $credentials->getProductUuid();objAuthorizationRequest["productUuid"] = credentials.product_uuid$objAuthorizationRequest["customData"] = array();$objAuthorizationRequest["customData"]["customerId"] = <partner-customer-id>;$objAuthorizationRequest["customData"]["websiteSession"] = <customer-session>;$objAuthorizationRequest["customData"]["customData3"] = <Some addional data>;objAuthorizationRequest["customData"] = {}objAuthorizationRequest["customData"]["customerId"] = <partner-customer-id>objAuthorizationRequest["customData"]["websiteSession"] = <customer-session>objAuthorizationRequest["customData"]["customData3"] = <Some addional data>$objAuthorizationRequest["scopes"] = "address,dataset,email";$objAuthorizationRequest["productUuid"] = <product-UUID>;
$objAuthorizationRequest["customData"] = array();$objAuthorizationRequest["customData"]["customerId"] = <partner-customer-id>;$objAuthorizationRequest["customData"]["websiteSession"] = <customer-session>;$objAuthorizationRequest["customData"]["customData3"] = <Some addional data>;objAuthorizationRequest = {}objAuthorizationRequest["scopes"] = "address,dataset,email"objAuthorizationRequest["productUuid"] = <product-UUID>
objAuthorizationRequest["customData"] = {}objAuthorizationRequest["customData"]["customerId"] = <partner-customer-id>objAuthorizationRequest["customData"]["websiteSession"] = <customer-session>objAuthorizationRequest["customData"]["customData3"] = <Some addional data>// You have recieved the CWL encryption key after filling in the form for product registration$partnerCwlKey = <partner-encryption-key>;$requestValueEncryptedUrlEncoded = Lumminary\Client\LumminaryApi::cwl_data_request_build( $objAuthorizationRequest, $partnerCwlKey);import lumminary_sdk as lumminary
# You have recieved the CWL encryption key after filling in the form for productpartnerCwlKey = <partner-encryption-key> requestValueEncryptedUrlEncoded = lumminary.LumminaryApi.cwl_data_request_build(objAuthorizationRequest, partnerCwlKey)<a class="lumminary-connect-btn" data-partner-uuid="4231-7446-2543-6542" data-request="7LfMX811Als0l%2FAvf84pB7n3mcycnTjgWl1FaVNffdqiOApMn4HAnk0Ux6eatObfYmxf1xPRjo7nBojsL4ImgOL932NK2Ei4VoUXjs9Y%2BcvphI0kxBSblLaeVXNPbJO9LsuNP%2BHJzDBAnZZdAObgYxHH2QDY3VD%2Ff%2FBXKw9WYDdBssAoegMFEJ9GgYutFQ4nTPXAt%2FdWCqoxYbZrYpCj2Pphk9lstc4Ib%2BLNxKiEtNCmVGr6sgmR2lPBwgylTsEX%2FMRCJb6sdQyZBhvSQCMFb0p3%2B9tEwV0%3D" style="cursor:pointer; text-decoration:none;" href="https://lumminary.com"> <img src="https://lumminary.com/cwl/connect-with-lumminary-white.svg" alt="Lumminary DNA tests" height="50" title="Connect with Lumminary"></a>// the entire callback URL, including the querystring parameters$callbackUrlWithPayload = "https://partnerwebsite.con/callback?request=...&response=...";
$cwlReturnObject = Lumminary\Client\LumminaryApi::cwl_url_query_extract( $callbackUrlWithPayload, $partnerCwlKey );// the entire callback URL, including the querystring parameterscallback_url_with_payload = "https://partnerwebsite.con/callback?request=...&response=..."
cwlReturnObject = apiClient.cwl_url_query_extract( callback_url_with_payload, partner_cwl_key){ "request": <your-request-parameter-echoed>, "response": { "authorizationUuid": <cwl-authorization-uuid>, "authorizationTimestamp": <cwl-authorization-created-timestamp> }}// the entire callback url, including the querystring parameters$callbackUrlWithPayload = "https://partnerwebsite.con/callback?request=...&response=...";
$cwlReturnObject = Lumminary\Client\LumminaryApi::cwl_url_query_extract( $callbackUrlWithPayload, $partnerCwlKey );# the entire callback url, including the querystring parameterscallback_url_with_payload = "https://partnerwebsite.con/callback?request=...&response=..."
cwlReturnObject = apiClient.cwl_url_query_extract( callback_url_with_payload, partner_cwl_key){ "request": <your-request-parameter-echoed>, "response": { "error": { "id": <error id>, "message": <error message> } }}- Homepage
- https://api.apis.guru/v2/specs/lumminary.com/1.0.json
- Provider
- lumminary.com
- OpenAPI version
- 2.0
- Spec (JSON)
- https://api.apis.guru/v2/specs/lumminary.com/1.0/swagger.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/lumminary.com/1.0/swagger.yaml
Tool extraction failed: Only OpenAPI 3.x documents are supported. Swagger 2.x documents should be converted first..