Listing Carts
Listing Carts are a personal collection of listings that can be modified or used as search criteria.
Supported Roles
| Role | Reads | Writes | Notes | 
|---|---|---|---|
| IDX | No | No | |
| Public | No | No | |
| VOW | Yes | Yes | |
| Portal | Yes | Yes | |
| Private | Yes | Yes | 
More information about roles may be found here.
Available Services
Listing Carts
Listing carts as a subresource of contacts are only available in a private role.
/<API Version>/listingcarts
    /<API Version>/contacts/<Contact.Id>/listingcarts
| HTTP Method | Description | Notes | 
|---|---|---|
| GET | Returns a list of all listing carts for the current user | |
| POST | Creates a new listing cart. If the AutoNameattribute is set totruein the payload, the providedNamewill be automatically modified in
  the event of a conflict so that it is unique. | |
| PUT,DELETE | Returns HTTP 405 (Method Not Allowed) | Not implemented | 
GET Request
Parameters:
| Parameter | Required | 
|---|---|
| Standard search and paging syntax. | No | 
GET Response
Example:
{
    "D": {
        "Success": true,
        "Results": [
            {
                "ResourceUri": "/vX/listingcarts/20100912153422758914000000",
                "Id": "20100912153422758914000000",
                "OwnerId": "20090815223215294334000000",
                "Name": "My Listing Cart",
                "ListingCount": 10,
                "ModificationTimestamp": "2014-06-27T10:01:06-05:00",
                "CreatedTimestamp": "2008-08-12T11:12:16-05:00",
                "ViewId": "20070215323215384328000000"
            },
            {
                "ResourceUri": "/vX/listingcarts/20110112133422752751000000",
                "Id": "20110112133422752751000000",
                "OwnerId": "20090815223215294334000000",
                "Name": "My Other Listing Cart",
                "ListingCount": 15,
                "ModificationTimestamp": "2014-06-27T10:03:06-05:00",
                "CreatedTimestamp": "2008-08-12T11:13:16-05:00",
                "ViewId": null
            }
        ]
    }
}POST Request
Request body:
{
    "D": {
      "ListingCarts": [{
        "Name": "My Cart's Name",
        "AutoName": true,
        "ListingIds": [
            "20110112234857732941000000",
            "20110302120238448431000000",
            "20110510011212354751000000"
        ]
      }]
  }
}POST Response
The standard success/fail response is returned.
My Listing Carts
/<API Version>/my/listingcarts
Allows access to portal carts that were not provided by another source. Favorites, Possibilities, Recommened and other automatically generated carts are excluded.
| HTTP Method | Description | Conditional | Notes | 
|---|---|---|---|
| GET | All portal carts | No | |
| POST | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
| PUT | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
| DELETE | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
GET Request
Parameters:
| Parameter | Required | Notes | 
|---|---|---|
| Pagination | No | 
GET Response
See the GET request section for for the listing carts service.
Individual Listing Cart
Listing carts as a subresource of contacts are only available in a private role.
/<API Version>/listingcarts/<Id>
    /<API Version>/contacts/<Contact.Id>/listingcarts/<Id>
| HTTP Method | Description | Notes | 
|---|---|---|
| GET | Returns the data for an individual listing cart | |
| POST | Add additional listings to an existing listing cart. | |
| PUT | Replace an existing set of listings for a listing cart. | |
| DELETE | Destroy an existing listing cart. | 
GET Request
Parameters:
- None
GET Response
Example:
{
    "D": {
        "Success": true,
        "Results": [
            {
                "ResourceUri": "/vX/listingcarts/20100912153422758914000000",
                "Id": "20100912153422758914000000",
                "Name": "My Listing Cart",
                "OwnerId": "20090815223215294334000000",
                "ListingIds": [
                  "20110112234857732941000000",
                  "20110302120238448431000000",
                  "20110510011212354751000000"
                ]
            }
        ]
    }
}POST Request
Request body:
{
    "D": {
      "ListingIds": [
        "20110112234857732941000000",
        "20110302120238448431000000",
        "20110510011212354751000000"
      ]
  }
}POST Response
The standard success/fail response is returned.
  When posting to a listing cart as a subresource of a contact, a private role may
