{"id":4131,"date":"2024-04-04T13:11:08","date_gmt":"2024-04-04T11:11:08","guid":{"rendered":"https:\/\/modulus.help\/kb\/docs\/documentation\/item-catalogue\/api-item-list\/"},"modified":"2024-04-04T13:36:48","modified_gmt":"2024-04-04T11:36:48","slug":"api-item-list","status":"publish","type":"docs","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/item-catalogue\/api-item-list\/","title":{"rendered":"API: Item List"},"content":{"rendered":"<p>The purpose of this API is to list items.<\/p>\n<h4>Request<\/h4>\n<table style=\"width: auto;\">\n<tbody>\n<tr>\n<th style=\"text-align: left;\">URL<\/th>\n<td>https:\/\/your_account.modulus.biz\/api\/itm\/PublicItem?token=YOUR_TOKEN<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">API Name<\/th>\n<td>PublicItem<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Method<\/th>\n<td>POST<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Source<\/th>\n<td>Third Party Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Recipient<\/th>\n<td>modulus\u00ae Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Content Type<\/th>\n<td>application\/json<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Query String Parameters<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"text-align: left;\">token<\/th>\n<td>Yes<\/td>\n<td>Text<\/td>\n<td>Your authentication token.<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">limit<\/th>\n<td>No<\/td>\n<td>Number<\/td>\n<td>Max number of items to return (default 100).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Payload Parameters<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"text-align: left;\">load_options<\/th>\n<td>No<\/td>\n<td>Array<\/td>\n<td>Extra data to load in addition to item basic data. Acceptable values [units, categories, prices, attributes].<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">filter<\/th>\n<td>No<\/td>\n<td>Object<\/td>\n<td>To reduce the resulted data based on specific filtration details <a href=\"#filter_details\">here<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"filter_details\">Filter Parameter Details<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"text-align: left;\">codes<\/th>\n<td>No<\/td>\n<td>Array<\/td>\n<td>One or more item codes.<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">attributes<\/th>\n<td>No<\/td>\n<td>Array<\/td>\n<td>Attributes to return with the item.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Responses<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>HTTP Status<\/th>\n<th>result<\/th>\n<th>title<\/th>\n<th>message<\/th>\n<th>object<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th colspan=\"5\">Success Responses<\/th>\n<\/tr>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>Item loaded successfully.<\/td>\n<td>\n<pre><code class=\"json\">{\r\n      [{\r\n        \"intID\": \"1\",\r\n        \"intBaseUnitID\": \"1\",\r\n        \"intDisplayUnitID\": \"1\",\r\n        \"intBkRevenueAccountID\": -1,\r\n        \"intBkDiscountAccountID\": -1,\r\n        \"intBkReturnAccountID\": -1,\r\n        \"intBkExpenseAccountID\": -1,\r\n        \"decDisplayUnitRatio\": \"1.00\",\r\n        \"strName\": \"HR Module\",\r\n        \"strAlias\": \"Personnel Module\",\r\n        \"strCode\": \"1\",\r\n        \"boolIsDisabled\": \"0\",\r\n        \"strDescription\": \"moo\",\r\n        \"strNotes\": \"NA\",\r\n        \"strCustomAttributes\": \"\",\r\n        \"strType\": \"product\",\r\n        \"boolIsAsset\": false,\r\n        \"boolIsProduction\": false,\r\n        \"boolIsPurchasing\": true,\r\n        \"boolIsSelling\": true,\r\n        \"arrCustomAttribute\": []\r\n      }]\r\n}<\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th colspan=\"5\">Failure Responses<\/th>\n<\/tr>\n<tr>\n<td>500 Internal Server Error<\/td>\n<td>false<\/td>\n<td>Error<\/td>\n<td>Error message describe the problem.<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example<\/h4>\n<table style=\"width: auto;\">\n<tbody>\n<tr>\n<th>Request<\/th>\n<td>\n<pre><code class=\"json\">curl <span style=\"white-space: nowrap;\">--request POST 'https:\/\/your_account.modulus.biz\/api\/itm\/PublicItem?token=YOUR_TOKEN' \\<\/span>\r\n--header 'Content-Type: application\/json' \\\r\n--data-raw '{\r\n    \"load_options\": [\"prices\", \"attributes\"],\r\n    \"filter\": {\r\n        \"codes\": [1,2,3,4],\r\n        \"attributes\": [\"test\"]\r\n    }\r\n}'<\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th>200 OK<\/th>\n<td>\n<pre><code class=\"json\">{\r\n    \"result\": true,\r\n    \"title\": \"Success\",\r\n    \"message\": \"Item Loaded successfully.\",\r\n    \"object\": [\r\n      {\r\n        \"intID\": \"1\",\r\n        \"intBaseUnitID\": \"1\",\r\n        \"intDisplayUnitID\": \"1\",\r\n        \"intBkRevenueAccountID\": -1,\r\n        \"intBkDiscountAccountID\": -1,\r\n        \"intBkReturnAccountID\": -1,\r\n        \"intBkExpenseAccountID\": -1,\r\n        \"decDisplayUnitRatio\": \"1.00\",\r\n        \"strName\": \"HR Module\",\r\n        \"strAlias\": \"Personnel Module\",\r\n        \"strCode\": \"1\",\r\n        \"boolIsDisabled\": \"0\",\r\n        \"strDescription\": \"moo\",\r\n        \"strNotes\": \"N\\\/A\",\r\n        \"strCustomAttributes\": \"\",\r\n        \"strType\": \"product\",\r\n        \"boolIsAsset\": false,\r\n        \"boolIsProduction\": false,\r\n        \"boolIsPurchasing\": true,\r\n        \"boolIsSelling\": true,\r\n        \"arrCustomAttribute\": [],\r\n        \"arrPriceListItem\": [\r\n          {\r\n            \"intID\": \"1\",\r\n            \"decPrice\": 10,\r\n            \"intTaxTypeID\": \"15\",\r\n            \"strAlias\": \"\",\r\n            \"intUnitID\": \"1\",\r\n            \"intPriceListID\": \"1\",\r\n            \"boolIsDisabled\": false,\r\n            \"boolIsUsed\": true\r\n          },\r\n          {\r\n            \"intID\": \"1\",\r\n            \"decPrice\": 200,\r\n            \"intTaxTypeID\": \"3\",\r\n            \"strAlias\": \"\",\r\n            \"intUnitID\": \"1\",\r\n            \"intPriceListID\": \"2\",\r\n            \"boolIsDisabled\": false,\r\n            \"boolIsUsed\": true\r\n          },\r\n          {\r\n            \"intID\": \"1\",\r\n            \"decPrice\": 80,\r\n            \"intTaxTypeID\": \"2\",\r\n            \"strAlias\": \"\",\r\n            \"intUnitID\": \"1\",\r\n            \"intPriceListID\": \"3\",\r\n            \"boolIsDisabled\": false,\r\n            \"boolIsUsed\": true\r\n          }\r\n        ],\r\n        \"arrAttributes\": {\r\n          \"test\": \"94\"\r\n        }\r\n      },\r\n      {\r\n        \"intID\": \"4\",\r\n        \"intBaseUnitID\": \"1\",\r\n        \"intDisplayUnitID\": \"1\",\r\n        \"intBkRevenueAccountID\": -1,\r\n        \"intBkDiscountAccountID\": -1,\r\n        \"intBkReturnAccountID\": -1,\r\n        \"intBkExpenseAccountID\": -1,\r\n        \"decDisplayUnitRatio\": \"1.00\",\r\n        \"strName\": \"INV Module\",\r\n        \"strAlias\": \"Invoice Module\",\r\n        \"strCode\": \"4\",\r\n        \"boolIsDisabled\": \"0\",\r\n        \"strDescription\": \"\",\r\n        \"strNotes\": \"N\\\/A\",\r\n        \"strCustomAttributes\": \"\",\r\n        \"strType\": \"product\",\r\n        \"boolIsAsset\": false,\r\n        \"boolIsProduction\": false,\r\n        \"boolIsPurchasing\": false,\r\n        \"boolIsSelling\": true,\r\n        \"arrCustomAttribute\": [],\r\n        \"arrPriceListItem\": [\r\n          {\r\n            \"intID\": \"4\",\r\n            \"decPrice\": 5,\r\n            \"intTaxTypeID\": \"7\",\r\n            \"strAlias\": \"\",\r\n            \"intUnitID\": \"1\",\r\n            \"intPriceListID\": \"1\",\r\n            \"boolIsDisabled\": false,\r\n            \"boolIsUsed\": true\r\n          }\r\n        ],\r\n        \"arrAttributes\": []\r\n      }\r\n    ]\r\n  }}<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"featured_media":0,"parent":4130,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"comment_count":0,"_links":{"self":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4131"}],"collection":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/comments?post=4131"}],"version-history":[{"count":3,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4131\/revisions"}],"predecessor-version":[{"id":4400,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4131\/revisions\/4400"}],"up":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4130"}],"wp:attachment":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/media?parent=4131"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/doc_tag?post=4131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}