Versions | 12.0 | 13.0 | 14.0 | 15.0 | 16.0 | 17.0 | 18.0 |
---|---|---|---|---|---|---|---|
Community | |||||||
Enterprise |
https://www.ekika.co/support
All-in-One RESTful API Framework
Maximize Your Odoo Integration with Our RESTful API Framework – Simplified, Scalable, and Secure.
- Live Test URL: https://api_framework-18.demo.odoo-apps.ekika.co/web/login
- Login: ekikademo | Password: ekikademo
Note: It is recommended to use desktop mode for a better viewing experience.
Why Choose This RESTful API Solution?
-
Pure Dynamic APIs -
Code Your Custom APIs -
Multi-API Sets -
50+ API Combinations -
Multi-DB Support -
API Docs (Swagger/Redocly/Graphiql) -
6 Types of API Auth -
3 Kinds of data permissions -
Create Update Delete Records -
Custom Actions and Workflows -
Supports Multi-Company -
Allows Context Passing -
Multi-language Supported -
Execute ORM Methods -
Allows File Upload/Download -
Trigger Emails -
Easy Debugging -
Strict Production -
Procedure Execution -
Install Uninstall Apps -
Bulk Data Operation -
Report Download -
Pagination -
Filters, Sort, Group By -
Log Viewer -
Check Data Access -
Retrieve Multi-Model Data -
Supports Custom Models -
Flexible Endpoints
Multiple REST APIs, Auth & Access using API Framework
Easy to Use, Control and Customize Securely.

Our Customers Experiences
piotr
We recommend EKIKA as supplier for GraphQL api solution for Odoo. We have successfully
implemented their module (we focus on GraphQL api) in production environment. All the questions / requests were
promptly answered, no issues at all.
Christiaan Baard
The module allows you to interact with almost everything in an Odoo setup which opens the doors for complex
customisation. I can recommend this to anyone who is wanting to extend the functionality of there Odoo
instance.
Big thanks to the Ekika team for helping getting this setup. Very quick to response and helpful when they did.

