INTRODUCTION
Efficient and secure data sharing with Odoo REST API!
Odoo has a RESTful API!! A REST API is an application program interface (API) that allows you to GET, PUT, POST, and DELETE data via HTTP queries.
REST APIs are resource-oriented, stateless, cacheable, layered, and uniform interfaces.
The HTTP request lets you get, put, post, and delete data. This module allows you to access and modify data using HTTP requests in Odoo.
You can update a record from the database according to your needs.
The Odoo app permits you to send a request in JSON format and get the response in JSON or XML (as per configuration).
Odoo REST API module creates REST API for Odoo and allows accessing and modifying data using HTTP requests.
The module now provides a user authentication system that verifies the user request for API use. Also, the module can now perform user authentication for security.
FEATURES
- Odoo REST API provides an option to generate a user authentication token from your user profile.
- In Postman, you can input encoded credentials from Base64 to generate the authentication key.
- User authentication is in place to ensure that only authorized users can use API resources.
- You can limit specific access privileges for various API keys.
- Furthermore, access rights messages in the endpoint responses are visible.
- This application enables you to create an API key for accessing endpoints
- Configuring specific data access rights for different users.
- The same API key is used for many endpoint users.
- You have the choice to select the response format, be it in JSON or XML.
- It’s also possible to request the database table schema.
Before moving ahead, explore our Odoo development services & an extensive range of quality Odoo Apps.
INSTALLATION
- Once you purchase the App from Webkul store, you will receive the link to download the zip file of the module.
- Extract the file on your system after the download finishes. You will be able to see a folder named- ‘odoo_rest.’
- Copy and paste this folder inside your Odoo Add-Ons path.
- Now, open the Odoo App and click on the Settings menu. Here, click on Activate the Developer Mode.
- Then, open the Apps menu and click on ‘Update Modules List.’
- In the search bar, remove all the filters and search ‘odoo_rest.’
- You will be able to see the module in the search result. Click on ‘Install’ to install it.
WORKFLOW
- Under the ‘Settings’ menu, choose ‘Web Service Account’ from the ‘Technical’ menu.
- Now, generate an API Secret Key, along with enabling ‘User Authentication’. Also, select the ‘Available for’ option.
- Select the users’ option under ‘Users & Companies.’
- Choose ‘API Key’ and hit the ‘Generate Token’ button to create a token for that specific API within the ‘User Authentication’ tab.
- After that, move back to the API key. Here, you can see a ‘User’ icon/option at the top-right of your REST Web Service Account.
- Clicking on the user icon will open the list of users, and their user authentication token will be shown next to their User ID.
- You can also configure the API key for Specific access as well. Choose the ‘Specific Resources’ option in the ‘Available for’ option, and configure them.
- You can also perform User Authentication from Postman. All you do is encode the login credentials from Base64 in the given format and follow the screenshot instructions.
{‘login’:’admin’,’ password’:’admin’}.
NEED HELP?
Hope you find the guide helpful! Please feel free to share your feedback in the comments below.
If you still have any issues/queries regarding the same, please raise a ticket at the UV Desk.
For any doubt, contact us at our support mail.
Thanks for paying attention!!
Current Product Version - 1.0.0
Supported Framework Version - Odoo 16, 15, 14
{
“success”: false,
“message”: “ERROR: TypeError(\”unhashable type: ‘dict’\”) {}”,
“responseCode”: 500,
“object_name”: “sale.order”,
“user_id”: 1,
“model_id”: 608
}
If I sent:
{
“partner_id”: “10”,
“partner_shipping_id”: “10”,
“partner_invoice_id”: “10”,
“pricelist_id”: “3”,
“date_order”: “2023-12-08”,
“order_line”: [
{
“product_id”: “13”,
“name”: “Attension Please”,
“product_uom_qty”: “5”,
“price_unit”: “4”
}
]
}