API


Getting Started

HTTP Methods 

GET
POST
PUT
DELETE


POST

POST /api/{model}/

Headers

  • Content-Type: application/json

Parameters

  • data (mandatory):

    This is used to pass data to be posted. For example

    POST /api/product.public.category/

    Request Body

                          {
        "params": {
            "data": {
                "name": "Test category_2"
            }
        }
    }
    
                        

    Response

                          {
        "jsonrpc": "2.0",
        "id": null,
        "result": 398
    }
    
                        

    The number on result is the id of the newly created record.

  • context (optional):

    This is used to pass any context if it's needed when creating a new record. The format of passing it is

    Request Body

                          {
        "params": {
            "context": {
                "context_1": "context_1_value",
                "context_2": "context_2_value",
                ....
            },
            "data": {
                "field_1": "field_1_value",
                "field_2": "field_2_value",
                ....
            }
        }
    }