Subversion Repositories SmartDukaan

Rev

Rev 37291 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37291 Rev 37296
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, one per color            → listed in catalogSkuMaster
58
itemId     = a sellable SKU (variant of a catalog)     → 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
<div class="note">
63
<div class="note">
Line 120... Line 120...
120
only newly introduced SKUs, as opposed to <code>updatedSince</code> which also returns price/stock/listing
120
only newly introduced SKUs, as opposed to <code>updatedSince</code> which also returns price/stock/listing
121
updates of existing SKUs.</p>
121
updates of existing SKUs.</p>
122
<pre>GET /external/v1/catalogSkuMaster?offset=0&amp;limit=500
122
<pre>GET /external/v1/catalogSkuMaster?offset=0&amp;limit=500
123
→ records: [ { "catalogId": 12345, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
123
→ records: [ { "catalogId": 12345, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
124
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
124
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
125
               "color": "Blue", "brandIdentifier": "SM-A155FZKW",
125
               "brandIdentifier": "SM-A155FZKW",
126
               "mop": 14999.0, "mrp": 17999.0, "active": true,
126
               "mop": 14999.0, "mrp": 17999.0, "active": true,
127
               "updatedAt": 1753500000000, "addedOn": 1750000000000 } ]</pre>
127
               "updatedAt": 1753500000000, "addedOn": 1750000000000 } ]</pre>
128
 
128
 
129
<h3><span class="method">GET</span>/skuMaster</h3>
129
<h3><span class="method">GET</span>/skuMaster</h3>
130
<p>Per-store stock + price rows for <em>your mapped stores</em>, with full item identity on every row.
130
<p>Per-store stock + price rows for <em>your mapped stores</em>, with full item identity on every row.
Line 132... Line 132...
132
an unmapped id → 403 <code>EXT_403</code>). Omitting <code>storeId</code> returns rows across all your
132
an unmapped id → 403 <code>EXT_403</code>). Omitting <code>storeId</code> returns rows across all your
133
mapped stores.</p>
133
mapped stores.</p>
134
<pre>GET /external/v1/skuMaster?offset=0&amp;limit=500
134
<pre>GET /external/v1/skuMaster?offset=0&amp;limit=500
135
→ records: [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
135
→ records: [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
136
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
136
               "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
137
               "color": "Blue", "brandIdentifier": "SM-A155FZKW", "availability": 7,
137
               "brandIdentifier": "SM-A155FZKW", "availability": 7,
138
               "mop": 14999.0, "mrp": 17999.0, "active": true, "updatedAt": 1753500000000 } ]</pre>
138
               "mop": 14999.0, "mrp": 17999.0, "active": true, "updatedAt": 1753500000000 } ]</pre>
139
 
139
 
140
<h3><span class="method">GET</span>/storeMaster</h3>
140
<h3><span class="method">GET</span>/storeMaster</h3>
141
<p>Your mapped stores with location and GST details, in the standard paginated envelope
141
<p>Your mapped stores with location and GST details, in the standard paginated envelope
142
(<code>limit</code> max 500; no <code>updatedSince</code> — store data has no delta feed, sync it fully).</p>
142
(<code>limit</code> max 500; no <code>updatedSince</code> — store data has no delta feed, sync it fully).</p>
Line 177... Line 177...
177
      the standard paginated envelope (<code>serverTime</code>/<code>totalCount</code>/<code>records</code>).
177
      the standard paginated envelope (<code>serverTime</code>/<code>totalCount</code>/<code>records</code>).
178
      One loop replaces batching ids across many calls.</li>
178
      One loop replaces batching ids across many calls.</li>
179
</ul>
179
</ul>
180
<pre>GET /external/v1/stock?storeId=2116665&amp;itemIds=101,102
180
<pre>GET /external/v1/stock?storeId=2116665&amp;itemIds=101,102
181
→ [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
181
→ [ { "storeId": 2116665, "itemId": 101, "title": "Samsung Galaxy A15 SM-A155F",
182
      "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F", "color": "Blue",
182
      "brand": "Samsung", "modelName": "Galaxy A15", "modelNumber": "SM-A155F",
183
      "brandIdentifier": "SM-A155FZKW", "availability": 7, "mop": 14999.0, "mrp": 17999.0, "active": true },
183
      "brandIdentifier": "SM-A155FZKW", "availability": 7, "mop": 14999.0, "mrp": 17999.0, "active": true },
184
    { "storeId": 2116665, "itemId": 102, "title": null, "availability": 0, "mop": null, "mrp": null, "active": false } ]
184
    { "storeId": 2116665, "itemId": 102, "title": null, "availability": 0, "mop": null, "mrp": null, "active": false } ]
185
 
185
 
186
GET /external/v1/stock?storeId=2116665&amp;offset=0&amp;limit=500
186
GET /external/v1/stock?storeId=2116665&amp;offset=0&amp;limit=500
187
→ { "serverTime": ..., "offset": 0, "limit": 500, "totalCount": 812, "records": [ ...same row shape... ] }</pre>
187
→ { "serverTime": ..., "offset": 0, "limit": 500, "totalCount": 812, "records": [ ...same row shape... ] }</pre>