Questions on the API

147 views
Skip to first unread message

Michael Beattie

unread,
Apr 9, 2013, 9:00:36 AM4/9/13
to gilt-pu...@googlegroups.com
Perhaps there is something about the API that I am not understanding but in poking around at the api and reading the docs I have found a few things that confused me.

says it will return a "sale list object" but actually it is neither a list nor detail object.

It is missing the products list from the sale detail and it has an extra "end date" on top of the sale list.

2) Products are not contained in sale detail (or sale detail is not defined correctly)
From your doc:

Sale detail
Information about a single sale can be retrieved by saving the store and sale_key from an active or upcoming fetch. This endpoint will only return data for as long as the sale is active or upcoming. Example request for all upcoming sales:

So, using the store and sale_key for this upcoming sale...
<fault>
            <faultstring>Service Identification Failure</faultstring>
            <detail>
                <errorcode>26108</errorcode>
                    <trace>
                        Fault Name: ServiceIdentificationFailure
                        Error Type: NotFound
                        Description: Service Identification Failure
                        Service: null
                        Endpoint: null
                        Operation (Client):
                    </trace>
            </detail>
</fault>

However using the "Sale" field return a sale item object, not a sale detail...

{"name":"Little Giraffe Blankets & More","sale":"https://api.gilt.com/v1/sales/home/little-giraffe-blankets-6832/detail.json","sale_key":"little-giraffe-blankets-6832","store":"home","sale_url":"http://www.gilt.com/home/sale/little-giraffe-blankets-6832?utm_medium=api&utm_campaign=TestApp&utm_source=salesapi","image_urls":{"744x281":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636538/orig.jpg","width":744,"height":281}],"366x186":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636540/orig.jpg","width":366,"height":186}],"185x173":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636551/orig.jpg","width":185,"height":173}],"320x153":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636543/orig.jpg","width":320,"height":153}],"490x250":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636539/orig.jpg","width":490,"height":250}],"650x280":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636544/orig.jpg","width":650,"height":280}],"240x163":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636541/orig.jpg","width":240,"height":163}],"300x184":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636552/orig.jpg","width":300,"height":184}],"287x195":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636527/orig.jpg","width":287,"height":195}],"80x85":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636546/orig.jpg","width":80,"height":85}],"590x213":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636525/orig.jpg","width":590,"height":213}],"300x280":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636521/orig.jpg","width":300,"height":280}],"100x93":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636548/orig.jpg","width":100,"height":93}],"636x400":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636529/orig.jpg","width":636,"height":400}],"385x173":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636554/orig.jpg","width":385,"height":173}],"455x172":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636530/orig.jpg","width":455,"height":172}],"370x345":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636553/orig.jpg","width":370,"height":345}],"620x280":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636522/orig.jpg","width":620,"height":280}],"612x526":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636534/orig.jpg","width":612,"height":526}],"140x130":[{"url":"http://cdn1.gilt.com/images/share/uploads/0000/0002/0063/200636549/orig.jpg","width":140,"height":130}]},"begins":"2013-04-09T16:00:00Z","ends":"2013-04-11T04:00:00Z"}

(there's no products list here)

How does a "sale" link to a "product" or how do you get a "sale_detail" from a list? Or do you just need to use the category or search api to get a product?

Federico Feroldi

unread,
Apr 10, 2013, 10:57:04 AM4/10/13
to gilt-pu...@googlegroups.com
Hi Michael,

sorry for the confusion on the documentation! Here's the answers to your questions:

1) you're right, the sales list object you get for the upcoming sales is a stripped down version of the full data you get for the active sales. This is due to the fact that we cannot expose products for upcoming sales until the sale goes live. In other words, you will not be able to get the products on sale *before* the sale goes live (i.e. becomes active).
 
2) sorry, that's an error in the documentation (thanks for spotting it). As you found out, the URL for sale detail object is provided in the "sale" field. But again, you will not get the products because that's an upcoming sale and you have to wait until the sale becomes active. Other reasons a sale can have no products is when the sale is sold out or products can be shown only to certain users (so we cannot expose the products through the API)

For instance, this is a sale that is currently part of the active feed:

{
            "begins": "2013-04-08T16:00:00Z",
            "description": "Headed by Crystorama’s gleaming chandeliers, these stylish lighting pieces for virtually the whole home have a distinctly Parisian flavor. Classic-yet-tailored lines, top-flight materials, and an evocative vintage feel instantly transport us to our dream apartment (you know, that one right off the Champs-Élysées).",
            "ends": "2013-04-11T16:00:00Z",
            "image_urls": {
                "100x93": [
                    {
                        "height": 93,
                        "width": 100
                    }
                ],
                "140x130": [
                    {
                        "height": 130,
                        "width": 140
                    }
                ],
                "185x173": [
                    {
                        "height": 173,
                        "width": 185
                    }
                ],
                "240x163": [
                    {
                        "height": 163,
                        "width": 240
                    }
                ],
                "287x195": [
                    {
                        "height": 195,
                        "width": 287
                    }
                ],
                "300x184": [
                    {
                        "height": 184,
                        "width": 300
                    }
                ],
                "300x280": [
                    {
                        "height": 280,
                        "width": 300
                    }
                ],
                "320x153": [
                    {
                        "height": 153,
                        "width": 320
                    }
                ],
                "366x186": [
                    {
                        "height": 186,
                        "width": 366
                    }
                ],
                "370x345": [
                    {
                        "height": 345,
                        "width": 370
                    }
                ],
                "385x173": [
                    {
                        "height": 173,
                        "width": 385
                    }
                ],
                "455x172": [
                    {
                        "height": 172,
                        "width": 455
                    }
                ],
                "490x250": [
                    {
                        "height": 250,
                        "width": 490
                    }
                ],
                "590x213": [
                    {
                        "height": 213,
                        "width": 590
                    }
                ],
                "612x526": [
                    {
                        "height": 526,
                        "width": 612
                    }
                ],
                "620x280": [
                    {
                        "height": 280,
                        "width": 620
                    }
                ],
                "636x400": [
                    {
                        "height": 400,
                        "width": 636
                    }
                ],
                "650x280": [
                    {
                        "height": 280,
                        "width": 650
                    }
                ],
                "744x281": [
                    {
                        "height": 281,
                        "width": 744
                    }
                ],
                "80x85": [
                    {
                        "height": 85,
                        "width": 80
                    }
                ]
            },
            "name": "City of Light: Crystorama & More",
            "products": [
            ],
            "sale_key": "lighting-46",
            "store": "home"
        }

as you can see the "products" list provide all the links to the product details.

Sorry again for the confusion, we'll fix the documentation asap. Let me know if I can help any further,
best,

-Federico

Michael Beattie

unread,
Apr 10, 2013, 2:07:52 PM4/10/13
to gilt-pu...@googlegroups.com
That's cool.  I was poking around your site and started to implement the API in go.


That's when I noticed these things. I've only spent maybe an hour or two on it so far.  I will add more soon.  Check it out and take a look if you'd like.

Federico Feroldi

unread,
Apr 10, 2013, 2:56:24 PM4/10/13
to gilt-pu...@googlegroups.com
Awesome, I linked your library from our documentation :)



--
You received this message because you are subscribed to the Google Groups "Gilt Public API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gilt-public-a...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Federico Feroldi
Gilt Groupe, Inc.

Michael Beattie

unread,
Apr 11, 2013, 9:47:36 AM4/11/13
to gilt-pu...@googlegroups.com
Ah, that's cool.  It's pretty bare now but maybe that will inspire someone to send some pull requests :)
Reply all
Reply to author
Forward
0 new messages