1 Odoo & rSHOP API Integration
Documentation
1.1 Overview
This document describes the API endpoints for data transfer between
Odoo and the rSHOP e-commerce system. The data is exchanged in JSON
format over HTTPS, and all transfers occur in batches. The initiating
system is responsible for calling the corresponding endpoint.
Each batch transfer is asynchronous, meaning that after sending data,
the initiating system expects a processing result confirming success or
failure.
1.2 API Endpoints for Data Transfer
1.2.1Products Transfer (Odoo → rSHOP)
Method: POST
Endpoint: /api/products
Description: Odoo sends a batch of new or updated products to
rSHOP, including used products.
Request Body (JSON)
{
"batch_odoo_ id": 9871,
"odoo_batch_id": 9871,
"products": [
{
“odoo_product_id”: 123,
"product_odoo_id": 123,
"name": "Product A",
"category": "Category X",
"price_stock": 100.50,
"price_purchase": 107.50,
"used_product": false,
"used_for_odoo_id": 999,
...
}
]
}
1.2.2Stock Update (Odoo → rSHOP)
Method: POST
Endpoint: /api/stock
Description: Odoo sends batch stock updates for products in rSHOP.
Several combinations of product-warehouse (or location).
Request Body (JSON)
{
"batch_odoo_ id": 9871,
"odoo_batch_id": 9871,
"stock_updates": [
{
“odoo_product_id”: 123,
"product_odoo_id": 123,
"warehouse_code": "main_warehouse",
"warehouse_name": "Centrálný sklad",
"onhand": 15,
"free": 10
}
]
}
1.2.3Prices Update (Odoo → rSHOP)
Method: POST
Endpoint: /api/prices
Description: Odoo sends batch price updates for products in rSHOP.
Note: Prices to pulled from different sources (purchase price from
first vendor (logic required) set, avg. stock price = unit cost)
Request Body (JSON)
{
"batch_odoo_ id": 9871,
"odoo_batch_id": 9871,
"pricelists": [
{
"product_id": 123,
"stock_price": {
"currency": “EUR”, (ISO currency code)
"price": 33.99
}
,
"purchase_price": {
"currency": “EUR”, (ISO currency
code)
"price": 33.99
}
"type": "MSRP", (MRRP | MAP)
"counties": [{country_code: SK}]
"price": {
"currency": “EUR”, (ISO currency code)
"price": 33.99
}
...
}
]
}
1.2.4Sales Order Transfer (rSHOP → Odoo)
Method: POST
Endpoint: /rshop/orders
Description: rSHOP sends a batch of new sales orders to Odoo.
Request Body (JSON)
{
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"orders": [
{
"order_rshop_id": 123,
“rshop_order_id” : 123,
"order_name": "SO2500001",
“rshop_customer_id”: 123,
"customer_rshop_id": 123,
"items": [
{
"product_odoo_id": 123,
"odoo_product_id": 123,
"quantity": 2,
"unit_price": 100.50, (tax excluded)
"tax_code": xyz, (Pohoda codes may be used)
"price": 201.00, (tax excluded)
"price_tax_incl": 247,23 (line price tax
icluded)
}
],
"total_price": 201.00,
"total_price_tax_incl": 247.23,
"currency": EUR,
"status": "new"
"payment_type": "stripe", (stripe, paypal, transfer, cod),
"payment_status": "paid", (paid, not paid)
"delivery_type": "home-delivery", //home-delivery,
pickup-point,
“shipment_provider”: “Packeta” //DPD, Packeta, PBH,
aupark
“external_carrier_id”: “123”, // external carrier id used by the
3rd party API for shipment
"parcel_shop_id": "123",
"shipping_policy": "asap" (asap (as soon as possible),
ready (when all products are ready)
"delivery_address": { //optional, if not
filled contact address is used instead
“address_rshop_id”: 123,
"name": "Recipient Name",
"street_1": "My Street 1",
"city": "Košice",
"zip": "044 01",
"state": "Alaska",
"county_iso_code": "SK",
"email": "recipient@[Link]",
"phone": "+123456789"
“invoicing_address”: “{address_rshop_id}”, { //optional,
if not filled contact address is used instead
"name": "Recipient Name",
"street_1": "My Street 1",
"city": "Košice",
"zip": "044 01",
"state": "Alaska",
"county_iso_code": "SK",
"email": "recipient@[Link]",
"phone": "+123456789"
},
“contact_address”: “{address_rshop_id}”, { // required address
"name": "Recipient Name",
"street_1": "My Street 1",
"city": "Košice",
"zip": "044 01",
"state": "Alaska",
"county_iso_code": "SK",
"email": "recipient@[Link]",
"phone": "+123456789",
“consents”: [
{
“type”: “dataProcessing”,
"status": "granted"
}
]
}
"note": "order note"
}
]
}
1.2.5Contact (Customer) Synchronization (rSHOP → Odoo)
Method: POST
Endpoint: /rshop/customers
Description: rSHOP sends a batch of new or updated customer data
to Odoo.
Request Body (JSON)
{
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"customers": [
{
“rshop_customer_id”: 123,
"customer_rshop_id": 123,
“registration_status”: “registered”, (registered/unregistered) //if not send,
unregistered is default
“customer_type”: “individual”, (individual, company, unregistered)
"name": "John Doe",
“company_name”: ”firma123”,
“company_registration_number”: “1234567”,
“tax_number”: “123456789”, (DIČ jen pro SK)
“vat_number”: “SK123456789” (slovenské IČ DPH a pro všechny ostatní
VAT),
“vat_payer”: “yes”, (yes, no)
"email": "johndoe@[Link]",
"phone": "+123456789",
"address":[
{
"adress_rshop_id”: “123”,
“address_type”: “delivery”, (delivery, invoicing,
contact)
“name”: "Recipient name”,
"street": "123 Main St",
"city": "New York",
"zip": "10001",
"country": "USA"
},
“consents”: [
{
“type”: “dataProcessing”,
"status": "granted"
}
]
}
]
}
1.2.6Order Shipping Confirmation (Odoo → rSHOP)
Method: POST
Endpoint: /api/orders/shipping
Description: Odoo sends shipping details for fulfilled orders to
rSHOP.
Request Body (JSON)
{
"batch_odoo_ id": 9871,
"odoo_batch_id": 9871,
“exported_at”: "2025-05-07T10:45:00Z",
"shipments": [
{
"order_odoo_id": 123,
"order_rshop_id": 123,
“rshop_order_id”: 123,
"order_name": "SO2500001",
"shipment_odoo_id": 456,
"odoo_shipment_id": 456,
"carrier": "DHL",
“delivery_type”: “pickup-point”, (?)
"tracking_reference number": "1234567890",
"status": "shipped",
"shipped_date": "2024-02-21",
“is_partial”: “true”, (? true/false)
"items": [
{
"product_id": "PROD-001",
"product_name": "nozik rybka",
"quantity": 2,
"uom": "ks"
},
{
"product_id": "PROD-002",
"product_name": "",
"quantity": 1,
"uom": "ks"
}
]
}
]
}
1.3 API Endpoints for Data Processing Confirmation
1.3.1Products Processing Result (rSHOP → Odoo)
Method: POST
Endpoint: /rshop/products/status
Description: rSHOP confirms the processing status of received
products.
Request Body (JSON)
{
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"results": [
{
"product_odoo_id": 123,
"odoo_product_id": 123,
"batch_odoo_id ": 9871,
"odoo_batch_id ": 9871,
"status": "OK"
"error_message": "Missing..."
}
]
}
1.3.2Stock Update Confirmation (rSHOP → Odoo) – TBD (do we
need it ?)
Method: POST
Endpoint: /rshop/stock/status
Description: rSHOP confirms the processing status of stock
updates.
Request Body (JSON)
{
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"results": [
{
"batch_odoo_id ": 9872,
"odoo_batch_id ": 9872,
"product_odoo_id": 123,
"odoo_product_id": 123,
"status": " OK"
"error_message": "Missing..."
}
]
}
1.3.3Prices Processing Confirmation (rSHOP → Odoo) – TBD (do
we need it?)
Method: POST
Endpoint: / rshop/prices/status
Description: rSHOP confirms the processing status of received price
updates.
Request Body (JSON)
{
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"results": [
{
"batch_odoo_id ": 9873,
"odoo_batch_id ": 9873,
"product_odoo_id": 123,
"odoo_product_id ": 123,
"status": "OK"
"error_message": "Missing..."
}
]
}
1.3.4Sales Order Processing Result (Odoo → rSHOP)
Method: POST
Endpoint: /api/orders/status
Description: Odoo confirms the processing status of received sales
orders.
Request Body (JSON)
{
"batch_odoo_ id": 9871,
"odoo_batch_id": 9871,
"results": [
{
"order_rshop_id": 123,
“rshop_order_id”: 123,
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"status": "OK"
"error_message": "Missing..."
}
]
}
1.3.5Customer Processing Confirmation (Odoo → rSHOP)
Method: POST
Endpoint: /api/customers/status
Description: Odoo confirms the processing status of received
customer data.
Request Body (JSON)
{
"batch_odoo_ id": 9871,
"odoo_batch_id": 9871,
"results": [
{
"batch_rshop_id ": 9872,
"customer_rshop_id": 123,
"status": "OK"
"error_message": "Missing..."
}
]
}
1.3.6Order Shipping Confirmation Status (rSHOP → Odoo) – TBD
(do we need it?)
Method: POST
Endpoint: / rshop/orders/shipping/status
Description: rSHOP confirms receipt and processing of order
shipping details.
Request Body (JSON)
Poznámka: doplnit řádky za jednotlivé produkty
{
"batch_rshop_id ": 9871,
“rshop_batch_id”: 9871,
"results": [
{
"batch_odoo_id ": 9874,
"odoo_batch_id ": 9874,
"order_rshop_id": 123,
"rshop_order_id": 123,
"shipment_odoo_id": 456,
"odoo_shipment_id": 456,
"status": "OK"
"error_message": "Missing..."
}
]
}
1.4 Key Considerations
1. Batch Processing: All data is transferred in batches to improve
efficiency.
2. Asynchronous Processing: The system that receives the data
processes it and later returns a status confirmation.
3. Error Handling: If an error occurs, the processing result must
contain an error description.
4. Data Consistency: Each batch transfer is identified using a UUID
for tracking.
Přidat
Zpětná aktualizace řádku objednávky – změna množství