Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Sales
  3. Shop Apotheke Marketplace v 19.0
  4. Sales Conditions FAQ

Shop Apotheke Marketplace

by Cognisance UG https://www.cognisance.de
Odoo

$ 609.77

v 19.0 Third Party
This module requires Odoo Enterprise Edition.
Live Preview
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Helpdesk (helpdesk)
• Sales (sale_management)
• Discuss (mail)
• Invoicing (account)
• Inventory (stock)
Community Apps Dependencies Show
Base Marketplace Connector
Lines of code 19678
Technical Name shop_apotheke
LicenseOPL-1
Websitehttps://www.cognisance.de
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Helpdesk (helpdesk)
• Sales (sale_management)
• Discuss (mail)
• Invoicing (account)
• Inventory (stock)
Community Apps Dependencies Show
Base Marketplace Connector
Lines of code 19678
Technical Name shop_apotheke
LicenseOPL-1
Websitehttps://www.cognisance.de
  • Description
  • License
Cognisance Marketplace Suite

Mirakl Marketplace Connector

A full Mirakl operating layer for Odoo covering catalog synchronization, order import, shipment feedback, invoice upload, refund synchronization, Mirakl helpdesk communication, OR21 order acceptance, incident management, PA01 customer-debit confirmation, payout reconciliation, live webhooks, and stock-drift detection.

20+Mirakl API Endpoints
9New Operational Features
1Unified Odoo Workflow

Highlights

  • Imports orders, listings, credit notes, master data, product attributes, and value lists from Mirakl.
  • Exports stock and shipment tracking updates from Odoo back to the marketplace.
  • Synchronizes categories, channels, carriers, shipping zones, logistic classes, reasons, and catalog metadata.
  • Uploads invoice PDFs and sends Odoo credit-note refunds to Mirakl.
  • Turns Mirakl order threads into actionable Odoo Helpdesk tickets with reply support.
  • Accepts or refuses pending Mirakl orders (OR21) directly from the sales order header.
  • Opens and closes Mirakl incidents from Odoo to protect the seller during open claims.
  • Confirms Mirakl-managed customer payments (PA01) and pulls payout reports for accounting.
  • Receives live Mirakl webhooks with HMAC-SHA256 signature verification.
  • Detects stock and offer drift between Odoo and Mirakl through a periodic reverse-sync.
  • Translates Mirakl per-line promotions and order discounts into Odoo discount percentages.
  • Includes queues, retries, logs, dashboards, watchdog automation, and a unit-test suite.

Feature Overview

Order and Sales Flow

  • Order import by create date, update date, or specific marketplace order.
  • Customer, invoice, and shipping partner creation from Mirakl payloads.
  • Marketplace status, provision, channel, and delivery metadata on the Odoo sales order.
  • Credit-note import and duplicate shipping-line cleanup helpers.

Catalog and Listings

  • Listing and offer import with SKU filters, stock-only mode, and only-new-product mode.
  • Optional update of existing Odoo products and prices during listing import.
  • Attribute, category, and value-list synchronization for Mirakl catalog compliance.
  • Product merge workflows and mapping support for imported marketplace items.

Shipping and Invoicing

  • Inventory export from Odoo to Mirakl.
  • Tracking export with central Mirakl carrier configuration and tracking URLs.
  • Shipping watchdog automation for completed pickings that still need confirmation.
  • Optional invoice PDF upload when shipments are sent to Mirakl.

Refunds and Support

  • Refund payload generation from Odoo credit notes and transmission to Mirakl.
  • Remote refund IDs, timestamps, states, and error handling stored in Odoo.
  • Mirakl inbox synchronization into Odoo Helpdesk with attachments and replies.
  • Ticket-side order cancellation and delivery visibility for support teams.

Order Acceptance (OR21)

  • Mirakl: Annehmen and Mirakl: Ablehnen buttons on the sales order header.
  • Visible automatically while the Mirakl order is in WAITING_ACCEPTANCE.
  • Sends per-line decisions to PUT /api/orders/{order_id}/accept.
  • Local mirakl_acceptance_state mirror with timestamp.

Incident Management

  • Incident öffnen and Incident schließen buttons on shipped Mirakl orders.
  • Calls POST and DELETE /api/orders/{order_id}/incident.
  • Protects the seller from auto-refund timeouts while a claim is open.
  • Stores open/closed state and timestamps on the sales order.

Customer Debit (PA01) and Payouts

  • Mirakl-Payment-Modus toggle on the marketplace instance.
  • PA01: Customer Debit button on customer invoices linked to a Mirakl sales order.
  • Optional cron Mirakl: Customer Debit Confirmation (PA01) for paid invoices.
  • Payouts ziehen pulls Mirakl payment history and self-billing PDFs as ir.attachment.

Live Webhooks

  • Per-instance endpoint /mirakl/webhook/<int:instance_id>.
  • HMAC-SHA256 signature verification with per-instance secret.
  • Dispatches ORDER_CREATED, ORDER_STATE_CHANGED, ORDER_REFUSED, MESSAGE_RECEIVED, REFUND_CREATED.
  • Auto-computed webhook URL on the instance form for one-click copy.

