smarter-1 User Guide
smarter-1 takes your product catalog and generates actionable recommendations on potential regulatory hazards for handling your products in a safe, compliant manner, without requiring supplier registration or extensive proprietary data.
Behind the scenes, our enrichment process can identify missing attributes from vetted publicly available sources. From there, our experts leverage a suite of machine learning tools and automation to deliver recommendations quickly, at scale.
You can use this API to submit your product data and collect the results of our analysis. All you need to get started is a UPC and Product Name. (If you have more data available we'll utilize it and/or return it back to you to aid your workflows, but anything else is always optional.)
Generally, the process is as follows:
- Upload your product catalog: You can upload your product catalog as a bulk CSV, or individually product-by-product
- Check in on our progress: Analysis can take a bit of time, but you can check in periodically (polling) on individual products or page through the results of your entire catalog
- Retrieve your results: Once analysis is complete, you can retrieve the results individually or in bulk
Setup
All authentication with the API is done using a bearer token. When you sign
into the developer portal or the staging
portal using auth0 credentials, an
API key is generated for you. Provide this key in the Authorization
header of your requests to authenticate with the API:
Code
Uploading Products
You can upload your product catalog as a
bulk CSV,
or
individually
product-by-product. At a minimum, you must provide the product_name and upc
attributes for each product. UPC is provided in the URL for a single product
upload, and as a column in the CSV for bulk uploads. You can also provide
any additional attributes you have available, such as brand, description,
etc.
Polling and Retrieving Results
When looking up products, either
individually by upc
or in
bulk,
you can check the status field to see if the product is still being processed.
The status field can have the following values:
PENDING: indicates that a product has been received and is enqueued for regulatory evaluationIN_REVIEW: indicates that the product is currently in review by our regulatory expertsCLASSIFICATION_COMPLETE: indicates that the product has been classified and classifications are ready for retrieval
Each product will contain attributes and classifications fields. The
attributes field contains useful attributes you provided in the upload, for
example sku or other internal identifiers, or product descriptions. The
classifications field contains the results of our analysis. Both lists
contain objects with name and value fields.
Code
Paging Results in Bulk
Several query parameters are available to help you filter and page through the products returned from the bulk endpoint. Available query parameters include:
start_date: returns only products last updated after midnight (UTC) on the provided dateend_date: returns only products last updated before midnight (UTC) on the provided datestatuses: returns only products with the provided status values (JSON array)page_size: the number of products to return per page (default: 50)page_token: the page token to use for pagination (provided in thepagination.next_page_tokenfield of the response)
Example: Retrieving Completed Products With Pagination
Code
Code
Later queries can use the page_token to page through the results. If you're
polling on an interval, you can use the start_date query parameter to only
return products that have been updated since the last time you checked,
useful for checking in on the status of a product without having to page
through all of the results again.