What is API Framework? and How it Works?
-
REST API simplifies communication and act as intermediaries between different software systems.
It allows them to interact and share data seamlessly over the internet using HTTP requests.
For example, a Rest API can enable a website to fetch information from a database, or it can allow a mobile app to send data to a server.
In simpler terms, Rest API acts as a bridge that helps different applications talk to each other and work together smoothly, making tasks like data sharing and integration much easier. - This Odoo REST API Framework allows you most used trending REST API technologies with secure authentication and user centric data (odoo-model) access management.
- Using this API Framework you can Integrate Various Applications, Access and Manage Data, Execute Odoo Workflows, Build Mobile Apps and Connect Web Application and Services, Extend Functionalities, Connect IoT devices, Automate External Systems and Customize Odoo and much much more.
True Dynamic
APIs with dynamically calculated models with both json-api and graphql for demand-based responses.
Json:API & GraphQL
Auth & Access
It has a strong foundation of authentication and authorization system using various alternate options.
Secure and Controlled
No-Extra-Code
No extra code required, your custom models are supported. But you have the option to do it as well.
Hassel Free Maintanance
Data Security
Provides you security. We don’t bypass Odoo’s authentication process, which makes risk-free business data APIs.
X route(.., auth=None, ..)
Limitless
Powerful to make a new frontend using Odoo backend. Integrate for Real-Time Updates like IoT.
Wings to Fly
Equipped
Plenty of free code snippets available to get started on your activity quickly.
Powerful Tools
JSON API
OAuth2
Custom Access
GraphQL
API-Key
Basic Auth
CRUD
Sudo-Access
Login-Pass
Method Calling
Upload-Download
Schema
Debugging
Dynamic & more…
Conclusion, this RESTful API Solution fits with each and every aspect of the ERP needs in
terms of external exposure of data from your central ERP system.
As a dedicated but growing team, we’re always striving to deliver the best possible experience.
We value your feedback, so don’t hesitate to share your concerns or specific requirements.
We believe in open communication and collaboration. We value your feedback, so don’t hesitate to share your concerns or specific requirements.
We welcome your feature requests, and budget considerations to ensure our API solution perfectly aligns with your business goals.
RESTful API Framework Package Installation and Configuration.
Overview of Installation and Set-up Procedure.
This Odoo API Framework in designed to use in very easy manner. All you need
to do is follow few steps defined below.
How to quick start Odoo API Framework for External Connectivity?:
-
Download the module file (usually a .zip file) from a Odoo App Store
or from https://ekika.co website.When downloading applications prioritize using official sources like our website https://ekika.co or https://git.ekika.co or the Odoo Apps Store to ensure app quality, security, and ongoing support. Avoid using apps from untrusted third-party sources to mitigate the risk of security vulnerabilities and compatibility issues.
- Put modules in addons path and ensure your Odoo 17 instance is up again
and running with new files in consideration. - Install API Framework modules.
- Setup user by givine access for APIs based on your operational method.
- Once you install module and grant access you will find main API menu in
your Odoo environment. - Setup Odoo RESTful API as per your desired need with communication
protocol style, authentication, authorization style and use our Postman
collection to speed up practical instead of reading documentation. -
POSTMAN Collection:
https://git.ekika.co/EKIKA.co/Odoo-API-Framework-POSTMAN-CollectionYou should update url and authentication option based on your api configuration. Also you may require to update id for reference record based on your environment where applicable.
Congratulations on starting to leverage
APIs! This opens doors to exciting integrations that can significantly
enhance your application’s capabilities.
Prerequisites:
- Download the module file (usually a .zip file) from a trusted source like
https://ekika.co OR Odoo App Store - Ensure your Odoo 17 instance is up and running.
- Have administrative access to your Odoo instance (self-hosted or odoo.sh).
How to install Odoo Apps?
-
Download the Module:
- Locate the appropriate module for your needs on a trusted repository
like the Odoo Apps Store
(https://apps.odoo.com/apps) or from our
website
https://ekika.co . - Download the module file (typically a .zip file).
- Locate the appropriate module for your needs on a trusted repository
-
Extract the Module Files:
- Use a decompression tool like WinRAR or 7-Zip to extract the
contents of
the downloaded .zip file. This will create a folder containing the
module’s files.
- Use a decompression tool like WinRAR or 7-Zip to extract the
-
Place the Module in the Addons Path (Custom Addons Recommended or Commit
to
your Version Control system i.e. git):- Recommended: Create a dedicated custom_addons
repository/folder similar to your main Odoo addons directory. This
keeps
official and custom modules organized. - Odoo.sh: If using Odoo.sh, upload the extracted
folder
to the ~/src/user/ directory OR recommended to commit in custom
addons. - Direct Odoo Installation: For a self-hosted Odoo
instance, copy or move the
extracted folder to the addons directory within your Odoo project
directory using git recommended.
- Recommended: Create a dedicated custom_addons
-
Using Git for Version Control (Optional but Recommended):
- If the module is available in a Git repository, consider using Git
for
version control: - Navigate to your custom_addons directory using the terminal.
- Clone the repository using the git clone command and the provided
URL. - This approach allows you to track changes, collaborate with others,
and
easily update the module. - We manage our api addons for customers for regular important updates
too. We strongly recommend you to use direct source to keep you up
to
date with changes. Send us email after purchase on hello@ekika.co to
get
access to our repository.
- If the module is available in a Git repository, consider using Git
-
Restart Your Odoo Service:
- For changes to take effect, restart your Odoo service. The specific
method may vary depending
on your installation method (manual, Docker, service manager like
systemd). Refer to your Odoo
documentation for detailed instructions.
- For changes to take effect, restart your Odoo service. The specific
-
Open Odoo in Your Browser and Log In with Admin Access:
- Access your Odoo instance in a web browser (usually
http://localhost:8069) in local system. - Use your administrator credentials to log in.
- Access your Odoo instance in a web browser (usually
-
Activate Developer Mode:
- Developer mode is typically required for installing newly added
addons. - Go to Settings (usually a gear icon in the main menu).
- Scroll to bottom in settings.
- Click the link to activate Developer mode or add query-parameter in
URL:
&debug=1 after the /web and before # in the url.
- Developer mode is typically required for installing newly added
-
Update the Module List:
- Go to the Apps section in your Odoo instance.
- Click on Update Apps List. This ensures Odoo detects the newly added
module from your addons path in configuration file.
-
Find and Install the “api_framework” App:
- If the module you’re installing depends on the api_framework app,
search
for it in the Apps
section. (Optional in case if you are installing our free api helper
modules) - If it’s not already installed, click Install to proceed.
- If the module you’re installing depends on the api_framework app,
-
Configure API Permissions (Required to grant permission to API manager
or
User): -
Verify Installation and Access:
- Depending on the module, you might need to access specific menus or
functionalities to verify
successful installation. If you can see main API menu you have
enough
access to get started. You require administrative access as api
containes user permission and user and permission management require
user record access.
- Depending on the module, you might need to access specific menus or
-
Additional Tips:
- Backup: It’s always recommended to back up your
Odoo
database before
installing new modules, especially custom ones. Because we do not
know
you environment and what are things attached with module
installation
procedure. - Custom Modules and Security: Exercise caution when
installing custom modules
from untrusted sources. They could introduce security
vulnerabilities or
may cause weired behaviour in your environment.
- Backup: It’s always recommended to back up your
What is API Authentication?
API authentication is the process of verifying the identity of a client or user who is making an API request. It ensures that only authorized users or systems are granted access to the API’s resources or functionality. Authentication mechanisms typically involve the exchange of credentials or tokens between the client and the API server to establish trust and validate the client’s identity. This process helps to maintain the security and integrity of the API by preventing unauthorized access and misuse of its services. There are various authentication methods commonly used in APIs:
- API-Key Based
- Basic Authentication
- User Credentials
- OAuth2
Here, we explain every API Authentication in brief:
- API-Key Based: A simple method where clients include a unique key in their requests to authenticate themselves. These keys are passed in the request headers. The most popular choice for including API keys in headers “x-api-key” is a custom header convention for passing your API key. The API key must be sent with every request.
- API Key is located on the API listing section and inside that request, you can add your API Key Manually or Auto Generated.
- Then you have to add the API Key to your postman’s headers in x-api-key’s value field.
- Basic Authentication: In this method the client or user sends a request. The request header contains the Base64-encoded username and password, seprated by a colon. When handling the request, the server decodes the login details and checks if the user can access the requested content.
- User Credentials: In this method the client provides its username and password to the API server as proof of identity. The server then verifies these credentials against its records to authenticate the client. If the provided credentials match those stored in the server’s database, the client is granted access to the API’s resources or services.
- OAuth2: OAuth2 stands for “Open Authorization 2.0“. It is the second version of the OAuth protocol, which is an open standard for access delegation commonly used for API authentication and authorization. OAuth 2.0 is a widely used authorization framework that allows applications to securely access resources on behalf of users without needing their credentials. It’s commonly used for API authentication in web and mobile applications. OAuth 2.0 uses Access Tokens. An Access Token is a piece of data that represents the authorization to access resources on behalf of the end-user.




JSON API
Introduction
JSON API is a specification for building APIs (Application Programming
Interfaces) in
JSON format. It provides guidelines for how client applications can request and
receive data from a server.
How It Works
JSON API works by defining a specific structure for API requests and responses,
allowing for consistency and ease of use. Here’s how it works:
Request:
- Endpoint: Clients make requests to specific endpoints (URLs) on the
server to retrieve or manipulate resources. For example, a client might
request
a list of articles from the â/articlesâ endpoint. - HTTP Methods: JSON API uses standard HTTP methods like GET, POST,
PATCH,
and DELETE for different operations. GET is used to retrieve data, POST to
create new resources, PATCH to update existing resources, and DELETE to
remove
resources. - Parameters: Clients can include query parameters in the request URL
to
specify filtering, sorting, pagination, sparse fieldsets, or include related
resources. For instance, clients can request only specific fields of a
resource,
or request related data to be included in the response.
- Learn more about JSON API from here.
- Also, Checkout https://jsonapi.org/ for
official documentation of JSON API.
Create JSON API
- First we have to go into our API listiing section where all the APIs are listed. Then click New to create new API showed in image below.
- Add the Name, Endpoint, Authentication, Access Control, & generate the API Key for the perticular user you want to give access to. Note: If you are not able to generate the API Key then make sure to do this following steps: Go to Configuration >> Settings >> API Key Settings >> Select Auto.
- Copy the Endpoint URL and add it to the postman request section field. After that you have to add you model name (E.G res.partner). After that you can write your query by simply adding ? after the model name.
- Add this API Key to Get Requests Header, inside key field enter X-API-Key and add the API Key in value field shown in image below.
- Add the query parameters as you required.
- After adding query parameers you can simply send the request by clicking send button.
- You will get this type of response shown in image below.





GraphQL API
Introduction
GraphQL is a query language for APIs and a runtime for executing those queries
with
existing data.
-
Declarative Data Fetching: GraphQL allows clients to request only
the
data they need and nothing more. Clients can specify the shape and
structure
of the response, reducing the over-fetching and under-fetching of data
that
often occurs in REST APIs. -
Hierarchical Structure: GraphQL queries have a hierarchical
structure,
mirroring the shape of the response data. Clients can request nested
fields,
and the server responds with a JSON object that matches the requested
structure.
How It Works
In GraphQL, queries and mutations are two types of operations used to interact
with
the API:
- Query Operation: A query in GraphQL is used to read or fetch data
from
the server. Clients can specify exactly what data they need, and the server
will
return only the requested data, no more and no less. Queries are similar to
GET
requests in REST APIs. - Mutation Operation: A mutation in GraphQL is used to modify data on
the
server. Mutations are similar to POST, PUT, PATCH, or DELETE requests in
REST
APIs. Mutations can be used for creating, updating, or deleting records.
- Learn more about GraphQl API from here.
- Also, Checkout https://graphql.org/learn/
for
official documentation of GraphQL API.
Create GraphQL API
- First we have to go into our API listiing section where all the APIs are listed. Then click New to create new API showed in image below.
- Add the Name, Endpoint, Authentication, Access Control, & generate the API Key for the perticular user you want to give access to. Note: If you are not able to generate the API Key then make sure to do this following steps: Go to Configuration >> Settings >> API Key Settings >> Select Auto.
- Copy the Endpoint URL and add it to the postman request section field. You don’t have to add any query in this field.
- Add this API Key to Post Requests Header, inside key field enter X-API-Key and add the API Key in value field shown in image below.
- Write the query as you required.
- After adding query you can simply send the request by clicking send button.
- You will get this type of response shown in image below.





API-Key Authentication
This module serves as a fundamental building block within the API Framework. To
implement API-key based authentication in your API configuration system, it is
essential to integrate this module. Keep in mind that this module is not
designed to
function independently; it relies on the API Framework Base (api_framework_base)
as
its foundation to seamlessly operate with various API authentication mechanisms.
Auth API-Key Introduction
API-Key authentication is a simple and effective way to secure your API endpoints
by
requiring clients to include an API key in the request headers. This
authentication
method ensures that only authorized users can access your API resources.
How It Works
When making a request to an API endpoint that requires authentication, clients
must
include an X-API-Key header in the HTTP request. The value of this header should
be
the API key provided to the client by the API provider.
- Learn more about Auth API-Key from here.
Api OAuth2
OAuth2 stands for “Open Authorization 2.0“. It is the second version of the OAuth protocol, which is an open standard for access delegation commonly used for API authentication and authorization. OAuth 2.0 is a widely used authorization framework that allows applications to securely access resources on behalf of users without needing their credentials. It’s commonly used for API authentication in web and mobile applications. OAuth 2.0 uses Access Tokens. An Access Token is a piece of data that represents the authorization to access resources on behalf of the end-user.
Introduction
This module include authorization-code-grant flow of OAuth2 for API.
How It Works
Auhtorization and Token Related Steps:
- First, client register redirect-uri, which is provided in api record form,
to
its respected provider. - Client has to made request to
“/<api>/oauth2/provider/authorize”
with its client_id in request-body(json), which returns
authorization_url in json-body from response - When client use this authorization_url, client has to authorize with its
respected user, after successful authorization server returns token
information,
which includes: - access_token, refresh_token, expires_in, expires_at, scope, token_type,
id_token. Note: this differs from provider - db, login
- If client wants to refresh the token & get access-token then made
request to
“/<api>/oauth2/token” with its client-id,
client-user-identity in request-body(json), which return new token
related information - If client wants to revoke the token then made request to
“/<api>/oauth2/revoke” with its client-id,
client-user-identity in request-body(json), which revoke the token
from
authorization server and also delete the client api user record. - When client want fetch api data using oauth2 method,
made
http-request using header:
Authorization: Bearer access_token_value
- If access_token in valid then it return response data. and if
access_token
invalid then client has to refresh the token or authorize the user
again.
API Resource Access Steps:
For More Details
Python Request Examples:
1. Client Authorization:
import requests import json url = "https://easyapi.ekika.app/jsonapiext/oauth2/provider/authorize" payload = json.dumps({ "client_id": "YOUR_CLIENT_ID", "client_user_identity": "YOUR_UNIQUE_CLIENT_IDENTITY" }) headers = { 'Content-Type': 'application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
2. Refresh Token:
import requests import json url = "https://easyapi.ekika.app/jsonapiext/oauth2/token" payload = json.dumps({ "client_id": "YOUR_CLIENT_ID", "client_user_identity": "YOUR_UNIQUE_CLIENT_IDENTITY" }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
3. Revoke Token:
import requests import json url = "https://easyapi.ekika.app/jsonapiext/oauth2/revoke" payload = json.dumps({ "client_id": "YOUR_CLIENT_ID", "client_user_identity": "YOUR_UNIQUE_CLIENT_IDENTITY" }) headers = { 'Content-Type''application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
- Learn more about Api Oauth2 from here.
Basic Authentication
Introduction
HTTP Basic Authentication is a simple authentication scheme built into the HTTP
protocol. It is based on challenge-response mechanism and is widely used for
securing web applications and APIs. This document provides an overview of HTTP
Basic
Authentication, how it works, and examples of how to implement it.
Format of Authorization Header
The Authorization header for HTTP Basic Authentication is constructed as follows:
Authorization: Basic base64(username:password)
The base64(username:password) is the base64 encoding of the concatenation of the
username and password, separated by a colon (:).
Headers
Key | Value |
---|---|
Authorization | Basic dXNlcm5hbWU6cGFzc3dvcmQ= |
Example
Here’s an example using cURL:
curl -X GET "https://api.example.com/resource" -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ="
Here’s an example using Python:
import requests api_url = 'https://api.example.com/resource' # Make an authenticated GET request headers = { 'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=' } response = requests.get(api_url, headers=headers)
- Learn more about Auth Basic from here.
- Also, Checkout RFC 7617 for official
documentation of “Basic” HTTP authentication.
User Authentication
Introduction
The user authentication API requests using username and password headers. By
following these instructions, developers can ensure secure communication with
the
API server.
How It Works
The user authentication works by sending a username and password in the HTTP
request
header. The server challenges the client with a 401 Unauthorized response,
indicating that authentication is required. The client then includes the
username
and password in the Authorization header of subsequent requests.
Headers
Key | Value |
---|---|
username | your-username |
password | your-password |
Example
Here’s an example using cURL:
curl -X GET -H "username: your-username" -H "password: your-password" https://api.example.com/resource
Here’s an example using Python:
import requests api_url = 'https://api.example.com/resource' # Make an authenticated GET request headers = { 'username': 'your-username', 'password': 'your-password', } response = requests.get(api_url, headers=headers)
- Learn more about Auth User Credential from here.
JSON API Get Request Overview:
A GET Request in JSON API is a request to retrieve data from a server, in here it’s retrieve data from odoo. It typically involves specifying the endpoint URL along with optional query parameters to filter or shape the response data. The response from the server is usually in JSON format, containing the requested data or an error message.
- This is the main query parameters which is mandatory to write when you are working with APIs.
- Use “HTTP Get Method” to retrieve specific record from odoo.
- Domain is specified your wesite’s domain address. The port number is optional.
- Endpoint is the specific path within the API that identifies the particular resource or action. This part of the URL tells the server what type of operation is being requested.
- Model is Odoo’s technical name of entities and also known as model name, record’s model or entities. You can identify it from the URL shown below.
- To insert query we have to add “?” after the model, so it will indicates that query parameters is starting.
- All other query parameters are included after model that you can see on next tabs.
- Headers in an API request are key-value pairs sent between the client and the server, providing additional information about the request or the client itself. They are part of the HTTP protocol and can carry various types of metadata.
- Add “Content-Type” and “x-api-key” keys with their specific values. JSON API’s media type designation is “application/vnd.api+json“. Add this in Content-Type’s value field and also add your API Key.

Get Record with ID:
- The id indicates that specific record we want to retrieve.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query fetches data for the sale.order model with ID 16 from the specified endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order/16
Output


Example(2): This JSON API query fetches data for the res.partner model with ID 14 from the specified endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/res.partner/14
Output


Get Record with Fields:
- The fields parameter is used to specify which fields of the model you want to retrieve. It’s structured as “fields[{model}]=field_name“
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query retrieves specific fields name and date_order for all sale orders from the endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?fields[sale.order]=name,date_order
Output


Example(2): This JSON API query retrieves only the name and email fields for all res partners from the specified endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/res.partner?fields[res.partner]=name,email
Output


Get Record with Pagination:
- The page number parameter specifies the page number of the records you want to retrieve. The “page[number]=1” indicates the first page.
- The page size parameter determines the number of records to be returned per page. The “page[size]=4” means that each page should contain four records.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query fetches the first page of sale orders with a page size of 4 from the specified endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?page[number]=1&page[size]=4
Output


Example(2): This JSON API query retrieves the fifth page of res partners, with each page containing 3 res partners, from the specified endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/res.partner?page[number]=5&page[size]=3
Output


Get Record with Sorting:
- The sort indicates the records to be sorts based on the specified field in ascending order sort={fields_name}. For Descending use “-“, sort=-{fields_name}.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query fetches sale orders from the endpoint demotestapi sorted by the name field in ascending order.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?sort=name
Output


Example(2): This JSON API query fetches sale orders from the endpoint demotestapi sorted primarily by the date_order field in ascending order, and then by the name field in ascending order as a secondary sorting criteria.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?sort=date_order,name
Output


Get Record with Filter:
- The filter parameter is used to specify the filtering criteria in Odoo domain notation filter={domain}.
- In Odoo domain notation, filtering conditions are represented as lists. The basic structure typically involves a combination of logical operators (AND, OR) and tuples representing field, operator, and value conditions. Using Odoo domain notation allows for advanced filtering capabilities, enabling the retrieval of specific records that meet complex criteria.
See the Example(1) with Query Parameters and Output:
Example(1): This JSON API query filters sale orders based on the conditions:
- State is either ‘sale’ or ‘cancel’.
- Team ID is either 5 or 1.
- Amount total is greater than 1000 and team ID is 1.
- Partner ID is 11 or user ID is 6.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?filter=[AND, OR, (‘state’, ‘=’, ‘sale’), OR, (‘state’, ‘=’, ‘cancel’), (‘team_id’, ‘=’, 5), OR, AND, (‘amount_total’, ‘>’, 1000), (‘team_id’, ‘=’, 1), OR, (‘partner_id’, ‘=’, 11), (‘user_id’, ‘=’, 6)]
Output


Get Record with Relational Fields:
- The fields[{model}]=field_name parameter allows the selection of specific fields from the model, including relational fields.
- Relational fields in a database model establish relationships between different entities or models. For example, in the “sale.order” model, partner_id represent a relationship with the res.partner model.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query fetches only the specified fields name, partner_id, and payment_term_id for all sale orders from the specified endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?fields[sale.order]=name,partner_id,payment_term_id
Output


Example(2): This JSON API query retrieves the specified fields name, parent_id, and child_ids for all partners from the provided endpoint demotestapi.
Query: http://api.17.dev.ekika.co/demotestapi/res.partner?fields[res.partner]=name,parent_id,child_ids
Output


Get Record with Relational Fields with Include:
- The fields[{model}]=field_name parameter allows the selection of specific fields from the model, including relational fields.
- The include parameter instructs the API to include the related data for the specified relational field in the response.
- Relational fields establish connections or relationships between different entities or models.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query fetches sale orders with fields name, partner_id, and date_order, and includes related partner information for each sale order.
Query: http://api.17.dev.ekika.co/demotestapi/sale.order?fields[sale.order]=name,partner_id,date_order&include=partner_id
Output


Example(2): This JSON API query retrieves partner data with fields name, parent_id, and child_ids, while also including information about the parent partner for each partner entry.
Query: http://api.17.dev.ekika.co/demotestapi/res.partner?fields[res.partner]=name,parent_id,child_ids&include=parent_id
Output


Get Record with Relational Fields, Include and Relational Include Data:
- The fields[{model}]=field_name parameter allows the selection of specific fields from the model, including relational fields.
- The fields[{relation_model}]=field_name parameter allows the selection of specific fields from related models.
- The include parameter instructs the API to include the related data for the specified relational field in the response.
- Relational fields establish connections or relationships between different entities or models.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query fetches sale order data with fields name, partner_id, and date_order, including partner information for each sale order with fields name and email.
Query: https://api.17.dev.ekika.co/demotestapi/sale.order?fields[sale.order]=name,partner_id,date_order&include=partner_id&fields[res.partner]=name,email



Example(2): This JSON API query retrieves sale order data with specific fields name, partner_id, order_line, and tag_ids, including related order lines and tags. Additionally, it fetches partner information with fields name and email, along with product quantity details for each order line, and tag names for each tag.
Query: https://api.17.dev.ekika.co/demotestapi/sale.order?fields[sale.order]=name,partner_id,order_line,tag_ids&include=order_line,partner_id,tag_ids&fields[res.partner]=name,email&fields[sale.order.line]=name,product_uom_qty&fields[crm.tag]=name



Get Record with Relationships Links:
- The relationship, this part of the endpoint indicates that you want to retrieve the relationship links of the specified record.
- The relational_field specifies the field within the model that represents the relationship you’re interested in. For example, partner_id or order_line.
See the Example(1) & Example(2) with Query Parameters and Output:
Example(1): This JSON API query retrieves the relationship between the sale order with ID 16 and its partner, including partner data with fields name and child_ids, and also includes information about the child partners associated with the main partner.
Query: https://api.17.dev.ekika.co/demotestapi/sale.order/16/relationships/partner_id?fields[res.partner]=name,child_ids&include=child_ids
Output


Example(2): This JSON API query retrieves the relationship between the sale order with ID 16 and its order lines, including specific fields name and product_uom_qty for each order line.
Query: https://api.17.dev.ekika.co/demotestapi/sale.order/16/relationships/order_line?fields[sale.order.line]=name,product_uom_qty
Output


Export:
- The endpoint/export exports data by returning an Excel file encoded in base64, following Odoo’s standard export format
See the Example with Query Parameters and Output:
Example: This JSON API query enables users to retrieve Excel export data from the server. The endpoint requires a JSON body formatted per Odoo’s standards to specify data selection and export format.
Query: https://api.17.dev.ekika.co/demotestapi/export



JSON Body:
{ "import_compat": false, "context": { "lang": "en_US", "tz": "Asia/Calcutta", "uid": 2, "allowed_company_ids": [ 1 ] }, "domain": [ [ "user_id", "=", 2 ] ], "fields": [ { "name": "name", "label": "Order Reference", "type": "char" }, { "name": "display_name", "label": "Display Name", "type": "char" }, { "name": "activity_ids", "label": "Activities", "type": "one2many" }, { "name": "create_date", "label": "Creation Date", "type": "datetime" }, { "name": "partner_id", "label": "Customer", "type": "many2one" }, { "name": "user_id", "label": "Salesperson", "type": "many2one" }, { "name": "user_id/name", "label": "Salesperson/Name", "type": "char" }, { "name": "state", "label": "Status", "type": "selection" }, { "name": "amount_total", "label": "Total", "type": "monetary" } ], "groupby": [], "ids": [ 20, 19, 14, 13, 7, 6, 4 ], "model": "sale.order" }
Method Execution:
In JSON-based APIs, method execution refers to calling a server-side function or method on the server to perform a specific action. Method execution is often done through POST or PUT requests, which carry instructions to the server in a JSON format, allowing direct interaction with the backend’s functionality
See the Example with Query & Output:
Example: This JSON API query executes the action_confirm method, and change the quotation from quotation state to confirm state.
Query: https://api.17.dev.ekika.co/demotestapi/sale.order/25/execute



{ "data": { "method": "action_confirm", "kwargs":{} } }
Fields Get:
In JSON API this query retrieves metadata about the fields of the res.partner model using the fields_get method.
See the Example with Query & Output:
Example: This JSON API query retrieves metadata about the fields of the res.partner model using the fields_get method.

{ "data": { "method": "fields_get", "kwargs": { "attributes": ["type", "string"] } } }
Check Access Rights:
In JSON API, the check_access_rights method verifies whether a user has the necessary permissions to perform specific actions on a model. In Odoo, this method ensures that the current user has the appropriate rights to interact with the specified resource.
See the Example with Query & Output:
Example: This JSON API query checks the user’s access rights for the res.partner model.

{ "data": { "method": "check_access_rights", "kwargs": { "operation": "read" } } }
Report:
- The endpoint /report gives data by returning PDF/TEXT/HTML file encoded in base64, following Odoo’s standard report format
See the Example with Query Parameters and Output:
Example: This JSON API query enables users to give data in PDF/TEXT/HTML format from the server.
Query: https://api.17.dev.ekika.co/demotestapi/report

{ "converter": "pdf", "report_ref": "sale.report_saleorder", "res_ids": [6, 7], "data": {} }
Context:
In JSON API, you can provide context as a standard odoo.
See the Example with Query & Output:


JSON API Create Request Overview:
A POST Request in a JSON API is a way to send data to odoo to create a new resource. In a POST request, the data to be created is typically sent in the body of the request in JSON format.
- This is the main query parameters which is mandatory to write when you are working with APIs.
- Use “HTTP POST Method” to create records in odoo.
- Domain is specified your wesite’s domain address. The port number is optional.
- Endpoint is the specific path within the API that identifies the particular resource or action. This part of the URL tells the server what type of operation is being requested.
- Model is Odoo’s technical name of entities and also known as model name, record’s model or entities. You can identify it from the URL shown below.
- In Post Request Method you don’t have to write any query parameters in the request field like in Get Request Method, you simply write the queries in JSON Format in the body field.
- Headers in an API request are key-value pairs sent between the client and the server, providing additional information about the request or the client itself. They are part of the HTTP protocol and can carry various types of metadata.
- Add “Content-Type” and “x-api-key” keys with their specific values. JSON API’s media type designation is “application/vnd.api+json“. Add this in Content-Type’s value field and also add your API Key.

Odoo’s ORM (Object-Relational Mapping) & Field Types:
Odoo’s ORM (Object-Relational Mapping) system allows you to define relationships between different models in your application. These relationships can be established using many2many, many2one, and one2many fields.
- One2many: A one2many field creates a one-to-many relationship between the current model and another model. This means a single record of the current model is linked to multiple records of another model. It is defined as the inverse of a many2one field.
- Many2one: A many2one field creates a many-to-one relationship between the current model and another model. This means multiple records of the current model can be linked to a single record of another model. It is essentially a foreign key.
- Many2many: A many2many field creates a many-to-many relationship between two models. This means multiple records of the current model can be linked to multiple records of another model. This relationship is usually managed through a join table.
Create Record with attributes:
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Demo Corporation Pvt Ltd.", "email": "demo@mail.com" "mobile": "1020304050", "company_type": "company", } } }
Example(1): This JSON API query Creates new res.partner with mentioned attributes like name, email, mobile, and company type.
Output


Create Record with relationship One2many Field:
- Relationships: Defines any related resources associated with the partner entity being created. In this case, there is a relationship named “bank_ids” representing the bank accounts associated with the partner entity.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Demo Corporation Pvt Ltd.", "email": "demo@mail.com", "mobile": "1020304050", "company_type": "company" }, "relationships": { "bank_ids":{ "data": [ { "type": "res.partner.bank", "attributes": { "sequence": 10, "bank_id": 2, "acc_number": "11212121212", "allow_out_payment": true, "acc_holder_name": false } } ] } } } }
Example(1): This request is structured according to JSON API conventions, facilitating the creation of a partner entity with associated bank accounts in a standardized manner.
Output


Create Record with relationship Many2One Field:
- Relationships: Defines any related resources associated with the partner entity being created. In this case, there is a relationship named “user_id” representing the user accounts associated with the partner entity.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Demo Corporation Pvt Ltd.", "email": "demo@mail.com", "mobile": "1020304050", "company_type": "company" }, "relationships": { "user_id": { "data": { "type": "res.users", "id": 2 } } } } }
Example(1): This request is structured according to JSON API conventions, facilitating the creation of a partner entity with associated user accounts in a standardized manner.
Output


Create Record with relationship Many2Many Field:
- Relationships: Defines any related resources associated with the partner entity being created. In this case, there is a relationship named “category_id” representing the categories associated with the partner entity.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Demo Corporation Pvt Ltd.", "email": "demo@mail.com", "mobile": "1020304050", "company_type": "company" }, "relationships": { "category_id": { "data": [ { "type": "res.partner.category", "id": "4" }, { "type": "res.partner.category", "id": "5" } ] } } } }
Example(1): This request is structured according to JSON API conventions, facilitating the creation of a partner entity with associated categories in a standardized manner.
Output


Create Record with Odoo’s field types “One2Many”, “Many2One”, and “Many2Many” together:
- Use odoo field types, “One2Many“, “Many2One“, and “Many2Many” all in 1 request.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Jannie wills", "email": "jannie@mail.com", "mobile": "1002003005" "function": "CTO", "city": "London", "street": "London st139" }, "relationships": { "bank_ids":{ "data": [ { "type": "res.partner.bank", "attributes": { "sequence": 20, "bank_id": 2, "acc_number": "1230321", "allow_out_payment": true, "acc_holder_name": true } } ] }, "user_id": { "data": { "type": "res.users", "id": 2 } }, "category_id": { "data": [ { "type": "res.partner.category", "id": "4" }, { "type": "res.partner.category", "id": "5" } ] } } } }
Example(1): This request is structured according to JSON API conventions, facilitating the creation of a partner entity with associated Bank Accounts as One2many in a standardized manner and also a Sales Person assign to it as “Many2one” field type, and gave multile Tags to that person as “Many2many” field type.
Output


Record’s created in dashboard.
Output


Date & Time format in Odoo:
- In Odoo, date fields are used to store date and datetime values in the models. These fields are essential for tracking and managing time-related data, such as order dates, due dates, creation dates, etc. Odoo provides specific field types to handle date and datetime data effectively.
- By default Odoo handles time zones by storing all datetime values in the database in Coordinated Universal Time (UTC).
How Odoo Handles Time Zones?
- Storage in UTC:
- All datetime values are stored in UTC in the database. This approach ensures a single, consistent time reference.
- Conversion to User’s Local Time Zone:
- When a datetime value is displayed to a user, Odoo automatically converts it from UTC to the user’s local time zone. The user’s time zone can be set in their preferences.
- Setting User Time Zone:
- Each user in Odoo can have their own time zone setting. This can be configured in the user’s preferences under the “Preferences” menu.
Query:
{ "data": { "type": "sale.order", "attributes": { "date_order": "2023-06-12 10:22:57" }, "relationships": { "partner_id": { "data": { "type": "res.partner", "id": "80" } }, "tag_ids": { "data": [ { "type": "crm.tags", "id": "2" }, { "type": "crm.tags", "id": "1" } ] }, "order_line": { "data": [ { "type": "sample", "attributes": { "product_id": "36", "product_uom_qty": 6, "price_unit": "650.50" } }, { "type": "sample", "attributes": { "product_id": "16", "product_uom_qty": 3, "price_unit": "680.75" } } ] } } } }
This JSON request is designed to create a new sale.order record in Odoo. It includes:
- The order date and time.
- A relationship to a customer (res.partner with ID 80).
- Associations with two tags (crm.tags with IDs 2 and 1).
- Two order lines, each specifying product details, quantities, and prices.
For better understanding, we added the example images below.
Output


You can see that in below image, we add the time 10:22:57 when writing the query, and it is showing the time 03:52:57 as the timezone which selected by us(IST). So, Odoo takes the time as UTC timezone.

Selection Field in Odoo:
- Selection fields in Odoo are fields that allow users to choose from a predefined list of options.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Maggie", "email": "maggie@mail.com", "mobile": "1002003005", "function": "CTO", "city": "London", "street": "London st139", "ubl_cii_format": "ubl_bis3" } } }
We added the example images below for better understanding.
Note: Write the Key of the specific values in query while you are creating a new record. Refer the query parameters image.
Output


Below is the created record image which shows the selection field options list. You can add the option diectly while creating a new record, just make sure to write the Key Field in the query not the value.

Context:
In JSON API, you can provide context as a standard odoo.
See the Example with Query & Output:


JSON API Update Request Overview:
A Update Request JSON API is used to modify existing resources on odoo. This typically involves sending an HTTP PATCH request to the API endpoint demotestapi that corresponds to the resource you want to update.
- This is the main query parameters which is mandatory to write when you are working with APIs.
- Use “HTTP PATCH Method” to update the records in odoo.
- Domain is specified your wesite’s domain address. The port number is optional.
- Endpoint is the specific path within the API that identifies the particular resource or action. This part of the URL tells the server what type of operation is being requested.
- Model is Odoo’s technical name of entities and also known as model name, record’s model or entities. You can identify it from the URL shown below.
- In PATCH Request Method you have to write some query parameters in the request field like in Get Request Method, you will learn about that in next tabs when you move forwad in this documentation.
- Headers in an API request are key-value pairs sent between the client and the server, providing additional information about the request or the client itself. They are part of the HTTP protocol and can carry various types of metadata.
- Add “Content-Type” and “x-api-key” keys with their specific values. JSON API’s media type designation is “application/vnd.api+json“. Add this in Content-Type’s value field and also add your API Key.

Odoo’s ORM (Object-Relational Mapping) & Field Types:
Odoo’s ORM (Object-Relational Mapping) system allows you to define relationships between different models in your application. These relationships can be established using many2many, many2one, and one2many fields.
- One2many: A one2many field creates a one-to-many relationship between the current model and another model. This means a single record of the current model is linked to multiple records of another model. It is defined as the inverse of a many2one field.
- Many2one: A many2one field creates a many-to-one relationship between the current model and another model. This means multiple records of the current model can be linked to a single record of another model. It is essentially a foreign key.
- Many2many: A many2many field creates a many-to-many relationship between two models. This means multiple records of the current model can be linked to multiple records of another model. This relationship is usually managed through a join table.
Update Record with Attributes:
Here, we already created a res partner ID 96, in which we are going to perform update records query to upadate the records.
Query:
{ "data": { "type": "res.partner", "id": 96, "attributes": { "name": "Joey Tribbiani", "email": "Joey@mail.com", "mobile": 1299129900, "city": "Gandhinagar", "website": "http://www.demosite.com", "function": "CTO" } } }
Example(1): This JSON object represents a PATCH request to update the details of a specific resource ID 96 in an API that uses the JSON.
Output


- We created a res partner. Then we add the data of that person with the id which is assign to that person, in this case it’s ID 96.
- The request changes several attributes of this partner, such as their name, email, mobile number, city, website, and function showed in below image.

Update Record with relationship One2many Field:
- Relationships: Defines any related resources associated with the partner entity being updated. In this case, there is a relationship named “bank_ids” representing the bank accounts associated with the partner entity.
Query:
{ "data": { "type": "res.partner", "id": 96, "attributes": { "name": "Joey Tribbiani", "email": "Joey@mail.com", "mobile": 1299129900, "city": "Gandhinagar", "website": "http://www.demosite.com", "function": "CTO" }, "relationships": { "bank_ids":{ "data": [ { "type": "res.partner.bank", "attributes": { "sequence": 10, "bank_id": 2, "acc_number": "23002300", "allow_out_payment": true, "acc_holder_name": true } } ] } } } }
Example(1): This request is update the bank account details of the user with ID 96.
Query after update record


- The request changes the relationship data of related bank account details of the person showed in below images.
Account number after updated


Update Record with relationship Many2One Field:
- Relationships: Defines any related resources associated with the partner entity being updated In this case, there is a relationship named “user_id” representing the user accounts associated with the partner entity.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Joey Tribbiani", "email": "Joey@mail.com", "mobile": 1299129900, "city": "Gandhinagar", "website": "http://www.demosite.com", "function": "CTO" }, "relationships": { "user_id": { "data": { "type": "res.users", "id": 1 } } } } }
Example(1): This request is update the sales person of the user with ID 96.
Query after update record


- The request changes the relationship data of related sales person details of the person showed in below images.
Sales person after updated


Update Record with relationship Many2Many Field:
- Relationships: Defines any related resources associated with the partner entity being updated. In this case, there is a relationship named “category_id” representing the categories associated with the partner entity.
Query:
{ "data": { "type": "res.partner", "attributes": { "name": "Joey Tribbiani", "email": "Joey@mail.com", "mobile": 1299129900, "city": "Gandhinagar", "website": "http://www.demosite.com", "function": "CTO" }, "relationships": { "category_id": { "data": [ { "type": "res.partner.category", "id": "3" }, { "type": "res.partner.category", "id": "6" } ] } } } }
Example(1): This request is update the tags field value of the user with ID 96.
Query after update record


- The request changes the tag values details of the person showed in below images.
Tags after updated


Update Record with Odoo’s field types “One2Many”, “Many2One”, and “Many2Many” together:
- Use odoo field types, “One2Many“, “Many2One“, and “Many2Many” all in 1 request.
Query:
{ "data": { "type": "res.partner", "id": 96, "attributes": { "name": "Joey Tribbiani", "email": "Joeyupdated@mail.com", "mobile": 1299129900, "city": "Ahmedabad", "website": "http://www.demosite.com", "function": "CFO" }, "relationships": { "bank_ids":{ "data": [ { "type": "res.partner.bank", "attributes": { "sequence": 20, "bank_id": 1, "acc_number": "999000999", "allow_out_payment": true, "acc_holder_name": true } } ] }, "user_id": { "data": { "type": "res.users", "id": 1 } }, "category_id": { "data": [ { "type": "res.partner.category", "id": "4" }, { "type": "res.partner.category", "id": "5" } ] } } } }
Example(1): This request is structured according to JSON API conventions, facilitating the updation of a partner entity with associated Bank Accounts as One2many type in a standardized manner and also a Sales Person assign to it as “Many2one” field type, and gave multile Tags to that person as “Many2many” field type.
Query Parameters Continued


This is the all changes which is made through this PATCH Request. Refer the images below.


JSON API Delete Request:
A Delete Request in JSON API is used to remove a resource from odoo. This typically involves sending an HTTP DELETE request to the API endpoint corresponding to the resource you want to delete.
- This is the main query parameters which is mandatory to write when you are working with APIs.
- Use “HTTP DELETE Method” to delete the records in odoo.
- Domain is specified your wesite’s domain address. The port number is optional.
- Endpoint is the specific path within the API that identifies the particular resource or action. This part of the URL tells the server what type of operation is being requested.
- Model is Odoo’s technical name of entities and also known as model name, record’s model or entities. You can identify it from the URL shown below.
- ID indicates that specific record we want to delete.
- Headers in an API request are key-value pairs sent between the client and the server, providing additional information about the request or the client itself. They are part of the HTTP protocol and can carry various types of metadata.
- Add “Content-Type” and “x-api-key” keys with their specific values. JSON API’s media type designation is “application/vnd.api+json“. Add this in Content-Type’s value field and also add your API Key.

This is the query in below image shows the query of specific record you want to delete from odoo & the header section also.

Request:
- Endpoint: Clients make requests to specific endpoints (URLs) on the server to retrieve or manipulate resources. For example, a client might request a list of articles from the “/articles” endpoint.
- HTTP Methods: JSON API uses standard HTTP methods like GET, POST, PATCH, and DELETE for different operations. GET is used to retrieve data, POST to create new resources, PATCH to update existing resources, and DELETE to remove resources.
- Parameters: Clients can include query parameters in the request URL to specify filtering, sorting, pagination, sparse fieldsets, or include related resources. For instance, clients can request only specific fields of a resource, or request related data to be included in the response.
Example of a JsonAPI Requests:
- GET Requests:
- Sparse Fieldsets: Get sale.order with only the “name”, “partner_id”, “date_order” fields included in the response.
GET /sale.order?fields[sale.order]=name,partner_id,date_order
- Including Related Resources: Get sale.order and include the related partner_id in the response.
/sale.order?fields[sale.order]=partner_id&include=partner_id
- Pagination: Get the second page of sale.order with 5 records per page.
GET /sale.order?page[number]=2&page[size]=5
- Sort: Get sale.order sorted by their date_order in descending order.
GET /sale.order?sort=-date_order
- Filter: Get sale.order filter by standard odoo domain, consider below example.
GET /sale.order?filter=[AND, OR, ('state', '=', 'sale'), OR, ('state', '=', 'cancel'), ('team_id', '=', 5), OR, AND, ('amount_total', '>', 1000), ('team_id', '=', 1), OR, ('partner_id', '=', 11), ('user_id', '=', 6)]
Get Records
JSON API Query Parameters Explanation:
JSON API is a specification for building APIs in JSON. This query is a set of parameters used in a JSON API request. These parameters define how the API should respond and what data should be included.
- fields[res.partner]: Specifies the fields to include for the res.partner resource. This includes fields like name, is_company, email, phone, country_id, user_id, and company_id.
- fields[res.country]: Specifies the fields to include for the res.country resource. This includes fields like name and code.
- fields[res.users]: Specifies the fields to include for the res.users resource. This includes fields like name and active.
- fields[res.company]: Specifies the fields to include for the res.company resource. This includes the field name.
- Include Parameter: include: Specifies related resources to include along with the primary resource. In this case, it includes related resources like country_id, user_id, and company_id.
- Pagination Parameters: page[number]: Specifies the page number of the result set. In this case, it’s page number 1. page[size]: Specifies the number of items per page. In this case, it’s 5 items per page.
- Sorting Parameter: sort: Specifies the sorting order for the result set. The hyphen (-) before id indicates descending order. So, it sorts by name in ascending order and then by id in descending order.
- Filtering Parameter: filter: Specifies the filter criteria to apply to the result set. In this case, it filters records where the field is_company is equal to true.
- In summary, these parameters define how to fetch and manipulate data from the API, including which fields to include, which related resources to include, how to paginate the results, how to sort them, and how to filter them.
Headers Explanation:
These headers are used in a JSON API request to specify the format of the data being sent and to provide authentication information.
- Content-Type: Specifies the format of the data being sent in the request body. In this case, it indicates that the data is in JSON API format (application/vnd.api+json).
- x-api-key: Provides authentication information. It likely contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
GET
https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?
{..query params..}
fields[res.partner] | name,is_company,email,phone,country_id,user_id,company_id |
---|---|
fields[res.country] | name,code |
fields[res.users] | name,active |
include | country_id,user_id,company_id |
fields[res.company] | name |
page[number] | 1 |
page[size] | 5 |
sort | name,-id |
filter | [(‘is_company’, ‘=’, true)] |
Headers
Key | Value |
---|---|
Content-Type | application/vnd.api+json |
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{
"meta": {
"version": "1.1",
"author-info": {
"author": "Jane DOE",
"author-email": "jane@ekika.co"
},
"documentation-link": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": [
{
"type": "res.partner",
"id": 14,
"attributes": {
"name": "Azure Interior",
"is_company": true,
"email": "azure.Interior24@example.com",
"phone": "(870)-931-0505"
},
"relationships": {
"country_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14/relationships/country_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14/country_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": {
"type": "res.country",
"id": 233
}
},
"user_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14/relationships/user_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14/user_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
},
"company_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14/relationships/company_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14/company_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
}
},
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/14"
}
},
{
"type": "res.partner",
"id": 10,
"attributes": {
"name": "Deco Addict",
"is_company": true,
"email": "deco_addict@yourcompany.example.com",
"phone": "(603)-996-3829"
},
"relationships": {
"country_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10/relationships/country_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10/country_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": {
"type": "res.country",
"id": 233
}
},
"user_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10/relationships/user_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10/user_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
},
"company_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10/relationships/company_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10/company_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
}
},
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/10"
}
},
{
"type": "res.partner",
"id": 1,
"attributes": {
"name": "EKIKA",
"is_company": true,
"email": "anand@ekika.co",
"phone": "+91 9510031431"
},
"relationships": {
"country_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1/relationships/country_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1/country_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": {
"type": "res.country",
"id": 233
}
},
"user_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1/relationships/user_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1/user_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
},
"company_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1/relationships/company_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1/company_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
}
},
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/1"
}
},
{
"type": "res.partner",
"id": 56,
"attributes": {
"name": "Ekika Corporation New",
"is_company": true,
"email": "hello@ekika.co",
"phone": "5554444555444"
},
"relationships": {
"country_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56/relationships/country_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56/country_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
},
"user_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56/relationships/user_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56/user_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
},
"company_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56/relationships/company_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56/company_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
}
},
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/56"
}
},
{
"type": "res.partner",
"id": 11,
"attributes": {
"name": "Gemini Furniture",
"is_company": true,
"email": "gemini_furniture@fake.geminifurniture.com",
"phone": "(941)-284-4875"
},
"relationships": {
"country_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11/relationships/country_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11/country_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": {
"type": "res.country",
"id": 233
}
},
"user_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11/relationships/user_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11/user_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
},
"company_id": {
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11/relationships/company_id",
"related": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11/company_id",
"describedby": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": null
}
},
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/11"
}
}
],
"included": [
{
"type": "res.country",
"id": 233,
"attributes": {
"name": "United States",
"code": "US"
},
"relationships": {},
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.country/233"
}
}
],
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]",
"first": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]",
"prev": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]",
"next": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=2&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]",
"last": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=2&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]"
}
}
curl --location --globoff 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]' \ --header 'Content-Type: application/vnd.api+json' \ --header 'x-api-key: {Your API-Key}'
import requests import json url = "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?" \ "fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id" \ "&fields[res.country]=name,code&fields[res.users]=name,active" \ "&include=country_id,user_id,company_id&fields[res.company]=name" \ "&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]" payload = {} headers = { 'Content-Type': 'application/vnd.api+json', 'x-api-key': '{Your API-Key}' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'Content-Type' => 'application/vnd.api+json', 'x-api-key' => '{Your API-Key}' ]; $request = new Request('GET', 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]', $headers); $res = $client->sendAsync($request)->wait(); echo $res->getBody(); ?php
const myHeaders = new Headers(); myHeaders.append("Content-Type", "application/vnd.api+json"); myHeaders.append("x-api-key", "{Your API-Key}"); const requestOptions = { method: "GET", headers: myHeaders, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]") .header("Content-Type", "application/vnd.api+json") .header("x-api-key", "{Your API-Key}") .asString();
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]" method := "GET" client := &http.Client { } req, err := http.NewRequest(method, url, nil) if err != nil { fmt.Println(err) return } req.Header.Add("Content-Type", "application/vnd.api+json") req.Header.Add("x-api-key", "{Your API-Key}") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'Content-Type': 'application/vnd.api+json', 'x-api-key': '{Your API-Key}' }; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]', options: Options( method: 'GET', headers: headers, ), ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Create Records
JSON API Query Parameters Explanation:
This request is used to create a new res.partner resource with specified attributes and relationships, including its categories and bank accounts.
- type: res.partner: Indicates the type of resource being created, which is a res.partner.
- attributes: active: Boolean indicating whether the partner is active.
- attributes: name: Name of the partner (e.g., “Ekika Corporation”).
- attributes: company_type: Type of the company, in this case, it’s set to “company”.
- attributes: city, street, zip: Address details.
- attributes: comment: Additional comments or notes.
- attributes: phone, mobile, email: Contact information.
- attributes: website: Website URL.
- relationships: category_id: Represents the relationship between the new partner and its categories. Each category is represented as an object with a type and an id. This specifies which categories the partner belongs to. In this case, it belongs to categories with IDs 4 and 3.
- relationships: bank_ids: Represents the relationship between the new partner and its bank accounts. Each bank account is represented as an object with a type and an attributes object containing details such as sequence, bank_id, acc_number, allow_out_payment, and acc_holder_name.
Headers Explanation:
These headers are used in a JSON API request to specify the format of the data being sent and to provide authentication information.
- Content-Type: Specifies the format of the data being sent in the request body. In this case, it indicates that the data is in JSON API format (application/vnd.api+json).
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
GET
https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?
{..query params..}
{
"data": {
"type": "res.partner",
"attributes": {
"active": true,
"name": "Ekika Corporation",
"company_type": "company",
"city": "Gandhinagar",
"street": "Gandhinagar",
"zip": "382421",
"comment": "<p>Comment Here</p>",
"phone": "5554444555444",
"mobile": "1010101",
"website": "http://www.ekika.co",
"email": "hello@ekika.co"
},
"relationships": {
"category_id": {
"data": [
{
"type": "res.partner.category",
"id": "4"
},
{
"type": "res.partner.category",
"id": "3"
}
]
},
"bank_ids":{
"data": [
{
"type": "res.partner.bank",
"attributes": {
"sequence": 10,
"bank_id": 2,
"acc_number": "11212121212",
"allow_out_payment": true,
"acc_holder_name": false
}
},
{
"type": "res.partner.bank",
"attributes": {
"sequence": 11,
"bank_id": 3,
"acc_number": "3434343434343434",
"allow_out_payment": true,
"acc_holder_name": false
}
}
]
}
}
}
}
Headers
Key | Value |
---|---|
Content-Type | application/vnd.api+json |
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{
"meta": {
"version": "1.1",
"author-info": {
"author": "Jane DOE",
"author-email": "jane@ekika.co"
},
"documentation-link": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": {
"type": "res.partner",
"attributes": {
"active": true,
"name": "Ekika Corporation",
"company_type": "company",
"city": "Gandhinagar",
"street": "Gandhinagar",
"zip": "382421",
"comment": "<p>Comment Here</p>",
"phone": "5554444555444",
"mobile": "1010101",
"website": "http://www.ekika.co",
"email": "hello@ekika.co"
},
"relationships": {
"category_id": {
"data": [
{
"type": "res.partner.category",
"id": "4"
},
{
"type": "res.partner.category",
"id": "3"
}
]
},
"bank_ids": {
"data": [
{
"type": "res.partner.bank",
"attributes": {
"sequence": 10,
"bank_id": 2,
"acc_number": "11212121212",
"allow_out_payment": true,
"acc_holder_name": false
}
},
{
"type": "res.partner.bank",
"attributes": {
"sequence": 11,
"bank_id": 3,
"acc_number": "3434343434343434",
"allow_out_payment": true,
"acc_holder_name": false
}
}
]
}
},
"id": 70,
"links": {
"self": "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner/70"
}
},
"included": [],
"links": {}
}
curl --location --globoff 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]' \ --header 'Content-Type: application/vnd.api+json' \ --header 'x-api-key: {Your API-Key}'
import requests import json url = "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?" \ "fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id" \ "&fields[res.country]=name,code&fields[res.users]=name,active" \ "&include=country_id,user_id,company_id&fields[res.company]=name" \ "&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]" payload = {} headers = { 'Content-Type': 'application/vnd.api+json', 'x-api-key': '{Your API-Key}' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'Content-Type' => 'application/vnd.api+json', 'x-api-key' => '{Your API-Key}' ]; $request = new Request('GET', 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]', $headers); $res = $client->sendAsync($request)->wait(); echo $res->getBody(); ?php
const myHeaders = new Headers(); myHeaders.append("Content-Type", "application/vnd.api+json"); myHeaders.append("x-api-key", "{Your API-Key}"); const requestOptions = { method: "GET", headers: myHeaders, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]") .header("Content-Type", "application/vnd.api+json") .header("x-api-key", "{Your API-Key}") .asString();
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]" method := "GET" client := &http.Client { } req, err := http.NewRequest(method, url, nil) if err != nil { fmt.Println(err) return } req.Header.Add("Content-Type", "application/vnd.api+json") req.Header.Add("x-api-key", "{Your API-Key}") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'Content-Type': 'application/vnd.api+json', 'x-api-key': '{Your API-Key}' }; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]', options: Options( method: 'GET', headers: headers, ), ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Update Records
JSON API Query Parameters Explanation:
This request is used to update the attributes of the res.partner resource with ID 70, including its contact details, address, and other information.
- type: res.partner: Indicates the type of resource being updated, which is a res.partner.
- id: 70: Specifies the ID of the resource to be updated, in this case, the partner with ID 70.
- attributes: active: Boolean indicating whether the partner is active.
- attributes: name: Name of the partner (e.g., “Ekika Corporation”).
- attributes: company_type: Type of the company, in this case, it’s set to “company”.
- attributes: city, street, zip: Address details.
- attributes: comment: Additional comments or notes.
- attributes: phone, mobile, email: Contact information.
- attributes: website: Website URL.
- relationships: category_id: Represents the relationship between the partner and its categories. data:: Indicates that there are no categories associated with this partner.
- relationships: bank_ids: Represents the relationship between the partner and its bank accounts. data:: Indicates that there are no bank accounts associated with this partner.
- Overall, this request is used to update the attributes of the res.partner resource with ID 70, including its contact details, address, and other information. It also specifies that the partner has no associated categories or bank accounts.
Headers Explanation:
These headers are used in a JSON API request to specify the format of the data being sent and to provide authentication information.
- Content-Type: Specifies the format of the data being sent in the request body. In this case, it indicates that the data is in JSON API format (application/vnd.api+json).
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
GET
https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?
{..query params..}
{
"data": {
"type": "res.partner",
"id": 70,
"attributes": {
"active": true,
"name": "Ekika Corporation Pvt Ltd.",
"company_type": "company",
"city": "Gandhinagar",
"street": "Gandhinagar",
"zip": "000000",
"comment": "<p>Comment Here</p>",
"phone": "5554444555444",
"mobile": "1010101",
"website": "http://www.ekika.co",
"email": "hello@ekika.co"
},
"relationships": {
"category_id": {
"data": []
},
"bank_ids":{
"data": []
}
}
}
}
Headers
Key | Value |
---|---|
Content-Type | application/vnd.api+json |
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{
"meta": {
"version": "1.1",
"author-info": {
"author": "Jane DOE",
"author-email": "jane@ekika.co"
},
"documentation-link": "https://api.17.dev.ekika.co/web#id=13&cids=1&menu_id=98&action=152&active_id=25&model=easy.jsonapi.doc&view_type=form"
},
"data": {
"type": "res.partner",
"id": 70,
"attributes": {
"active": true,
"name": "Ekika Corporation Pvt Ltd.",
"company_type": "company",
"city": "Gandhinagar",
"street": "Gandhinagar",
"zip": "000000",
"comment": "<p>Comment Here</p>",
"phone": "5554444555444",
"mobile": "1010101",
"website": "http://www.ekika.co",
"email": "hello@ekika.co"
},
"relationships": {
"category_id": {
"data": []
},
"bank_ids": {
"data": []
}
}
},
"included": [],
"links": {}
}
curl --location --globoff 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]' \ --header 'Content-Type: application/vnd.api+json' \ --header 'x-api-key: {Your API-Key}'
import requests import json url = "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?" \ "fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id" \ "&fields[res.country]=name,code&fields[res.users]=name,active" \ "&include=country_id,user_id,company_id&fields[res.company]=name" \ "&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]" payload = {} headers = { 'Content-Type': 'application/vnd.api+json', 'x-api-key': '{Your API-Key}' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'Content-Type' => 'application/vnd.api+json', 'x-api-key' => '{Your API-Key}' ]; $request = new Request('GET', 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]', $headers); $res = $client->sendAsync($request)->wait(); echo $res->getBody(); ?php
const myHeaders = new Headers(); myHeaders.append("Content-Type", "application/vnd.api+json"); myHeaders.append("x-api-key", "{Your API-Key}"); const requestOptions = { method: "GET", headers: myHeaders, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]") .header("Content-Type", "application/vnd.api+json") .header("x-api-key", "{Your API-Key}") .asString();
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name%2Cis_company%2Cemail%2Cphone%2Ccountry_id%2Cuser_id%2Ccompany_id&fields[res.country]=name%2Ccode&fields[res.users]=name%2Cactive&include=country_id%2Cuser_id%2Ccompany_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name%2C-id&filter=[(%27is_company%27%2C%20%27%3D%27%2C%20true)]" method := "GET" client := &http.Client { } req, err := http.NewRequest(method, url, nil) if err != nil { fmt.Println(err) return } req.Header.Add("Content-Type", "application/vnd.api+json") req.Header.Add("x-api-key", "{Your API-Key}") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'Content-Type': 'application/vnd.api+json', 'x-api-key': '{Your API-Key}' }; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-jsonapi-apikey/res.partner?fields[res.partner]=name,is_company,email,phone,country_id,user_id,company_id&fields[res.country]=name,code&fields[res.users]=name,active&include=country_id,user_id,company_id&fields[res.company]=name&page[number]=1&page[size]=5&sort=name,-id&filter=[('is_company', '=', true)]', options: Options( method: 'GET', headers: headers, ), ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
GraphQL API Get Request Overview:
A GraphQL query is used to fetch specific data from a server, like retrieving records from Odoo. Instead of specifying an endpoint, you define the fields and data structure in the query, allowing precise control over the response. The server returns only the requested fields in JSON format or an error message.
- This is the main query parameters which is mandatory to write when you are working with APIs.
- Use “HTTP Get Method” to retrieve specific record from odoo.
- Domain is specified your wesite’s domain address. The port number is optional.
- Endpoint is the specific path within the API that identifies the particular resource or action. This part of the URL tells the server what type of operation is being requested.
- Model is Odoo’s technical name of entities and also known as model name, record’s model or entities. You can identify it from the URL shown below.
- Headers in an API request are key-value pairs sent between the client and the server, providing additional information about the request or the client itself. They are part of the HTTP protocol and can carry various types of metadata.
- Add “Content-Type” and “x-api-key” keys with their specific values. GraphQL API’s media type designation is “application/json“. Add this in Content-Type’s value field and also add your API Key.
- Variables are defined separately from the query itself and are typically passed as a JSON object when executing the query. GraphQL supports passing variables in formats other than JSON, although JSON is the most common format used in practice.

