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 revisionPrevious revision
Next revision
Previous revision
api [2020/04/22 10:01] flackapi [2024/05/10 08:12] (current) – [Quote Request API] adapt to item_level_iq_info bkovats
Line 48: Line 48:
     "results": [     "results": [
         {         {
-            "description": "All purchasablein stock virtual compounds",  +            "id": 1, 
-            "entry_count": 35772718+            "name": "Mcule Full", 
 +            "description": "Purchasable Mcule supplier ULTIMATE catalogs", 
 +            "entry_count": 40240579, 
 +            "last_updated": "2023-01-21",
             "files": [             "files": [
                 {                 {
-                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_170918.sdf.gz",  +                    "size_mb": 9337
-                    "file_type": "sdf.gz",  +                    "file_type": "sdf.gz", 
-                    "file_type_display": "2D SDF (sdf.gz)",  +                    "file_type_display": "2D SDF (sdf.gz)", 
-                    "size_mb": 5762 +                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_230121.sdf.gz" 
-                }, +                },
                 {                 {
-                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_170918.smiles.gz",  +                    "size_mb": 513
-                    "file_type": "smiles.gz",  +                    "file_type": "smi.gz", 
-                    "file_type_display": "SMILES (smi.gz)",  +                    "file_type_display": "SMILES (smi.gz)", 
-                    "size_mb": 462+                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_230121.smi.gz"
                 }                 }
-            ],  +            ], 
-            "last_updated": "2017-09-18",  +            "public": true
-            "name": "Mcule Purchasable (full)"+            "group": "default"
-            "public": true+
         },          }, 
         {         {
-            "description": "All purchasable, in stock compounds",  +            "id": 2, 
-            "entry_count": 5648837+            "name": "Mcule In Stock", 
 +            "description": "Purchasable Mcule supplier in stock catalogs", 
 +            "entry_count": 5790697, 
 +            "last_updated": "2023-01-20",
             "files": [             "files": [
                 {                 {
-                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_170918.sdf.gz",  +                    "size_mb": 1327
-                    "file_type": "sdf.gz",  +                    "file_type": "sdf.gz", 
-                    "file_type_display": "2D SDF (sdf.gz)",  +                    "file_type_display": "2D SDF (sdf.gz)", 
-                    "size_mb": 1311 +                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_230120.sdf.gz" 
-                }, +                },
                 {                 {
-                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_170918.smiles.gz",  +                    "size_mb": 85
-                    "file_type": "smiles.gz",  +                    "file_type": "smi.gz", 
-                    "file_type_display": "SMILES (smi.gz)",  +                    "file_type_display": "SMILES (smi.gz)", 
-                    "size_mb": 84+                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_230120.smi.gz"
                 }                 }
-            ],  +            ], 
-            "last_updated": "2017-09-18",  +            "public": true
-            "name": "Mcule Purchasable (in stock)"+            "group": "default"
-            "public": true+
         }         }
     ]     ]
Line 162: Line 166:
 ===== InChIKey lookup ===== ===== InChIKey lookup =====
 == Endpoint: == == Endpoint: ==
-<code>/lookup/<inchi_key></code>+<code>/lookup/inchikey/<inchi_key></code>
  
 == Example API request: == == Example API request: ==
