api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
api [2022/02/10 13:02] – [Quote order] 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 162: | Line 210: | ||
===== InChIKey lookup ===== | ===== InChIKey lookup ===== | ||
== Endpoint: == | == Endpoint: == | ||
- | < | + | < |
== Example API request: == | == Example API request: == | ||
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 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. | + | * **scheme**: If you have access to predefined |
- | 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 1882: | Line 2057: | ||
</ | </ | ||
- | Please note that in case you submit a file in the API request, you have to use // | + | 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 // | If you don't submit a file in the API request, you can use // | ||
Line 1903: | Line 2078: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | == Example response: === | ||
+ | < | ||
+ | HTTP/1.0 201 CREATED | ||
+ | Allow: POST, OPTIONS | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
Mandatory fields: | Mandatory fields: | ||
Line 1918: | Line 2134: | ||
* **billing_last_name**: | * **billing_last_name**: | ||
* **billing_phone**: | * **billing_phone**: | ||
- | * **billing_same**: | + | * **billing_same**: |
* **billing_vat**: | * **billing_vat**: | ||
* **shipping_address**: | * **shipping_address**: | ||
- | * **shipping_city**: | + | * **shipping_city**: |
* **shipping_company_name**: | * **shipping_company_name**: | ||
* **shipping_country**: | * **shipping_country**: | ||
Line 1934: | Line 2150: | ||
* **po_file**: | * **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. | + | 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.1644498139.txt.gz · Last modified: 2022/02/10 13:02 by flack