The ERPNext Medusa Integration exposes a set of Frappe whitelisted methods that bridge your Medusa storefront with ERPNext. These endpoints handle storefront product data, quotation lifecycle management, sales order synchronization, customer linking, and wishlist/review operations.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/aerele/medusa_integration/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All endpoints share the same URL pattern:utils.py, replace api with utils:
Authentication
- Guest endpoints
- Authenticated endpoints
Endpoints decorated with
@frappe.whitelist(allow_guest=True) accept unauthenticated requests. No session token or API key is required.These are used for all storefront-facing operations — browsing products, managing wishlists, creating quotations, and so on.Request format
- POST requests: send a JSON body with
Content-Type: application/json. - GET requests: pass parameters as URL query string parameters.
Response format
All endpoints return JSON. Successful responses contain the documented fields directly. Error responses include anerror string field and may return an appropriate HTTP status code (404 for not found, 500 for server errors).
Request logging
Every API call — inbound and outbound — is automatically recorded in ERPNext under the Medusa Request Log doctype. Each log entry captures:- Request status (
Success/Failure) - Request payload
- Response body
- Associated voucher type and name (when applicable)
Available endpoints
| Endpoint | Method | Auth | Description |
|---|---|---|---|
get_website_items | GET/POST | Guest | Paginated storefront product listing with filters |
get_website_variants | GET | Guest | Variant items for a parent product |
get_website_image | GET | Guest | Image URL, brand image, quantity, and price for a product |
get_distinct_specs | POST | Guest | Distinct colour/shape/shade specs for a set of products |
get_all_brands | GET | Guest | All brands with images, optionally filtered by item group |
create_quotation | POST | Guest | Create a Quotation from a Medusa draft order |
update_quotation | POST | Guest | Approve or reject a quotation; optionally create Sales Order |
update_quotation_new | POST | Guest | Update quotation item list, unapproved items, and increased items |
fetch_quotation_pdf_url | POST | Guest | Return a print URL for a quotation PDF |
get_medusa_prices | GET/POST | Guest | Standard and negotiated prices for Medusa product/variant IDs |
export_sales_order | POST | Guest | Push Sales Order and payment status back to Medusa |
sync_missing_prices_to_medusa | POST | Guest | Bulk-sync item prices that lack a Medusa price ID |
fetch_all_customers | GET | Guest | ERPNext customers without a Medusa ID |
update_address | POST | Guest | Update billing address for a customer |
link_medusa_lead | GET | Auth required | Link an ERPNext Customer to a Medusa Lead ID |
handle_wishlist | POST | Guest | Add or remove items from a customer’s wishlist |
add_review_to_website_item | POST | Guest | Add or update a product review |
fetch_relevant_items | POST | Guest | Recommended items for a product page |
fetch_relevant_collection_products | POST | Guest | Top-selling products for a given item group |