Drift & Offer-Diff

  • Configurable stock-drift threshold and on-demand Drift jetzt prüfen button.
  • Reverse-reads GET /api/offers in pages of 100 entries.
  • Reports stock drift, orphan offers (Mirakl-only), and missing offers (Odoo-only).
  • Optional cron Mirakl: Stock & Offer Drift Check every six hours.

Discount Handling & Tests

  • Translates per-line promotions arrays into Odoo discount percentages.
  • Falls back to top-level order_discount aggregate spread across non-shipping lines.
  • Ships a tests/ package with a Mirakl-aware mock for _send_mirakl_request.
  • Tagged tests for selective runs: mirakl_request, mirakl_webhook, mirakl_offer_diff, mirakl_stock_drift, mirakl_order_accept, mirakl_sale_order.

API Endpoints Used

The connector talks to the following Mirakl seller-API endpoints. Endpoints marked (new) were added in version 19.0.1.0.3.

Master Data & Catalog

  • GET /api/account
  • GET /api/channels, /api/hierarchies, /api/reasons
  • GET /api/shipping/carriers, /api/shipping/zones, /api/shipping/logistic_classes
  • GET /api/offers/states, /api/products/attributes
  • POST/GET /api/products/imports, /api/offers, /api/offers/imports, /api/offers/stock/imports

Orders & Fulfillment

  • GET /api/orders, /api/orders/documents
  • PUT /api/orders/{id}/cancel, /api/orders/{id}/tracking
  • POST /api/orders/refund
  • PUT /api/orders/{id}/accept (new)
  • POST/DELETE /api/orders/{id}/incident (new)

Payments & Self-Billing

  • GET /api/sellerpayment/transactions_logs
  • POST /api/payment/debit (new)
  • GET /api/payment/payments_history (new)
  • GET /api/payment/payment_documents/{id}/download (new)

Helpdesk Inbox

  • GET /api/inbox/threads
  • GET /api/inbox/threads/{id}
  • POST /api/inbox/threads/{id}/message
  • GET /api/inbox/threads/{id}/download

Requirements

Odoo Stack

  • base_marketplace
  • helpdesk
  • Configured sales, stock, invoicing, and delivery workflows

Marketplace Setup

  • Mirakl API endpoint and API key
  • Shop and carrier configuration
  • Category and attribute mappings
  • Optional cognisance_brandmap plus cognisance_brandmap_mirakl for Mirakl brand mappings
  • Working invoice PDF reporting for upload workflows

Screenshots

Documentation screenshots from the Mirakl marketplace connector in Odoo.

Instance Configuration

Mirakl Instance Configuration

Import Operations

Mirakl Import Operations

Dashboard

Mirakl Dashboard

Orders

Mirakl Orders

Queue

Mirakl Queue

Configuration and Mapping

Mirakl Configuration and Mapping

Listings

Mirakl Listings

Credit Notes

Mirakl Credit Notes

Helpdesk

Mirakl Helpdesk

Typical Flow

  1. Configure the marketplace instance and import master data, attributes, and value lists.
  2. Import listings and marketplace orders into Odoo.
  3. Accept or refuse new Mirakl orders from the sales order header (OR21) when the marketplace requires explicit acceptance.
  4. Fulfill orders in Odoo and export stock plus shipment tracking back to Mirakl.
  5. Open Mirakl incidents from Odoo if a customer claim cannot be resolved through standard refund or shipment correction.
  6. Upload invoices and synchronize refunds. For Mirakl-payment instances, confirm the customer debit (PA01) from the invoice or via cron.
  7. Pull payout history and self-billing PDFs into Odoo for accounting reconciliation.
  8. Run the drift detector regularly to catch stock and offer divergences between Odoo and Mirakl before they affect customers.

Inbound Webhooks

Endpoint

  • URL: <your-odoo-base-url>/mirakl/webhook/<int:instance_id>
  • Method: POST
  • Content type: application/json
  • Public route, no Odoo session required.

Signature

  • Header: X-Mirakl-Signature or X-Hub-Signature-256.
  • Scheme: HMAC-SHA256 of the raw request body using the per-instance secret.
  • Accepted formats: <hex> or sha256=<hex>.
  • Failures return 401; transient processing errors return 202 to avoid retry storms.

Field Reference

The new feature blocks add the following fields. All fields are scoped to Mirakl marketplace instances and have no effect on other marketplaces.

mk.instance

  • mirakl_webhook_enabled (Boolean) - master switch for the inbound webhook endpoint.
  • mirakl_webhook_secret (Char, password) - HMAC-SHA256 secret shared with Mirakl.
  • mirakl_webhook_url_display (Char, computed) - public webhook URL for one-click copy.
  • mirakl_drift_threshold (Integer, default 1) - drift below this delta is ignored.
  • mirakl_drift_last_run / mirakl_drift_last_summary - last sweep timestamp and result.
  • mirakl_payment_self_managed (Boolean) - PA01 mode toggle.
  • mirakl_last_payout_pull (Datetime, readonly) - last successful payout-history fetch.

