PassThrough Requests for Odoo Accounting Online

List Countries

use id from the response of the following request, as the value for country in the contact related api's.

A cURL to list countries would look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
    "method": "POST",
    "path" : "/jsonrpc",
    "body" : "{\"operation\":\"search_read\",\"method\":\"execute_kw\",\"service\":\"object\",\"model\":\"res.country\",\"args\":[[]],\"pagination\":{\"limit\":100,\"offset\":0}}"
}'

you can adjust the limit and offset values in the above request to implement pagination.

List States By Country Id

use id from the response of the following request, as the value for state in the contact related api's.

A cURL to list countries would look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
    "method": "POST",
    "path" : "/jsonrpc",
    "body" : "{\"operation\":\"search_read\",\"method\":\"execute_kw\",\"service\":\"object\",\"model\":\"res.country.state\",\"args\":[[[\"country_id\",\"=\",104]]],\"pagination\":{\"limit\":100,\"offset\":0}}"
}'

you can change the country_id, limit and offset values in the above request based on your requirements.