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
    • Estate 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. Extra Tools
  3. Odoo rest API v 18.0
  4. Sales Conditions FAQ

Odoo rest API

by Cybrosys Techno Solutions https://www.cybrosys.com
Odoo
v 18.0 Third Party 5132
Download for v 18.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 288
Technical Name rest_api_odoo
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 288
Technical Name rest_api_odoo
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 16.0 17.0 18.0
Community
Enterprise

The odoo Rest API module allow us to connect to database with the help of GET , POST , PUT and DELETE request.

Odoo rest API

Email Us

Key Highlights

Api Key Generation

This module Api key generation using database authentication.

Create Records

Can create records for the models we want to access.

Methods

This module Choose specific methods like GET, POST etc.

Create & Updates

This module Create and update records from database.

Delete

This module Choose DELETE method to delete records.

Odoo rest API

Are you ready to make your business more organized?
Improve now!

odoo@cybrosys.com +91 9074270811
  • Screenshots
  • Features
  • FAQs
  • Releases
acc_bg

Configuration

  • First of all, we have to add a new parameter in odoo conf. file.
  • server_wide_modules = web, base, rest_api_odoo
    - This will allow us to send request to server without selecting database first.
    - Incase if you have to uninstall the module , you have to remove this parameter.
    - Next we can install the module.
  • After installing the Rest api app we can see a new api key field in users.
  • - Next we have to generate the api-key for the current user.
  • You can import the postman collections provided in the app folder for authentication and interacting with database in various methods.

Postman collections

  • We have attached Postman collections through which you can authenticate rest api.
  • First, extract the zip file. Then, you will obtain the JSON-format file, which you can directly import into POSTMAN.
  • The url format will be like this - http://localhost:8018/odoo_connect Replace 'localhost:8018' with your localhost port number.
  • You have to provide database name, username and password through the headers while sending request.
  • If the authentication is successful , an api key will be generated for the current user.
  • This key will be used when sending api requests to database.
  • The response will be like this - {"Status": "auth successful", "User": "Mitchell Admin", "api-key": "66c2ebab-d4dc-42f0-87d0-d1646e887569"}.

API Authentication

  • After rest api authentication, we can create records in the rest api app.
  • Here we can choose the model, and also we can choose the http methods.
  • The api response will be based on these records.

Get Records

  • You can send GET request to retrieve data from the database.
  • The postman collection has been provided with--> app files for sending request from postman.
  • You have to provide username, password and api key through the header.
  • Model can be passed as argument as the technical name , and also if you want specific record you can provide the id as well,
  • The format for GET method will be like this http://localhost:8018/send_request?model=res.partner&Id=10.
  • We can specify the fields inside the JSON data, and it will be like this - {"fields": ["name", "email"]}.
  • This is the format of api response - {"records": [{"id": 10, "email": "deco.addict82@example.com", "name": "Deco Addict"}]}.

Create Records

  • Using POST method , you can create new records in the database.
  • Just make sure you enabled POST method for the model record in rest api app , otherwise you will get 'method not allowed' message.
  • For creating record you have to provide the JSON data along with the model.
  • You can make use of the postman collection that we have added with app files.
  • The format for sending POST request will be like this - http://localhost:8018/send_request?model=res.partner.
  • This is the format for JSON data - { "fields" :["name", "phone"] , "values": {"name": "abc", "phone":"55962441552" } }.
  • Make sure the data entered in correct format otherwise you will get 'Invalid JSON data' message.
  • Response will be in this format - {"New resource": [{"id": 51, "name": "abc", "phone": "55962441552"}]}.

Update Records

  • Updation of records in the database can be done with PUT method.
  • You have to provide the model and also the id or the record that you want to update.
  • You can use the Postman collection that we have provided and , you will be always have to send request with your login credentials. Otherwise, it will be showing access denied.
  • The format for sending PUT request will be like this - http://localhost:8018/send_request?model=res.partner&Id=46.
  • Here too you have to provide the JSON data through which the updates will be done.
  • The response format will be like this - {"Updated resource": [{"id": 46, "email": "abc@example.com", "name": "Toni"}]}.

Delete Records

  • Database records can be deleted by sending DELETE method request.
  • For the deletion we have to provide the Model and the record id that we want to delete.
  • Make sure you have permission to delete files for the selected model in the rest api record.
  • The delete request format will be like this - http://localhost:8018/send_request?model=res.partner&Id=46.
  • The response after successful deletion will be - {"Resource deleted": [{"id": 46, "email": "abc@example.com", "name": "Toni"}]}.

We can create records in the rest api app.

request to retrieve data from the database.

Update of records in the database can be done with PUT method.

Database records can be deleted by sending DELETE method request.

What is the purpose of the Odoo REST API module?

The Odoo REST API module allows users to connect to the Odoo database and perform operations using standard HTTP methods: GET, POST, PUT, and DELETE.

How can the REST API module benefit developers?

It enables developers to integrate Odoo with other applications and systems, facilitating seamless data exchange and enhancing functionality.

What types of requests can be made using the Odoo REST API?

Users can make GET requests to retrieve data, POST requests to create new records, PUT requests to update existing records, and DELETE requests to remove records from the database.

Latest Release 18.0.1.0.0

1st October, 2024
Add
  • Initial Commit

Related Products

Odoo 18 Full Accounting Kit

Open HRMS Core

Odoo WooCommerce Connector

Odoo18 Dynamic Accounting Reports

Hide Any Menu User Wise

Odoo Dynamic Dashboard

Our Services

Odoo Customization
Odoo Implementation
Odoo Support
Odoo Migration
Odoo integration
Odoo Consultancy
Odoo Licensing
Hire Odoo Developer
....

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, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
  • Ratings
  • Discuss
Can only use record IDs?
by
Jared Hansen
on 1/22/25, 7:18 PM

I was really hoping to use this module but it only lets you look up records by id number.  I need to look up records by some other identifier (e.g. email) in order to *find* the Id number...  So close..  


Error when installing on v18 CE
by
Danizan
on 12/30/24, 11:44 AM
    raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing file:/c:/odoo/odoo-18.0/addons_custom/rest_api_odoo/views/connection_api_views.xml:26, somewhere inside
<record id="connection_api_view_tree" model="ir.ui.view">
        <field name="name">connection.api.view.tree</field>
        <field name="model">connection.api</field>
        <field name="arch" type="xml">
            <tree>
                <field name="model_id" string="Model"/>
                <field name="is_get"/>
                <field name="is_post"/>
                <field name="is_put"/>
                <field name="is_delete"/>
            </tree>
        </field>
    </record>

Re: Error when installing on v18 CE
by
Cybrosys Technologies
on 1/3/25, 6:47 AM Author

No errors were encountered while installing rest_api_odoo. However, the error provided includes a 'tree' tag, which is specific to Odoo V17. It appears that a V17 file was used and an attempt was made to install it in V18. Please verify the version compatibility and try again.


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