Odoo API Framework: https://apps.odoo.com/apps/modules/17.0/api_framework/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
507 lines
21 KiB
507 lines
21 KiB
{ |
|
"info": { |
|
"_postman_id": "55d55297-0060-4018-9dfd-6f6b58bb5ec4", |
|
"name": "POS API JsonAPI", |
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", |
|
"_exporter_id": "29186461" |
|
}, |
|
"item": [ |
|
{ |
|
"name": "Get POS Configuration", |
|
"protocolProfileBehavior": { |
|
"disableBodyPruning": true |
|
}, |
|
"request": { |
|
"method": "GET", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"open_ui\",\n \"kwargs\":{}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.config?fields[pos.config]=name,company_id,last_session_closing_date,last_session_closing_cash&include=company_id&fields[res.company]=id,name", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.config" |
|
], |
|
"query": [ |
|
{ |
|
"key": "fields[pos.config]", |
|
"value": "name,company_id,last_session_closing_date,last_session_closing_cash" |
|
}, |
|
{ |
|
"key": "include", |
|
"value": "company_id" |
|
}, |
|
{ |
|
"key": "fields[res.company]", |
|
"value": "id,name" |
|
} |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "POS Open Register", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"open_ui\",\n \"kwargs\":{}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.config/2/execute", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.config", |
|
"2", |
|
"execute" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "Get POS Session", |
|
"protocolProfileBehavior": { |
|
"disableBodyPruning": true |
|
}, |
|
"request": { |
|
"method": "GET", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"open_ui\",\n \"kwargs\":{}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.session?fields[pos.session]=id,name,config_id,user_id,state,rescue&filter=[['config_id', '=', 2],['state', 'in', ['opening_control', 'opened']],['rescue', '=', false]]&page[size]=1", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.session" |
|
], |
|
"query": [ |
|
{ |
|
"key": "fields[pos.session]", |
|
"value": "id,name,config_id,user_id,state,rescue" |
|
}, |
|
{ |
|
"key": "filter", |
|
"value": "[['config_id', '=', 2],['state', 'in', ['opening_control', 'opened']],['rescue', '=', false]]" |
|
}, |
|
{ |
|
"key": "page[size]", |
|
"value": "1" |
|
} |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "Set Opening Control", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"set_opening_control\",\n \"kwargs\": {\"cashbox_value\": 1200, \"notes\": \"I have 1200 cash opening cash\"}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.session/10/execute", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.session", |
|
"10", |
|
"execute" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "POS Session Load Data", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"load_data\",\n \"kwargs\":{\"models_to_load\": []}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.session/10/execute", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.session", |
|
"10", |
|
"execute" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "Get POS Products JsonAPI", |
|
"protocolProfileBehavior": { |
|
"disableBodyPruning": true |
|
}, |
|
"request": { |
|
"method": "GET", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"open_ui\",\n \"kwargs\":{}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/product.product?fields[product.product]=id,name,lst_price,pos_categ_ids&filter=[['available_in_pos', '=', true],['sale_ok', '=', true], ['pos_categ_ids', 'in', [4, 5]]]&include=pos_categ_ids&fields[pos.category]=name", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"product.product" |
|
], |
|
"query": [ |
|
{ |
|
"key": "fields[product.product]", |
|
"value": "id,name,lst_price,pos_categ_ids" |
|
}, |
|
{ |
|
"key": "filter", |
|
"value": "[['available_in_pos', '=', true],['sale_ok', '=', true], ['pos_categ_ids', 'in', [4, 5]]]" |
|
}, |
|
{ |
|
"key": "include", |
|
"value": "pos_categ_ids" |
|
}, |
|
{ |
|
"key": "fields[pos.category]", |
|
"value": "name" |
|
} |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "Get Product Info Pos", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"get_product_info_pos\",\n \"kwargs\": {\"price\": 20, \"quantity\": 1, \"pos_config_id\": 2}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/product.product/54/execute", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"product.product", |
|
"54", |
|
"execute" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "POS Order Create", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"sync_from_ui\",\n \"kwargs\": {\n \"orders\": [\n {\n \"user_id\": 2,\n \"amount_difference\": false,\n \"amount_tax\": 3,\n \"amount_total\": 23,\n \"amount_paid\": 23,\n \"amount_return\": 0,\n \"lines\": [\n [\n 0,\n 0,\n {\n \"skip_change\": false,\n \"product_id\": 54,\n \"attribute_value_ids\": [\n [\n 4,\n 18\n ],\n [\n 4,\n 22\n ]\n ],\n \"custom_attribute_value_ids\": [],\n \"price_unit\": 20,\n \"qty\": 15,\n \"price_subtotal\": 20,\n \"price_subtotal_incl\": 23,\n \"price_extra\": 0,\n \"price_type\": \"original\",\n \"discount\": false,\n \"order_id\": 1,\n \"tax_ids\": [\n [\n 4,\n 1\n ]\n ],\n \"pack_lot_ids\": [],\n \"full_product_name\": \"Casual T-shirt (Black, S)\",\n \"customer_note\": false,\n \"refund_orderline_ids\": [],\n \"refunded_orderline_id\": false,\n \"note\": false,\n \"combo_parent_id\": false,\n \"combo_line_ids\": [],\n \"combo_item_id\": false,\n \"sale_order_origin_id\": false,\n \"sale_order_line_id\": false,\n \"down_payment_details\": false,\n \"id\": 2\n }\n ]\n ],\n \"company_id\": 1,\n \"pricelist_id\": false,\n \"partner_id\": false,\n \"sequence_number\": 1,\n \"session_id\": 10,\n \"state\": \"paid\",\n \"account_move\": false,\n \"picking_ids\": [],\n \"procurement_group_id\": false,\n \"floating_order_name\": false,\n \"general_note\": \"\",\n \"nb_print\": false,\n \"fiscal_position_id\": false,\n \"payment_ids\": [\n [\n 0,\n 0,\n {\n \"name\": false,\n \"pos_order_id\": 1,\n \"amount\": 23,\n \"payment_method_id\": 4,\n \"payment_date\": \"2024-11-14 05:48:35\",\n \"card_type\": false,\n \"card_brand\": false,\n \"card_no\": false,\n \"cardholder_name\": false,\n \"payment_ref_no\": false,\n \"payment_method_authcode\": false,\n \"payment_method_issuer_bank\": false,\n \"payment_method_payment_mode\": false,\n \"transaction_id\": false,\n \"payment_status\": false,\n \"ticket\": \"\",\n \"is_change\": false,\n \"account_move_id\": false,\n \"id\": 1,\n \"create_uid\": false,\n \"create_date\": false,\n \"write_uid\": false,\n \"write_date\": false,\n \"online_account_payment_id\": false\n }\n ]\n ],\n \"to_invoice\": false,\n \"shipping_date\": false,\n \"is_tipped\": false,\n \"tip_amount\": false,\n \"ticket_code\": \"woj9w\",\n \"has_deleted_line\": false,\n \"id\": \"1\",\n \"create_uid\": false,\n \"create_date\": false,\n \"write_uid\": false,\n \"write_date\": false,\n \"next_online_payment_amount\": false,\n \"crm_team_id\": false\n }\n ]\n }\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.order/0/execute", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.order", |
|
"0", |
|
"execute" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "Alternate JsonAPI POS Order Create", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"type\": \"pos.order\",\n \"attributes\": {\n \"user_id\": 2,\n \"amount_difference\": false,\n \"amount_tax\": 3,\n \"amount_total\": 23,\n \"amount_paid\": 23,\n \"amount_return\": 0,\n \"company_id\": 1,\n \"pricelist_id\": false,\n \"partner_id\": false,\n \"sequence_number\": 1,\n \"session_id\": 10,\n \"state\": \"paid\",\n \"account_move\": false,\n \"picking_ids\": [],\n \"procurement_group_id\": false,\n \"floating_order_name\": false,\n \"general_note\": \"\",\n \"nb_print\": false,\n \"fiscal_position_id\": false,\n \"to_invoice\": false,\n \"shipping_date\": false,\n \"is_tipped\": false,\n \"tip_amount\": false,\n \"ticket_code\": \"woj9w\",\n \"has_deleted_line\": false,\n \"id\": \"1\",\n \"create_uid\": false,\n \"create_date\": false,\n \"write_uid\": false,\n \"write_date\": false,\n \"next_online_payment_amount\": false,\n \"crm_team_id\": false\n },\n \"relationships\": {\n \"lines\": {\n \"data\": [\n {\n \"type\": \"pos.order.line\",\n \"attributes\": {\n \"skip_change\": false,\n \"product_id\": 54,\n \"attribute_value_ids\": [\n [\n 4,\n 18\n ],\n [\n 4,\n 22\n ]\n ],\n \"custom_attribute_value_ids\": [],\n \"price_unit\": 20,\n \"qty\": 25,\n \"price_subtotal\": 20,\n \"price_subtotal_incl\": 23,\n \"price_extra\": 0,\n \"price_type\": \"original\",\n \"discount\": false,\n \"order_id\": 1,\n \"tax_ids\": [\n [\n 4,\n 1\n ]\n ],\n \"pack_lot_ids\": [],\n \"full_product_name\": \"Casual T-shirt (Black, S)\",\n \"customer_note\": false,\n \"refund_orderline_ids\": [],\n \"refunded_orderline_id\": false,\n \"note\": false,\n \"combo_parent_id\": false,\n \"combo_line_ids\": [],\n \"combo_item_id\": false,\n \"sale_order_origin_id\": false,\n \"sale_order_line_id\": false,\n \"down_payment_details\": false,\n \"id\": 2\n }\n }\n ]\n },\n \"payment_ids\": {\n \"data\": [\n {\n \"type\": \"pos.payment\",\n \"attributes\": {\n \"name\": false,\n \"pos_order_id\": 1,\n \"amount\": 23,\n \"payment_method_id\": 4,\n \"payment_date\": \"2024-11-14 05:48:35\",\n \"card_type\": false,\n \"card_brand\": false,\n \"card_no\": false,\n \"cardholder_name\": false,\n \"payment_ref_no\": false,\n \"payment_method_authcode\": false,\n \"payment_method_issuer_bank\": false,\n \"payment_method_payment_mode\": false,\n \"transaction_id\": false,\n \"payment_status\": false,\n \"ticket\": \"\",\n \"is_change\": false,\n \"account_move_id\": false,\n \"id\": 1,\n \"create_uid\": false,\n \"create_date\": false,\n \"write_uid\": false,\n \"write_date\": false,\n \"online_account_payment_id\": false\n }\n }\n ]\n }\n }\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.order", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.order" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
}, |
|
{ |
|
"name": "Get Closing Control Data", |
|
"request": { |
|
"method": "POST", |
|
"header": [ |
|
{ |
|
"key": "Content-Type", |
|
"value": "application/vnd.api+json", |
|
"type": "text" |
|
}, |
|
{ |
|
"key": "x-api-key", |
|
"value": "Vw4mVd2FSoTdvMf9SDYLMq9WLP1MOJOz", |
|
"type": "text" |
|
} |
|
], |
|
"body": { |
|
"mode": "raw", |
|
"raw": "{\n \"data\": {\n \"method\": \"get_closing_control_data\",\n \"kwargs\": {}\n }\n}", |
|
"options": { |
|
"raw": { |
|
"language": "json" |
|
} |
|
} |
|
}, |
|
"url": { |
|
"raw": "https://pos-18.dev.odoo-apps.ekika.co/user-jsonapi-apikey/pos.session/10/execute", |
|
"protocol": "https", |
|
"host": [ |
|
"pos-18", |
|
"dev", |
|
"odoo-apps", |
|
"ekika", |
|
"co" |
|
], |
|
"path": [ |
|
"user-jsonapi-apikey", |
|
"pos.session", |
|
"10", |
|
"execute" |
|
] |
|
} |
|
}, |
|
"response": [] |
|
} |
|
] |
|
} |