Skip to content

Stores::Products API

ardeearam edited this page Mar 18, 2015 · 13 revisions

/stores/[store_front]/products

GET /stores/[store_front]/products/[sku]

Gets the simple products for a particular Store.

URL Parameters

  • store_front - Store Front ID.
  • sku - SKU of particular item.

Query Parameters

  • limit
  • page

PUT /stores/[store_fronts]/products/quantity?delta=true

Mass update for quantity and apparent_quantity fields. This method is asynchronous, and will return a Location URL that the client can follow and poll via HEAD or GET to check update progress.

URL Parameters

  • store_front - Store Front ID.

Query Parameters

  • delta - If true, it will cache recent quantity values. On succeeding calls, only those that changed values of either quantity and/or apparent_quantity will be updated, and the rest of the items will be ignored. Best used for one-way synchronization from an external system to GCore. If not true, then no caching will be done, and all of the items will be updated.

Body Parameters

  • Body parameters consist of a JSON-encoded array of hashes with the following keys: sku, quantity, and apparent_quantity.

Response Headers

  • Location - The URL that the client can use via HEAD or GET command to check the progress of the update.
  • X-Batch - The Batch ID of this call, mainly used as identifier for grouping in logs and reports.

Request

PUT /stores/cudsly/products/quantity?delta=true HTTP/1.1
Host: api.gcore.galoretv.com
Accept: application/json
Content-Type: application/json
Authorization: AUTHORIZATION_STRING

[
    {
        "sku": "0513B-WANDA-Black-38",
        "quantity": "4",
        "apparent_quantity":"1"
    },
    {
        "sku": "0814G-COLUMBIA-White-39",
        "quantity": "4",
        "apparent_quantity":"1" 
    },
    {
        "sku": "0514A-TRICIA-Black-39",
        "quantity": "4",
        "apparent_quantity":"1" 
    }
]

Response

HTTP/1.1 201 Created
Content-Type: application/json
X-GCore-Version: 0.99
Location: /stores/cudsly/products/quantity/1426650414
X-Batch: 1426650414

{}