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. REST API v 11.0
  4. Sales Conditions FAQ

REST API

by DRC Systems India Pvt. Ltd. http://www.drcsystems.com
Odoo

$ 63.59

v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 Third Party 44
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 193
Technical Name rest_api_drc
Websitehttp://www.drcsystems.com
Versions 8.0 9.0 10.0 11.0 12.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 193
Technical Name rest_api_drc
Websitehttp://www.drcsystems.com
Versions 8.0 9.0 10.0 11.0 12.0

Features

This module provide REST API (json) access to Odoo models.
  • Available Operations
    • Get Token :

      Odoo requires users of the API to be authenticated before they can use any other API. Authentication itself is done through the authenticate function and returns Token. On Every API call user must send a token to Access any API.

      • Example:
        localhost:8069/api/user/get_token?login=admin&password=admin
        It will Return:
        {"token": "24e635ff9cc74429bed3d420243f5aa6"}   # If authentication done.
    • Delete Token :

      User can delete token so, API call is not allow to access by that token On Detele token API call user must send a token.

      • Example:
        localhost:8069/api/user/delete_token?token=24e635ff9cc74429bed3d420243f5aa6
        Return:
        {"success": "Token '24e635ff9cc74429bed3d420243f5aa6' Deleted Successfully"}

    • Refresh Token :

      User can Refresh token so, token will be updated and return new token. On Refresh token API call user must send a token.

      • Example:
        localhost:8069/api/user/refresh_token?token=24e635ff9cc74429bed3d420243f5aa6
        Return:
        {"token": "cd7bdf0dfb7d4d74b08d3eae84af934c"}

    • Search Record:

      list records , it is mandatory to pass model name if id is pass with url then return a single record of a specific id Found else check domain in post data , if domain is found then return matched records else return all the data with id and name field.

      By default a search will return the ids and name of all records matching the condition, which may be a huge number.if offset and limit parameters are available to only retrieve a subset of all matched records.

      By default a search will return the ids and name of all records matching the condition, it may possible that also you want to read other fields name with that name and ids. Note: it will always returns id as default field name if field name is not given it will return (id and name) otherwise it will return (id and all given fields name).

      • Example for single record :
        localhost:8069/api/res.partner/search/1?token=24e635ff9cc74429bed3d420243f5aa6
      • Example for search using domain, offset and limit
        localhost:8069/api/res.partner/search?token=cd7bdf0dfb7d4d74b08d3eae84af934c&
        		&domain=[('customer','=', True)]&offset=10&limit=2&fields=['name','phone']

        • It will Return :
          [
              {
                  "phone": "+44 121 690 4596",
                  "id": 25,
                  "name": "David Simpson"
              },
              {
                  "phone": false,
                  "id": 35,
                  "name": "Jacob Taylor"
              },
          ]
          					            
                                     
    • Create Record:

      create record , it is mandatory to pass model name and values for record creation pass as create_vals of JOSN/Dictionary format. .

      • Example:
        localhost:8069/api/product.product/create?token=24e635ff9cc74429bed3d420243f5aa6&
                                	create_vals={'name':'Apple'}
        • It will Return :
          {'id':101}
                                        
    • Update Record:

      update record , it is mandatory to pass model name and record id and values for record update pass as update_vals in JOSN/Dictionary format.

      • Example:
        localhost:8069/api/product.product/update/101?token=24e635ff9cc74429bed3d420243f5aa6&
        	update_vals={'name':'Mango'}
        • It will Return :
          {'success':'Record Updated Successfully'}
                                        
    • Delete Record:

      Delete record , it is mandatory to pass model name and record id For Delete multiple records pass record ids in url parameter as 'unlink_ids' as in list format.

      • Example for single record:
        localhost:8069/api/product.product/unlink/59?token=24e635ff9cc74429bed3d420243f5aa6
        • It will Return :
          {'success':'Records Successfully Deleted 59'}
                                        
      • Example for multi record:
        localhost:8069/api/product.product/unlink/?token=24e635ff9cc74429bed3d420243f5aa6&
        	unlink_ids=[60,61]
                                
        • It will Return :
          {'success':'Records Successfully Deleted [60,61]'}
                                        
    • Calling method of any model :

      For calling a method of any model , it is mandatory to pass model name, record id and method name method call based on new api standards. so no need to pass cr,uid,ids,context as method argument. Other then this argument pass as 'args'=[arg1,arg2] in query string

      • Example for calling a method without argument:
        localhost:8069/api/sale.order/26/method/action_button_confirm/
        	?token=1ec448c54a004165b4c0da976b227260
        • It will Return :
          {"success": "True"}

          It will return dictionary its key 'success' and and its value is as per return value of calling method

      • Example for calling method with arguments:

        def get_salenote(self, partner_id)' this method is of sale.order model. For calling this method we need to pass partner_id as argument

        localhost:8069/api/sale.order/35/method/get_salenote/
        	?token=1ec448c54a004165b4c0da976b227260&args=[3]
                                
        • It will Return :
          {"success": "sale note"}
                                        
      • Example for calling method with keyword arguments:
        localhost:8069/api/sale.order/33/method/action_invoice_create/?
        	token=1ec448c54a004165b4c0da976b227260&args={'date_invoice':'2016-09-02'}
                                
        • It will Return :
          {"success": "12"}
                                        

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 or have a question related to your purchase, please use the support page.
  • Ratings
  • Discuss
There are no ratings yet!
Error 404
by
Jordi Morató
on 5/16/18, 6:33 AM Confirmed Purchase

When requested using curl script it returns a 404 error


please support
by
Fn4media
on 4/15/18, 3:11 PM Confirmed Purchase

is not working am purchased app and error


lade api
by
Fn4media
on 3/31/18, 2:55 AM Confirmed Purchase

lead api


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