Get Records:
See the Example with Query, Variables & Output:


query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) { ResPartner( offset: $offset limit: $limit order: $order domain: $domain ) { id name phone email is_company country_id{ name code } user_id{ name active } company_id{ name } } }
{ "offset": 0, "limit": 6, "order": "name,id desc", "domain": [["is_company","=",true]] }
- offset: 0: This sets the offset to 0, meaning that the query will start fetching records from the beginning.
- limit: 6: This sets the limit to 6, indicating that the query should return a maximum of 6 records.
- order: “name,id decs”: This means “order the data by name, and if names are the same, order them by id in descending order.
- domain: This means “filter the data to include only records where the ‘is_company’ field is equal to true.”
Get Single Record:
See the Example with Query & Output:


query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) { ResPartner( offset: $offset limit: $limit order: $order domain: $domain ) { id name phone email is_company country_id{ name code } user_id{ name active } company_id{ name } } }
Create Record:
Mutation Create: A mutation in GraphQL is a type of request used to modify data on the server. It’s often used to perform operations such as creating, updating, or deleting data. Unlike queries, which are used for fetching data, mutations are used for making modifications to the data.
See the Example with Query & Output:



mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: "Ekika Corporation New", category_id: [4, 3] company_type: "company", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: "11212121212", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: "3434343434343434", allow_out_payment: true, acc_holder_name: false }] ] city: "Gandhinagar", street: "Gandhinagar", street2: "", zip: "382421", comment: "<p>Comment Here</p>", phone: "5554444555444", mobile: "1010101", website: "http://www.ekika.co", email: "hello@ekika.co", } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }
Update Records:
See the Example with Query & Output:


