-
Notifications
You must be signed in to change notification settings - Fork 1
Home
GCore is a cloud-based retail platform developed by Galore Labs. The goal is to provide a retail back-end platform where any technology, be it a store front, an inventory system, analytic system, payment gateway, or whatnot can connect and integrate with by following simple specifications.
The GCORE API is a sessionless RESTful API that acccepts JSON-encoded string input, and outputs a JSON-encoded string.
First and foremost, you must obtain either one of the following through your friendly neighborhood GCore administrators:
- username & password combination
- API Key & API secret combination
If you are not very familiar interfacing with a RESTful API, the Postman Rest Client Google Chrome App is a good tool to play around and experiment with.
If you want to use the username & password combination, issue the HTTP message below:
POST /session HTTP/1.1
Host: api.gcore.galoretv.com
Accept: application/json
Content-Type: application/json
{"username":"[email protected]", "password":"supplier"}
The GCORE API will then respond with the following HTTP response:
HTTP/1.1 200 OK
x-GCore-Version: 0.99
{
"message": "Log-in successful",
"model": {
"user": {
"_id": {
"$oid": "53b38af3b51fa98276550281"
},
"avatar_url": "http://m.c.lnkd.licdn.com/mpr/pub/image-xqmDSoicVGPdA7hAY_Wl7-iAAuGWDXSS9IglouycyPQTeunsxqmloauY5P8hD4Ke_Gf/ardee-aram.jpg",
"created_at": "0000-00-00 00:00:00",
"display_name": "Supplier",
"email": "[email protected]",
"last_reset_date": "2013-11-10 02:36:13",
"secret_token": "f1a3984988722844ea9f2881fa5186eecec02d57",
"id": "53b38af3b51fa98276550281"
}
}
}
For any succeeding operations, you will need an Authorization string.
- If you are using the username & password combination, your Authorization string is
id:secret_token
that you obtained from logging in. So from the log in above, the Authorization string is53b38af3b51fa98276550281:f1a3984988722844ea9f2881fa5186eecec02d57
. Note that thesecret_token
changes every login. - If you are using the API Key & API secret combination, then your Authorization string is simply
api_key:api_secret
, and need not go through the log-in process.
The sample API call below demonstrates the need to add the Authorization string as an HTTP header in subsequent GCore API calls.
GET /stores/bakeshop/catalog_products HTTP/1.1
Host: api.gcore.galoretv.com
Accept: application/json
Authorization: 528ea86a1d9178075b4f02af:50a1b361defa50533acc33f8f129458c4178c5da
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. :)