api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
api [2022/02/09 15:34] – [Quote Request API] flack | api [2023/06/03 07:19] – [Quote Request API] 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 841: | Line 845: | ||
</ | </ | ||
- | 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 919: | ||
</ | </ | ||
- | The **limit** | + | Mandatory fields: |
+ | |||
+ | * **query**: string, accepted identifiers: | ||
+ | |||
+ | Optional fields: | ||
+ | |||
+ | * **limit**: integer, accepted | ||
+ | * **collection**: | ||
Line 1057: | Line 1074: | ||
* **amount**: Preferred amount per molecule (mg). (default: 1) | * **amount**: Preferred amount per molecule (mg). (default: 1) | ||
* **min_amount**: | * **min_amount**: | ||
- | * **target_volume**: | + | * **target_volume**: |
* **target_cc**: | * **target_cc**: | ||
* **extra_amount**: | * **extra_amount**: | ||
Line 1066: | Line 1083: | ||
* **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**) need to be specified. | The **amount** or target concentration-volume pair (**target_volume** and **target_cc**) need to be specified. | ||
Line 1733: | Line 1750: | ||
* **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 1830: | Line 1877: | ||
</ | </ | ||
+ | |||
+ | ===== 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