query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) { ResPartner( offset: $offset limit: $limit order: $order domain: $domain ) { id name phone email is_company country_id{ name code } user_id{ name active } company_id{ name } } }
Delete Records:
See the Example with Query & Output:


mutation Delete { deleteResPartner: ResPartner( id: 50, ) }
Exports:
See the Example with Query & Output:
Example: This GraphQL API query enables users to retrieve Excel export data from the server.



Query:
query ExportQuery { ExportData( values: $export_data ) }
{ "export_data":{ "import_compat": false, "context": { "lang": "en_US", "tz": "Asia/Calcutta", "uid": 2, "allowed_company_ids": [ 1 ] }, "domain": [ [ "user_id", "=", 2 ] ], "fields": [ { "name": "name", "label": "Order Reference", "type": "char" }, { "name": "display_name", "label": "Display Name", "type": "char" }, { "name": "activity_ids", "label": "Activities", "type": "one2many" }, { "name": "create_date", "label": "Creation Date", "type": "datetime" }, { "name": "partner_id", "label": "Customer", "type": "many2one" }, { "name": "user_id", "label": "Salesperson", "type": "many2one" }, { "name": "user_id/name", "label": "Salesperson/Name", "type": "char" }, { "name": "state", "label": "Status", "type": "selection" }, { "name": "amount_total", "label": "Total", "type": "monetary" } ], "groupby": [], "ids": [ 7, 6 ], "model": "sale.order" } }
Method Execution:
In GraphQL, method execution refers to calling a predefined function or method on the server to perform a specific action. This is commonly done using mutations in GraphQL, which are designed to execute actions, such as updating, creating, or deleting data.
See the Example with Query & Output:
Example: This GraphQL API query executes the action_draft method, and change the quotation from draft state to quotation state.
Output




