{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"12d60319-660e-4a86-acdc-3a3d278d43d6","name":"API CRMconnect","description":"# CRMconnect API - Postman Documentation\n\n## 1) General setup in Postman\n\nUse these collection/environment variables:\n\n- `client_instance` = `https://client-domain.tld`\n    \n- `base_url` = `{{client_instance}}/api/`\n    \n- `authtoken` = token copied from `{{client_instance}}/admin/api/api_management`\n    \n- `resource` = dynamic resource name (example: `customers`, `invoices`, `projects`)\n    \n- `record_id` = numeric id\n    \n- `search_key` = search keyword\n    \n\nAuth header for all API requests:\n\n- Header key: `authtoken`\n    \n- Header value: `{{authtoken}}`\n    \n\n## 2) Where to get authtoken\n\n1. Open `{{client_instance}}/admin/api/api_management`\n    \n2. Create/select API user/token from management screen\n    \n3. Copy token in Postman variable `authtoken`\n    \n4. Send requests with header `authtoken: {{authtoken}}`\n    \n\n## 3) Global route patterns\n\nBase route:\n\n- `{{base_url}}` already contains `/api/`\n    \n\nStandard API patterns:\n\n- List: `GET {{base_url}}{{resource}}?page=1&per_page=50`\n    \n- Get one: `GET {{base_url}}{{resource}}/{{record_id}}`\n    \n- Search: `GET {{base_url}}{{resource}}/search/{{search_key}}`\n    \n- Create: `POST {{base_url}}{{resource}}`\n    \n- Update: `PUT {{base_url}}{{resource}}/{{record_id}}`\n    \n- Delete: `DELETE {{base_url}}delete/{{resource}}/{{record_id}}`\n    \n\nWMS API patterns:\n\n- List: `GET {{base_url}}wms/{{resource}}?page=1&per_page=50`\n    \n- Get one: `GET {{base_url}}wms/{{resource}}/{{record_id}}`\n    \n- Search (where implemented): `GET {{base_url}}wms/{{resource}}/search/{{search_key}}`\n    \n- Create: `POST {{base_url}}wms/{{resource}}`\n    \n- Update: `PUT {{base_url}}wms/{{resource}}/{{record_id}}`\n    \n- Delete: `DELETE {{base_url}}wms/{{resource}}/{{record_id}}`\n    \n\n## 4) Special auth endpoints\n\n- `POST {{base_url}}login/auth`\n    \n- `POST {{base_url}}login/view`\n    \n- `POST {{base_url}}login/key`\n    \n\nNote: in production flow, use token from `admin/api/api_management` as requested.\n\n## 5) Core API resources index\n\nUse these values in `{{resource}}` for the standard patterns above.\n\n`announcements`, `client_work_points`, `commodity_groups`, `commodity_subgroups`, `common`, `contacts`, `contract_types`, `contracts`, `countries`, `credit_notes`, `crm_active_package`, `crmpackages`, `currencies`, `customer_groups`, `customers`, `customersbygln`, `domaincheck`, `estimates`, `expense_categories`, `expenses`, `files`, `goals`, `initiate_enrollment`, `inventory`, `invoices`, `item_categories`, `items`, `job_types`, `ka_omn_invoices`, `ka_omn_manage_delivery`, `ka_omn_orders`, `ka_omn_recadv`, `key`, `lead_sources`, `lead_statuses`, `leads`, `marketing_campaigns`, `milestones`, `modulesapi`, `omn_orders`, `opportunities`, `opportunity_statuses`, `options`, `orders`, `overview`, `packages_activate`, `payments`, `projects`, `proformas`, `proposals`, `register_crm`, `reminders`, `staffs`, `states`, `surveys`, `tags`, `tasks`, `taxes`, `tickets`, `units`, `update_profile`, `warehouses`\n\n## 6) WMS resources index\n\nUse these values in `{{resource}}` with `/wms/` prefix:\n\n`warehouse_manage`, `commodity_list`, `manage_purchase`, `manage_delivery`, `goods_issue_note`, `manage_packing_list`, `manage_internal_delivery`, `loss_adjustment`, `physical_inventory`, `manage_order_return_delivery`, `manage_order_return_receipt`, `warehouse_history`\n\nNotes:\n\n- `warehouse_history` is read-only (GET list / GET one), write methods return not allowed.\n    \n- `commodity_list` supports search endpoint.\n    \n\n## 7) Pagination and common query params\n\nCommon list query params:\n\n- `page` (default 1)\n    \n- `per_page` (default controller value; max enforced by API)\n    \n- optional module-specific filters depending on endpoint\n    \n\n## 8) Common response shape\n\nTypical success list:\n\n``` json\n{\n  \"status\": true,\n  \"data\": [],\n  \"total_results\": 0,\n  \"page\": 1,\n  \"per_page\": 50,\n  \"results\": 0,\n  \"last_page\": 0,\n  \"has_next_page\": false\n}\n\n ```\n\nTypical success get-by-id (WMS documents):\n\n``` json\n{\n  \"status\": true,\n  \"data\": {},\n  \"details\": [],\n  \"references\": {}\n}\n\n ```\n\nTypical error:\n\n``` json\n{\n  \"status\": false,\n  \"message\": \"No data were found\"\n}\n\n ```\n\n## 9) Suggested Postman folder structure\n\n1. `00 - Setup & Auth`\n    \n2. `01 - Core API Templates`\n    \n3. `02 - Core API Resources`\n    \n4. `03 - WMS API Resources`\n    \n5. `99 - Troubleshooting`\n    \n\nInside `01 - Core API Templates`, create 6 requests using `{{resource}}` and `{{record_id}}`:\n\n- List\n    \n- Get one\n    \n- Search\n    \n- Create\n    \n- Update\n    \n- Delete\n    \n\nThis gives full coverage quickly for all resources.\n\n## 10) Troubleshooting checklist\n\n- 401/403: token invalid, missing, or expired\n    \n- 404: resource not found, wrong `record_id`, or endpoint not implemented in that controller\n    \n- 405: method not allowed for that endpoint\n    \n- Empty data: verify filters, permissions, and existing records in client instance\n    \n- WMS access: warehouse module must be active","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"10608325","team":6189965,"collectionId":"12d60319-660e-4a86-acdc-3a3d278d43d6","publishedId":"2sA3JDi6Cx","public":true,"publicUrl":"https://documenter-api.postman.tech/view/10608325/2sA3JDi6Cx","privateUrl":"https://go.postman.co/documentation/10608325-12d60319-660e-4a86-acdc-3a3d278d43d6","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"API CRMconnect"},{"name":"title","value":""}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":"https://content.pstmn.io/9307ea85-bcc3-43fc-b0bb-ec5a3393b868/Q1JNX2xvZ28ucG5n","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":"https://content.pstmn.io/403b9f79-847f-44a5-8318-6ac017f51f0c/Q1JNX2xvZ28ucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2024-05-01T08:58:21.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":"API CRMconnect"},"logos":{"logoLight":"https://content.pstmn.io/403b9f79-847f-44a5-8318-6ac017f51f0c/Q1JNX2xvZ28ucG5n","logoDark":"https://content.pstmn.io/9307ea85-bcc3-43fc-b0bb-ec5a3393b868/Q1JNX2xvZ28ucG5n"}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/755502d8a779afba4c087387d3addebfdb6baef4ccdc73168f1a5006ab8515b5","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sA3JDi6Cx"}