sale.order

  • mirakl_acceptance_state (Selection) - pending / accepted / refused.
  • mirakl_acceptance_sent_at - when OR21 was transmitted.
  • mirakl_acceptance_can_decide (computed) - drives the OR21 button visibility.
  • mirakl_incident_open / mirakl_incident_opened_at - incident state and timestamp.
  • mirakl_can_open_incident (computed) - true when order is shipped and no incident is open.

account.move

  • mirakl_customer_debit_sent (Boolean, readonly) - true after successful PA01 call.
  • mirakl_customer_debit_sent_at - PA01 timestamp.

Behavior Details

Webhook Event Routing

  • ORDER_CREATED / ORDER_STATE_CHANGED / ORDER_REFUSED re-import the order via sale.order.mirakl_import_single_order.
  • MESSAGE_RECEIVED calls the helpdesk thread sync.
  • REFUND_CREATED aliases to the order handler.
  • Response codes: 200 ok, 401 bad signature, 403 webhook off, 404 instance unknown, 400 bad JSON, 202 on internal error (no retry storm).

Drift Detector Internals

  • Pages GET /api/offers with max=100; loop ends when a page returns less than 100.
  • Multi-pack offers translate free_qty through mirakl_offer_product_qty before comparison.
  • Pure helper _mirakl_filter_stock_drift is exposed for unit-testing without network calls.
  • Cron catches exceptions per instance; one misconfigured shop cannot break the sweep.

Refuse Reason Fallback

  • Resolves in order: mirakl_default_refuse_reason_code, mirakl_default_cancel_reason_code, mirakl_default_refund_reason_code.
  • If none is set, the refuse button raises UserError.
  • Per-line decisions with mixed accept/refuse - call _mirakl_send_order_acceptance directly.

Incident Payload

  • Open: POST /api/orders/<id>/incident with {"order_lines":[{"order_line_id":"...","reason_code":"INCIDENT_OPEN"}]}.
  • Close: DELETE /api/orders/<id>/incident?order_line_ids=L1,L2,....
  • While open, Mirakl pauses auto-refund timeouts on the order.

PA01 Cron Criteria

  • move_type = out_invoice AND state = posted AND mirakl_sale_order_id set.
  • mirakl_customer_debit_sent is False.
  • payment_state in (paid, in_payment, partial).
  • Linked instance has mirakl_payment_self_managed = True.

Payout PDF Storage

  • Incremental: each pull uses start_date = mirakl_last_payout_pull.
  • Download via response_mode='raw' to bypass JSON parsing.
  • Stored as ir.attachment with res_model = "mk.instance", name mirakl_payment_<id>.pdf.
  • Surfaces in the chatter of the marketplace instance.

Discount Maths

  • Per-line: (sum(promotions[].amount) / base_total) * 100, clamped to [0, 100].
  • Only discount is touched; price_unit stays at the Mirakl original.
  • Global fallback only when no per-line promotions exist; spread over non-shipping lines.
  • Writes use _marketplace_silent_sync_context() to avoid echoing changes back to Mirakl.

Test Mock Patterns

  • Route table: mock_mirakl({(method, path_substring): response}).
  • Single response: mock_mirakl_response(env, payload).
  • Base class MiraklTestCase provides self.instance with realistic credentials.
  • Tags allow selective runs: --test-tags mirakl_request etc.

Limitations

  • Per-line accept/refuse mix - the UI buttons currently accept-all or refuse-all. For mixed decisions, call _mirakl_send_order_acceptance directly. A line-level wizard is on the backlog.
  • Webhook retry policy - inbound webhooks are processed inline. No durable queue layer; transient Odoo errors are answered with 202 so Mirakl does not retry.
  • Drift auto-correction - the detector reports differences but does not mutate Mirakl or Odoo state. Re-pushing stock is a separate operation.
  • Discount type fidelity - PERCENT_DISCOUNT versus FLAT_DISCOUNT is collapsed into a single percentage; the original promotions[].type is not retained on the line.
  • Payout reconciliation - downloaded self-billing PDFs are stored as attachments. Automatic matching against bank statements remains a manual accounting step.

Automation (Cron)

  • Mirakl Order Import: imports new or changed marketplace orders.
  • Mirakl Stock Export: pushes updated Odoo inventory to Mirakl.
  • Mirakl Tracking Export: confirms completed shipments back to Mirakl.
  • Mirakl Shipping Watchdog: retries completed shipments that still need marketplace confirmation.
  • Mirakl Helpdesk Thread Sync: imports Mirakl inbox threads into Odoo Helpdesk when enabled.
  • Mirakl: Stock & Offer Drift Check (default off): runs the drift and offer-diff diagnostics every six hours.
  • Mirakl: Customer Debit Confirmation (PA01) (default off): scans paid invoices on Mirakl-payment instances every fifteen minutes and sends POST /api/payment/debit.
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with