Rest API
  • Odoo REST API: Version 1.0 documentation
  • Connection
    • Configuration
    • Demo
    • Logging In
      • How you can do
        • Odoo Version Information
        • Oauth1 Authentication
        • OAuth2 Authentication
        • Basic Authentication
  • Calling Methods
    • Check Access Rights
    • List Records
      • Pagination
    • Count Records
    • Read Records
      • Read Single Record
      • Read List Records
      • Read Filter Records
    • Listing Record Fields
    • Create Records
    • Update Records
      • Update Single Record
      • Update List Records
    • Delete Records
      • Delete Single Record
      • Delete List Records
  • Report Printing
    • Print Single Report
    • Print List Reports
  • Inspection and Introspection
    • ir.model
    • ir.model.fields
Powered by GitBook
On this page
  1. Calling Methods
  2. Delete Records

Delete List Records

PreviousDelete Single RecordNextReport Printing

Last updated 1 year ago

Records can be deleted using , it takes a list of records to delete.

DELETE /restapi/1.0/object/{object_name}?ids={comma_separated_ids}

Request:

DELETE /restapi/1.0/object/res.partner?ids=17,20 HTTP/1.1
Host: {your_Odoo_server_url}

JSON Response:

HTTP/1.1 200 OK

{}

XML Response:

HTTP/1.1 200 OK

<ids type="str">17,20</ids>
Headers and Status Codes
Description

Request Headers

  • – the response content type depends on Accept header

  • – The OAuth protocol parameters to authenticate.

Response Headers

  • – this depends on Accept header of the request

Status Codes

  • – no error

  • – there’s no resource

  • – authentication failed

  • – if any error raise

unlink()
Accept
Authorization
Content-Type
200 OK
404 Not Found
401 Unauthorized
403 Forbidden