Subversion Repositories SmartDukaan

Rev

Rev 37856 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37856 Rev 37912
Line 53... Line 53...
53
</table>
53
</table>
54
 
54
 
55
<h2>Data model</h2>
55
<h2>Data model</h2>
56
<pre>categoryId = a product category exposed to you        → listed in categoryMaster
56
<pre>categoryId = a product category exposed to you        → listed in categoryMaster
57
catalogId  = a product model (e.g. "Galaxy A15")     → content in catalogMaster
57
catalogId  = a product model (e.g. "Galaxy A15")     → content in catalogMaster
58
itemId     = a sellable SKU (variant of a catalog)     → listed in catalogSkuMaster
58
itemId     = a sellable SKU, one per colour            → listed in catalogSkuMaster
59
storeId    = a physical partner store mapped to you   → listed in storeMaster
59
storeId    = a physical partner store mapped to you   → listed in storeMaster
60
stock      = (storeId, itemId) → availability          → skuMaster / stock</pre>
60
stock      = (storeId, itemId) → availability          → skuMaster / stock</pre>
61
<p>Prices per SKU: <code>mop</code> is the proposed selling price; <code>mrp</code> is the maximum retail
61
<p>Prices per SKU: <code>mop</code> is the proposed selling price; <code>mrp</code> is the maximum retail
62
price (strike-through display). A SKU with <code>active: false</code> is delisted and should not be sold.</p>
62
price (strike-through display). A SKU with <code>active: false</code> is delisted and should not be sold.</p>
63
<p><code>brandIdentifier</code> is the brand's own article/SKU code and is maintained <strong>per itemId</strong>
63
<p><code>brandIdentifier</code> is the brand's own article/SKU code and is maintained <strong>per itemId</strong>
64
(one colour variant of a catalog), not per catalog. It is returned on every SKU-level row —
64
(one colour variant of a catalog), not per catalog. It is returned on every SKU-level row —
65
<code>/catalogSkuMaster</code>, <code>/catalogSkus</code>, <code>/skuMaster</code> and <code>/stock</code> — and is
65
<code>/catalogSkuMaster</code>, <code>/catalogSkus</code>, <code>/skuMaster</code> and <code>/stock</code> — and is
66
<code>null</code> where it has not yet been maintained. Always key SKUs by <code>itemId</code>.</p>
66
<code>null</code> where it has not yet been maintained. Always key SKUs by <code>itemId</code>.</p>
-
 
67
<p><code>color</code> is the SKU's colour name (e.g. <code>"Blue"</code>) on the same SKU-level rows; it tells
-
 
68
apart SKUs of one catalog that share a <code>title</code>, and is <code>null</code> for colourless SKUs.</p>
67
<div class="note">
69
<div class="note">
68
  <strong>Category scoping:</strong> your account is mapped to specific categories (see
70
  <strong>Category scoping:</strong> your account is mapped to specific categories (see
69
  <code>/categoryMaster</code>). Every feed and lookup only ever returns catalogs, SKUs and stock within
71
  <code>/categoryMaster</code>). Every feed and lookup only ever returns catalogs, SKUs and stock within
70
  those categories. <code>title</code> is present and non-empty on catalog, SKU and stock records — the
72
  those categories. <code>title</code> is present and non-empty on catalog, SKU and stock records — the
71
  same derived product title everywhere.
73
  same derived product title everywhere.
Line 124... Line 126...
124
only newly introduced SKUs, as opposed to <code>updatedSince</code> which also returns price/stock/listing
126
only newly introduced SKUs, as opposed to <code>updatedSince</code> which also returns price/stock/listing
125
updates of existing SKUs.</p>
127
updates of existing SKUs.</p>
126
<pre>GET /external/v1/catalogSkuMaster?offset=0&amp;limit=500
128
<pre>GET /external/v1/catalogSkuMaster?offset=0&amp;limit=500
127
→ records: [ { "catalogId": 12345, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
129
→ records: [ { "catalogId": 12345, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
128
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
130
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
129
               "brandIdentifier": "SM-A155FZKW",
131
               "color": "Blue", "brandIdentifier": "SM-A155FZKW",
130
               "mop": 14999.0, "mrp": 17999.0, "active": true,
132
               "mop": 14999.0, "mrp": 17999.0, "active": true,
131
               "updatedAt": 1753500000000, "addedOn": 1750000000000 } ]</pre>
133
               "updatedAt": 1753500000000, "addedOn": 1750000000000 } ]</pre>
