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

Get Segment Listings

A member of the publisher's production team can rank or order items within a segment.  This method will return a list of SegmentListing objects that will contain either an Offer or a Segment. 

Method: GET /api/v3/publisher/segmentlistings/<segmentKey>
Authentication: oauth
 
Parameters
Required QueryString Value
Explanation
No
PageSize
The number of records to return per page. Default is 100
No
PageNumber The page number of records to return. Default is 1
Yes
SegmentKey
The segment key to retrieve the listing for.

Returns
segmentListings - Will return a list of either offer or segment.

Sample Request:

GET https://api.groupcommerce.com/api/v3/publisher/segmentlistings/all-cities?pagenumber=1&pagesize=20

Authorization: OAuth oauth_signature="hPhvZLx2cYMBJmvq1w9R0UBFjvo%3D", oauth_nonce="4255512", oauth_timestamp="1339023044", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1319851251455)/",
    "success": true,
    "version": "3",
    "metaData": {
        "pageCount": 21,
        "pageNumber": 3,
        "pageSize": 2,
        "totalItems": 63
    },
    "segmentListings": [
        {
            "offer": /* see offer */,
            "segment": null,
        },
        {
           
"offer": null
            "segment":
/* see segment */,
        }
    ]
}


Sample XML Response:

<getSegmentListingsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-10-29T01:21:24.3165547Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <metaData>
        <pageCount>21</pageCount>
        <pageNumber>3</pageNumber>
        <pageSize>2</pageSize>
        <totalItems>63</totalItems>
    </metaData>
    <segmentListings>
        <segmentListing>
            <offer> <!-- see
offer --></offer>
            <segment i:nil="true" />
        </segmentListing>
        <segmentListing>
            <offer i:nil="true" />
            <segment> <!-- see segment --> </segment>
        </segmentListing>
    </segmentListings>
</getSegmentListingsResponse>
Comments