-
Notifications
You must be signed in to change notification settings - Fork 1
Stores::Products API
ardeearam edited this page Mar 18, 2015
·
13 revisions
/stores/[store_front]/products
- GET
/stores/[store_front]/products
- POST
/stores/[store_front]/products
- GET
/stores/[store_front]/products/[sku]
- PUT
/stores/[store_front]/products/[sku]
- DELETE
/stores/[store_front]/products/[sku]
-
/stores/[store_front]/products/skus
- Get a list of all SKU's in the store. Mainly used for indexing and iteration. - GET
/stores/[store_front]/products/skus
-
/stores/[store_fronts]/products/quantity
- Stock item quantity records for products. - PUT
/stores/[store_fronts]/products/quantity?delta=true
- GET
/stores/[store_fronts]/products/quantity/[batch]
Gets the simple products for a particular Store.
URL Parameters
- store_front - Store Front ID.
- sku - SKU of particular item.
Query Parameters
- limit
- page
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 eitherquantity
and/orapparent_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 nottrue
, 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
, andapparent_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
{}
Questions? Spotted a documentation error? Or just want to say hi? Please leave a message at https://github.com/galorelabs/gcore/issues, and we'll get back to you as soon as we can. :)