Line 345: Line 349:
 http 'https://mcule.com/api/v1/compound/MCULE-9380369173/prices/?amounts=15,20' "Authorization: Token <your_token>" --print HBhb http 'https://mcule.com/api/v1/compound/MCULE-9380369173/prices/?amounts=15,20' "Authorization: Token <your_token>" --print HBhb
 </code> </code>
 +
 +
 +===== Compound list details =====
 +
 +With this endpoint you can get compound details information for multiple compound mcule IDs in a single API call.
 +
 +== Endpoint: ==
 +<code>/compounds/</code>
 +
 +== Basic API request: ==
 +<code>
 +echo '{"mcule_ids": ["MCULE-7655747555","MCULE-5912414227"]}' | http https://mcule.com/api/v1/compounds/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +
 +== Example API request: ==
 +<code>
 +echo '{"mcule_ids": ["MCULE-7655747555","MCULE-5912414227","MCULE-2570263241"], "price_amounts": [1,5,10], "components": true, "availability": true}' | http https://mcule.com/api/v1/compounds/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +POST /api/v1/compounds/ HTTP/1.1
 +Authorization: Token <your_token>
 +Content-Type: application/json
 +
 +{
 +    "availability": true,
 +    "components": true,
 +    "mcule_ids": [
 +        "MCULE-7655747555",
 +        "MCULE-5912414227",
 +        "MCULE-2570263241"
 +    ],
 +    "price_amounts": [
 +        1,
 +        5,
 +        10
 +    ]
 +}
 +</code>
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Content-Type: application/json
 +
 +{
 +    "count": 3,
 +    "results": [
 +        {
 +            "mcule_id": "MCULE-7655747555",
 +            "smiles": "C1C=C(F)C=C(C2=NC=C(C#N)C=N2)C=1",
 +            "inchi_key": "ZXSZUCRVSWGKCX-UHFFFAOYSA-N",
 +            "best_prices": [],
 +            "mol": "\n  mcule   14092123302D\n\n 15 16  0  0  0  0  0  0  0  0999 V2000\n    8.1579    0.0000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.7983    0.7849    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.7983    2.3549    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    8.1579    3.1400    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    9.5175    2.3549    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    9.5175    0.7849    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   10.8773    3.1400    0.0000 F    0  0  0  0  0  0  0  0  0  0  0\n    5.4386    3.1400    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.0789    2.3549    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    2.7192    3.1400    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.7192    4.7100    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.0789    5.4950    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.4386    4.7100    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    1.3597    5.4950    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.0000    6.2800    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n  1  2  2  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  6  1  1  0  0  0  0\n  5  7  1  0  0  0  0\n  3  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  2  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  2  0  0  0  0\n 12 13  1  0  0  0  0\n 13  8  2  0  0  0  0\n 11 14  1  0  0  0  0\n 14 15  3  0  0  0  0\nM  END",
 +            "availability": {
 +                "confirmed_amount": null,
 +                "availability_type": "in stock",
 +                "confirmed_amount_unit": "mg"
 +            },
 +            "std_inchi": "InChI=1S/C11H6FN3/c12-10-3-1-2-9(4-10)11-14-6-8(5-13)7-15-11/h1-4,6-7H",
 +            "url": "https://mcule.com/MCULE-7655747555/",
 +            "properties": {
 +                "rotatable_bonds": 1,
 +                "h_bond_donors": 0,
 +                "logp": 2.15438,
 +                "r3_violations": 0,
 +                "ct_bonds": 0,
 +                "undef_stereocenters": 0,
 +                "stereocenters": 0,
 +                "rings": 2,
 +                "heavy_atoms": 15,
 +                "r5_violations": 0,
 +                "heteroatoms": 4,
 +                "hydrogens": 6,
 +                "unknown_ct_bonds": 0,
 +                "non_organic_atoms": 0,
 +                "psa": 49.57,
 +                "known_stereocenters": 0,
 +                "atoms": 21,
 +                "unknown_stereocenters": 0,
 +                "halogen_atoms": 1,
 +                "known_ct_bonds": 0,
 +                "h_bond_acceptors": 3,
 +                "refractivity": 52.141,
 +                "mol_mass": 199.183,
 +                "o_and_n_atoms": 3,
 +                "undef_ct_bonds": 0,
 +                "components": 1
 +            },
 +            "stereo_type": "none",
 +            "components": [],
 +            "formula": "C11H6FN3"
 +        },
 +        {
 +            "mcule_id": "MCULE-5912414227",
 +            "smiles": "CN1C(C2N(C(C3N=CC=C(C4CC4)C=3)=O)CCCCC2)=CC=C1",
 +            "inchi_key": "LIJVUQWKZXRMJJ-UHFFFAOYSA-N",
 +            "best_prices": [
 +                {
 +                    "currency": "USD",
 +                    "amount": 1,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 310,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 5,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 330,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 10,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 355,
 +                    "unit": "mg"
 +                }
 +            ],
 +            "mol": "\n  mcule   14092123302D\n\n 24 27  0  0  0  0  0  0  0  0999 V2000\n    8.4758    5.5126    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.6618    5.6478    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    7.2928    6.3856    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.4771    6.2627    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.3419    5.4488    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.0742    5.0687    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.1972    4.2529    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.9855    4.0098    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    8.2869    3.2418    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.8744    2.5274    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.0585    2.4043    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.4539    2.9656    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.5154    3.7883    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    5.8010    4.2008    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.8010    5.0258    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n    5.0866    3.7883    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.0866    2.9632    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.3721    2.5507    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.6576    2.9632    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.6576    3.7883    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.3721    4.2008    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    4.3721    1.7257    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.7845    1.0113    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9596    1.0113    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  2  6  1  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n  7 13  1  0  0  0  0\n 13 14  1  0  0  0  0\n 14 15  2  0  0  0  0\n 14 16  1  0  0  0  0\n 16 17  2  0  0  0  0\n 17 18  1  0  0  0  0\n 18 19  2  0  0  0  0\n 19 20  1  0  0  0  0\n 20 21  2  0  0  0  0\n 16 21  1  0  0  0  0\n 18 22  1  0  0  0  0\n 22 23  1  0  0  0  0\n 23 24  1  0  0  0  0\n 22 24  1  0  0  0  0\nM  END",
 +            "availability": {
 +                "confirmed_amount": null,
 +                "availability_type": "potentially purchasable",
 +                "confirmed_amount_unit": "mg"
 +            },
 +            "std_inchi": "InChI=1S/C20H25N3O/c1-22-12-5-7-18(22)19-6-3-2-4-13-23(19)20(24)17-14-16(10-11-21-17)15-8-9-15/h5,7,10-12,14-15,19H,2-4,6,8-9,13H2,1H3",
 +            "url": "https://mcule.com/MCULE-5912414227/",
 +            "properties": {
 +                "rotatable_bonds": 4,
 +                "h_bond_donors": 0,
 +                "logp": 3.9929,
 +                "r3_violations": 4,
 +                "ct_bonds": 0,
 +                "undef_stereocenters": 1,
 +                "stereocenters": 1,
 +                "rings": 4,
 +                "heavy_atoms": 24,
 +                "r5_violations": 0,
 +                "heteroatoms": 4,
 +                "hydrogens": 25,
 +                "unknown_ct_bonds": 0,
 +                "non_organic_atoms": 0,
 +                "psa": 38.13,
 +                "known_stereocenters": 0,
 +                "atoms": 49,
 +                "unknown_stereocenters": 0,
 +                "halogen_atoms": 0,
 +                "known_ct_bonds": 0,
 +                "h_bond_acceptors": 4,
 +                "refractivity": 99.3685,
 +                "mol_mass": 323.431,
 +                "o_and_n_atoms": 4,
 +                "undef_ct_bonds": 0,
 +                "components": 1
 +            },
 +            "stereo_type": "absolute",
 +            "components": [],
 +            "formula": "C20H25N3O"
 +        },
 +        {
 +            "mcule_id": "MCULE-2570263241",
 +            "smiles": "CN1C(C2N(C(C3=C4C(NN=C4)=NC=C3)=O)CCCCC2)=CC=C1",
 +            "inchi_key": "MIRPCBGHLNQNNH-UHFFFAOYSA-N",
 +            "best_prices": [
 +                {
 +                    "currency": "USD",
 +                    "amount": 1,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 310,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 5,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 330,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 10,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 355,
 +                    "unit": "mg"
 +                }
 +            ],
 +            "mol": "\n  mcule   14092123302D\n\n 24 27  0  0  0  0  0  0  0  0999 V2000\n    3.0777    5.0348    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.6016    4.3976    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    4.4252    4.4469    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.7266    3.6789    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.0893    3.1549    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.3941    3.5991    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.6261    3.2977    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.0213    3.8587    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.2056    3.7359    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.7931    3.0214    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.0945    2.2533    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.8828    2.0103    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.5645    2.4749    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    3.2789    2.0625    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9934    2.4749    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n    3.2789    1.2374    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9934    0.8250    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9934   -0.0001    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.2789   -0.4125    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    2.5645   -0.0001    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.7798   -0.2549    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    1.2949    0.4125    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    1.7798    1.0798    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.5645    0.8250    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  2  6  1  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n  7 13  1  0  0  0  0\n 13 14  1  0  0  0  0\n 14 15  2  0  0  0  0\n 14 16  1  0  0  0  0\n 16 17  1  0  0  0  0\n 17 18  2  0  0  0  0\n 18 19  1  0  0  0  0\n 19 20  2  0  0  0  0\n 20 21  1  0  0  0  0\n 21 22  1  0  0  0  0\n 22 23  2  0  0  0  0\n 23 24  1  0  0  0  0\n 16 24  2  0  0  0  0\n 20 24  1  0  0  0  0\nM  END",
 +            "availability": {
 +                "confirmed_amount": null,
 +                "availability_type": "potentially purchasable",
 +                "confirmed_amount_unit": "mg"
 +            },
 +            "std_inchi": "InChI=1S/C18H21N5O/c1-22-10-5-7-15(22)16-6-3-2-4-11-23(16)18(24)13-8-9-19-17-14(13)12-20-21-17/h5,7-10,12,16H,2-4,6,11H2,1H3,(H,19,20,21)",
 +            "url": "https://mcule.com/MCULE-2570263241/",
 +            "properties": {
 +                "rotatable_bonds": 3,
 +                "h_bond_donors": 1,
 +                "logp": 2.9918,
 +                "r3_violations": 3,
 +                "ct_bonds": 0,
 +                "undef_stereocenters": 1,
 +                "stereocenters": 1,
 +                "rings": 4,
 +                "heavy_atoms": 24,
 +                "r5_violations": 0,
 +                "heteroatoms": 6,
 +                "hydrogens": 21,
 +                "unknown_ct_bonds": 0,
 +                "non_organic_atoms": 0,
 +                "psa": 66.81,
 +                "known_stereocenters": 0,
 +                "atoms": 45,
 +                "unknown_stereocenters": 0,
 +                "halogen_atoms": 0,
 +                "known_ct_bonds": 0,
 +                "h_bond_acceptors": 6,
 +                "refractivity": 96.5542,
 +                "mol_mass": 323.392,
 +                "o_and_n_atoms": 6,
 +                "undef_ct_bonds": 0,
 +                "components": 1
 +            },
 +            "stereo_type": "absolute",
 +            "components": [],
 +            "formula": "C18H21N5O"
 +        }
 +    ]
 +}
 +</code>
 +
 +Fields:
 +  * **mcule_ids**: Required. List of mcule IDs. Only compound level mcule IDs are accepted, e.g.: MCULE-7655747555. Mcule IDs that represent other [[structurelevels|structure levels]] (e.g. MCULE-7655747555-0, MCULE-7655747555-0-0, P-611592727) are not accepted.
 +  * **availability**: Optional. Default: false. Whether to return availability information in the response. If you don't need this information you can set it to false (or just leave it out from the request) in order to get a quicker response. Collecting this information can take some time. 
 +  * **components**: Optional. Default: true. Whether to return components information in the response in case the compound has multiple components. If you don't need this information you can set it to false in order to get a slightly quicker response. 
 +  * **price_amounts**: Optional. Default: None. List of amounts (in mg) to return best prices for. Please note that collecting pricing information is an expensive operation.
 +
 +Limits:
 +  * **mcule_ids**: The size of this list is limited to 500. If you specify the **price_amounts** field the limit is reduced to 100 since collecting pricing information is an expensive operation.
 +  * **price_amounts**: The size of this list is limited to 5. 
 +
  
  
 ===== Multiple queries exact search ===== ===== Multiple queries exact search =====
 Multiple queries exact search currently accepts the following input identifiers: mcule ID, SMILES, InChI or InChIKey identifiers. Multiple queries exact search currently accepts the following input identifiers: mcule ID, SMILES, InChI or InChIKey identifiers.
 +The maximum number of queries you can send to this endpoint is 1000 currently.
  
 == Endpoint: == == Endpoint: ==