mutation Method { methodSaleOrder: SaleOrder( id: 6, method_name: "action_draft", method_parameters: {} ){ id } }
Search Read:
In GraphQL, search_read is used to retrieve records by combining search and read operations in one method execution. search_read is purely for reading data and can be customized to return targeted information based on the request.
See the Example with Query & Output:
Example: This GraphQL API query executes the search_read method, to retrieve the fields like id, name etc, from the res.partner model.
Output


mutation Method { methodResPartner: ResPartner( method_name: "search_read", method_parameters: { domain:[["is_company", "=", true]] fields: ["id", "name", "email", "is_company"] limit: 4 } ) }
Search:
In GraphQL, the search operation is used to locate specific records in a dataset by applying filters or criteria to narrow down the results. In Odoo, search queries can retrieve lists of record IDs that match defined conditions, allowing users to identify records that meet particular parameters without loading full record details.
See the Example with Query & Output:
Example: This GraphQL API query executes the search method, to retrieve the record of companies using is_company = true parameter from the res.partner model.
Output


mutation Method { methodResPartner: ResPartner( method_name: "search", method_parameters: { domain:[["is_company", "=", true]] limit: 5 } ) }
Read:
In GraphQL, the read operation retrieves detailed information directly from specific records in the database based on given record IDs. In Odoo, read is used to obtain precise data for requested fields, providing in-depth details about each record without additional search or filtering.
See the Example with Query & Output:
Example: This GraphQL API query read the specified record fields using id.

mutation Method { methodResPartner: ResPartner( id: 10 method_name: "read", method_parameters: { fields: ["name", "email", "is_company", "country_id"] } ) }
Read Group:
In GraphQL, the read_group operation is used to aggregate and group data records based on specified fields. In Odoo, read_group allows you to retrieve summarized data, such as counts, sums, or averages, grouped by particular fields or categories.
See the Example with Query & Output:
Example: This GraphQL API query executes the read_group method, to retrieve specified fileds and group them using groupby country_id.
Output


mutation Method { methodResPartner: ResPartner( method_name: "read_group", method_parameters: { domain: [["is_company", "=", false]], fields: ["name", "country_id", "comment", "is_company"], groupby: country_id }, ) }
Search Count:
In GraphQL, the search_count operation is used to quickly determine the number of records that match specific search criteria without retrieving the actual data. In Odoo, search_count allows you to count the total number of records that meet certain conditions, providing an efficient way to assess the size of a dataset.
See the Example with Query & Output:
Example: This GraphQL API query give count of the records where the parameter is_company = true.

mutation Method { methodResPartner: ResPartner( method_name: "search_count", method_parameters: { domain:[["is_company", "=", true]] } ) }
Fields Get:
In GraphQL, the fields_get operation is used to retrieve metadata about the fields available in a specific model, including details like field names, types, and possible selection options. In Odoo, fields_get provides information about the structure and configuration of the fields in a model, allowing users to understand the data schema.
See the Example with Query & Output:
Example: This GraphQL API query shows the list of fields in res.partner model.

mutation Method { methodAccessRights: ResPartner( method_name: "fields_get", method_parameters: { attributes: ["type", "string"] }, ) }
Check Access Rights:
In GraphQL, the check_access_rights operation is used to verify whether a user has the necessary permissions to access or perform actions on a specific resource. In Odoo, check_access_rights is used to validate whether the current user has the appropriate rights to read, write, or modify records in a given model.
See the Example with Query & Output:
Example: This GraphQL API query shows the access rights, if the user have the rights to access the res.partner model.

mutation Method { methodAccessRights: ResPartner( method_name: "check_access_rights", method_parameters: { operation: "read", }, ) }
Context:
In GraphQL, you can provide context as a standard odoo.
See the Example with Query & Output:



