Skip to Content
Menu
v 17.0 Third Party 3052
Download for v 17.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 278
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 278
Technical Name rest_api_odoo
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 16.0 17.0 18.0
Community
Enterprise

Odoo rest API

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

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

Create and update records from database.

Delete

This module Choose DELETE method to delete records.

Step 1: Add a New Parameter in the Odoo.conf File

Before installing the module, Add "server_wide_modules = web, base, rest_api_odoo" to odoo.conf file. This configuration enables the server to handle requests without requiring database selection. Once this is done, you can proceed to install the module.
Note: If you need to uninstall the module, ensure you remove this parameter from the configuration file.

Step 2: Locate the Postman collections in the provided app folder.

In the extracted module folder, locate the Postman collections file in JSON format.

Step 3: Open Postman and click the Import button.

Step 4: Select the JSON file from the module folder to import the collection.

Imported collections.

Step 5:Open Authentication.

Step 6: Update the Base URL, db (Database Name), login (Database Username) and password (Database Password) under Headers.

Step 7: Click Send.

If authentication is successful, an API key will be generated for the current user.

API Key in the User's Form View

To find the generated API Key for the current user, navigate to Settings > Users & Companies > Users, open the user's form view, and go to the API tab. The API Key will be displayed there.

Step 8: Create Rest API Records.

Navigate to Rest API in Rest API module and create new record. Select the model and the HTTP methods. The chosen methods will determine the allowed actions on the records, and the API response will reflect the changes made.

Step 9: Getting Records via REST API

Open Get records api collection in postman and add the db, login, password, api-key in the headers. Pass the model (e.g., product.template) in the URL to retrieve records for that model.
Note: Make sure that GET method is enabled for product.template model in Rest API record.

Step 10: Specify the fields you want to retrieve in the JSON data under Body section and click Send.

The retrieved records.

Step 11: Get a specific record.

To retrieve a specific record, pass the ID in the URL (e.g., http://localhost:8027/send_request?model=product.template&Id=28) and click Send.

Retrieved record.

Step 12: Creating Records via POST Method

Open Create Records from Rest API Collection. Add db, api-key, login and password under Headers. Update the Base Url.

Step 13: Provide the JSON data under the Body section and specify the model in the URL. Click Send.

Note: Make sure that POST method is enabled for the selected model in Rest API record.

Created Record.

Step 14: Update Records Using PUT.

Open Update Records from Rest API Collection. Add db, api-key, login and password under Headers. Update the Base Url. Note: Make sure that PUT method is enabled for the selected model in Rest API record.

Step 15: Provide the JSON data under the Body section and specify the model in the URL. Click Send.

Response after record update.

Step 16: Delete Records Using DELETE.

Open Delete Records from Rest API Collection. Add db, api-key, login and password under Headers. Update the Base Url. Add the model and the id of the record to delete and click Send. Note: Make sure that DELETE method is enabled for the selected model in Rest API record.

Response after deleting the record.

  • We can create records in the rest api app.
  • We can send GET 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.
Version 17.0.1.0.0|Released on:29th Mar 2024

Initial Commit for Odoo rest API.

Related Products

Our Services

service-icon

Odoo Customization

service-icon

Odoo Implementation

service-icon

Odoo Support

service-icon

Hire Odoo Developer

service-icon

Odoo Integration

service-icon

Odoo Migration

service-icon

Odoo Consultancy

service-icon

Odoo Implementation

service-icon

Odoo Licensing Consultancy

Our Industries

Trading

Easily procure and sell your products

POS

Easy configuration and convivial experience

Education

A platform for educational management

Manufacturing

Plan, track and schedule your operations

E-commerce & Website

Mobile friendly, awe-inspiring product pages

Service Management

Keep track of services and invoice

Restaurant

Run your bar or restaurant methodically

Hotel Management

An all-inclusive hotel management application

Support

Need Help?

Got questions or need help? Get in touch.

odoo@cybrosys.com
WhatsApp

Say hi to us on WhatsApp!

+91 99456767686

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.
There are no ratings yet!
Its good and simple to use!
by
Muhammad Mahendra
on 2/13/25, 9:14 PM

But why we need to include the username and password inside the the request params although we've already have an API key?


there was some documentation attached before now none
by
baymax
on 11/20/24, 4:35 AM

is there any basic documentation for this module? any information on how to use would be great

Re: there was some documentation attached before now none
by
Cybrosys Technologies
on 11/27/24, 10:56 PM Author

Basic documentation has been included within the index file.


Hi, im installed module Rest Api odoo but i can't see API key, Plesase Help me !
by
Trung
on 11/14/24, 1:28 AM


Re: Hi, im installed module Rest Api odoo but i can't see API key, Plesase Help me !
by
Cybrosys Technologies
on 11/17/24, 11:35 PM Author

First of all add a new parameter in odoo conf. file.server_wide_modules = web, base, rest_api_odoo As mentiond in the app index.
After installing the Rest api app we can see a new api key field in users.
You can import the postman collections provided in the App folder for Api key generation using database authentication.


by
s@profsys.com.ua
on 8/22/24, 8:46 AM

Hi,
I need to get date fields, such as the "change_date" or "date_order". They're blocked from receiving, I understand?

Re:
by
Cybrosys Technologies
on 9/2/24, 2:32 AM Author

Hello, We have updated the app. Please get the latest version.