Line 387: Line 641:
     "results": [     "results": [
         {         {
-            "input_index": 1,  +            "input_index": 1
-            "mcule_id": "MCULE-9380369173",  +            "matching_level": 40, 
-            "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O", +            "matching_level_display": "Atom graph"
 +            "mcule_id": "MCULE-9380369173", 
 +            "query": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O", 
 +            "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O",
             "url": "https://mcule.com/MCULE-9380369173/"             "url": "https://mcule.com/MCULE-9380369173/"
-        }, +        },
         {         {
-            "input_index": 2,  +            "input_index": 2
-            "mcule_id": "MCULE-4016901520",  +            "matching_level": 20, 
-            "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1", +            "matching_level_display": "Sp3 configuration"
 +            "mcule_id": "MCULE-4016901520", 
 +            "query": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1", 
 +            "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1",
             "url": "https://mcule.com/MCULE-4016901520/"             "url": "https://mcule.com/MCULE-4016901520/"
-        }, +        },
         {         {
-            "input_index": 3,  +            "input_index": 3
-            "mcule_id": "MCULE-7428195288",  +            "matching_level": 40, 
-            "smiles": "C1([C@H](C(C)C)NC(CCCC[C@H]2CCSS2)=O)NC2=C(C=CC=C2)N=1",  +            "matching_level_display": "Atom graph"
-            "url": "https://mcule.com/MCULE-7428195288/" +            "mcule_id": "MCULE-1039596211", 
-        }, +            "query": "C1([C@H](C(C)C)NC(CCCCC2CCSS2)=O)NC2=C(C=CC=C2)N=1", 
 +            "smiles": "C1(C(C(C)C)NC(CCCCC2CCSS2)=O)NC2=C(C=CC=C2)N=1", 
 +            "url": "https://mcule.com/MCULE-1039596211/" 
 +        },
         {         {
-            "input_index": 5,  +            "input_index": 5
-            "mcule_id": "MCULE-1259420189",  +            "matching_level": 40, 
-            "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1", +            "matching_level_display": "Atom graph"
 +            "mcule_id": "MCULE-1259420189", 
 +            "query": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1", 
 +            "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1",
             "url": "https://mcule.com/MCULE-1259420189/"             "url": "https://mcule.com/MCULE-1259420189/"
         }         }
Line 413: Line 679:
 } }
 </code> </code>
 +
 +Please note that in case the queries are InChIKeys, **matching_level** and **matching_level_display** will always be **null** in the response. 
  
 ===== Multiple queries exact search with availability ===== ===== Multiple queries exact search with availability =====
