{"id":7613,"date":"2026-09-25T13:47:41","date_gmt":"2026-09-25T06:47:41","guid":{"rendered":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/?p=7613"},"modified":"2026-09-25T13:47:41","modified_gmt":"2026-09-25T06:47:41","slug":"apitms_shop","status":"publish","type":"post","link":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/","title":{"rendered":"TMS Shop Module"},"content":{"rendered":"<h5><strong>SKYBIZ API \u2014 TMS Module<\/strong><\/h5>\n<h3><strong>TMS Shop<\/strong><\/h3>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">The TMS Shop module allows you to retrieve, create, update, and delete shop\/outlet location records in your SKYBIZ TMS shop master. Supports <strong>read<\/strong>, <strong>create<\/strong>, <strong>update<\/strong>, and <strong>delete<\/strong> operations.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Endpoint:<\/strong> <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">\/apiv2\/modules\/tms_shop.php<\/code><\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Required Permissions:<\/strong> TMS Shop \u2014 Read, TMS Shop \u2014 Create, TMS Shop \u2014 Update, TMS Shop \u2014 Delete (as applicable to the action used)<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Primary Key:<\/strong> <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">LocationCode<\/code> \u2014 unique per shop, and <strong>fixed<\/strong> once created (cannot be changed via <code>update<\/code>).<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Batch Limit:<\/strong> Maximum <strong>500 documents<\/strong> per request for <code>create<\/code>, <code>update<\/code>, and <code>delete<\/code>.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Data Wrapper Key:<\/strong> Documents for this module are wrapped under <code>shop_data<\/code>.<\/p>\n<hr \/>\n<h3><strong>Allowed Fields<\/strong><\/h3>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">These are the only fields recognized by this module \u2014 for reading, creating, and updating. Any other field name sent in a <code>create<\/code> or <code>update<\/code> request is rejected. Every field in <code>tms_shop<\/code> is a string \u2014 there are no numeric columns on this module.<\/p>\n<div class=\"overflow-x-auto w-full px-2 mb-6\">\n<table class=\"min-w-full border-collapse text-sm leading-[1.7] whitespace-normal\">\n<thead class=\"text-left\">\n<tr>\n<th class=\"text-text-100 border-b-0.5 border-border-300\/60 py-2 pr-4 align-top font-bold\" scope=\"col\">Field<\/th>\n<th class=\"text-text-100 border-b-0.5 border-border-300\/60 py-2 pr-4 align-top font-bold\" scope=\"col\">Type<\/th>\n<th class=\"text-text-100 border-b-0.5 border-border-300\/60 py-2 pr-4 align-top font-bold\" scope=\"col\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>LocationCode<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Unique shop\/outlet location code. Primary key. Required for every action. <strong>Fixed<\/strong> \u2014 cannot be changed once created<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>LocationName<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Shop\/outlet name<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>Address<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Shop address<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>PostCode<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Postal code<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>City<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">City<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>State<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">State<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>Area<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">General area\/region the shop falls under<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>ContactNo<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Shop contact phone number<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>MallID<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Identifier of the mall the shop is located in, if applicable<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>MallName<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Name of the mall the shop is located in, if applicable<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>ShopAreaCode<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Retail zone\/cluster code this shop belongs to<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>ShopAreaName<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Retail zone\/cluster name this shop belongs to<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>MnemonicCode<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Short mnemonic code used to reference the shop<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>ShopCategory<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Category classification for the shop<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>BoutiqueGroup<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">string<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Boutique group classification for the shop<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr \/>\n<h3><strong>Read TMS Shop<\/strong><\/h3>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Retrieves shop location records. No date range is required for this module. You may optionally select specific fields and\/or filter by exact field values.<\/p>\n<h4>Base Request Structure<\/h4>\n<pre>{\r\n  \"api_key\": \"your-api-key\",\r\n  \"api_secret\": \"your-api-secret\",\r\n  \"action\": \"read\",\r\n  \"fields\": [\"LocationCode\", \"LocationName\", \"City\", \"State\", \"ShopCategory\"],\r\n  \"filters\": {\r\n    \"State\": \"Selangor\"\r\n  }\r\n}<\/pre>\n<h4>Request Parameters<\/h4>\n<div class=\"overflow-x-auto w-full px-2 mb-6\">\n<table class=\"min-w-full border-collapse text-sm leading-[1.7] whitespace-normal\">\n<thead class=\"text-left\">\n<tr>\n<th class=\"text-text-100 border-b-0.5 border-border-300\/60 py-2 pr-4 align-top font-bold\" scope=\"col\">Parameter<\/th>\n<th class=\"text-text-100 border-b-0.5 border-border-300\/60 py-2 pr-4 align-top font-bold\" scope=\"col\">Description<\/th>\n<th class=\"text-text-100 border-b-0.5 border-border-300\/60 py-2 pr-4 align-top font-bold\" scope=\"col\">Required<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>api_key<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Your API key<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Yes<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>api_secret<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Your API secret<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Yes<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>action<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Must be <code>\"read\"<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Yes<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>fields<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Array of field names to return. Any name not in the Allowed Fields list is silently dropped. Omit or leave empty to return all allowed fields<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">No<\/td>\n<\/tr>\n<tr>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\"><code>filters<\/code><\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">Object of <code>field: value<\/code> pairs. Each is applied as an exact-match (<code>=<\/code>) condition, combined with AND. Only keys in the Allowed Fields list are applied; other keys are ignored<\/td>\n<td class=\"border-b-0.5 border-border-300\/30 py-2 pr-4 align-top\">No<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h4>Read Rules<\/h4>\n<ul>\n<li>Results are ordered by <code>LocationCode<\/code><\/li>\n<li>No date range parameter exists or is required for this module<\/li>\n<li>No pagination \u2014 all matching rows are returned in a single response<\/li>\n<li>Filters are exact-match only (no partial\/LIKE matching, no operators)<\/li>\n<li>If <code>fields<\/code> is provided but none of the values match an allowed field, the request is rejected with <code>\"No valid fields requested\"<\/code><\/li>\n<\/ul>\n<hr \/>\n<h3><strong>Example 1 \u2014 Get All Shops (All Fields)<\/strong><\/h3>\n<h4>Request<\/h4>\n<pre>{\r\n  \"api_key\": \"your-api-key\",\r\n  \"api_secret\": \"your-api-secret\",\r\n  \"action\": \"read\"\r\n}<\/pre>\n<h4>Example 2 \u2014 Get Selected Fields, Filtered by State<\/h4>\n<h4>Request<\/h4>\n<pre>{\r\n  \"api_key\": \"your-api-key\",\r\n  \"api_secret\": \"your-api-secret\",\r\n  \"action\": \"read\",\r\n  \"fields\": [\"LocationCode\", \"LocationName\", \"City\", \"ShopCategory\"],\r\n  \"filters\": {\r\n    \"State\": \"Selangor\"\r\n  }\r\n}<\/pre>\n<h4>Sample Code for making an API READ request using php<\/h4>\n<pre>&lt;?php\r\nheader('Content-Type: application\/json');\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 1: CONFIGURATION\r\n\/\/ ============================================================\r\n\r\n$API_KEY = \"your-api-key\";\r\n$API_SECRET = \"your-api-secret\";\r\n$ACTION = \"read\";\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 2: ENDPOINT\r\n\/\/ ============================================================\r\n\r\n$BASE_URL = \"https:\/\/domain-name\/01\/clientportal\/apiv2\/modules\"; \/\/(replace it with your skybiz domain name url)\r\n$ENDPOINT = \"tms_shop.php\";\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 3: REQUEST PARAMETERS (both optional)\r\n\/\/ ============================================================\r\n\r\n$FIELDS = [\"LocationCode\", \"LocationName\", \"City\", \"ShopCategory\"];\r\n$FILTERS = [\r\n    \"State\" =&gt; \"Selangor\"\r\n];\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 4: BUILD PAYLOAD\r\n\/\/ ============================================================\r\n\r\n$payload = [\r\n    \"api_key\"    =&gt; $API_KEY,\r\n    \"api_secret\" =&gt; $API_SECRET,\r\n    \"action\"     =&gt; $ACTION,\r\n    \"fields\"     =&gt; $FIELDS,\r\n    \"filters\"    =&gt; $FILTERS\r\n];\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 5: SEND REQUEST\r\n\/\/ ============================================================\r\n\r\n$url = rtrim($BASE_URL, '\/') . '\/' . ltrim($ENDPOINT, '\/');\r\n\r\n$ch = curl_init($url);\r\n\r\ncurl_setopt_array($ch, [\r\n    CURLOPT_RETURNTRANSFER =&gt; true,\r\n    CURLOPT_POST =&gt; true,\r\n    CURLOPT_POSTFIELDS =&gt; json_encode($payload),\r\n    CURLOPT_HTTPHEADER =&gt; ['Content-Type: application\/json'],\r\n    CURLOPT_TIMEOUT =&gt; 30,\r\n]);\r\n\r\n$response = curl_exec($ch);\r\n\r\nif ($response === false) {\r\n    echo json_encode([\r\n        \"status\" =&gt; \"error\",\r\n        \"timestamp\" =&gt; date(\"c\"),\r\n        \"request_id\" =&gt; uniqid(\"req_\"),\r\n        \"message\" =&gt; curl_error($ch)\r\n    ], JSON_PRETTY_PRINT);\r\n    curl_close($ch);\r\n    exit;\r\n}\r\n\r\ncurl_close($ch);\r\n\r\n$result = json_decode($response, true);\r\n\r\necho json_encode([\r\n    \"status\" =&gt; $result['status'] ?? \"error\",\r\n    \"timestamp\" =&gt; date(\"c\"),\r\n    \"request_id\" =&gt; $result['request_id'] ?? uniqid(\"req_\"),\r\n    \"data\" =&gt; $result['data'] ?? null,\r\n    \"message\" =&gt; $result['message'] ?? null\r\n], JSON_PRETTY_PRINT);<\/pre>\n<h4>Response (Success)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"timestamp\": \"2026-09-25T04:07:04+00:00\",\r\n  \"request_id\": \"req_69f2d56891e57\",\r\n  \"data\": {\r\n    \"requested_by\": \"your-api-key\",\r\n    \"mode\": \"2\",\r\n    \"total_returned\": 2,\r\n    \"data\": [\r\n      {\r\n        \"LocationCode\": \"SHOP001\",\r\n        \"LocationName\": \"Sunway Pyramid Outlet\",\r\n        \"City\": \"Petaling Jaya\",\r\n        \"ShopCategory\": \"Mall\"\r\n      },\r\n      {\r\n        \"LocationCode\": \"SHOP002\",\r\n        \"LocationName\": \"Mid Valley Outlet\",\r\n        \"City\": \"Kuala Lumpur\",\r\n        \"ShopCategory\": \"Mall\"\r\n      }\r\n    ]\r\n  }\r\n}<\/pre>\n<hr \/>\n<h3><strong>Create TMS Shop<\/strong><\/h3>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Creates one or more shop location records. All documents are validated before any are saved. If any document fails validation, the entire batch is rejected \u2014 nothing is inserted.<\/p>\n<h4>Field Rules<\/h4>\n<div class=\"overflow-x-auto w-full px-2 mb-6\">\n<table class=\"min-w-full border-collapse text-sm leading-[1.7] whitespace-normal\">\n<thead class=\"text-left\">\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Rule<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>LocationCode<\/code><\/td>\n<td>string<\/td>\n<td><strong>Compulsory.<\/strong> Must not be empty. Must not already exist \u2014 checked both within the request batch and against existing records<\/td>\n<\/tr>\n<tr>\n<td><code>LocationName<\/code>, <code>Address<\/code>, <code>PostCode<\/code>, <code>City<\/code>, <code>State<\/code>, <code>Area<\/code>, <code>ContactNo<\/code>, <code>MallID<\/code>, <code>MallName<\/code>, <code>ShopAreaCode<\/code>, <code>ShopAreaName<\/code>, <code>MnemonicCode<\/code>, <code>ShopCategory<\/code>, <code>BoutiqueGroup<\/code><\/td>\n<td>string<\/td>\n<td>Optional. Blank\/empty if not provided<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"callout callout-warning\" style=\"background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px 16px; margin: 16px 0;\">\n<p style=\"margin: 0;\">\u26a0\ufe0f <strong>Duplicate Check Order:<\/strong> The batch is first checked for duplicate <code>LocationCode<\/code> values within the same request, then checked against existing records in SKYBIZ. Either kind of duplicate fails the <strong>entire<\/strong> batch, not just the duplicate document.<\/p>\n<\/div>\n<h4>Base Create Request Structure<\/h4>\n<pre>{\r\n  \"api_key\": \"your-api-key\",\r\n  \"api_secret\": \"your-api-secret\",\r\n  \"action\": \"create\",\r\n  \"shop_data\": {\r\n    \"documents\": [\r\n      {\r\n        \"LocationCode\": \"SHOP001\",\r\n        \"LocationName\": \"Sunway Pyramid Outlet\",\r\n        \"Address\": \"3 Jalan PJS 11\/15, Bandar Sunway\",\r\n        \"PostCode\": \"47500\",\r\n        \"City\": \"Petaling Jaya\",\r\n        \"State\": \"Selangor\",\r\n        \"Area\": \"Klang Valley\",\r\n        \"ContactNo\": \"0322345678\",\r\n        \"MallID\": \"MALL001\",\r\n        \"MallName\": \"Sunway Pyramid\",\r\n        \"ShopAreaCode\": \"PJ01\",\r\n        \"ShopAreaName\": \"Petaling Jaya Central\",\r\n        \"MnemonicCode\": \"SPY01\",\r\n        \"ShopCategory\": \"Mall\",\r\n        \"BoutiqueGroup\": \"Flagship\"\r\n      }\r\n    ]\r\n  }\r\n}<\/pre>\n<h4>Sample Code for making an API CREATE request using php<\/h4>\n<pre>&lt;?php\r\nheader('Content-Type: application\/json');\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 1: CONFIGURATION\r\n\/\/ ============================================================\r\n\r\n$API_KEY = \"your-api-key\";\r\n$API_SECRET = \"your-api-secret\";\r\n$ACTION = \"create\";\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 2: ENDPOINT\r\n\/\/ ============================================================\r\n\r\n$BASE_URL = \"https:\/\/domain-name\/01\/clientportal\/apiv2\/modules\"; \/\/(replace it with your skybiz domain name url)\r\n$ENDPOINT = \"tms_shop.php\";\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 3: DATA KEY\r\n\/\/ ============================================================\r\n\r\n$DATA_KEY = \"shop_data\";\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 4: BUILD YOUR DOCUMENTS ARRAY\r\n\/\/ ============================================================\r\n\r\n$DOCUMENTS = [];\r\n\r\n$DOCUMENTS[] = [\r\n    \"LocationCode\"  =&gt; \"SHOP001\",\r\n    \"LocationName\"  =&gt; \"Sunway Pyramid Outlet\",\r\n    \"Address\"       =&gt; \"3 Jalan PJS 11\/15, Bandar Sunway\",\r\n    \"PostCode\"      =&gt; \"47500\",\r\n    \"City\"          =&gt; \"Petaling Jaya\",\r\n    \"State\"         =&gt; \"Selangor\",\r\n    \"Area\"          =&gt; \"Klang Valley\",\r\n    \"ContactNo\"     =&gt; \"0322345678\",\r\n    \"MallID\"        =&gt; \"MALL001\",\r\n    \"MallName\"      =&gt; \"Sunway Pyramid\",\r\n    \"ShopAreaCode\"  =&gt; \"PJ01\",\r\n    \"ShopAreaName\"  =&gt; \"Petaling Jaya Central\",\r\n    \"MnemonicCode\"  =&gt; \"SPY01\",\r\n    \"ShopCategory\"  =&gt; \"Mall\",\r\n    \"BoutiqueGroup\" =&gt; \"Flagship\"\r\n];\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 5: CLIENT-SIDE COUNT CHECK (Please do not modify this)\r\n\/\/ ============================================================\r\n\r\n$totalDocuments = 0;\r\n\r\nforeach ($DOCUMENTS as $document) {\r\n    $totalDocuments++;\r\n\r\n    if (empty($document['LocationCode'])) {\r\n        echo json_encode([\r\n            \"status\" =&gt; \"REJECTED_BY_CLIENT\",\r\n            \"timestamp\" =&gt; date(\"c\"),\r\n            \"request_id\" =&gt; uniqid(\"req_\"),\r\n            \"message\" =&gt; \"CLIENT-SIDE REJECTION: Document at position {$totalDocuments} has empty LocationCode\",\r\n            \"action_required\" =&gt; \"Fix the document before sending to server\"\r\n        ], JSON_PRETTY_PRINT);\r\n        exit;\r\n    }\r\n}\r\n\r\nif ($totalDocuments &gt; 500) {\r\n    echo json_encode([\r\n        \"status\" =&gt; \"REJECTED_BY_CLIENT\",\r\n        \"timestamp\" =&gt; date(\"c\"),\r\n        \"request_id\" =&gt; uniqid(\"req_\"),\r\n        \"message\" =&gt; \"CLIENT-SIDE REJECTION: You have {$totalDocuments} documents. Maximum is 500.\",\r\n        \"your_document_count\" =&gt; $totalDocuments,\r\n        \"max_allowed\" =&gt; 500,\r\n        \"action_required\" =&gt; \"Reduce your documents to 500 or less BEFORE sending to server\"\r\n    ], JSON_PRETTY_PRINT);\r\n    exit;\r\n}\r\n\r\necho \"Sending {$totalDocuments} document(s) to server...\\n\\n\";\r\n\r\n\/\/ ============================================================\r\n\/\/ STEP 6: SEND REQUEST\r\n\/\/ ============================================================\r\n\r\n$url = rtrim($BASE_URL, '\/') . '\/' . ltrim($ENDPOINT, '\/');\r\n\r\n$payload = [\r\n    \"api_key\"    =&gt; $API_KEY,\r\n    \"api_secret\" =&gt; $API_SECRET,\r\n    \"action\"     =&gt; $ACTION,\r\n    $DATA_KEY    =&gt; [\"documents\" =&gt; $DOCUMENTS]\r\n];\r\n\r\n$ch = curl_init($url);\r\n\r\ncurl_setopt_array($ch, [\r\n    CURLOPT_RETURNTRANSFER =&gt; true,\r\n    CURLOPT_POST =&gt; true,\r\n    CURLOPT_POSTFIELDS =&gt; json_encode($payload),\r\n    CURLOPT_HTTPHEADER =&gt; ['Content-Type: application\/json'],\r\n    CURLOPT_TIMEOUT =&gt; 120,\r\n]);\r\n\r\n$response = curl_exec($ch);\r\ncurl_close($ch);\r\n\r\n$result = json_decode($response, true);\r\n\r\necho \"=== SERVER RESPONSE ===\\n\";\r\necho json_encode($result, JSON_PRETTY_PRINT);<\/pre>\n<h4>Response (Success)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"timestamp\": \"2026-09-25T10:30:00+08:00\",\r\n  \"request_id\": \"req_69fc0070d83cf\",\r\n  \"data\": {\r\n    \"requested_by\": \"your-api-key\",\r\n    \"mode\": \"2\",\r\n    \"summary\": {\r\n      \"total_documents\": 1,\r\n      \"inserted\": 1,\r\n      \"failed\": 0\r\n    },\r\n    \"successful_documents\": [\"SHOP001\"],\r\n    \"failed_documents\": [],\r\n    \"fail_details\": {\r\n      \"duplicate_in_request\": [],\r\n      \"duplicate_shops\": [],\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<h4>Response (Error \u2014 Duplicate Shop)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"timestamp\": \"2026-09-25T10:30:00+08:00\",\r\n  \"request_id\": \"req_69fc03e446a20\",\r\n  \"data\": {\r\n    \"requested_by\": \"your-api-key\",\r\n    \"mode\": \"2\",\r\n    \"summary\": {\r\n      \"total_documents\": 1,\r\n      \"inserted\": 0,\r\n      \"failed\": 1\r\n    },\r\n    \"successful_documents\": [],\r\n    \"failed_documents\": [\"SHOP001\"],\r\n    \"fail_details\": {\r\n      \"duplicate_in_request\": [],\r\n      \"duplicate_shops\": [\r\n        {\r\n          \"locationcode\": \"SHOP001\",\r\n          \"error\": \"Shop Location code already exists\"\r\n        }\r\n      ],\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<hr \/>\n<h3><strong>Update TMS Shop<\/strong><\/h3>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Updates one or more existing shop location records, matched by <code>LocationCode<\/code>. This is a <strong>partial update<\/strong> \u2014 only send the fields you want to change, plus <code>LocationCode<\/code> to identify the record. All documents are pre-validated before anything is written; if any document in the batch fails, the entire batch is rejected.<\/p>\n<h4>Field Rules<\/h4>\n<div class=\"overflow-x-auto w-full px-2 mb-6\">\n<table class=\"min-w-full border-collapse text-sm leading-[1.7] whitespace-normal\">\n<thead class=\"text-left\">\n<tr>\n<th>Field<\/th>\n<th>Rule<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>LocationCode<\/code><\/td>\n<td><strong>Compulsory<\/strong> in every document \u2014 used to look up the record. <strong>Fixed<\/strong> \u2014 including it only identifies the row, it is never itself updated<\/td>\n<\/tr>\n<tr>\n<td>Any other Allowed Field<\/td>\n<td>Optional \u2014 include only the fields you want to change. At least one field besides <code>LocationCode<\/code> must be present<\/td>\n<\/tr>\n<tr>\n<td>Any field not in the Allowed Fields list<\/td>\n<td>Not permitted \u2014 fails the whole batch<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h4>Pre-flight Validation (checked before any write, whole batch fails together)<\/h4>\n<ul>\n<li>Every document must have a non-empty <code>LocationCode<\/code><\/li>\n<li>No duplicate <code>LocationCode<\/code> within the same request batch<\/li>\n<li>No unrecognized field names (anything outside the Allowed Fields list)<\/li>\n<li>Every document must include at least one field to update besides <code>LocationCode<\/code> \u2014 sending only <code>LocationCode<\/code> is rejected as &#8220;nothing to update&#8221;<\/li>\n<li>Every <code>LocationCode<\/code> must already exist in SKYBIZ \u2014 if even one is not found, the whole batch is rejected<\/li>\n<\/ul>\n<div class=\"callout callout-warning\" style=\"background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px 16px; margin: 16px 0;\">\n<p style=\"margin: 0;\">\u26a0\ufe0f <strong>All-or-Nothing:<\/strong> A single bad document (not found, duplicate, unknown field, or nothing to update) causes <strong>every<\/strong> document in the request \u2014 including the valid ones \u2014 to fail.<\/p>\n<\/div>\n<h4>Base Update Request Structure<\/h4>\n<pre>{\r\n  \"api_key\": \"your-api-key\",\r\n  \"api_secret\": \"your-api-secret\",\r\n  \"action\": \"update\",\r\n  \"shop_data\": {\r\n    \"documents\": [\r\n      {\r\n        \"LocationCode\": \"SHOP001\",\r\n        \"ContactNo\": \"0322345699\",\r\n        \"ShopCategory\": \"Flagship Mall\"\r\n      }\r\n    ]\r\n  }\r\n}<\/pre>\n<h4>Sample Code for making an API UPDATE request using php<\/h4>\n<pre>&lt;?php\r\nheader('Content-Type: application\/json');\r\n\r\n$API_KEY = \"your-api-key\";\r\n$API_SECRET = \"your-api-secret\";\r\n$ACTION = \"update\";\r\n\r\n$BASE_URL = \"https:\/\/domain-name\/01\/clientportal\/apiv2\/modules\"; \/\/(replace it with your skybiz domain name url)\r\n$ENDPOINT = \"tms_shop.php\";\r\n\r\n$DOCUMENTS = [];\r\n\r\n\/\/ Only send LocationCode + the fields you want to change\r\n$DOCUMENTS[] = [\r\n    \"LocationCode\" =&gt; \"SHOP001\",\r\n    \"ContactNo\"    =&gt; \"0322345699\",\r\n    \"ShopCategory\" =&gt; \"Flagship Mall\"\r\n];\r\n\r\nif (count($DOCUMENTS) &gt; 500) {\r\n    echo json_encode([\r\n        \"status\" =&gt; \"REJECTED_BY_CLIENT\",\r\n        \"message\" =&gt; \"Maximum 500 documents per request.\"\r\n    ], JSON_PRETTY_PRINT);\r\n    exit;\r\n}\r\n\r\n$url = rtrim($BASE_URL, '\/') . '\/' . ltrim($ENDPOINT, '\/');\r\n\r\n$payload = [\r\n    \"api_key\"    =&gt; $API_KEY,\r\n    \"api_secret\" =&gt; $API_SECRET,\r\n    \"action\"     =&gt; $ACTION,\r\n    \"shop_data\"  =&gt; [\"documents\" =&gt; $DOCUMENTS]\r\n];\r\n\r\n$ch = curl_init($url);\r\n\r\ncurl_setopt_array($ch, [\r\n    CURLOPT_RETURNTRANSFER =&gt; true,\r\n    CURLOPT_POST =&gt; true,\r\n    CURLOPT_POSTFIELDS =&gt; json_encode($payload),\r\n    CURLOPT_HTTPHEADER =&gt; ['Content-Type: application\/json'],\r\n    CURLOPT_TIMEOUT =&gt; 120,\r\n]);\r\n\r\n$response = curl_exec($ch);\r\ncurl_close($ch);\r\n\r\necho json_encode(json_decode($response, true), JSON_PRETTY_PRINT);<\/pre>\n<h4>Response (Success)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"timestamp\": \"2026-09-25T11:00:00+08:00\",\r\n  \"request_id\": \"req_69fc1234abcd\",\r\n  \"data\": {\r\n    \"requested_by\": \"your-api-key\",\r\n    \"mode\": \"2\",\r\n    \"summary\": {\r\n      \"total_documents\": 1,\r\n      \"updated\": 1,\r\n      \"not_found\": 0,\r\n      \"failed\": 0\r\n    },\r\n    \"successful_documents\": [\"SHOP001\"],\r\n    \"not_found_documents\": [],\r\n    \"failed_documents\": [],\r\n    \"fail_details\": {\r\n      \"not_found\": [],\r\n      \"nothing_to_update\": [],\r\n      \"unknown_fields\": [],\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<h4>Response (Error \u2014 Shop Not Found)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"timestamp\": \"2026-09-25T11:00:00+08:00\",\r\n  \"request_id\": \"req_69fc5678efgh\",\r\n  \"data\": {\r\n    \"requested_by\": \"your-api-key\",\r\n    \"mode\": \"2\",\r\n    \"summary\": {\r\n      \"total_documents\": 1,\r\n      \"updated\": 0,\r\n      \"not_found\": 1,\r\n      \"failed\": 1\r\n    },\r\n    \"successful_documents\": [],\r\n    \"not_found_documents\": [\"SHOP999\"],\r\n    \"failed_documents\": [\"SHOP999\"],\r\n    \"fail_details\": {\r\n      \"not_found\": [\"SHOP999\"],\r\n      \"nothing_to_update\": [],\r\n      \"unknown_fields\": [],\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<h4>Response (Error \u2014 Unknown Field)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"data\": {\r\n    \"summary\": { \"total_documents\": 1, \"updated\": 0, \"not_found\": 0, \"failed\": 1 },\r\n    \"successful_documents\": [],\r\n    \"not_found_documents\": [],\r\n    \"failed_documents\": [\"SHOP001\"],\r\n    \"fail_details\": {\r\n      \"not_found\": [],\r\n      \"nothing_to_update\": [],\r\n      \"unknown_fields\": {\r\n        \"SHOP001\": [\"OpeningHours\"]\r\n      },\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<hr \/>\n<h3><strong>Delete TMS Shop<\/strong><\/h3>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Deletes one or more shop location records, matched by <code>LocationCode<\/code>. This permanently removes the record \u2014 there is no undo. All documents are pre-validated before anything is deleted; if any document fails, the entire batch is rejected.<\/p>\n<h4>Pre-flight Validation (checked before any write, whole batch fails together)<\/h4>\n<ul>\n<li>Every document must have a non-empty <code>LocationCode<\/code><\/li>\n<li>No duplicate <code>LocationCode<\/code> within the same request batch<\/li>\n<li>Every <code>LocationCode<\/code> must already exist in SKYBIZ \u2014 if even one is not found, the whole batch is rejected and nothing is deleted<\/li>\n<\/ul>\n<h4>Base Delete Request Structure<\/h4>\n<pre>{\r\n  \"api_key\": \"your-api-key\",\r\n  \"api_secret\": \"your-api-secret\",\r\n  \"action\": \"delete\",\r\n  \"shop_data\": {\r\n    \"documents\": [\r\n      { \"LocationCode\": \"SHOP001\" },\r\n      { \"LocationCode\": \"SHOP002\" }\r\n    ]\r\n  }\r\n}<\/pre>\n<h4>Sample Code for making an API DELETE request using php<\/h4>\n<pre>&lt;?php\r\nheader('Content-Type: application\/json');\r\n\r\n$API_KEY = \"your-api-key\";\r\n$API_SECRET = \"your-api-secret\";\r\n$ACTION = \"delete\";\r\n\r\n$BASE_URL = \"https:\/\/domain-name\/01\/clientportal\/apiv2\/modules\"; \/\/(replace it with your skybiz domain name url)\r\n$ENDPOINT = \"tms_shop.php\";\r\n\r\n$DOCUMENTS = [\r\n    [\"LocationCode\" =&gt; \"SHOP001\"],\r\n    [\"LocationCode\" =&gt; \"SHOP002\"]\r\n];\r\n\r\nif (count($DOCUMENTS) &gt; 500) {\r\n    echo json_encode([\r\n        \"status\" =&gt; \"REJECTED_BY_CLIENT\",\r\n        \"message\" =&gt; \"Maximum 500 documents per request.\"\r\n    ], JSON_PRETTY_PRINT);\r\n    exit;\r\n}\r\n\r\n$url = rtrim($BASE_URL, '\/') . '\/' . ltrim($ENDPOINT, '\/');\r\n\r\n$payload = [\r\n    \"api_key\"    =&gt; $API_KEY,\r\n    \"api_secret\" =&gt; $API_SECRET,\r\n    \"action\"     =&gt; $ACTION,\r\n    \"shop_data\"  =&gt; [\"documents\" =&gt; $DOCUMENTS]\r\n];\r\n\r\n$ch = curl_init($url);\r\n\r\ncurl_setopt_array($ch, [\r\n    CURLOPT_RETURNTRANSFER =&gt; true,\r\n    CURLOPT_POST =&gt; true,\r\n    CURLOPT_POSTFIELDS =&gt; json_encode($payload),\r\n    CURLOPT_HTTPHEADER =&gt; ['Content-Type: application\/json'],\r\n    CURLOPT_TIMEOUT =&gt; 120,\r\n]);\r\n\r\n$response = curl_exec($ch);\r\ncurl_close($ch);\r\n\r\necho json_encode(json_decode($response, true), JSON_PRETTY_PRINT);<\/pre>\n<h4>Response (Success)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"timestamp\": \"2026-09-25T11:15:00+08:00\",\r\n  \"request_id\": \"req_69fc9999ijkl\",\r\n  \"data\": {\r\n    \"requested_by\": \"your-api-key\",\r\n    \"mode\": \"2\",\r\n    \"summary\": {\r\n      \"total_documents\": 2,\r\n      \"deleted\": 2,\r\n      \"not_found\": 0,\r\n      \"failed\": 0\r\n    },\r\n    \"successful_documents\": [\"SHOP001\", \"SHOP002\"],\r\n    \"not_found_documents\": [],\r\n    \"failed_documents\": [],\r\n    \"fail_details\": {\r\n      \"not_found\": [],\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<h4>Response (Error \u2014 Shop Not Found)<\/h4>\n<pre>{\r\n  \"status\": \"response\",\r\n  \"data\": {\r\n    \"summary\": { \"total_documents\": 1, \"deleted\": 0, \"not_found\": 1, \"failed\": 1 },\r\n    \"successful_documents\": [],\r\n    \"not_found_documents\": [\"SHOP999\"],\r\n    \"failed_documents\": [\"SHOP999\"],\r\n    \"fail_details\": {\r\n      \"not_found\": [\"SHOP999\"],\r\n      \"validation_errors\": []\r\n    }\r\n  }\r\n}<\/pre>\n<hr \/>\n<h3><strong>Rate Limits &amp; Quota<\/strong><\/h3>\n<ul>\n<li><strong>Rate limit:<\/strong> 5 requests per 10 seconds, enforced per IP address and per API key. Exceeding it returns HTTP 429 with <code>\"Rate limit exceeded\"<\/code><\/li>\n<li><strong>Monthly quota:<\/strong> checked only on <code>create<\/code>, against the record count already used this month for TMS Shop. <code>read<\/code>, <code>update<\/code>, and <code>delete<\/code> are not quota-limited<\/li>\n<li><strong>Batch cap:<\/strong> 500 documents per request for <code>create<\/code>, <code>update<\/code>, and <code>delete<\/code> (not applicable to <code>read<\/code>)<\/li>\n<\/ul>\n<hr \/>\n<h3><strong>Error Responses<\/strong><\/h3>\n<h4>Missing API Credentials<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"API key and secret are required\"\r\n}<\/pre>\n<h4>Invalid API Credentials<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"Invalid API credentials\"\r\n}<\/pre>\n<h4>Expired API Key<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"API key expired on 2026-08-01. Please delete the expired credentials and create a new API key set to continue using the API.\"\r\n}<\/pre>\n<h4>Missing \/ Invalid Action<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"action is required. Use 'read', 'create', 'update', or 'delete'\"\r\n}<\/pre>\n<h4>No Permission for Action<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"tms_shop update permission denied\"\r\n}<\/pre>\n<h4>Missing shop_data \/ documents (CREATE \/ UPDATE \/ DELETE)<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"shop_data.documents must be a non-empty array\"\r\n}<\/pre>\n<h4>Batch Limit Exceeded (CREATE \/ UPDATE \/ DELETE)<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"Maximum 500 documents allowed. You sent 600. Please split into multiple requests with max 500 documents each.\"\r\n}<\/pre>\n<h4>Monthly Quota Exceeded (CREATE only)<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"Quota exceeded! You have used 950 out of 1000 records this month. You requested 100 more records, but only 50 remaining. Please reduce your request or contact administrator to increase quota.\"\r\n}<\/pre>\n<h4>Rate Limit Exceeded<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"data\": {\r\n    \"key\": \"your-api-key\",\r\n    \"limit\": 5,\r\n    \"window_seconds\": 10\r\n  },\r\n  \"message\": \"Rate limit exceeded\"\r\n}<\/pre>\n<h4>No Valid Fields Requested (READ)<\/h4>\n<pre>{\r\n  \"status\": \"error\",\r\n  \"timestamp\": \"2026-09-25T10:46:15+08:00\",\r\n  \"request_id\": \"req_6612f3b9c21a7\",\r\n  \"message\": \"No valid fields requested\"\r\n}<\/pre>\n<hr \/>\n<h3><strong>Common Errors \u2014 TMS Shop Module<\/strong><\/h3>\n<div class=\"overflow-x-auto w-full px-2 mb-6\">\n<table class=\"min-w-full border-collapse text-sm leading-[1.7] whitespace-normal\">\n<thead class=\"text-left\">\n<tr>\n<th>Error Message<\/th>\n<th>Cause<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>\"API key and secret are required\"<\/code><\/td>\n<td>Missing <code>api_key<\/code> or <code>api_secret<\/code><\/td>\n<td>Include both in the request<\/td>\n<\/tr>\n<tr>\n<td><code>\"Invalid action. Use 'read', 'create', 'update', or 'delete'\"<\/code><\/td>\n<td>Unsupported <code>action<\/code> value<\/td>\n<td>Use one of the four supported actions<\/td>\n<\/tr>\n<tr>\n<td><code>\"shop_data is required for create action\"<\/code> (or update\/delete)<\/td>\n<td>Missing <code>shop_data<\/code> object<\/td>\n<td>Wrap your documents in <code>shop_data.documents<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>\"Maximum 500 documents allowed...\"<\/code><\/td>\n<td>More than 500 documents in one create\/update\/delete request<\/td>\n<td>Split into batches of 500 or fewer<\/td>\n<\/tr>\n<tr>\n<td><code>\"Document with empty LocationCode found in batch\"<\/code><\/td>\n<td>A document is missing <code>LocationCode<\/code> (CREATE)<\/td>\n<td>Every document needs a non-empty <code>LocationCode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>\"Duplicate LocationCode 'X' found in the same batch\"<\/code><\/td>\n<td>Same <code>LocationCode<\/code> sent twice in one request<\/td>\n<td>Remove the duplicate, or send it in a separate request<\/td>\n<\/tr>\n<tr>\n<td><code>\"Shop Location code already exists\"<\/code><\/td>\n<td><code>LocationCode<\/code> already exists in SKYBIZ (CREATE)<\/td>\n<td>Use a unique <code>LocationCode<\/code>, or use <code>update<\/code> instead<\/td>\n<\/tr>\n<tr>\n<td><code>LocationCode<\/code> listed under <code>not_found_documents<\/code><\/td>\n<td><code>LocationCode<\/code> does not exist in SKYBIZ (UPDATE \/ DELETE)<\/td>\n<td>Check the code exists, or use <code>create<\/code> first<\/td>\n<\/tr>\n<tr>\n<td>Field name listed under <code>unknown_fields<\/code><\/td>\n<td>A field outside the Allowed Fields list was sent (UPDATE)<\/td>\n<td>Remove the field, or check spelling against the Allowed Fields table<\/td>\n<\/tr>\n<tr>\n<td><code>\"No updatable fields provided (only PK was sent)\"<\/code><\/td>\n<td>Document contained only <code>LocationCode<\/code>, nothing to change (UPDATE)<\/td>\n<td>Include at least one other field to update<\/td>\n<\/tr>\n<tr>\n<td><code>\"No valid fields requested\"<\/code><\/td>\n<td><code>fields<\/code> array contains no recognized field names (READ)<\/td>\n<td>Use field names from the Allowed Fields table<\/td>\n<\/tr>\n<tr>\n<td><code>\"tms_shop read\/create\/update\/delete permission denied\"<\/code><\/td>\n<td>API key&#8217;s module permissions don&#8217;t include that action<\/td>\n<td>Enable the permission in the portal by contacting your SkyBiz Admin<\/td>\n<\/tr>\n<tr>\n<td><code>\"Rate limit exceeded\"<\/code><\/td>\n<td>More than 5 requests in a 10-second window<\/td>\n<td>Slow down request frequency \/ add retry backoff<\/td>\n<\/tr>\n<tr>\n<td><code>\"Quota exceeded!...\"<\/code><\/td>\n<td>Monthly record quota reached (CREATE only)<\/td>\n<td>Reduce batch size or contact administrator to raise quota<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>SKYBIZ API \u2014 TMS Module TMS Shop The TMS Shop module allows you to retrieve, create, update, and delete shop\/outlet location records in your SKYBIZ TMS shop master. Supports read, create, update, and delete operations. Endpoint: \/apiv2\/modules\/tms_shop.php Required Permissions: TMS Shop \u2014 Read, TMS Shop \u2014 Create, TMS Shop \u2014 Update, TMS Shop \u2014 Delete ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[227],"tags":[],"class_list":["post-7613","post","type-post","status-publish","format-standard","hentry","category-1011-tms-shop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>TMS Shop Module - SKYBIZ Cloud ERP Support<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TMS Shop Module - SKYBIZ Cloud ERP Support\" \/>\n<meta property=\"og:description\" content=\"SKYBIZ API \u2014 TMS Module TMS Shop The TMS Shop module allows you to retrieve, create, update, and delete shop\/outlet location records in your SKYBIZ TMS shop master. Supports read, create, update, and delete operations. Endpoint: \/apiv2\/modules\/tms_shop.php Required Permissions: TMS Shop \u2014 Read, TMS Shop \u2014 Create, TMS Shop \u2014 Update, TMS Shop \u2014 Delete ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/\" \/>\n<meta property=\"og:site_name\" content=\"SKYBIZ Cloud ERP Support\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-25T06:47:41+00:00\" \/>\n<meta name=\"author\" content=\"team 03\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"team 03\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/\"},\"author\":{\"name\":\"team 03\",\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/#\\\/schema\\\/person\\\/f3a2bcb10e55b23238c1b160bb06d9a9\"},\"headline\":\"TMS Shop Module\",\"datePublished\":\"2026-09-25T06:47:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/\"},\"wordCount\":1180,\"articleSection\":[\"1011. TMS Shop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/\",\"url\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/\",\"name\":\"TMS Shop Module - SKYBIZ Cloud ERP Support\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/#website\"},\"datePublished\":\"2026-09-25T06:47:41+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/#\\\/schema\\\/person\\\/f3a2bcb10e55b23238c1b160bb06d9a9\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/apitms_shop\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TMS Shop Module\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/#website\",\"url\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/\",\"name\":\"SKYBIZ Cloud ERP Support\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/#\\\/schema\\\/person\\\/f3a2bcb10e55b23238c1b160bb06d9a9\",\"name\":\"team 03\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed4575e459e48798469dd7ea3f93c83386ac432dd3bfebbf7d56837d067cbb88?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed4575e459e48798469dd7ea3f93c83386ac432dd3bfebbf7d56837d067cbb88?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed4575e459e48798469dd7ea3f93c83386ac432dd3bfebbf7d56837d067cbb88?s=96&d=blank&r=g\",\"caption\":\"team 03\"},\"sameAs\":[\"http:\\\/\\\/skybiz.com.my\"],\"url\":\"https:\\\/\\\/aisupport.skybizglobal.com\\\/skybizclouderp\\\/author\\\/team03skybiz-com-my\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TMS Shop Module - SKYBIZ Cloud ERP Support","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"TMS Shop Module - SKYBIZ Cloud ERP Support","og_description":"SKYBIZ API \u2014 TMS Module TMS Shop The TMS Shop module allows you to retrieve, create, update, and delete shop\/outlet location records in your SKYBIZ TMS shop master. Supports read, create, update, and delete operations. Endpoint: \/apiv2\/modules\/tms_shop.php Required Permissions: TMS Shop \u2014 Read, TMS Shop \u2014 Create, TMS Shop \u2014 Update, TMS Shop \u2014 Delete ..Read more","og_url":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/","og_site_name":"SKYBIZ Cloud ERP Support","article_published_time":"2026-09-25T06:47:41+00:00","author":"team 03","twitter_card":"summary_large_image","twitter_misc":{"Written by":"team 03","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/#article","isPartOf":{"@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/"},"author":{"name":"team 03","@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/#\/schema\/person\/f3a2bcb10e55b23238c1b160bb06d9a9"},"headline":"TMS Shop Module","datePublished":"2026-09-25T06:47:41+00:00","mainEntityOfPage":{"@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/"},"wordCount":1180,"articleSection":["1011. TMS Shop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/","url":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/","name":"TMS Shop Module - SKYBIZ Cloud ERP Support","isPartOf":{"@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/#website"},"datePublished":"2026-09-25T06:47:41+00:00","author":{"@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/#\/schema\/person\/f3a2bcb10e55b23238c1b160bb06d9a9"},"breadcrumb":{"@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/apitms_shop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/"},{"@type":"ListItem","position":2,"name":"TMS Shop Module"}]},{"@type":"WebSite","@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/#website","url":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/","name":"SKYBIZ Cloud ERP Support","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/#\/schema\/person\/f3a2bcb10e55b23238c1b160bb06d9a9","name":"team 03","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed4575e459e48798469dd7ea3f93c83386ac432dd3bfebbf7d56837d067cbb88?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed4575e459e48798469dd7ea3f93c83386ac432dd3bfebbf7d56837d067cbb88?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed4575e459e48798469dd7ea3f93c83386ac432dd3bfebbf7d56837d067cbb88?s=96&d=blank&r=g","caption":"team 03"},"sameAs":["http:\/\/skybiz.com.my"],"url":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/author\/team03skybiz-com-my\/"}]}},"_links":{"self":[{"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/posts\/7613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/comments?post=7613"}],"version-history":[{"count":2,"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/posts\/7613\/revisions"}],"predecessor-version":[{"id":7615,"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/posts\/7613\/revisions\/7615"}],"wp:attachment":[{"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/media?parent=7613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/categories?post=7613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aisupport.skybizglobal.com\/skybizclouderp\/wp-json\/wp\/v2\/tags?post=7613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}