132
 
134
 
133
<h3><span class="method">GET</span>/skuMaster</h3>
135
<h3><span class="method">GET</span>/skuMaster</h3>
134
<p>Per-store stock + price rows for <em>your mapped stores</em>, with full item identity on every row
136
<p>Per-store stock + price rows for <em>your mapped stores</em>, with full item identity on every row
Line 137... Line 139...
137
an unmapped id → 403 <code>EXT_403</code>). Omitting <code>storeId</code> returns rows across all your
139
an unmapped id → 403 <code>EXT_403</code>). Omitting <code>storeId</code> returns rows across all your
138
mapped stores.</p>
140
mapped stores.</p>
139
<pre>GET /external/v1/skuMaster?offset=0&amp;limit=500
141
<pre>GET /external/v1/skuMaster?offset=0&amp;limit=500
140
→ records: [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
142
→ records: [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
141
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
143
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
142
               "brandIdentifier": "SM-A155FZKW", "availability": 7,
144
               "color": "Blue", "brandIdentifier": "SM-A155FZKW", "availability": 7,
143
               "mop": 14999.0, "mrp": 17999.0, "active": true, "updatedAt": 1753500000000 } ]</pre>
145
               "mop": 14999.0, "mrp": 17999.0, "active": true, "updatedAt": 1753500000000 } ]</pre>
144
 
146
 
145
<h3><span class="method">GET</span>/storeMaster</h3>
147
<h3><span class="method">GET</span>/storeMaster</h3>
146
<p>Your mapped stores with location and GST details, in the standard paginated envelope
148
<p>Your mapped stores with location and GST details, in the standard paginated envelope
147
(<code>limit</code> max 500; no <code>updatedSince</code> — store data has no delta feed, sync it fully).</p>
149
(<code>limit</code> max 500; no <code>updatedSince</code> — store data has no delta feed, sync it fully).</p>
Line 182... Line 184...
182
      the standard paginated envelope (<code>serverTime</code>/<code>totalCount</code>/<code>records</code>).
184
      the standard paginated envelope (<code>serverTime</code>/<code>totalCount</code>/<code>records</code>).
183
      One loop replaces batching ids across many calls.</li>
185
      One loop replaces batching ids across many calls.</li>
184
</ul>
186
</ul>
185
<pre>GET /external/v1/stock?storeId=2116665&amp;itemIds=101,102
187
<pre>GET /external/v1/stock?storeId=2116665&amp;itemIds=101,102
186
→ [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
188
→ [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
187
      "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
189
      "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F", "color": "Blue",
188
      "brandIdentifier": "SM-A155FZKW", "availability": 7, "mop": 14999.0, "mrp": 17999.0, "active": true },
190
      "brandIdentifier": "SM-A155FZKW", "availability": 7, "mop": 14999.0, "mrp": 17999.0, "active": true },
189
    { "storeId": 2116665, "itemId": 102, "title": null, "availability": 0, "mop": null, "mrp": null, "active": false } ]
191
    { "storeId": 2116665, "itemId": 102, "title": null, "availability": 0, "mop": null, "mrp": null, "active": false } ]
190
 
192
 
191
GET /external/v1/stock?storeId=2116665&amp;offset=0&amp;limit=500
193
GET /external/v1/stock?storeId=2116665&amp;offset=0&amp;limit=500
192
→ { "serverTime": ..., "offset": 0, "limit": 500, "totalCount": 812, "records": [ ...same row shape... ] }</pre>
194
→ { "serverTime": ..., "offset": 0, "limit": 500, "totalCount": 812, "records": [ ...same row shape... ] }</pre>