Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • E-learning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Artificiële Intelligentie
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelwinkel
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Horeca & Hospitality
    • Bar en café
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van mede-eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brouwerij
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Diensten
    • Klusjesman
    • IT-hardware & ondersteuning
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Alle bedrijfstakken bekijken
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijsprogramma
    • Scale Up! Business Game
    • Odoo bezoeken
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Partner worden
    • Diensten voor partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Integrate Odoo with third party APIs

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
integrationapi
3 Antwoorden
692 Weergaven
Avatar
vadawos

Hi   experts,


I am new to the ODOO world. I. have a requirement to integrate third party Invoices ODOO Invoices and  third Sales orders with ODOO sales orders using  the REST APIs.


Can you please guide me ?


Warm regards,

WILLION

0
Avatar
Annuleer
Avatar
Sandeep Paulraj R
Beste antwoord

Hi Willion,

Welcome to the Odoo community!

Integrating third-party invoices and sales orders with Odoo through REST APIs is a common requirement and can be implemented in several ways depending on the external system.

A typical integration flow would be:

  1. Analyze the Third-Party API

    • Review the API documentation.

    • Identify authentication methods (API Key, OAuth, Bearer Token, etc.).

    • Understand the request/response formats (usually JSON).

  2. Create a Custom Odoo Module

    • Develop a custom module to handle the integration logic.

    • Use Python libraries such as requests to communicate with the external API.

  3. Map External Data to Odoo Models

    • Sales Orders → sale.order

    • Invoices → account.move

    • Customers → res.partner

    • Products → product.product

  4. Implement Synchronization

    • Import data from the external system into Odoo.

    • Optionally export Odoo records back to the external system.

    • Use scheduled actions (Cron Jobs) for automatic synchronization.

  5. Handle Errors and Logging

    • Store API responses and errors for troubleshooting.

    • Implement retry mechanisms for failed requests.

Example (REST API call from Odoo):

import requests

response = requests.get(
    "https://api.example.com/orders",
    headers={"Authorization": "Bearer YOUR_TOKEN"}
)

data = response.json()

If you can share:

  • Your Odoo version

  • The third-party system name

  • Whether the integration is one-way or two-way

the community can provide more specific guidance and examples.

Best regards,
Sandeep Paulraj

0
Avatar
Annuleer
Avatar
Atliis 360
Beste antwoord

Hi,

Yes, this is definitely achievable! Here's the general approach for syncing third-party invoices and sales orders into Odoo via REST API:

1. Authenticate first:

import requests

session = requests.Session()
response = session.post('https://your-odoo.com/web/dataset/call_kw', json={
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
        "model": "res.users",
        "method": "authenticate",
        "args": ["your-db", "admin@example.com", "password", {}],
        "kwargs": {}
    }
})
uid = response.json().get("result")

2. Create a Sales Order (sale.order):

session.post('https://your-odoo.com/web/dataset/call_kw', json={
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
        "model": "sale.order",
        "method": "create",
        "args": [{"partner_id": 1, "order_line": [(0, 0, {
            "product_id": 5,
            "product_uom_qty": 2,
            "price_unit": 100.0
        })]}],
        "kwargs": {}
    }
})

3. Create an Invoice (account.move):

session.post('https://your-odoo.com/web/dataset/call_kw', json={
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
        "model": "account.move",
        "method": "create",
        "args": [{"move_type": "out_invoice", "partner_id": 1, "invoice_line_ids": [(0, 0, {
            "name": "Service",
            "quantity": 1,
            "price_unit": 200.0
        })]}],
        "kwargs": {}
    }
})

For duplicate prevention, always search for an existing record before creating:

# Check if order already exists by external reference
session.post('...call_kw', json={
    "params": {
        "model": "sale.order",
        "method": "search_read",
        "args": [[["client_order_ref", "=", "EXT-ORDER-123"]]],
        "kwargs": {"fields": ["id"], "limit": 1}
    }
})

If you want to avoid the JSON-RPC boilerplate and work with a cleaner REST interface, REST API Toolkit (available on the Odoo App Store for Odoo 19) lets you do all of this with simple GET/POST/PATCH/DELETE endpoints and Bearer token auth — much easier to integrate with third-party platforms.

Hope that helps!

0
Avatar
Annuleer
Avatar
Olagbaju Olamide
Beste antwoord

Hi Willion,

Yes, this is possible using Odoo REST/XML-RPC APIs or custom API endpoints depending on your Odoo version and integration requirements.

For your use case, the process usually involves:

  • Authenticating with the Odoo API

  • Mapping third-party invoice and sales order data

  • Creating/updating records in Odoo (sale.order and account.move)

  • Handling customer/product synchronization

  • Managing error handling and duplicate prevention

The best approach depends on:

  • your Odoo version,

  • the third-party system you want to connect,

  • and whether the sync should be real-time or scheduled.

If you can share a few more details about the external platform/API you are integrating with, I can guide you more specifically.

0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Integrate Odoo with third party APIs
integration api
Avatar
Avatar
1
aug. 24
10124
Integrating Odoo with external system
integration api
Avatar
Avatar
Avatar
2
mei 22
16287
How to call external API/web service from inherited module in odoo 12?
integration api
Avatar
0
jan. 21
1949
I want to integrate my custom store with openERP
integration api
Avatar
0
mrt. 15
5019
record rules filters res.partner but still reports pop error accessing res.users
security integration api
Avatar
0
jun. 26
745
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Partner worden
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now