Line 453: Line 721:
         {         {
             "availability": {             "availability": {
-                "availability_type": "in stock",  +                "availability_type": "in stock", 
-                "confirmed_amount": 242+                "confirmed_amount": 100,
                 "confirmed_amount_unit": "mg"                 "confirmed_amount_unit": "mg"
-            },  +            }, 
-            "input_index": 1,  +            "input_index": 1
-            "mcule_id": "MCULE-9380369173",  +            "matching_level": 40, 
-            "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O", +            "matching_level_display": "Atom graph"
 +            "mcule_id": "MCULE-9380369173", 
 +            "query": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O", 
 +            "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O",
             "url": "https://mcule.com/MCULE-9380369173/"             "url": "https://mcule.com/MCULE-9380369173/"
-        }, +        },
         {         {
             "availability": {             "availability": {
-                "availability_type": "in stock",  +                "availability_type": "potentially purchasable", 
-                "confirmed_amount": null, +                "confirmed_amount": null,
                 "confirmed_amount_unit": "mg"                 "confirmed_amount_unit": "mg"
-            },  +            }, 
-            "input_index": 2,  +            "input_index": 2
-            "mcule_id": "MCULE-4016901520",  +            "matching_level": 20, 
-            "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1", +            "matching_level_display": "Sp3 configuration"
 +            "mcule_id": "MCULE-4016901520", 
 +            "query": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1", 
 +            "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1",
             "url": "https://mcule.com/MCULE-4016901520/"             "url": "https://mcule.com/MCULE-4016901520/"
-        }, +        },
         {         {
             "availability": {             "availability": {
-                "availability_type": "in stock",  +                "availability_type": "in stock", 
-                "confirmed_amount": null+                "confirmed_amount": 50,
                 "confirmed_amount_unit": "mg"                 "confirmed_amount_unit": "mg"
-            },  +            }, 
-            "input_index": 3,  +            "input_index": 3
-            "mcule_id": "MCULE-7428195288",  +            "matching_level": 40, 
-            "smiles": "C1([C@H](C(C)C)NC(CCCC[C@H]2CCSS2)=O)NC2=C(C=CC=C2)N=1",  +            "matching_level_display": "Atom graph"
-            "url": "https://mcule.com/MCULE-7428195288/" +            "mcule_id": "MCULE-1039596211", 
-        }, +            "query": "C1([C@H](C(C)C)NC(CCCCC2CCSS2)=O)NC2=C(C=CC=C2)N=1", 
 +            "smiles": "C1(C(C(C)C)NC(CCCCC2CCSS2)=O)NC2=C(C=CC=C2)N=1", 
 +            "url": "https://mcule.com/MCULE-1039596211/" 
 +        },
         {         {
             "availability": {             "availability": {
-                "availability_type": "potentially purchasable",  +                "availability_type": "potentially purchasable", 
-                "confirmed_amount": null, +                "confirmed_amount": null,
                 "confirmed_amount_unit": "mg"                 "confirmed_amount_unit": "mg"
-            },  +            }, 
-            "input_index": 5,  +            "input_index": 5
-            "mcule_id": "MCULE-1259420189",  +            "matching_level": 40, 
-            "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1", +            "matching_level_display": "Atom graph"
 +            "mcule_id": "MCULE-1259420189", 
 +            "query": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1", 
 +            "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1",
             "url": "https://mcule.com/MCULE-1259420189/"             "url": "https://mcule.com/MCULE-1259420189/"
         }         }
     ]     ]
-+}
 </code> </code>
  
 +Please note that in case the queries are InChIKeys, **matching_level** and **matching_level_display** will always be **null** in the response. 
 +
 +
 +===== Similarity search =====
 +Similarity search currently accepts the following input identifiers: mcule ID, SMILES.
 +
 +== Endpoint: ==
 +<code>/search/sim/</code>
 +
 +== Example API request: ==
 +<code>
 +echo '{"query": "MCULE-3601132784", "limit": 3, "threshold": 0.8}' | http https://mcule.com/api/v1/search/sim/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +or
 +
 +<code>
 +echo '{"query": "CC1=C(C(CC2NC(=O)C3=C(SC(C4=CC=CC=C4)=C3)N=2)=O)C=CO1", "limit": 3, "threshold": 0.8}' | http https://mcule.com/api/v1/search/sim/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +POST /api/v1/search/sim/ HTTP/1.1
 +Accept: application/json
 +Accept-Encoding: gzip, deflate
 +Authorization: Token <your_token>
 +Content-Type: application/json
 +
 +{
 +    "limit": 3,
 +    "query": "MCULE-3601132784",
 +    "threshold": 0.8
 +}
 +</code>
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Allow: POST, OPTIONS
 +Content-Encoding: gzip
 +Content-Type: application/json
 +
 +{
 +    "results": [
 +        {
 +            "mcule_id": "MCULE-3601132784",
 +            "sim": 1.0,
 +            "smiles": "CC1=C(C(CC2NC(=O)C3=C(SC(C4=CC=CC=C4)=C3)N=2)=O)C=CO1",
 +            "url": "https://mcule.com/MCULE-3601132784/"
 +        },
 +        {
 +            "mcule_id": "MCULE-1000774360",
 +            "sim": 0.8540706605222734,
 +            "smiles": "O=C(C1OC=CC=1)CC1NC(=O)C2=C(SC(C3=CC=CC=C3)=C2)N=1",
 +            "url": "https://mcule.com/MCULE-1000774360/"
 +        },
 +        {
 +            "mcule_id": "MCULE-9463088657",
 +            "sim": 0.8529886914378029,
 +            "smiles": "CC1SC2=C(C(NC(=N2)CC(C2=C(C)OC=C2)=O)=O)C=1",
 +            "url": "https://mcule.com/MCULE-9463088657/"
 +        }
 +    ]
 +}
 +</code>
 +
 +Mandatory fields:
 +
 +    * **query**: string, accepted identifiers: mcule ID, SMILES.
 +
 +Optional fields:
 +
 +    * **threshold**: float, similarity threshold, accepted values between 0.7 and 1.0, default: 0.9
 +    * **limit**: integer, accepted values between 1 and 1000, default: 100
 +    * **collection**: string, accepted values: "full", "in_stock", default: "full". If you specify "in_stock" the search will be performed on the Mcule Purchasable (In Stock) collection which means that Virtual /  Potentially purchasable (60-80%) compounds will be excluded from the hits.
 +
 +
 +===== Substructure search =====
 +Substructure search currently accepts the following input identifiers: mcule ID, SMILES.
 +
 +== Endpoint: ==
 +<code>/search/sss/</code>
 +
 +== Example API request: ==
 +<code>
 +echo '{"query": "CC1=CC2=C(S1)N=CNC2=O", "limit": 5}' | http https://mcule.com/api/v1/search/sss/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +POST /api/v1/search/sss/ HTTP/1.1
 +Accept: application/json
 +Accept-Encoding: gzip, deflate
 +Authorization: Token <your_token>
 +Content-Type: application/json
 +
 +{
 +    "limit": 5,
 +    "query": "CC1=CC2=C(S1)N=CNC2=O"
 +}
 +</code>
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Allow: POST, OPTIONS
 +Content-Encoding: gzip
 +Content-Type: application/json
 +
 +{
 +    "results": [
 +        {
 +            "mcule_id": "MCULE-8112694353",
 +            "smiles": "C12C(C)=C(SC=1N=CN(CC(NCCCC(=O)NC1CCCCC1)=O)C2=O)C",
 +            "url": "https://mcule.com/MCULE-8112694353/"
 +        },
 +        {
 +            "mcule_id": "MCULE-8986577308",
 +            "smiles": "C12SC3=C(CCCC3)C=1C(NC(SCC#C)=N2)=O",
 +            "url": "https://mcule.com/MCULE-8986577308/"
 +        },
 +        {
 +            "mcule_id": "MCULE-4695228882",
 +            "smiles": "C12SC3=C(CCCC3)C=1C(NC(SCCCC)=N2)=O",
 +            "url": "https://mcule.com/MCULE-4695228882/"
 +        },
 +        {
 +            "mcule_id": "MCULE-1137030903",
 +            "smiles": "N1(CC2C=NN(C)C=2)C(=O)C2C=C(SC=2N=C1S)CC",
 +            "url": "https://mcule.com/MCULE-1137030903/"
 +        },
 +        {
 +            "mcule_id": "MCULE-1308684767",
 +            "smiles": "C12SC3=C(CCCC3)C=1C(NC(SCC=C)=N2)=O",
 +            "url": "https://mcule.com/MCULE-1308684767/"
 +        }
 +    ]
 +}
 +</code>
 +
 +Mandatory fields:
 +
 +    * **query**: string, accepted identifiers: mcule ID, SMILES.
 +
 +Optional fields:
 +
 +    * **limit**: integer, accepted values between 1 and 1000, default: 100
 +    * **collection**: string, accepted values: "full", "in_stock", default: "full". If you specify "in_stock" the search will be performed on the Mcule Purchasable (In Stock) collection which means that Virtual /  Potentially purchasable (60-80%) compounds will be excluded from the hits.
  
  