reset the VowAdded or VowRemoved arrays to an empty state by posting a 0
for those attributes:
Request body:
{
    "D": {
      "ListingIds": [
        "20110112234857732941000000",
        "20110302120238448431000000",
        "20110510011212354751000000"
      ],
      "VowAdded": 0,
      "VowRemoved": 0
  }
}PUT Request
Request body:
See the POST response section above for the data format.
PUT Response
The standard success/fail response is returned.
DELETE Request
Parameters:
- None
DELETE Response
The standard success/fail response is returned.
Carts for a Specified Listing
/<API Version>/listingcarts/for/<Listing.Id>
| HTTP Method | Description | Notes | 
|---|---|---|
| GET | Returns a list of all carts owned by the current user containing the specified listing | |
| POST,PUT,DELETE | Returns HTTP 405 (Method Not Allowed) | Not implemented | 
Remove a Listing from a Cart
/<API Version>/listingcarts/<Id>/listings/<Listing.Id>
    /<API Version>/contacts/<Contact.Id>/listingcarts/<Id>/listings/<Listing.Id>
| HTTP Method | Description | Notes | 
|---|---|---|
| GET,POST,PUT | Returns HTTP 405 (Method Not Allowed) | Not implemented | 
| DELETE | Removes a listing from a cart | 
DELETE Request
Parameters:
None.
DELETE Response
The standard success/fail response is returned.
Listings in a Cart
    /<API Version>/listingcarts/<Id>/listings
    /<API Version>/contacts/<Contact.Id>/listingcarts/<Id>/listings
  
| HTTP Method | Description | Conditional | Notes | 
|---|---|---|---|
| GET | Returns the data for listings stored in the cart. | No | |
| POST | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
| PUT | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
| DELETE | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
GET Request
Parameters:
| Parameter | Required | Notes | 
|---|---|---|
| Pagination | No | |
| Standard selection parameters | No | |
| Standard expansion parameters | No | |
| _location | No | 
GET Response
See the GET request section for the listings service.
Rating Listings
    /<api version>/listingcarts/<id>/listings/<listing.id>
    /<API Version>/contacts/<Contact.Id>/listingcarts/<Id>/listings/<Listing.Id>
  
| HTTP Method | Description | Conditional | Notes | 
|---|---|---|---|
| GET | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
| POST | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
| PUT | Changes the rating for a listing | No | Favorites cart only.  The provided rating must be between 1 and 3. A listing's StarRatingcan be viewed as an expansion with the listings service or the listings in a cart service. | 
| DELETE | Returns HTTP 405 (Method Not Allowed) | No | Not implemented | 
PUT Request
Request body:
{
    "D": {
      "StarRating": 1
    }
}
PUT Response
The standard success/fail response is returned.
Listing Carts Description
| Attribute | Data Type | Writeable | Required | Searchable | Description | 
|---|---|---|---|---|---|
| ResourceUri | Character | No | No | No | The URI to the listing cart resource. | 
| Id | Character | No | No | No | The unique Id of the cart. | 
| CreatedById | Character | No | No | No | The Idof the user that created the cart.  In practice, this will either be the same asOwnerIdor, when an agent creates a cart for a contact with a VOW/Portal account, the agent'sId.nullif the cart is a system generated cart, such as a Portal cart. | 
| OwnerId | Character | No | No | No | The Id of the user the cart belongs to. | 
| ViewId | Character | No | No | No | The Id of the View the user would like used when displaying the listings in this cart. | 
| Name | Character | Yes | Yes | Yes | The name of the cart. A user may not have two carts with the same name. | 
| ListingIds | Character List | Yes | No | No | The listings in the listing cart. Present only on an individual listing cart retrieval. | 
| ListingCount | Integer | No | No | No | The number of listings in a listing cart. | 
| VowAdded | Character List | No | No | No | Listings added to the cart by a VOW/Portal account. Present only when a private role retrieves carts for a contact. | 
| VowRemoved | Character List | No | No | No | Listings removed from the cart by a VOW/Portal account. Present only when a private role retrieves carts for a contact. | 
| AutoName | Boolean | Yes | No | No | Available as part of a POST body only, when creating a new cart.  If present, the provided Namewill be automatically modified, in the event of a conflict, so that it is unique. | 
| PortalCartType | Character | No | No | No | Only available under contact carts. Possible values are Favorites,Rejects,Recommended,RemovedorCustom. | 
| ModificationTimestamp | Timestamp | No | No | No | The time the listing cart was last updated. | 
| CreatedTimestamp | Timestamp | No | No | No | The time the listing cart was created. | 
Expansions
| Expansion | Roles | Single Record Only? | Selection Support? | Description | 
|---|---|---|---|---|
| View | All | Yes | No | A hash detailing the view related to the cart. |