api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
api [2022/04/29 14:20] – flack | api [2025/01/09 13:11] (current) – flack | ||
---|---|---|---|
Line 43: | Line 43: | ||
{ | { | ||
- | | + | |
- | " | + | " |
- | " | + | " |
- | " | + | " |
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | "files": [ | ||
{ | { | ||
- | | + | |
- | "entry_count": | + | "size_mb": |
- | " | + | " |
- | { | + | " |
- | " | + | " |
- | " | + | "filename": "mcule_purchasable_full_250101.sdf.gz", |
- | " | + | "sha256_checksum": "0ee1174d29b386291b4ef670a73bb84d0762cd29fa0dc7685fe45644f51525b7" |
- | " | + | }, |
- | }, | + | |
- | { | + | |
- | | + | |
- | "file_type": "smiles.gz", | + | |
- | " | + | |
- | "size_mb": | + | |
- | } | + | |
- | ], | + | |
- | | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
{ | { | ||
- | | + | |
- | "entry_count": | + | "size_mb": |
- | " | + | " |
- | { | + | " |
- | " | + | " |
- | " | + | "filename": "mcule_purchasable_full_250101.smi.gz", |
- | " | + | "sha256_checksum": "633892ab35459b103027d5dd88de03fa795b5a8fba50b6d6d2938f66fb747ea7" |
- | " | + | |
- | }, | + | |
- | { | + | |
- | | + | |
- | "file_type": "smiles.gz", | + | |
- | " | + | |
- | "size_mb": | + | |
- | } | + | |
- | ], | + | |
- | | + | |
- | " | + | |
- | " | + | |
} | } | ||
- | | + | ], |
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | |||
+ | ... | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | | ||
} | } | ||
</ | </ | ||
Line 841: | Line 889: | ||
</ | </ | ||
- | The **threshold** field accepts values between 0.7 and 1.0, the default is 0.9. | + | Mandatory fields: |
+ | |||
+ | | ||
+ | |||
+ | Optional fields: | ||
- | The **limit** | + | * **threshold**: |
+ | * **limit**: integer, accepted | ||
+ | * **collection**: | ||
Line 909: | Line 963: | ||
</ | </ | ||
- | The **limit** | + | Mandatory fields: |
+ | |||
+ | * **query**: string, accepted identifiers: | ||
+ | |||
+ | Optional fields: | ||
+ | |||
+ | * **limit**: integer, accepted | ||
+ | * **collection**: | ||
Line 1055: | Line 1116: | ||
Optional fields: | Optional fields: | ||
- | * **amount**: Preferred amount per molecule (mg). (default: 1) | + | |
- | * **min_amount**: Acceptable minimum amount (mg). (default: | + | |
- | * **target_volume**: | + | * **min_amount**: |
- | * **target_cc**: | + | * Amount (µmol) based amount fields |
- | * **extra_amount**: | + | |
- | * **min_extra_amount**: | + | * **min_amount_umol**: Acceptable minimum amount (µmol). (default: |
+ | | ||
+ | | ||
+ | * **target_cc**: | ||
+ | * **extra_amount**: | ||
+ | * **min_extra_amount**: | ||
* **customer_email**: | * **customer_email**: | ||
* **delivery_time**: | * **delivery_time**: | ||
* **purity**: Required minimum purity (%). (default: null) | * **purity**: Required minimum purity (%). (default: null) | ||
* **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. | * **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**) | + | The **amount** or **target_amount_umol** or target concentration-volume pair (**target_volume** and **target_cc**) |
**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 | + | Currently supplier |
< | < | ||
{ | { | ||
- | " | + | " |
- | " | + | |
+ | | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | | ||
} | } | ||
</ | </ | ||
Line 1154: | Line 1226: | ||
</ | </ | ||
+ | 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**: | ||
+ | * **products**: | ||
+ | * **user_ref_id**: | ||
+ | |||
+ | 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: === | ||
+ | < | ||
+ | POST / | ||
+ | Accept: application/ | ||
+ | Accept-Encoding: | ||
+ | Authorization: | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Example response: === | ||
+ | < | ||
+ | HTTP/1.1 201 CREATED | ||
+ | Allow: GET, POST, HEAD, OPTIONS | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | 15, | ||
+ | 64, | ||
+ | 93 | ||
+ | ], | ||
+ | " | ||
+ | 871069132, | ||
+ | 855381908 | ||
+ | ] | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
===== Quote Request Status API ===== | ===== Quote Request Status API ===== | ||
Line 1903: | Line 2078: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | == Example response: === | ||
+ | < | ||
+ | HTTP/1.0 201 CREATED | ||
+ | Allow: POST, OPTIONS | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
Mandatory fields: | Mandatory fields: |
api.1651242034.txt.gz · Last modified: 2022/04/29 14:20 by flack