Line 644: Line 1072:
  
 Optional fields: Optional fields:
-  * **amount**: Preferred amount per molecule (mg). (default: 1) +  * Weight (mg) based amount fields   
-  * **min_amount**: Acceptable minimum amount (mg). (default: null+    * **amount**: Preferred amount per molecule (mg). 
-  * **target_volume**: The target volume (in ml), in case of solution based amount+    * **min_amount**: Acceptable minimum amount (mg). (default: 1) 
-  * **target_cc**: Target concentration (mM), in case of solution based amount. +  * Amount (µmol) based amount fields 
-  * **extra_amount**: In case of solution based amount calculation extra amount (in mg) can be specified here.+    * **target_amount_umol**: Preferred amount per molecule (µmol). 
 +    * **min_amount_umol**: Acceptable minimum amount (µmol). (default: 1
 +  * Solution based amount fields 
 +    * **target_volume**: The target volume (in µL). 
 +    * **target_cc**: Target concentration (mM)
 +    * **extra_amount**: In case of solution based amount calculation the preferred extra amount (in mg) can be specified here
 +    * **min_extra_amount**: In case of solution based amount calculation the acceptable minimum extra amount (in mg) can be specified here. 
   * **customer_email**: The customer's email address. By default it will be filled with the email address associated with the user making the API request.   * **customer_email**: The customer's email address. By default it will be filled with the email address associated with the user making the API request.
   * **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)   * **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 supplier and product filtering. See example below
 +  * **scheme**: If you have access to predefined / pre-negotiated quote request schemes, you can specify here which one you want to use. You have to send the ID of the scheme which will be provided to you after negotiation. A quote query scheme is essentially a template that contains predefined quote query parameters, or even include private parameters that affect quote generation in various ways (e.g.: discounts, predefined custom prices). These parameters can be customized for your use case. The scheme might already contain mandatory fields like delivery_country. In this case you don't have to specify them again, they will be applied from the scheme. Any explicitly specified public parameter during the request will override the one that comes from the specified scheme
  
-The **amount** or target concentration-volume pair (**target_volume** and **target_cc**) need to be specified.+The **amount** or **target_amount_umol** or target concentration-volume pair (**target_volume** and **target_cc**) needs to be specified. In case more than one of these is provided, you should get a validation error. Any other values that don't belong to the same type of amount are ignored during the quote generation. For example if **amount** and **min_amount_umol** are provided, the latter is ignored.
  
 **item_filters** example: **item_filters** example:
 It has to be a data structure where keys are mcule IDs you specified in the **mcule_ids** field. If you specify a key that is not an item in the **mcule_ids** list you should get a validation error (400 Bad Request). It has to be a data structure where keys are mcule IDs you specified in the **mcule_ids** field. If you specify a key that is not an item in the **mcule_ids** list you should get a validation error (400 Bad Request).
-Currently only supplier filtering is supported. You can specify a supplier ID list in the **suppliers** field to restrict product selection of a given item to a list of suppliers. If the list contains only one supplier ID, you restrict the product selection to that particular supplier. To get the ID of a supplier you can use the [[api#compound_suppliers_public_api|Compound suppliers Public API endpoint]] or the data is provided to you in another form (e.g.: exported database file that contains the information). If you specify a non-existing supplier ID, you should get a validation error.+Currently supplier and product filtering is supported. You can specify a supplier and/or product ID list in the **suppliers** and **products** fields to restrict product selection of a given item to a list of suppliers and/or products. If both filters are specified, both of them are applied. If the **suppliers** list contains only one supplier ID, you restrict the product selection to that particular supplier. To get the ID of a supplier you can use the [[api#compound_suppliers_public_api|Compound suppliers Public API endpoint]] or the data is provided to you in another form (e.g.: exported database file that contains the information). Product IDs are accepted in both the string (e.g. "P-430012732") and number (e.g. 430012732) format. If you specify a non-existing supplier or product ID, you should get a validation error.
 <code> <code>
 { {
-  "MCULE-2221628462": {"suppliers": [3]}, +  "MCULE-2221628462": { 
-  "MCULE-6824753328": {"suppliers": [3, 48]}+    "suppliers": [3] 
 +  }, 
 +  "MCULE-6824753328": { 
 +    "suppliers": [3, 48]
 +    "products: ["P-430012732", "P-600234524"
 +  }
 } }
 </code>  </code> 
Line 717: Line 1158:
     "delivery_contact_person_name": "",      "delivery_contact_person_name": "", 
     "delivery_contact_person_phone": "",      "delivery_contact_person_phone": "", 
-    "delivery_country": "US", +    "delivery_country": "US", 
 +    "delivery_format_display": "Dry powder/film in supplier vial", 
     "delivery_post_code": "",      "delivery_post_code": "", 
     "delivery_time": 21,      "delivery_time": 21, 
Line 740: Line 1182:
 </code> </code>
  
 +Alternative use of the endpoint:
  
 +Instead of **mcule_ids** you can specify a list of items in the **items** field. Each item has to be a data structure where the **mcule_id** field is mandatory and the following fields can be specified optionally:
 +  * amount fields: you can set the amount on an item-level by providing the appropriate amount fields (see above)
 +  * **suppliers**: list of supplier IDs for supplier filtering (same as **suppliers** in **item_filters** above)
 +  * **products**: list of product IDs for product filtering (same as **products** in **item_filters** above)
 +  * **user_ref_id**: any custom identifier (text) that will be included in the quote
 +
 +If the amount is provided for an item, it overwrites the globally set amount for that particular item. Note that the global amount must be provided even if it's specified individually for every item.
 +
 +== Example request: ===
 +<code>
 +POST /api/v1/iquote-queries/ HTTP/1.1
 +Accept: application/json, */*
 +Accept-Encoding: gzip, deflate
 +Authorization: Token <your_token>
 +Content-Type: application/json
 +
 +{
 +    "amount": 1,
 +    "customer_first_name": "John", 
 +    "customer_last_name": "Doe", 
 +    "delivery_country": "US", 
 +    "items": [
 +        {
 +            "mcule_id": "MCULE-6813962937",
 +            "user_ref_id": "molecule1",
 +            "target_amount_umol": 10,
 +            "products": ["P-871069132", "P-855381908"],
 +            "suppliers": [15, 64, 93]
 +        },
 +        {
 +            "mcule_id": "MCULE-5422721033"
 +        }
 +    ]
 +}
 +</code>
 +
 +== Example response: ===
 +<code>
 +HTTP/1.1 201 CREATED
 +Allow: GET, POST, HEAD, OPTIONS
 +Content-Type: application/json
 +
 +{
 +    "id": 62536,
 +    "state_display": "Pending",
 +    "api_url": "https://mcule.com/api/v1/iquote-queries/62536/",
 +    "site_url": "https://mcule.com/quote/query/62536/",
 +    "item_filters": {
 +        "MCULE-6813962937": {
 +            "suppliers": [
 +                15,
 +                64,
 +                93
 +            ],
 +            "products": [
 +                871069132,
 +                855381908
 +            ]
 +        }
 +    },
 +    "delivery_format_display": "Dry powder/film in supplier vial",
 +    "thoroughness_display": "Mildly thorough",
 +    "amount": 1,
 +    "min_amount": 1,
 +    "target_volume": null,
 +    "target_cc": null,
 +    "target_amount_umol": null,
 +    "min_amount_umol": 1,
 +    "extra_amount": null,
 +    "min_extra_amount": null,
 +    "customer_email": "",
 +    "purity": null,
 +    "delivery_time": null,
 +    "higher_amounts": false,
 +    "keep_original_salt_form": false,
 +    "keep_original_tautomer_form": false,
 +    "keep_original_stereo_form": false,
 +    "deliver_multiple_salt_forms": false,
 +    "additional_document_notes": "",
 +    "notes": "",
 +    "thoroughness": 10,
 +    "max_reliability_class": null,
 +    "customer_first_name": "John",
 +    "customer_last_name": "Doe",
 +    "delivery_country": "US",
 +    "delivery_contact_person_name": "",
 +    "delivery_contact_person_email": "",
 +    "delivery_contact_person_phone": "",
 +    "delivery_post_code": "",
 +    "delivery_city": "",
 +    "delivery_address": "",
 +    "created": "2024-05-10T09:56:57.008555",
 +    "promo_code": "",
 +    "exclude_products": "",
 +    "include_products": "",
 +    "state": 10,
 +    "start_date": null,
 +    "end_date": null,
 +    "user": 38573,
 +    "scheme": null
 +}
 +</code>
 ===== Quote Request Status API ===== ===== Quote Request Status API =====
  
Line 787: Line 1332:
     "delivery_contact_person_phone": "",      "delivery_contact_person_phone": "", 
     "delivery_country": "US",      "delivery_country": "US", 
 +    "delivery_format_display": "Dry powder/film in supplier vial", 
     "delivery_post_code": "",      "delivery_post_code": "", 
     "delivery_time": 21,      "delivery_time": 21, 
Line 964: Line 1510:
  
 { {
 +    "additional_document_notes": "",
 +    "amount_range": [1, 1],
 +    "amount_range_display": "1",
     "analytical_services_price": "0.00",      "analytical_services_price": "0.00", 
     "api_url": "https://mcule.com/api/v1/iquotes/15677/",      "api_url": "https://mcule.com/api/v1/iquotes/15677/", 
Line 1027: Line 1576:
             "price": "144.45",              "price": "144.45", 
             "product": 505393003,             "product": 505393003,
 +            "product_available_amount": null,
 +            "product_available_amount_display": "In stock",
             "product_catalog_id": 156,             "product_catalog_id": 156,
             "product_catalog_name": "Building Blocks",              "product_catalog_name": "Building Blocks", 
Line 1033: Line 1584:
             "product_price": "35.18",              "product_price": "35.18", 
             "product_purity": 98,              "product_purity": 98, 
 +            "product_smiles": "CCC(NCC[C@H]1C2=C(C=CC3=C2CCO3)CC1)=O",
             "product_supplier_id": 37,             "product_supplier_id": 37,
             "product_supplier_name": "AK Scientific",             "product_supplier_name": "AK Scientific",
Line 1044: Line 1596:
             "id": 1740172,              "id": 1740172, 
             "price": "97.32",              "price": "97.32", 
 +            "product": 346316287, 
 +            "product_available_amount": null,
 +            "product_available_amount_display": "In stock",
             "product_catalog_id": 6,             "product_catalog_id": 6,
             "product_catalog_name": "Advanced Collection",             "product_catalog_name": "Advanced Collection",
-            "product": 346316287,  
             "product_compound_mcule_id": "MCULE-3906582667",              "product_compound_mcule_id": "MCULE-3906582667", 
             "product_mcule_id": "P-346316287",              "product_mcule_id": "P-346316287", 
             "product_price": "95.94",              "product_price": "95.94", 
             "product_purity": 90,              "product_purity": 90, 
 +            "product_smiles": "CC1N(C(C2NCCC2)=O)CC(C2=C(C)C=CC=C2)C1.Cl",
             "product_supplier_id": 3,             "product_supplier_id": 3,
             "product_supplier_name": "Enamine",             "product_supplier_name": "Enamine",
Line 1063: Line 1618:
             "price": "97.32",              "price": "97.32", 
             "product": 346567071,              "product": 346567071, 
 +            "product_available_amount": null,
 +            "product_available_amount_display": "In stock",
             "product_catalog_id": 6,             "product_catalog_id": 6,
             "product_catalog_name": "Advanced Collection",             "product_catalog_name": "Advanced Collection",
Line 1069: Line 1626:
             "product_price": "95.94",              "product_price": "95.94", 
             "product_purity": 90,              "product_purity": 90, 
 +            "product_smiles": "FC1=C(N2CC3=C(C=CC=C3)OCC2)N=CC=C1",
             "product_supplier_id": 3,             "product_supplier_id": 3,
             "product_supplier_name": "Enamine",             "product_supplier_name": "Enamine",
Line 1081: Line 1639:
             "price": "97.32",              "price": "97.32", 
             "product": 346206264,              "product": 346206264, 
 +            "product_available_amount": null,
 +            "product_available_amount_display": "In stock",
             "product_catalog_id": 6,             "product_catalog_id": 6,
             "product_catalog_name": "Advanced Collection",             "product_catalog_name": "Advanced Collection",
Line 1087: Line 1647:
             "product_price": "95.94",              "product_price": "95.94", 
             "product_purity": 90,             "product_purity": 90,
 +            "product_smiles": "OC(C1(C2=C(C(F)(F)F)C=CC=C2)CC1)=O",
             "product_supplier_id": 3,             "product_supplier_id": 3,
             "product_supplier_name": "Enamine",              "product_supplier_name": "Enamine", 
Line 1099: Line 1660:
             "price": "416.37",              "price": "416.37", 
             "product": 580505383,              "product": 580505383, 
 +            "product_available_amount": null,
 +            "product_available_amount_display": "Potentially purchasable (60-80%)",
             "product_catalog_id": 202,             "product_catalog_id": 202,
             "product_catalog_name": "Compounds on demand",             "product_catalog_name": "Compounds on demand",
Line 1105: Line 1668:
             "product_price": "293.45",              "product_price": "293.45", 
             "product_purity": null,              "product_purity": null, 
 +            "product_smiles": "OC(C1(C2=C(C(F)(F)F)C=CC=C2)CC1)=O",
             "product_supplier_id": 33,             "product_supplier_id": 33,
             "product_supplier_name": "Manchester Organics",             "product_supplier_name": "Manchester Organics",
Line 1170: Line 1734:
         "delivery_contact_person_phone": "",          "delivery_contact_person_phone": "", 
         "delivery_country": "US",          "delivery_country": "US", 
 +        "delivery_format_display": "Dry powder/film in supplier vial",
         "delivery_post_code": "",          "delivery_post_code": "", 
         "delivery_time": 21,          "delivery_time": 21, 
Line 1261: Line 1826:
 Where currency is not specified, it is always USD. Where currency is not specified, it is always USD.
  
 +  * **additional_document_notes**: additional document notes if there are any
 +  * **amount_range**: Amount / product (mg), min - max product amounts as a list
 +  * **amount_range_display**: Amount / product (mg) as string
   * **analytical_services_price**: price of analytical services (USD)   * **analytical_services_price**: price of analytical services (USD)
   * **avg_product_price**: Average product price (USD)   * **avg_product_price**: Average product price (USD)
Line 1284: Line 1852:
     * **effective_price_display**: Total price change if excluded this product. (USD) It shows how the total price will change upon removal of the product. In addition to the product price, this may include delivery cost, packaging fees, small / minimum order fees, etc     * **effective_price_display**: Total price change if excluded this product. (USD) It shows how the total price will change upon removal of the product. In addition to the product price, this may include delivery cost, packaging fees, small / minimum order fees, etc
     * **price**: effective price     * **price**: effective price
 +    * **product_available_amount**: concrete available amount (mg) data if available,
 +    * **product_available_amount_display**: availability display, e.g.: In stock, Potentially purchasable (60-80%),
     * **product_mcule_id**: The mcule ID of the quoted product.     * **product_mcule_id**: The mcule ID of the quoted product.
     * **product**: The ID of the quoted product (should be neglected).     * **product**: The ID of the quoted product (should be neglected).
Line 1290: Line 1860:
     * **product_price**: Product price (USD)     * **product_price**: Product price (USD)
     * **product_purity**: Minimum purity (%)     * **product_purity**: Minimum purity (%)
 +    * **product_smiles**: SMILES of the product
     * **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.
   * **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**: If the quote has been ordered, data related to the purchase order is provided here. 
 +    * **billing_address**: Billing address 
 +    * **billing_city**: Billing city 
 +    * **billing_company_name**: Billing Institution / Company name 
 +    * **billing_country**: Billing country 
 +    * **billing_post_code**: Billing ZIP / Post code 
 +    * **billing_state**: Billing State / Province 
 +    * **billing_email**: Billing contact email 
 +    * **billing_first_name**: Billing contact first name 
 +    * **billing_last_name**: Billing contact last name 
 +    * **billing_phone**: Billing contact phone number 
 +    * **billing_same**: Whether the billing data is the same is shipping data 
 +    * **billing_vat**: Billing VAT number 
 +    * **shipping_address**: Shipping address 
 +    * **shipping_city**: shipping city 
 +    * **shipping_company_name**: Shipping Institution / Company name 
 +    * **shipping_country**: Shipping country 
 +    * **shipping_post_code**: Shipping ZIP / Post code 
 +    * **shipping_state**: Shipping State / Province 
 +    * **shipping_email**: Shipping contact email 
 +    * **shipping_first_name**: Shipping contact first name 
 +    * **shipping_last_name**: Shipping contact last name 
 +    * **shipping_phone**: Shipping contact phone number 
 +    * **notes**: notes 
 +    * **po_number**: Customer Purchase Order number 
 +    * **po_file_filename**: In case a Purchase Order file was submitted, the name of the filename. 
 +    * **po_option**: Purchase Order option (10: Upload PO, 20: Order without PO, 30: Send PO later) 
 +    * **po_option_display**: Purchase Order option as string 
 +    * **created**: Datetime when the purchase order was submitted 
 +    * **updated**: Datetime when the purchase order data was updated 
 +    * **id**: ID of the purchase order data
   * **payment_due_days**: Payment terms. Number of days net or prepayment by credit card   * **payment_due_days**: Payment terms. Number of days net or prepayment by credit card
   * **price**: Total price of quote (USD)   * **price**: Total price of quote (USD)
Line 1390: Line 1991:
 </code> </code>
  
 +
 +===== Quote order =====
 +
 +Submit purchase order for a quote via API.
 +
 +<code>
 +http --form POST https://mcule.com/api/v1/iquotes/15677/order/ po_option=10 po_file@~/po.pdf "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +== Example request: ===
 +<code>
 +POST /api/v1/iquotes/15677/order/ HTTP/1.1
 +Accept: */*
 +Accept-Encoding: gzip, deflate
 +Authorization: Token <your_token>
 +Content-Type: multipart/form-data; boundary=b582e4472c434fd6b30b265ffef125e8
 +
 ++-----------------------------------------+
 +| NOTE: binary data not shown in terminal |
 ++-----------------------------------------+
 +</code>
 +
 +Please note that in case you submit a file in the API request, you have to use //Content-Type: multipart/form-data// as you can see at the above request.
 +
 +If you don't submit a file in the API request, you can use //Content-Type: application/json// :
 +
 +<code>
 +echo '{"po_option": 20, "shipping_country": "US", "shipping_first_name": "John", "shipping_last_name": "Doe"}' | http https://mcule.com/api/v1/iquotes/15677/order/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +== Example request: ===
 +<code>
 +POST /api/v1/iquotes/15677/order/ HTTP/1.1
 +Accept: application/json, */*
 +Authorization: Token <your_token>
 +Content-Type: application/json
 +{
 +    "po_option": 20,
 +    "shipping_country": "US",
 +    "shipping_first_name": "John",
 +    "shipping_last_name": "Doe"
 +}
 +</code>
 +
 +== Example response: ===
 +<code>
 +HTTP/1.0 201 CREATED
 +Allow: POST, OPTIONS
 +Content-Type: application/json
 +
 +{
 +    "billing_address": "",
 +    "billing_city": "",
 +    "billing_company_name": "",
 +    "billing_country": "",
 +    "billing_email": "",
 +    "billing_first_name": "",
 +    "billing_last_name": "",
 +    "billing_phone": "",
 +    "billing_post_code": "",
 +    "billing_same": true,
 +    "billing_state": "",
 +    "billing_vat": "",
 +    "created": "2022-04-29T17:02:09.257359",
 +    "id": 3691,
 +    "notes": "",
 +    "po_file_filename": "",
 +    "po_number": "",
 +    "po_option": 20,
 +    "po_option_display": "Order without PO",
 +    "shipping_address": "",
 +    "shipping_city": "",
 +    "shipping_company_name": "",
 +    "shipping_country": "US",
 +    "shipping_email": "",
 +    "shipping_first_name": "John",
 +    "shipping_last_name": "Doe",
 +    "shipping_phone": "",
 +    "shipping_post_code": "",
 +    "shipping_state": "",
 +    "updated": "2022-04-29T17:02:09.257373"
 +}
 +</code>
 +
 +
 +Mandatory fields:
 +    * **po_option**: Purchase Order option (10: Upload PO, 20: Order without PO, 30: Send PO later)
 +
 +Optional fields:
 +    * **billing_address**: Billing address
 +    * **billing_city**: Billing city
 +    * **billing_company_name**: Billing Institution / Company name
 +    * **billing_country**: Billing country
 +    * **billing_post_code**: Billing ZIP / Post code
 +    * **billing_state**: Billing State / Province
 +    * **billing_email**: Billing contact email
 +    * **billing_first_name**: Billing contact first name
 +    * **billing_last_name**: Billing contact last name
 +    * **billing_phone**: Billing contact phone number
 +    * **billing_same**: Whether the billing data is the same as shipping data
 +    * **billing_vat**: Billing VAT number
 +    * **shipping_address**: Shipping address
 +    * **shipping_city**: Shipping city
 +    * **shipping_company_name**: Shipping Institution / Company name
 +    * **shipping_country**: Shipping country
 +    * **shipping_post_code**: Shipping ZIP / Post code
 +    * **shipping_state**: Shipping State / Province
 +    * **shipping_email**: Shipping contact email
 +    * **shipping_first_name**: Shipping contact first name
 +    * **shipping_last_name**: Shipping contact last name
 +    * **shipping_phone**: Shipping contact phone number
 +    * **notes**: notes
 +    * **po_number**: Customer Purchase Order number
 +    * **po_file**: Purchase Order document file.
 +
 +The address and contact fields are optional if this information is included in the Purchase Order document or will be provided later to our support team. Although providing the shipping and billing address / contact information here can speed up the ordering process, if you decide to leave them empty, our support team will contact you to reconcile this information. 
 +
 +Subsequent calls to this same endpoint make it possible to update the purchase order information. You can also report incorrect data at order@mcule.com. Please make sure you reference the quote's Full reference ID (**reference_id_full** field in the corresponding API response) in your email.
  
  
api.txt · Last modified: 2024/05/10 08:12 by bkovats