api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
api [2020/07/06 18:50] – [Multiple queries exact search] flack | api [2023/05/23 18:28] – [Similarity search] flack | ||
---|---|---|---|
Line 48: | Line 48: | ||
" | " | ||
{ | { | ||
- | "description": "All purchasable, in stock & virtual compounds", | + | "id": |
- | " | + | " |
+ | " | ||
+ | " | ||
+ | " | ||
" | " | ||
{ | { | ||
- | "download_url": | + | "size_mb": |
- | " | + | " |
- | " | + | " |
- | "size_mb": | + | "download_url": |
- | }, | + | }, |
{ | { | ||
- | "download_url": | + | "size_mb": |
- | " | + | " |
- | " | + | " |
- | "size_mb": | + | "download_url": |
} | } | ||
- | ], | + | ], |
- | "last_updated": | + | "public": |
- | "name": "Mcule Purchasable (full)", | + | "group": "default" |
- | " | + | |
}, | }, | ||
{ | { | ||
- | "description": "All purchasable, in stock compounds", | + | "id": |
- | " | + | " |
+ | " | ||
+ | " | ||
+ | " | ||
" | " | ||
{ | { | ||
- | "download_url": | + | "size_mb": |
- | " | + | " |
- | " | + | " |
- | "size_mb": | + | "download_url": |
- | }, | + | }, |
{ | { | ||
- | "download_url": | + | "size_mb": |
- | " | + | " |
- | " | + | " |
- | "size_mb": | + | "download_url": |
} | } | ||
- | ], | + | ], |
- | "last_updated": | + | "public": |
- | "name": "Mcule Purchasable (in stock)", | + | "group": "default" |
- | " | + | |
} | } | ||
] | ] | ||
Line 162: | Line 166: | ||
===== InChIKey lookup ===== | ===== InChIKey lookup ===== | ||
== Endpoint: == | == Endpoint: == | ||
- | < | + | < |
== Example API request: == | == Example API request: == | ||
Line 345: | Line 349: | ||
http ' | http ' | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Compound list details ===== | ||
+ | |||
+ | With this endpoint you can get compound details information for multiple compound mcule IDs in a single API call. | ||
+ | |||
+ | == Endpoint: == | ||
+ | < | ||
+ | |||
+ | == Basic API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | == Request: == | ||
+ | < | ||
+ | POST / | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | 1, | ||
+ | 5, | ||
+ | 10 | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Response: == | ||
+ | < | ||
+ | HTTP/1.1 200 OK | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Fields: | ||
+ | * **mcule_ids**: | ||
+ | * **availability**: | ||
+ | * **components**: | ||
+ | * **price_amounts**: | ||
+ | |||
+ | Limits: | ||
+ | * **mcule_ids**: | ||
+ | * **price_amounts**: | ||
+ | |||
===== Multiple queries exact search ===== | ===== Multiple queries exact search ===== | ||
Multiple queries exact search currently accepts the following input identifiers: | Multiple queries exact search currently accepts the following input identifiers: | ||
+ | The maximum number of queries you can send to this endpoint is 1000 currently. | ||
== Endpoint: == | == Endpoint: == | ||
Line 525: | Line 779: | ||
</ | </ | ||
+ | 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: | ||
+ | |||
+ | == Endpoint: == | ||
+ | < | ||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | == Request: == | ||
+ | < | ||
+ | POST / | ||
+ | Accept: application/ | ||
+ | Accept-Encoding: | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Response: == | ||
+ | < | ||
+ | HTTP/1.1 200 OK | ||
+ | Allow: POST, OPTIONS | ||
+ | Content-Encoding: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Mandatory fields: | ||
+ | |||
+ | * **query**: string, accepted identifiers: | ||
+ | |||
+ | Optional fields: | ||
+ | |||
+ | * **threshold**: | ||
+ | * **limit**: integer, accepted values between 1 and 1000, default: 100 | ||
+ | * **collection**: | ||
+ | |||
+ | |||
+ | ===== Substructure search ===== | ||
+ | Substructure search currently accepts the following input identifiers: | ||
+ | |||
+ | == Endpoint: == | ||
+ | < | ||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | == Request: == | ||
+ | < | ||
+ | POST / | ||
+ | Accept: application/ | ||
+ | Accept-Encoding: | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Response: == | ||
+ | < | ||
+ | HTTP/1.1 200 OK | ||
+ | Allow: POST, OPTIONS | ||
+ | Content-Encoding: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The **limit** field accepts values between 1 and 1000, the default is 100. | ||
Line 674: | Line 1069: | ||
* **target_volume**: | * **target_volume**: | ||
* **target_cc**: | * **target_cc**: | ||
- | * **extra_amount**: | + | * **extra_amount**: |
+ | * **min_extra_amount**: | ||
* **customer_email**: | * **customer_email**: | ||
* **delivery_time**: | * **delivery_time**: | ||
Line 680: | Line 1076: | ||
* **higher_amounts**: | * **higher_amounts**: | ||
* **item_filters**: | * **item_filters**: | ||
+ | * **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 concentration-volume pair (**target_volume** and **target_cc**) need to be specified. | ||
Line 743: | Line 1140: | ||
" | " | ||
" | " | ||
- | " | + | " |
+ | " | ||
" | " | ||
" | " | ||
Line 813: | Line 1211: | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 990: | Line 1389: | ||
{ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1053: | Line 1455: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1059: | Line 1463: | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1070: | Line 1475: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1089: | Line 1497: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1095: | Line 1505: | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1107: | Line 1518: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1113: | Line 1526: | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1125: | Line 1539: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1131: | Line 1547: | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1196: | Line 1613: | ||
" | " | ||
" | " | ||
+ | " | ||
" | " | ||
" | " | ||
Line 1287: | Line 1705: | ||
Where currency is not specified, it is always USD. | Where currency is not specified, it is always USD. | ||
+ | * **additional_document_notes**: | ||
+ | * **amount_range**: | ||
+ | * **amount_range_display**: | ||
* **analytical_services_price**: | * **analytical_services_price**: | ||
* **avg_product_price**: | * **avg_product_price**: | ||
Line 1310: | Line 1731: | ||
* **effective_price_display**: | * **effective_price_display**: | ||
* **price**: effective price | * **price**: effective price | ||
+ | * **product_available_amount**: | ||
+ | * **product_available_amount_display**: | ||
* **product_mcule_id**: | * **product_mcule_id**: | ||
* **product**: | * **product**: | ||
Line 1316: | Line 1739: | ||
* **product_price**: | * **product_price**: | ||
* **product_purity**: | * **product_purity**: | ||
+ | * **product_smiles**: | ||
* **structure_origin_mcule_id**: | * **structure_origin_mcule_id**: | ||
* **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**: |
+ | * **billing_address**: | ||
+ | * **billing_city**: | ||
+ | * **billing_company_name**: | ||
+ | * **billing_country**: | ||
+ | * **billing_post_code**: | ||
+ | * **billing_state**: | ||
+ | * **billing_email**: | ||
+ | * **billing_first_name**: | ||
+ | * **billing_last_name**: | ||
+ | * **billing_phone**: | ||
+ | * **billing_same**: | ||
+ | * **billing_vat**: | ||
+ | * **shipping_address**: | ||
+ | * **shipping_city**: | ||
+ | * **shipping_company_name**: | ||
+ | * **shipping_country**: | ||
+ | * **shipping_post_code**: | ||
+ | * **shipping_state**: | ||
+ | * **shipping_email**: | ||
+ | * **shipping_first_name**: | ||
+ | * **shipping_last_name**: | ||
+ | * **shipping_phone**: | ||
+ | * **notes**: notes | ||
+ | * **po_number**: | ||
+ | * **po_file_filename**: | ||
+ | * **po_option**: | ||
+ | * **po_option_display**: | ||
+ | * **created**: | ||
+ | * **updated**: | ||
+ | * **id**: ID of the purchase order data | ||
* **payment_due_days**: | * **payment_due_days**: | ||
* **price**: Total price of quote (USD) | * **price**: Total price of quote (USD) | ||
Line 1416: | Line 1870: | ||
</ | </ | ||
+ | |||
+ | ===== Quote order ===== | ||
+ | |||
+ | Submit purchase order for a quote via API. | ||
+ | |||
+ | < | ||
+ | http --form POST https:// | ||
+ | </ | ||
+ | |||
+ | == Example request: === | ||
+ | < | ||
+ | POST / | ||
+ | Accept: */* | ||
+ | Accept-Encoding: | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | |||
+ | +-----------------------------------------+ | ||
+ | | NOTE: binary data not shown in terminal | | ||
+ | +-----------------------------------------+ | ||
+ | </ | ||
+ | |||
+ | Please note that in case you submit a file in the API request, you have to use // | ||
+ | |||
+ | If you don't submit a file in the API request, you can use // | ||
+ | |||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | == Example request: === | ||
+ | < | ||
+ | POST / | ||
+ | Accept: application/ | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Example response: === | ||
+ | < | ||
+ | HTTP/1.0 201 CREATED | ||
+ | Allow: POST, OPTIONS | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | Mandatory fields: | ||
+ | * **po_option**: | ||
+ | |||
+ | Optional fields: | ||
+ | * **billing_address**: | ||
+ | * **billing_city**: | ||
+ | * **billing_company_name**: | ||
+ | * **billing_country**: | ||
+ | * **billing_post_code**: | ||
+ | * **billing_state**: | ||
+ | * **billing_email**: | ||
+ | * **billing_first_name**: | ||
+ | * **billing_last_name**: | ||
+ | * **billing_phone**: | ||
+ | * **billing_same**: | ||
+ | * **billing_vat**: | ||
+ | * **shipping_address**: | ||
+ | * **shipping_city**: | ||
+ | * **shipping_company_name**: | ||
+ | * **shipping_country**: | ||
+ | * **shipping_post_code**: | ||
+ | * **shipping_state**: | ||
+ | * **shipping_email**: | ||
+ | * **shipping_first_name**: | ||
+ | * **shipping_last_name**: | ||
+ | * **shipping_phone**: | ||
+ | * **notes**: notes | ||
+ | * **po_number**: | ||
+ | * **po_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' | ||
api.txt · Last modified: 2024/05/10 08:12 by bkovats