ultimate-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 | ||
ultimate-api [2020/04/11 11:11] – [Query types] flack | ultimate-api [2020/07/20 14:09] – [Quote Request API] flack | ||
---|---|---|---|
Line 6: | Line 6: | ||
You can find in the examples below the full URLs you have to use. | You can find in the examples below the full URLs you have to use. | ||
- | Examples are demonstrated with [[https://github.com/jkbrzt/ | + | Examples are demonstrated with [[https://httpie.org/|HTTPie]]. |
Only the most important request/ | Only the most important request/ | ||
Line 28: | Line 28: | ||
* 100 searches / day | * 100 searches / day | ||
- | For authenticated users: | + | For authenticated users (access token required, see below): |
* 100 searches / minute | * 100 searches / minute | ||
Line 53: | Line 53: | ||
===== Query types ===== | ===== Query types ===== | ||
- | The supported query types are currently: SMILES, InChIKey, IUPAC name, CAS number, Std InChI, ZINC ID, CHEMBL ID. | + | The supported query types are currently: SMILES, InChIKey, Molfile or SDF string (V2000), IUPAC name, CAS number, Std InChI, ZINC ID, CHEMBL ID. |
We recommend to send your queries in SMILES format. | We recommend to send your queries in SMILES format. | ||
Line 60: | Line 60: | ||
InChIKey support is limited to the case where the query compound is part of the Ultimate database. | InChIKey support is limited to the case where the query compound is part of the Ultimate database. | ||
Example **InChIKey** query: < | Example **InChIKey** query: < | ||
+ | |||
+ | Example **Molfile string** query: | ||
+ | < | ||
+ | \n -INDIGO-04112011472D\n\n 30 33 0 0 0 0 0 0 0 0999 V2000\n | ||
IUPAC name resolution don't always work. | IUPAC name resolution don't always work. | ||
Example **IUPAC name** query: < | Example **IUPAC name** query: < | ||
- | Resolving CAS numbers happens via an external service and don't always work. | + | Resolving CAS numbers happens via an external service and don't always work or might be unstable. |
Example **CAS number** query: < | Example **CAS number** query: < | ||
Example **Std InChI** query: < | Example **Std InChI** query: < | ||
- | Resolving ZINC IDs happens via [[http:// | + | Resolving ZINC IDs happens via [[http:// |
- | Resolving CHEMBL IDs happens via [[https:// | + | Resolving CHEMBL IDs happens via [[https:// |
===== Exact search ===== | ===== Exact search ===== | ||
Line 150: | Line 154: | ||
You have to use the value **sim** in the **type** parameter. | You have to use the value **sim** in the **type** parameter. | ||
+ | |||
You can limit the number of hits with the **limit** parameter. In this example we fetched the 5 most similar hits. | You can limit the number of hits with the **limit** parameter. In this example we fetched the 5 most similar hits. | ||
The maximum allowed number of **limit** is 1000. | The maximum allowed number of **limit** is 1000. | ||
Line 311: | Line 316: | ||
* **amount**: the amount value in mg. Default: 1, Min: 1, Max: 100. The **amount** can be specified for some, or all items in the **compounds** list. If the amount is not specified for an item in the **compounds** list, the " | * **amount**: the amount value in mg. Default: 1, Min: 1, Max: 100. The **amount** can be specified for some, or all items in the **compounds** list. If the amount is not specified for an item in the **compounds** list, the " | ||
* **currency**: | * **currency**: | ||
- | * **individual**: | + | * **individual**: |
Line 622: | Line 627: | ||
You can notice that you get lower prices but those prices are only valid in the context where you order the compounds together. | You can notice that you get lower prices but those prices are only valid in the context where you order the compounds together. | ||
+ | |||
+ | |||
+ | |||
+ | ====== Quote Request API ====== | ||
+ | |||
+ | == Endpoint: == | ||
+ | < | ||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | Mandatory fields: | ||
+ | * **compounds**: | ||
+ | * list of InChIKeys (which you get from search results for example). For example: < | ||
+ | * list of InChIKey, amount pairs. This is useful if you want to request quote for different amounts. For example: < | ||
+ | * **customer_name**: | ||
+ | * **delivery_country**: | ||
+ | |||
+ | |||
+ | Optional fields: | ||
+ | * **customer_email**: | ||
+ | * **currency**: | ||
+ | * **scheme**: If you have access to predefined quote request schemes, you can specify here which one you want to use. 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. | ||
+ | |||
+ | |||
+ | == Example request: === | ||
+ | < | ||
+ | POST / | ||
+ | Accept: application/ | ||
+ | Accept-Encoding: | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Example response: === | ||
+ | < | ||
+ | HTTP/1.1 201 CREATED | ||
+ | Allow: GET, POST, HEAD, OPTIONS | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ |
ultimate-api.txt · Last modified: 2021/05/25 14:27 by flack