Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎1 - Offer Related‎ > ‎

Get Ranked Offers

Will get all offers for the publisher segment ordered by the segment's custom display order.

MethodGET /api/v3/publisher/rankedoffers?pagenumber={pageNumber}&pagesize={pageSize}&segmentkey={segmentKey}

Authentication: oauth
 
Parameters
Required QueryString Value
Explanation
No
PageSize
The number of records to return per page. Default is 10
No
PageNumber The page number of records to return. Default is 1
Yes SegmentKey The segment key filter to apply against the offer segment key.




Returns
base response fields
offers - Will return a list of Offers.

Sample Request:

GET http://api.groupcommerce.com/api/v3/publisher/rankedoffers?pagenumber=1&pagesize=20&SegmentKey=new-york

Authorization: OAuth oauth_signature="pfLynyfBlfZ6FT6gIQHuDsg5IGY%3d", oauth_nonce="7837298", oauth_timestamp="1323711888", oauth_consumer_key="09495674-04e3-4bfb-81e5-1f256ca317ba", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1322607433092)/",
    "success": true,
    "version": "3",
    "metaData": {
        "pageCount": 1,
        "pageNumber": 1,
        "pageSize": 20,
        "totalItems": 2
    },
    "offers": [
        { 
/* see offer */ },
        
/* see offer */ }
    ]
}


Sample XML Response:

<getRankedOffersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <errors/>
  <lastPublished>2011-11-29T22:59:59.3406803Z</lastPublished>
  <success>true</success>
  <version>3</version>
  <metaData>
    <pageCount>1</pageCount>
    <pageNumber>1</pageNumber>
    <pageSize>20</pageSize>
    <totalItems>2</totalItems>
  </metaData>
  <offers>
    <offer>
        
<!-- see offer -->
    </offer>
    <offer>
        
<!-- see offer -->
    </offer>
  </offers>
</getRankedOffersResponse>
Comments