User Tools

Site Tools


api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api [2019/09/08 16:54]
flack [Quote API]
api [2019/09/25 20:24] (current)
flack [Quote API]
Line 645: Line 645:
   * **delivery_time**:​ Delivery time limit (working days). Door-to-door delivery time. Only offer molecules that are available within the specified number of working days. You can specify null if delivery time is not critical. (default: 21)   * **delivery_time**:​ Delivery time limit (working days). Door-to-door delivery time. Only offer molecules that are available within the specified number of working days. You can specify null if delivery time is not critical. (default: 21)
   * **purity**: Required minimum purity (%). (default: null)   * **purity**: Required minimum purity (%). (default: null)
 +  * **higher_amounts**:​ Set to true if you would like to get a quote for the compounds in the largest possible quantity in case they do not cost more than the specified amount. (default: false)
   * **item_filters**:​ Per query item filters. Currently it supports only supplier filtering. See example below.   * **item_filters**:​ Per query item filters. Currently it supports only supplier filtering. See example below.
  
Line 1104: Line 1105:
         }         }
     ],      ], 
-    "​missing_mcule_ids":​ [],  
     "​name":​ "", ​     "​name":​ "", ​
     "​order_data":​ null,      "​order_data":​ null, 
Line 1280: Line 1280:
     * **product**:​ The ID of the quoted product (should be neglected).     * **product**:​ The ID of the quoted product (should be neglected).
     * **product_compound_mcule_id**:​ The compound level structures'​ mcule ID of the quoted product.     * **product_compound_mcule_id**:​ The compound level structures'​ mcule ID of the quoted product.
 +    * **product_delivery_time**:​ Delivery time (working days)
     * **product_price**:​ Product price (USD)     * **product_price**:​ Product price (USD)
     * **product_purity**:​ Minimum purity (%)     * **product_purity**:​ Minimum purity (%)
     * **structure_origin_mcule_id**:​ The mcule ID of the query molecule.     * **structure_origin_mcule_id**:​ The mcule ID of the query molecule.
     * **quote**: The ID of the quote this product level quote data belongs to.     * **quote**: The ID of the quote this product level quote data belongs to.
-  * **missing_mcule_ids**:​ list of missing mcule IDs from the query 
   * **name**: The name of the quote. Quotes created via the API don't have names.   * **name**: The name of the quote. Quotes created via the API don't have names.
   * **order_data**:​ Order data. (Should be neglected).   * **order_data**:​ Order data. (Should be neglected).
Line 1319: Line 1319:
   * **valid_until**:​ The datetime until the quote is valid.   * **valid_until**:​ The datetime until the quote is valid.
   ​   ​
 +==== Quote - Missing structures ====
 +
 +You can get the missing structures along with the reason of their exclusion.
 +
 +<​code>​
 +http https://​mcule.com/​api/​v1/​iquotes/<​quote_id>/​missing/​ "​Authorization:​ Token <​your_token>"​
 +</​code>​
 +
 +And it will return a similar response to this:
 +<​code>​
 +{
 +    "​results":​ [
 +        {
 +            "​data":​ {
 +                "​MCULE-6224850672":​ "No instant quotable products"​
 +            }, 
 +            "​id":​ 4, 
 +            "​quote":​ 125, 
 +            "​structure":​ 167312, ​
 +            "​structure_mcule_id":​ "​MCULE-6224850672"​
 +        }, 
 +        {
 +            "​data":​ {
 +                "​MCULE-7173925849":​ "No instant quotable products"​
 +            }, 
 +            "​id":​ 5, 
 +            "​quote":​ 125, 
 +            "​structure":​ 135326, ​
 +            "​structure_mcule_id":​ "​MCULE-7173925849"​
 +        }, 
 +        {
 +            "​data":​ {
 +                "​P-282184":​ "​Purity filtering", ​
 +                "​P-307415":​ "​Purity filtering"​
 +            }, 
 +            "​id":​ 6, 
 +            "​quote":​ 125, 
 +            "​structure":​ 201510, ​
 +            "​structure_mcule_id":​ "​MCULE-9519333144"​
 +        }
 +    ]
 +}
 +</​code>​
 +
 ==== Download quote as PDF  ==== ==== Download quote as PDF  ====
  
Line 1338: Line 1382:
 http https://​mcule.com/​api/​v1/​iquotes/​15677/​download-excel/​ "​Authorization:​ Token <​your_token>"​ --download http https://​mcule.com/​api/​v1/​iquotes/​15677/​download-excel/​ "​Authorization:​ Token <​your_token>"​ --download
 </​code>​ </​code>​
 +
 +
 +
 +====== Code examples (Python) ======
 +
 +We created a public Git repository that contains Python code examples on how to use the Mcule API. These examples supplement the above API documentation and might give you a better understanding on how you can utilize those API endpoints currently.
 +
 +The repository is available here:
 +[[https://​bitbucket.org/​mcule/​mcule_api_usage_examples/​]]
 +
 +We'll probably extend this repository with new examples later.
 +
api.1567954454.txt.gz ยท Last modified: 2019/09/08 16:54 by flack