Get Records
GraphQL API Query Explanation:
GraphQL API is a specification for building APIs that allows clients to request exactly the data they need. This query is a set of parameters used in a GraphQL API request. These parameters define how the API should respond and what data should be included.
- Query Definition (query MyQuery): The first keyword in the GraphQL query is “query”. It signifies that a query operation is being performed in the next block of code followed by the name of the query, which is “MyQuery”. This is a user-defined name and can be customized as needed.
- ResPartner: This is the name of the query operation. It’s asking for data related to a resource called “ResPartner”.
- Variables: Inside parentheses, there are variables defined like $offset, $limit, $order, and $domain. These variables can be passed values when executing the query. Each variable is preceded by a dollar sign ($) and followed by its type. For example, Int represents integer values, and String represents text.
- $offset: This variable is used for pagination. It determines the starting point from which records should be fetched. For example, if $offset is set to 10, the query will start retrieving records from the 11th record onward.
- $limit: Also used for pagination, this variable specifies the maximum number of records to be returned in a single query response. For instance, if $limit is set to 6, the query will return a maximum of 6 records.
- $order: This variable is used to specify the order in which the retrieved records should be sorted. It likely takes a string value representing the field on which to sort and the sorting direction (e.g., ascending or descending).
- $domain: This variable [[“is_company”,”=”,true]] filter the data to include only records where the ‘is_company’ field is equal to true.
- Fields: Inside “ResPartner”, we list the specific pieces of information we want about each partner. This could include their ID, name, phone number, email, and other details.
- Nested Fields: Fields like country_id, user_id, and company_id are followed by curly braces containing more fields. Some pieces of information, like which country a partner is in (country_id), have more details we want to know, like the country’s name and code.
- country_id: This field represents the country where each partner is located. Inside country_id, we have two nested fields: name and code. “name” field give us the full name of the country (e.g., “United States”). “code” field give us the country’s abbreviated code (e.g., “US”).
- user_id: This field indicates the user associated with each partner. Inside user_id, we have two nested fields: name and active. “name” field give us the user’s name (e.g., “John Doe”). “active” tell us whether the user is currently active or not (e.g., true/false).
- company_id: This field shows the company to which each partner belongs. Inside company_id, we have a single nested field: name. “name” field provide us with the name of the company (e.g., “ABC Corp”).
Headers Explanation:
These headers are used in a GraphQL API request to specify the format of the data being sent and to provide authentication information.
- Content-Type: Specifies the format of the data being sent in the request body. In this case, it indicates that the data is in GraphQL API format (application/json).
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
GraphQL Variables Explanation:
- In GraphQL, variables are defined separately from the query itself and are typically passed as a JSON object when executing the query. GraphQL supports passing variables in formats other than JSON, although JSON is the most common format used in practice.
- offset: 0: This sets the offset to 0, meaning that the query will start fetching records from the beginning.
- limit: 6: This sets the limit to 6, indicating that the query should return a maximum of 6 records.
- order: “name,id decs”: This means “order the data by name, and if names are the same, order them by id in descending order.
- domain: This means “filter the data to include only records where the ‘is_company’ field is equal to true.”
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
POST
https://api.17.dev.ekika.co/user-graphql-apikey
query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) { ResPartner( offset: $offset limit: $limit order: $order domain: $domain ) { id name phone email is_company country_id{ name code } user_id{ name active } company_id{ name } } }
GraphQL Variables:
{ "offset": 0, "limit": 6, "order": "name,id desc", "domain": [["is_company","=",true]] }
Headers
Key | Value |
---|---|
Content-Type | application/json |
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{ "data": { "ResPartner": [ { "id": 14, "name": "Azure Interior", "phone": "(870)-931-0505", "email": "azure.Interior24@example.com", "is_company": true, "country_id": { "name": "United States", "code": "US" }, "user_id": null, "company_id": null }, { "id": 10, "name": "Deco Addict", "phone": "(603)-996-3829", "email": "deco_addict@yourcompany.example.com", "is_company": true, "country_id": { "name": "United States", "code": "US" }, "user_id": null, "company_id": null }, { "id": 1, "name": "EKIKA", "phone": "+91 9510031431", "email": "anand@ekika.co", "is_company": true, "country_id": { "name": "United States", "code": "US" }, "user_id": null, "company_id": null }, { "id": 66, "name": "Ekika Corporation New", "phone": "5554444555444", "email": "hello@ekika.co", "is_company": true, "country_id": null, "user_id": null, "company_id": null }, { "id": 56, "name": "Ekika Corporation New", "phone": "5554444555444", "email": "hello@ekika.co", "is_company": true, "country_id": null, "user_id": null, "company_id": null }, { "id": 11, "name": "Gemini Furniture", "phone": "(941)-284-4875", "email": "gemini_furniture@fake.geminifurniture.com", "is_company": true, "country_id": { "name": "United States", "code": "US" }, "user_id": null, "company_id": null } ], "pageInfo": { "ResPartner": { "totalCount": 11, "hasNextPage": true } } } }
curl --location 'https://api.17.dev.ekika.co/user-graphql-apikey' \ --header 'x-api-key: {YOUR-API-KEY}' \ --header 'Content-Type: application/json' \ --data '{ "query": "query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) {\n ResPartner(\n offset: $offset\n limit: $limit\n order: $order\n domain: $domain\n )\n {\n id\n name\n phone\n email\n is_company\n country_id{\n name\n code\n }\n user_id{\n name\n active\n }\n company_id{\n name\n }\n }\n }", "variables": { "offset": 0, "limit": 6, "order": "name,id desc", "domain": [ ["is_company", "=", true] ] } }'
import requests import json url = "https://api.17.dev.ekika.co/user-graphql-apikey" payload = "{\"query\":\"query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) {\\n ResPartner(\\n offset: $offset\\n limit: $limit\\n order: $order\\n domain: $domain\\n )\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}\",\"variables\":{\"offset\":0,\"limit\":6,\"order\":\"name,id desc\",\"domain\":[[\"is_company\",\"=\",true]]}}" headers = { 'x-api-key': '{Your API-Key}', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'x-api-key' => '{Your API-Key}', 'Content-Type' => 'application/json' ]; $body = '{ "query": "query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) { ResPartner( offset: $offset limit: $limit order: $order domain: $domain ) { id name phone email is_company country_id { name code } user_id { name active } company_id { name } } }", "variables": { "offset": 0, "limit": 6, "order": "name,id desc", "domain": [["is_company","=",true]] } }'; $request = new Request('POST', 'https://api.17.dev.ekika.co/user-graphql-apikey', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody();
const myHeaders = new Headers(); myHeaders.append("x-api-key", "{Your API-Key}"); myHeaders.append("Content-Type", "application/json"); const graphql = JSON.stringify({ query: ` query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) { ResPartner( offset: $offset limit: $limit order: $order domain: $domain ) { id name phone email is_company country_id { name code } user_id { name active } company_id { name } } } `, variables: { "offset": 0, "limit": 6, "order": "name,id desc", "domain": [["is_company", "=", true]] } }); const requestOptions = { method: "POST", headers: myHeaders, body: graphql, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-graphql-apikey", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.post("https://api.17.dev.ekika.co/user-graphql-apikey") .header("x-api-key", "{Your API-Key}") .header("Content-Type", "application/json") .body("{\"query\":\"query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) {\\n ResPartner(\\n offset: $offset\\n limit: $limit\\n order: $order\\n domain: $domain\\n )\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}\",\"variables\":{\"offset\":0,\"limit\":6,\"order\":\"name,id desc\",\"domain\":[[\"is_company\",\"=\",true]]}}") .asString();
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-graphql-apikey" method := "POST" payload := strings.NewReader("{\"query\":\"query MyQuery($offset: Int, $limit: Int, $order: String, $domain: [[Any]]) {\\n ResPartner(\\n offset: $offset\\n limit: $limit\\n order: $order\\n domain: $domain\\n )\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}\",\"variables\":{\"offset\":0,\"limit\":6,\"order\":\"name,id desc\",\"domain\":[[\"is_company\",\"=\",true]]}}") client := &http.Client { } req, err := http.NewRequest(method, url, payload) if err != nil { fmt.Println(err) return } req.Header.Add("x-api-key", "{Your API-Key}") req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'x-api-key': '{Your API-Key}', 'Content-Type': 'application/json' }; var data = '''{"query":"query MyQuery(\$offset: Int, \$limit: Int, \$order: String, \$domain: [[Any]]) {\\n ResPartner(\\n offset: \$offset\\n limit: \$limit\\n order: \$order\\n domain: \$domain\\n )\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}","variables":{"offset":0,"limit":6,"order":"name,id desc","domain":[["is_company","=",true]]}}'''; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-graphql-apikey', options: Options( method: 'POST', headers: headers, ), data: data, ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Get Single Record
GraphQL Query Explanation:
This GraphQL query is retrieving information about a specific ResPartner with the ID “22”. You can enter any of the ID to retrieve a specific information including details like name, phone, email, etc., and also includes the name of the company to which the partner belongs.
- Query Definition (query MyQuery): The first keyword in the GraphQL query is “query”. It signifies that a query operation is being performed in the next block of code followed by the name of the query, which is “MyQuery”. This is a user-defined name and can be customized as needed.
- ResPartner: This is the name of the query operation. It’s asking for data related to a resource called “ResPartner”.
- Field Selections: Inside the query, we specified fields that we want to retrieve for the ResPartner with ID “22”.
- id: The unique identifier of the partner.
- name: The name of the partner.
- phone: The phone number of the partner.
- email: The email address of the partner.
- is_company: A boolean field indicating whether the partner is a company or not.
- country_id: This appears to be a related field indicating the country associated with the partner. Within this field, you are querying for “name” and “code” of the country.
- user_id: This refers to the user associated with the partner. We are querying for the “name” and “active” status of the user.
- company_id: This field represents the company associated with the partner. It indicates the company to which the partner belongs. Here, we are querying for the “name” of the company.
Headers Explanation:
These headers are used in a GraphQL API request to specify the format of the data being sent and to provide authentication information.
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
POST
https://api.17.dev.ekika.co/user-graphql-apikey
query MyQuery { ResPartner(id: "22") { id name phone email is_company country_id{ name code } user_id{ name active } company_id{ name } } }
Headers
Key | Value |
---|---|
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{ "data": { "ResPartner": [ { "id": 22, "name": "Jesse Blue", "phone": "(829)-386-3277", "email": "jesse.brown74@example.com", "is_company": false, "country_id": { "name": "United States", "code": "US" }, "user_id": null, "company_id": { "name": "EKIKA" } } ], "pageInfo": { "ResPartner": { "totalCount": 1, "hasNextPage": false } } } }
curl --location 'https://api.17.dev.ekika.co/user-graphql-apikey' \ --header 'x-api-key: {Your API-Key} \ --header 'Content-Type: application/json' \ --data '{"query":"query MyQuery {\n ResPartner(id: \"22\")\n {\n id\n name\n phone\n email\n is_company\n country_id{\n name\n code\n }\n user_id{\n name\n active\n }\n company_id{\n name\n }\n }\n}","variables":{}}'
import requests import json url = "https://api.17.dev.ekika.co/user-graphql-apikey" payload = "{\"query\":\"query MyQuery {\\n ResPartner(id: \\\"22\\\")\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}\",\"variables\":{}}" headers = { 'x-api-key': '{Your API-Key}', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'x-api-key' => '{Your API-Key}', 'Content-Type' => 'application/json' ]; $body = '{"query":"query MyQuery {\\n ResPartner(id: \\"22\\")\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}","variables":{}}'; $request = new Request('POST', 'https://api.17.dev.ekika.co/user-graphql-apikey', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody();
const myHeaders = new Headers(); myHeaders.append("x-api-key", "{Your API-Key}"); myHeaders.append("Content-Type", "application/json"); const graphql = JSON.stringify({ query: "query MyQuery {\n ResPartner(id: \"22\")\n {\n id\n name\n phone\n email\n is_company\n country_id{\n name\n code\n }\n user_id{\n name\n active\n }\n company_id{\n name\n }\n }\n}", variables: {} }) const requestOptions = { method: "POST", headers: myHeaders, body: graphql, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-graphql-apikey", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.post("https://api.17.dev.ekika.co/user-graphql-apikey") .header("x-api-key", "{Your API-Key}") .header("Content-Type", "application/json") .body("{\"query\":\"query MyQuery {\\n ResPartner(id: \\\"22\\\")\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}\",\"variables\":{}}") .asString();
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-graphql-apikey" method := "POST" payload := strings.NewReader("{\"query\":\"query MyQuery {\\n ResPartner(id: \\\"22\\\")\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}\",\"variables\":{}}") client := &http.Client { } req, err := http.NewRequest(method, url, payload) if err != nil { fmt.Println(err) return } req.Header.Add("x-api-key", "{Your API-Key}") req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'x-api-key': '{Your API-Key}', 'Content-Type': 'application/json' }; var data = '''{"query":"query MyQuery {\\n ResPartner(id: \\"22\\")\\n {\\n id\\n name\\n phone\\n email\\n is_company\\n country_id{\\n name\\n code\\n }\\n user_id{\\n name\\n active\\n }\\n company_id{\\n name\\n }\\n }\\n}","variables":{}}'''; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-graphql-apikey', options: Options( method: 'POST', headers: headers, ), data: data, ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Create Records
GraphQL Query Explanation:
This GraphQL mutation query is responsible for creating a new partner entity (ResPartner) in the system.
- mutation Create: A mutation in GraphQL is a type of request used to modify data on the server. It’s often used to perform operations such as creating, updating, or deleting data. Unlike queries, which are used for fetching data, mutations are used for making modifications to the data. In this example, the mutation is used to create a new ResPartner record with specified details like name, contact information, address, etc.
- Alias: createResPartner: An alias is a way to provide a custom name to the result of a field or operation. In this mutation query, createResPartner is the alias given to the result of the mutation operation ResPartner. This alias is helpful when you have multiple mutation operations in a single request, allowing you to distinguish between the results of each operation.
- Mutation Operation: ResPartner: Specifies that the mutation will create a new ResPartner record.
- ResPartnerValues: An object containing key-value pairs representing the fields and their values for the new ResPartner record being created.
- Fields: Fields such as active, name, category_id, company_type, bank_ids, city, street, zip, comment, phone, mobile, website, and email are provided with respective values.
- bank_ids: This field represents an array of bank account details associated with the new partner being created. Each item in the bank_ids array contains details about a specific bank account.
- sequence: A numerical value indicating the order or position of the bank account.
- bank_id: The unique identifier of the bank associated with the account.
- acc_number: The account number for this bank account.
- allow_out_payment: A boolean value indicating whether outgoing payments are allowed from this account.
- acc_holder_name: A boolean value indicating whether the account holder’s name is required for transactions.
- Other Fields: All other fields and their values are also to be added.
- Selection Set: Specifies the fields of the created ResPartner record that should be returned after the mutation operation. Fields such as active, category_id, bank_ids, city, comment, company_type, id, name, phone, mobile, email, street, and zip are included.
- You can returen any of the field with their specific values, you don’t have to specify all fields if you don’t want every details to be returned.
Headers Explanation:
These headers are used in a GraphQL API request to specify the format of the data being sent and to provide authentication information.
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
POST
https://api.17.dev.ekika.co/user-graphql-apikey
mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: "Ekika Corporation New", category_id: [4, 3] company_type: "company", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: "11212121212", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: "3434343434343434", allow_out_payment: true, acc_holder_name: false }] ] city: "Gandhinagar", street: "Gandhinagar", street2: "", zip: "382421", comment: "<p>Comment Here</p>", phone: "5554444555444", mobile: "1010101", website: "http://www.ekika.co", email: "hello@ekika.co", } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }
Headers
Key | Value |
---|---|
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{ "data": { "createResPartner": [ { "active": true, "category_id": [ 4, 3 ], "bank_ids": [ 20, 21 ], "city": "Gandhinagar", "comment": "<p>Comment Here</p>", "company_type": "company", "id": 69, "name": "Ekika Corporation New", "phone": "5554444555444", "mobile": "1010101", "email": "hello@ekika.co", "street": "Gandhinagar", "zip": "382421" } ] } }
curl --location 'https://api.17.dev.ekika.co/user-graphql-apikey' \ --header 'x-api-key: {YOUR-API-KEY}' \ --header 'Content-Type: application/json' \ --data-raw '{ "query": "mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: \"Ekika Corporation New\", category_id: [4, 3], company_type: \"company\", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: \"11212121212\", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: \"3434343434343434\", allow_out_payment: true, acc_holder_name: false }] ], city: \"Gandhinagar\", street: \"Gandhinagar\", street2: \"\", zip: \"382421\", comment: \"<p>Comment Here</p>\", phone: \"5554444555444\", mobile: \"1010101\", website: \"http://www.ekika.co\", email: \"hello@ekika.co\" } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }", "variables": {} }'
import requests import json url = "https://api.17.dev.ekika.co/user-graphql-apikey" payload = ''' { "query": "mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: \\"Ekika Corporation New\\", category_id: [4, 3], company_type: \\"company\\", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: \\"11212121212\\", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: \\"3434343434343434\\", allow_out_payment: true, acc_holder_name: false }] ], city: \\"Gandhinagar\\", street: \\"Gandhinagar\\", street2: \\"\\", zip: \\"382421\\", comment: \\"Comment Here
\\", phone: \\"5554444555444\\", mobile: \\"1010101\\", website: \\"http://www.ekika.co\\", email: \\"hello@ekika.co\\" } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }", "variables": {} } ''' headers = { 'x-api-key': '{Your API-Key}', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'x-api-key' => '{API-KEY}', 'Content-Type' => 'application/json' ]; $bodyData = [ "query" => "mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: \"Ekika Corporation New\", category_id: [4, 3], company_type: \"company\", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: \"11212121212\", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: \"3434343434343434\", allow_out_payment: true, acc_holder_name: false }] ], city: \"Gandhinagar\", street: \"Gandhinagar\", street2: \"\", zip: \"382421\", comment: \"<p>Comment Here</p>\", phone: \"5554444555444\", mobile: \"1010101\", website: \"http://www.ekika.co\", email: \"hello@ekika.co\", } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }", "variables" => [] ]; $body = json_encode($bodyData); $request = new Request('POST', 'https://api.17.dev.ekika.co/user-graphql-apikey', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody(); ?>
const myHeaders = new Headers(); myHeaders.append("x-api-key", "{YOUR-API-KEY}"); myHeaders.append("Content-Type", "application/json"); const graphql = JSON.stringify({ query: ` mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: "Ekika Corporation New", category_id: [4, 3], company_type: "company", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: "11212121212", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: "3434343434343434", allow_out_payment: true, acc_holder_name: false }] ], city: "Gandhinagar", street: "Gandhinagar", street2: "", zip: "382421", comment: "Comment Here
", phone: "5554444555444", mobile: "1010101", website: "http://www.ekika.co", email: "hello@ekika.co" } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } } `, variables: {} }); const requestOptions = { method: "POST", headers: myHeaders, body: graphql, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-graphql-apikey", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.post("https://api.17.dev.ekika.co/user-graphql-apikey") .header("x-api-key", "{Your API-Key}") .header("Content-Type", "application/json") .body("{\"query\":\"mutation Create {\\n createResPartner: ResPartner(\\n ResPartnerValues: {\\n active: true,\\n name: \\\"Ekika Corporation New\\\",\\n category_id: [4, 3]\\n company_type: \\\"company\\\",\\n bank_ids: [\\n\\t\\t\\t\\t\\t[0, 0, {\\n\\t\\t\\t\\t\\t\\tsequence: 10,\\n\\t\\t\\t\\t\\t\\tbank_id: 2,\\n\\t\\t\\t\\t\\t\\tacc_number: \\\"11212121212\\\",\\n\\t\\t\\t\\t\\t\\tallow_out_payment: true,\\n\\t\\t\\t\\t\\t\\tacc_holder_name: false\\n\\t\\t\\t\\t\\t}],\\n\\t\\t\\t\\t\\t[0, 0, {\\n\\t\\t\\t\\t\\t\\tsequence: 11,\\n\\t\\t\\t\\t\\t\\tbank_id: 3,\\n\\t\\t\\t\\t\\t\\tacc_number: \\\"3434343434343434\\\",\\n\\t\\t\\t\\t\\t\\tallow_out_payment: true,\\n\\t\\t\\t\\t\\t\\tacc_holder_name: false\\n\\t\\t\\t\\t\\t}]\\n\\t\\t\\t\\t]\\n city: \\\"Gandhinagar\\\",\\n street: \\\"Gandhinagar\\\",\\n street2: \\\"\\\",\\n zip: \\\"382421\\\",\\n comment: \\\"Comment Here
\\\",\\n phone: \\\"5554444555444\\\",\\n mobile: \\\"1010101\\\",\\n website: \\\"http://www.ekika.co\\\",\\n email: \\\"hello@ekika.co\\\",\\n }\\n )\\n {\\n active\\n category_id\\n bank_ids\\n city\\n comment\\n company_type\\n id\\n name\\n phone\\n mobile\\n email\\n street\\n zip\\n }\\n}\",\"variables\":{}}") .asString();
package main import ( "fmt" "io/ioutil" "net/http" ) func main() { url := "https://api.17.dev.ekika.co/user-graphql-apikey" method := "POST" payload := `{"query":"mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: \"Ekika Corporation New\", category_id: [4, 3] company_type: \"company\", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: \"11212121212\", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: \"3434343434343434\", allow_out_payment: true, acc_holder_name: false }] ] city: \"Gandhinagar\", street: \"Gandhinagar\", street2: \"\", zip: \"382421\", comment: \"<p>Comment Here</p>\", phone: \"5554444555444\", mobile: \"1010101\", website: \"http://www.ekika.co\", email: \"hello@ekika.co\", } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }","variables":{}}` client := &http.Client{} req, err := http.NewRequest(method, url, strings.NewReader(payload)) if err != nil { fmt.Println(err) return } req.Header.Add("x-api-key", "{Your API-Key}") req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'x-api-key': '{Your API-Key}', 'Content-Type': 'application/json' }; var data = '''{"query":"mutation Create { createResPartner: ResPartner( ResPartnerValues: { active: true, name: \\"Ekika Corporation New\\", category_id: [4, 3] company_type: \\"company\\", bank_ids: [ [0, 0, { sequence: 10, bank_id: 2, acc_number: \\"11212121212\\", allow_out_payment: true, acc_holder_name: false }], [0, 0, { sequence: 11, bank_id: 3, acc_number: \\"3434343434343434\\", allow_out_payment: true, acc_holder_name: false }] ] city: \\"Gandhinagar\\", street: \\"Gandhinagar\\", street2: \\"\\", zip: \\"382421\\", comment: \\"<p>Comment Here</p>\\", phone: \\"5554444555444\\", mobile: \\"1010101\\", website: \\"http://www.ekika.co\\", email: \\"hello@ekika.co\\", } ) { active category_id bank_ids city comment company_type id name phone mobile email street zip } }","variables":{}}'''; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-graphql-apikey', options: Options( method: 'POST', headers: headers, ), data: data, ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Update Records
GraphQL Query Explanation:
This GraphQL mutation updates a ResPartner record with the ID 69 in the system.
- mutation Update: This indicates that the mutation will perform an update operation.
- Alias: updateResPartner: This is an alias given to the result of the mutation. It allows you to identify and access the result of this specific mutation in the response.
- Mutation Operation: ResPartner: Specifies the type of operation being performed, which is updating a ResPartner record.
- id: Specifies the ID of the ResPartner record to be updated. In this case, it’s ID 69.
- ResPartnerValues: An object containing key-value pairs representing the fields and their updated values for the ResPartner record.
- Selection Set: Specifies the fields of the updated ResPartner record that should be returned after the mutation operation. You can write any field you want to return as result.
- You can returen any of the field with their specific values, you don’t have to specify all fields if you don’t want every details to be returned.
- In summary this mutation updates the specified ResPartner record with new values for the specified fields and returns the updated values of certain fields in the response.
Headers Explanation:
These headers are used in a GraphQL API request to specify the format of the data being sent and to provide authentication information.
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
POST
https://api.17.dev.ekika.co/user-graphql-apikey
mutation Update { updateResPartner: ResPartner( id: 69, ResPartnerValues: { active: true, name: "Ekika Corporation PVT LTD.", category_id: null company_type: "company" } ) { active category_id { id name } bank_ids { id } city comment company_type id name phone mobile email street zip } }
Headers
Key | Value |
---|---|
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{ "data": { "updateResPartner": [ { "active": true, "category_id": [], "bank_ids": [ { "id": 20 }, { "id": 21 } ], "city": "Gandhinagar", "comment": "<p>Comment Here</p>", "company_type": "company", "id": 69, "name": "Ekika Corporation PVT LTD.", "phone": "5554444555444", "mobile": "1010101", "email": "hello@ekika.co", "street": "Gandhinagar", "zip": "382421" } ] } }
curl --location 'https://api.17.dev.ekika.co/user-graphql-apikey' \ --header 'x-api-key: {YOUR-API-KEY}' \ --header 'Content-Type: application/json' \ --data '{"query":"mutation Update {\n updateResPartner: ResPartner(\n id: 69, \n ResPartnerValues: {\n active: true,\n name: \"Ekika Corporation PVT LTD.\",\n category_id: null\n company_type: \"company\"\n }\n )\n {\n active\n category_id {\n id\n name\n }\n bank_ids {\n id\n }\n city\n comment\n company_type\n id\n name\n phone\n mobile\n email\n street\n zip\n }\n}","variables":{}}'
import requests import json url = "https://api.17.dev.ekika.co/user-graphql-apikey" payload = "{\"query\":\"mutation Update {\\n updateResPartner: ResPartner(\\n id: 69, \\n ResPartnerValues: {\\n active: true,\\n name: \\\"Ekika Corporation PVT LTD.\\\",\\n category_id: null\\n company_type: \\\"company\\\"\\n }\\n )\\n {\\n active\\n category_id {\\n id\\n name\\n }\\n bank_ids {\\n id\\n }\\n city\\n comment\\n company_type\\n id\\n name\\n phone\\n mobile\\n email\\n street\\n zip\\n }\\n}\",\"variables\":{}}" headers = { 'x-api-key': '{YOUR-API-KEY}', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'x-api-key' => '{YOUR-API-KEY}', 'Content-Type' => 'application/json' ]; $body = '{"query":"mutation Update {\\n updateResPartner: ResPartner(\\n id: 69, \\n ResPartnerValues: {\\n active: true,\\n name: \\"Ekika Corporation PVT LTD.\\",\\n category_id: null\\n company_type: \\"company\\"\\n }\\n )\\n {\\n active\\n category_id {\\n id\\n name\\n }\\n bank_ids {\\n id\\n }\\n city\\n comment\\n company_type\\n id\\n name\\n phone\\n mobile\\n email\\n street\\n zip\\n }\\n}","variables":{}}'; $request = new Request('POST', 'https://api.17.dev.ekika.co/user-graphql-apikey', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody();
const myHeaders = new Headers(); myHeaders.append("x-api-key", "{YOUR-API-KEY}"); myHeaders.append("Content-Type", "application/json"); const graphql = JSON.stringify({ query: "mutation Update {\n updateResPartner: ResPartner(\n id: 69, \n ResPartnerValues: {\n active: true,\n name: \"Ekika Corporation PVT LTD.\",\n category_id: null\n company_type: \"company\"\n }\n )\n {\n active\n category_id {\n id\n name\n }\n bank_ids {\n id\n }\n city\n comment\n company_type\n id\n name\n phone\n mobile\n email\n street\n zip\n }\n}", variables: {} }) const requestOptions = { method: "POST", headers: myHeaders, body: graphql, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-graphql-apikey", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://api.17.dev.ekika.co/user-graphql-apikey") .header("x-api-key", "{YOUR-API-KEY}") .header("Content-Type", "application/json") .body("{\"query\":\"mutation Update {\\n updateResPartner: ResPartner(\\n id: 69, \\n ResPartnerValues: {\\n active: true,\\n name: \\\"Ekika Corporation PVT LTD.\\\",\\n category_id: null\\n company_type: \\\"company\\\"\\n }\\n )\\n {\\n active\\n category_id {\\n id\\n name\\n }\\n bank_ids {\\n id\\n }\\n city\\n comment\\n company_type\\n id\\n name\\n phone\\n mobile\\n email\\n street\\n zip\\n }\\n}\",\"variables\":{}}") .asString();
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-graphql-apikey" method := "POST" payload := strings.NewReader("{\"query\":\"mutation Update {\\n updateResPartner: ResPartner(\\n id: 69, \\n ResPartnerValues: {\\n active: true,\\n name: \\\"Ekika Corporation PVT LTD.\\\",\\n category_id: null\\n company_type: \\\"company\\\"\\n }\\n )\\n {\\n active\\n category_id {\\n id\\n name\\n }\\n bank_ids {\\n id\\n }\\n city\\n comment\\n company_type\\n id\\n name\\n phone\\n mobile\\n email\\n street\\n zip\\n }\\n}\",\"variables\":{}}") client := &http.Client { } req, err := http.NewRequest(method, url, payload) if err != nil { fmt.Println(err) return } req.Header.Add("x-api-key", "{YOUR-API-KEY}") req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'x-api-key': '{YOUR-API-KEY}', 'Content-Type': 'application/json' }; var data = '''{"query":"mutation Update {\\n updateResPartner: ResPartner(\\n id: 69, \\n ResPartnerValues: {\\n active: true,\\n name: \\"Ekika Corporation PVT LTD.\\",\\n category_id: null\\n company_type: \\"company\\"\\n }\\n )\\n {\\n active\\n category_id {\\n id\\n name\\n }\\n bank_ids {\\n id\\n }\\n city\\n comment\\n company_type\\n id\\n name\\n phone\\n mobile\\n email\\n street\\n zip\\n }\\n}","variables":{}}'''; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-graphql-apikey', options: Options( method: 'POST', headers: headers, ), data: data, ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Delete Records
GraphQL Query Explanation:
This mutation deletes the ResPartner record with the ID 69 from the system.
- mutation Delete: This indicates that the mutation will perform an delete operation.
- Alias: deleteResPartner: This is an alias given to the result of the mutation. It allows you to identify and access the result of this specific mutation in the response.
- Mutation Operation: ResPartner: Specifies the type of operation being performed, which is deleting a ResPartner record.
- id: Specifies the ID of the ResPartner record to be deleted. In this case, it’s ID 69.
- Selection Set: There is no selection set specified after the mutation operation. This means that the mutation does not return any specific fields of the deleted ResPartner record in the response.
Headers Explanation:
These headers are used in a GraphQL API request to specify the format of the data being sent and to provide authentication information.
- x-api-key: Provides authentication information. It contains an API key (Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z), which is a unique identifier used to authenticate the client making the request. This key allows the API server to verify that the client has the necessary permissions to access the requested resources.
You can execute above request on any model of Odoo.
Note: You have to check access control if your find mismatch of records as per your expectation.
POST
https://api.17.dev.ekika.co/user-graphql-apikey
mutation Delete { deleteResPartner: ResPartner( id: 69, ) }
Headers
Key | Value |
---|---|
x-api-key | {Your API-Key} (e.g., Qm7M6q!JRwwL:*->QX~;>S|^NC.8ID5z) |
{ "data": { "delete": "Success" } }
curl --location 'https://api.17.dev.ekika.co/user-graphql-apikey' \ --header 'x-api-key: "{YOUR-API-KEY} \ --header 'Content-Type: application/json' \ --data '{"query":"mutation Delete {\ndeleteResPartner: ResPartner(\nid: 69, \n)\n}","variables":{}}'
import requests import json url = "https://api.17.dev.ekika.co/user-graphql-apikey" payload = "{\"query\":\"mutation Delete {\\ndeleteResPartner: ResPartner(\\nid: 69, \\n)\\n}\",\"variables\":{}}" headers = { 'x-api-key': "{YOUR-API-KEY}", 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
<?php $client = new Client(); $headers = [ 'x-api-key' => "{YOUR-API-KEY}", 'Content-Type' => 'application/json' ]; $body = '{"query":"mutation Delete {\\ndeleteResPartner: ResPartner(\\nid: 69, \\n)\\n}","variables":{}}'; $request = new Request('POST', 'https://api.17.dev.ekika.co/user-graphql-apikey', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody();
const myHeaders = new Headers(); myHeaders.append("x-api-key", "{YOUR-API-KEY}"); myHeaders.append("Content-Type", "application/json"); const graphql = JSON.stringify({ query: "mutation Delete {\ndeleteResPartner: ResPartner(\nid: 69, \n)\n}", variables: {} }) const requestOptions = { method: "POST", headers: myHeaders, body: graphql, redirect: "follow" }; fetch("https://api.17.dev.ekika.co/user-graphql-apikey", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.post("https://api.17.dev.ekika.co/user-graphql-apikey") .header("x-api-key", "{YOUR-API-KEY}") .header("Content-Type", "application/json") .body("{\"query\":\"mutation Delete {\\ndeleteResPartner: ResPartner(\\nid: 69, \\n)\\n}\",\"variables\":{}}") .asString();
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.17.dev.ekika.co/user-graphql-apikey" method := "POST" payload := strings.NewReader("{\"query\":\"mutation Delete {\\ndeleteResPartner: ResPartner(\\nid: 69, \\n)\\n}\",\"variables\":{}}") client := &http.Client { } req, err := http.NewRequest(method, url, payload) if err != nil { fmt.Println(err) return } req.Header.Add("x-api-key", "{YOUR-API-KEY}") req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
var headers = { 'x-api-key': "{YOUR-API-KEY}", 'Content-Type': 'application/json' }; var data = '''{"query":"mutation Delete {\\ndeleteResPartner: ResPartner(\\nid: 69, \\n)\\n}","variables":{}}'''; var dio = Dio(); var response = await dio.request( 'https://api.17.dev.ekika.co/user-graphql-apikey', options: Options( method: 'POST', headers: headers, ), data: data, ); if (response.statusCode == 200) { print(json.encode(response.data)); } else { print(response.statusMessage); }
Standard REST Json API Request’s Overview:
- This is the main query parameters which is mandatory to write when you are working with APIs.
- Use “HTTP POST Method” to send specific data.
- Domain is specified your wesite’s domain address. The port number is optional.
- Endpoint is the specific path within the API that identifies the particular resource or action.
This part of the URL tells the server what type of operation is being requested. - Model is Odoo’s technical name of entities and also known as model name, record’s model or
entities. You can identify it from the URL shown below. - Method specifies the type of action being performed on the server.
- Headers in an API request are key-value pairs sent between the client and the server, providing
additional information about the request or the client itself. They are part of the HTTP protocol and
can
carry various types of metadata. - Add “Content-Type” and “x-api-key” keys with their specific values. REST API’s media
type designation is “application/json“. Add this in Content-Type’s value field and also add your
API Key.

Search:
See the Example with Query & Output:
Example: This query searches for res.partner records in a local Odoo instance via the
/api-rest-json/res.partner/search endpoint.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/search" payload = json.dumps({ "args": [ [ [ "is_company", "=", True ] ] ], "kwargs": {} }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Search Read:
See the Example with Query & Output:
Example: This query combines search and read operations for res.partner records in a local Odoo
instance via the /api-rest-json/res.partner/search_read endpoint. It retrieves records that match
specified criteria and returns their details in a single request.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/search_read" payload = json.dumps({ "args": [ [ [ "is_company", "=", True ] ] ], "kwargs": { "fields": [ "name", "country_id", "comment", "is_company" ], "limit": 5 } }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Search Count:
See the Example with Query & Output:
Example: This query returns the count of res.partner records in a local Odoo instance via the
/api-rest-json/res.partner/search_count endpoint.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/search_count" payload = json.dumps({ "args": [ [ [ "is_company", "=", True ] ] ], "kwargs": {} }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Read:
See the Example with Query & Output:
Example: This query retrieves details of res.partner records from a local Odoo instance via the
/api-rest-json/res.partner/read endpoint.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/read" payload = json.dumps({ "args": [ [ 14, 10, 11 ] ], "kwargs": { "fields": [ "name", "country_id", "comment", "is_company" ] } }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Read Group:
See the Example with Query & Output:
Example:
This query retrieves grouped data for res.partner records in a local Odoo instance via the
/api-rest-json/res.partner/read_group endpoint. It allows grouping records based on specified fields.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/read_group" payload = json.dumps({ "args": [ [ [ "is_company", "=", False ] ] ], "kwargs": { "fields": [ "name", "country_id", "comment", "is_company" ], "groupby": "country_id" } }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Create:
See the Example with Query & Output:
Example: This query creates a new res.partner record in a local Odoo instance via the
/api-rest-json/res.partner/create endpoint. It uses the POST method to send the necessary data for the new
record.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/create" payload = json.dumps({ "args": [ { "name": "Sample Partner", "email": "sample-partner@example.com" } ], "kwargs": {} }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Write:
See the Example with Query & Output:
Example: This query updates existing res.partner records in a local Odoo instance via the
/api-rest-json/res.partner/write endpoint. It uses the POST method to send updated data for specific
records, modifying their fields.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/write" payload = json.dumps({ "args": [ [ 49 ], { "name": "Sample Partner Change", "email": "sample-partner-change@example.com" } ], "kwargs": {} }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Unlink:
See the Example with Query & Output:
Example: This query deletes res.partner records in a local Odoo instance via the
/api-rest-json/res.partner/unlink endpoint. It uses the POST method to remove specified records from the
system.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/unlink" payload = json.dumps({ "args": [ [ 49 ] ], "kwargs": {} }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Fields Get:
See the Example with Query & Output:
Example: This query retrieves the field definitions for the res.partner model in a local Odoo
instance via the /api-rest-json/res.partner/fields_get endpoint. It provides information about the fields,
such as their types, labels, and other properties.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/fields_get" payload = json.dumps({ "args": [], "kwargs": { "attributes": [ "string", "help", "type" ] } }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Check Access Rights:
See the Example with Query & Output:
Example: This query checks the access rights for the res.partner model in a local Odoo instance
via the /api-rest-json/res.partner/check_access_rights endpoint. It verifies whether the user has the
necessary permissions (such as create, read, write, delete) for the specified model.

*** python *** import requests import json url = "http://localhost:8016/api-rest-json/res.partner/check_access_rights" payload = json.dumps({ "args": [ "create" ], "kwargs": {} }) headers = { 'Content-Type': 'application/json', 'x-api-key': 'YOUR-API-KEY' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Need Help?
EKIKA Has Your Back – 24/7 Support.
We’re just a message away, no matter the time zone.
90 Days Free Support
We understand that even with great documentation, you might have questions or need additional
assistance.
That’s why we offer exceptional support for “Odoo REST API Framework” users!
(copy link to clipboard)
(copy link to clipboard)
(copy link to clipboard)
Contact Us:
- Whats App / Phone: +919510031431 — URGENT
- EMail: hello@ekika.co
- Skype: amshukla17
- Website: https://ekika.co
- Support Ticket: https://ekika.co/support — Get
Notifications of
Progress. - 24 x 7 Available! Contact us NOW.
We love hearing your ideas for improvement! If you have a feature in mind that would
make your Odoo
experience even better, simply contact us. We’re happy to discuss your needs and explore
the best
way to implement them.
Frequently Asked Questions (FAQs)
Welcome to our FAQ page! This resource is designed to answer common questions you might have
about API Framework. We’ve categorized the questions for easy browsing, and you can also use the
search bar on our website to find specific answers quickly. If you don’t see your question
addressed here, feel free to contact us!
Contact Us:
- Whats App / Phone: +919510031431 —
URGENT - EMail: hello@ekika.co
- Skype: amshukla17
- Website: https://ekika.co
- Support Ticket: https://ekika.co/support
—
Get Notifications of Progress. - 24 x 7 Available! Contact us NOW.
We love hearing your ideas for improvement! If you have a feature in mind
that
would make your Odoo experience even better, simply contact us. We’re happy
to
discuss your needs and explore the best way to implement them.
We offer a wide range of Odoo services to help you at any stage, from
initial
setup
(“implementation”) to ongoing customization and support. This includes:
- Adding new features and functionalities (“addons development”)
- Changing behaviour of whole system (“server and structure level
changes”) - Server maintenance and configuration changes (“nginx / filestores / size
issues
etc.”) - Integration with other systems
- RESTful APIs, WebHooks, Slave-Master DB, Real-time data communication
(“socket
connection”) etc. - Improving app performance and user experience (“performance tuning” and
“UI/UX
design”) - Secure and reliable managed hosting solutions
- Annual maintenance contracts to keep your Odoo running smoothly and so
much
more…
Basically, we’re your one-stop shop for all things Odoo! We offer premium
services
at competitive rates.
The beauty of this API Framework is that it’s highly flexible! You’re not
limited to
a
specific number of APIs. You can create as many as your needs require to
connect
your
Odoo environment with other applications.
Here’s what makes it so dynamic:
-
Define Endpoints: You have full
control over
defining endpoints within each API. These endpoints specify how data can
be
accessed
and manipulated within your Odoo system. -
Customizable Configuration: You can
configure
each
API to perfectly suit the needs of the application it connects to. This
ensures
a
seamless and efficient integration. It allows you to configure
authentication,
authorization, protocols, users and much more.
In short, this API Framework empowers you to build a robust network of
custom APIs
tailored to your specific requirements.
You can change the key expiration time by simply doing this steps:
- Go to the API section in which your specific API is published.
- First you have to unpublished it and cancel it.
- After that you change the key expiration date and time based on your requirements.
- Lastly, just publish your API to use it.
Odoo models themselves are dynamically calculated with API configuration.
They are the
core
building blocks that represent data within your Odoo instance (e.g.,
products,
customers, orders
etc.).
API Framework and Model Access: The API
framework acts
as an
intermediary between external applications and your Odoo models. You can
configure the
API
framework to define:
- Endpoints: These specify how data can
be accessed
and
manipulated within specific models. - Authentication: You can use API keys,
Basic,
OAuth2, User
Credential or other methods to control access to the API. - Authorization: You can define user
roles and
permissions
to control which users or applications can access specific models or
functionalities
through
the API using odoo’s standard permission management system.
So you will have:
- Flexibility: You can create custom
APIs to expose
specific
data or functionalities from your Odoo models to external applications. - Security: You can control access to
models and
data
through API configuration. - Unified Access: The API provides a
standardized
way for
external applications to interact with your Odoo data, regardless of
whether they
use
standard or custom models. - Actions and Workflow: You can call
methods of your
Odoo
models so you have ability to execute workflow and actions as well.
Important Considerations:
- Not all models exposed by default:
While the API
framework
can provide access to most models, your configured access with groups
and groups
assigned to
user will define what information user can access using APIs. - Strong Authentication: Never use
auth=None or weak
authentication mechanisms. Implement robust authentication methods like
API keys,
OAuth, or
Basic with proper key management practices. - Granular Authorization: Don’t grant
blanket
access. Use
authorization to control what users or applications can access specific
models, data
fields,
and functionalities within your Odoo instance. Implement role-based
access control
(RBAC) to
assign permissions based on user roles as per Odoo standards. So we
recommand to use
custom
or user based access system from our APIs. We provide sudo access for
MVP or quick
start
work, we do not recommand it for producation usage.
In summary: The API framework acts as a
bridge,
allowing
external applications to interact with your Odoo models securely and
efficiently. You
have
granular control over what data and functionalities are exposed through
custom API
configurations.
No, GraphQL Subscriptions with WebSocket connection are not included in the standard API framework bundle.
Here’s why:
Specialized Implementation: GraphQL Subscriptions require a specific implementation tailored to real-time data updates. This makes them unsuitable for generic use within the broader API framework.
Do you offer GraphQL Subscriptions for Projects?
Yes, absolutely! While not included in the standard bundle, we offer custom development of GraphQL Subscriptions specifically designed for your project needs.
We have basic generic demo available if you would like to give it a try.
How can I learn more about Custom GraphQL Subscriptions?
Contact Us: Reach out to our team directly to discuss your project requirements and request a demo of our custom GraphQL Subscription solutions.
We look forward to helping you unlock the power of real-time data with GraphQL Subscriptions!
Changelog
-
Version 1.1 [Jun 22, 2023]
- New Remove GraphQL Subscription to decrease price from api_framework and put it standalone.
- New Well written documentation.
- New Add CORS Support.
- Fixes Bug Fixes and Refinements: Various bug fixes and code improvements were implemented across different modules to enhance stability and performance.
Milestone: Well Documented Release
-
Version 1.0 [Dec 18, 2023] Phobimo (Stable)
- New Functionality for exporting reports for both API types was added to facilitate better analysis and tracking of data.
- New JsonAPI Meta Information related fields and views were incorporated, expanding the scope of available information for users and improving the overall user experience.
- Enhancement Separate documentation views were created for JSON API and GraphQL functionalities, providing users with clearer guidance on utilizing these features effectively.
- Fixes Bug Fixes and Refinements: Various bug fixes and code improvements were implemented across different modules to enhance stability and performance.
Milestone: Full Feature Release
-
Version 0.9 [Nov 30, 2023]
- New API logging functionalities were introduced, providing administrators with insights into API usage and facilitating debugging processes.
- Enhancement GraphQL Enhancements: GraphQL functionalities like introspection, schema directives, multi-query support, and argument passing were refactored, enhancing the flexibility and capabilities of GraphQL endpoints.
- Enhancement JSON API Enhancements: JSON API functionalities related improvements in documentation and error handling, ensuring smoother interactions and troubleshooting processes.
- Enhancement Additional Features: Easy-API form improvements were made, simplifying the process of managing field visibility and adding custom access settings.
- Fixes Security and Access Control: Bug fixes and integration testing with OAuth for login and authorization, supporting various grant types with json api and graphql. Bug fixes of Access control features, allowing administrators to define user groups and customize access settings for better control over data and functionalities.
Security and Access Control Boost
-
Version 0.8 [Oct 31, 2023]
- New Easy-API Improvements: Stages within the easy-API form were introduced to manage field visibility, offering users more control over the presentation of data (ccb76eb). Implemented unique constraint validations for specific easy-api model fields (a4486b5).
- Enhancement Enabled adding custom access settings directly from the easy-api form (8b68799). Additionally, functionalities for API logging with options for filtering groups were implemented (b5185e9), improving monitoring capabilities.
Focus on Additional Features and Enhancements
-
Version 0.7 [Oct 17, 2023] Marsorb (Beta)
- New OAuth Integration: OAuth functionalities for login and authorization were introduced (38dae19). Implemented support for various OAuth grant types (Implicit, Resource Owner Password Credentials, Client Credentials). Support for various OAuth grant types, token revocation, refresh, and authorization code generation was implemented (86d777e).
- New Documentation Improvements: Introduced separate Documentation views for JSON-API and GraphQL functionalities (a4b0802, 70db31f).
- New Access Control: Created three user groups (API Manager, Controller, Document Viewer) with designated access levels (993e672). Custom access settings could now be assigned directly from the easy-API form, offering finer control over data access and usage (8b68799).
- Enhancement Enhanced JSON-API documentation to reflect model changes (c96984a). Functionalities for exporting reports for both JSON-API and GraphQL were added, improving accessibility and usability for users (fda0508, 1a8e3a0).
Documentation, Security, and Access Control Prioritized
-
Version 0.6 [Oct 09, 2023]
- Enhancement GraphQL Introspection and Schemas: Functionalities for generating GraphQL Introspection data and Schemas were implemented (f920592, edea7d7). Added functionalities for handling introspection queries like ‘__type’ (418cc21). Support for specifying GraphQL schema directives and descriptions was introduced (c57714b, 989a46).
- Enhancement Enhanced functionalities: Various other enhancements such as multi-query functionality within GraphQL (f920592), passing arguments and variables directly to GraphQL domains (103994d), implemented search functionality using ID arguments within GraphQL (e4fadcf), added support for boolean data types within GraphQL (56d5597), enhanced error handling for GraphQL dispatchers (bcedcf2).
Focus on GraphQL Advancements
-
Version 0.5 [Sep 29, 2023]
- New Easy-API: Introduced Easy-API with functionalities for simplified API creation (dca56b3, f90daed), including a publish button, help section, and advanced settings (f5129c6, c41d78b, fd8df7d). Security was improved with the implementation of Sudo-Access functionality. Implemented a test module for the Easy-JsonApi module (f871315).
- New Security Improvements: Implemented Sudo-Access functionality for enhanced security (cf81e04).
- Enhancement JSON-API Development: Continued development and refinement of JSON-API functionalities (622c8b6, 704b8db, ebe5941), including handling relationships, generating links, and supporting CRUD operations (serve_get, serve_post, serve_patch, serve_delete methods) (841ed4a, 5c8609d, 7551936). Enhanced error handling and exception management were implemented to ensure robustness (Json-API exceptions raised). Documented functionalities with code comments and a dedicated JSON-API documentation section (247c7ee, e525845).
- Fixes Additional Improvements: Various other enhancements were made, including custom access control functionalities (69c9259), improved API logging (f923d6a, be1f6dd), and bug fixes across different modules (f431ec8, 28f5a7f, c43d4e6).
Continued Development of JSON-API Integration and Easy-API Implementation & Enhancements
-
Version 0.4 [Sep 11, 2023]
- Enhancement API Enhancements: Added functionalities for handling page size, automatic/manual API key generation (ab260e4, 105e1d5, 2769d86), and API logging with configurable tail length (9d6c5c2, 0b99c78). Improved error handling and exception management within the API framework were also implemented (5599db2, json-api exceptions modified). Refactored code structure for better organization (f23490e, 62d49b4).
- Enhancement Additional Improvements: Implemented functionalities for applying rules within the application (3736b93), enhanced debug functionalities (2ee5266), and separated API mode configuration from the main codebase (013674a). Security was improved by defaulting to not storing sessions on every request (9acb14c). Added functionalities for dynamic route support (c8a5120).
API Enhancements and Additional Improvements
-
Version 0.3 [Aug 31, 2023]
- New GraphQL Implementation: Successfully implemented Create, Read, Update, and Delete (CRUD) operations for GraphQL (99e7d56, deb0dec, 2a90be2, 5290b95), along with handling inline fragments and domains (eaf7585, e32c4b4). These additions expanded the capabilities of the framework, particularly in supporting GraphQL endpoints.
Introduced GraphQL Support
-
Version 0.2 [Aug 16, 2023]
- New JSON-API Integration:
- Core functionalities for JSON-API data formatting were implemented (57d8b0b, cd1dbd2, 31fd365), along with handling fields and include parameters in querie (21fd365, 5cc17bb).
- Additional functionalities such as search models were introduced (032e8e4) and marked JSON-API as work-in-progress with ongoing development (f8954b6, 8a10a1c).
Implementation of JSON-API Integration
-
Initial Version 0.1 [Jul 31, 2023] Mars Awakens (Alpha)
- New New
important release - EKIKA launches ORF (Odoo REST Framework), a beta project inspired by Django’s DRF. ORF fills a gap in the Odoo community by providing a powerful API framework for Odoo users, aiming to improve their experience.
- Create Security Groups (API Admin or Manager, Read-only – Document Viewer, User or Developer).
- Resource Management: Established resource control models (baac3dc) and developed modules for resource access control (fe94f4e), setting the stage for effective management of resources within the framework.
- Important Authentication & Authorization: Implemented API key-based authentication (e2da633) and functionalities for authentication type with resource control (a1a1555). Create modules for API user authentication and exception handling (733ca5e, 828cc2f, 1673b3f).
- Important API Framework Foundation: Created the base API module (f16ec49, 4735ef6, 8940aba) and implemented functionalities for API configuration settings (4034de8, 94ac818), HTTP requests (d2e45fa), and developed a module for testing API endpoints (f9a2336).
Inception and Foundation Laying
- New New
-
Version Naming Conventions: ekika.co/api-version
Services EKIKA Provides
EKIKA is your destination for expert Odoo ERP implementation and customization. We
pride ourselves on building reliable, trust-based partnerships that give you full transparency and control over
your business processes.
With over 12 years of experience, we can assist you with eCommerce platforms,
production planning, point-of-sale systems, managing inventory adjustments, and providing advanced field worker
tracking solutions to optimize your workflows and boost operational efficiency.

Implementation
Utilise Odoo ERP tailored for your business needs for smooth
operations.

Customization
Personalized adjustments to Odoo modules for seamless
management.

Support
Ongoing assistance and maintenance to optimize your Odoo
system’s performance.
Are you struggling with disorganized operations, high operational costs, or lack of
transparency in your processes? What sets us apart is our commitment to personalized solutions tailored to
your unique business needs and our proactive support, ensuring seamless integration and ongoing success.
Would you like to explore Odoo ERP for your business? Schedule a free consultation
with EKIKA today!
You must log in to submit a review.