Getting and Creating List

From Enterprise Help
Revision as of 07:50, 14 May 2015 by Sghosh (Talk | contribs)

Jump to: navigation, search

A List is a specific communication type to which Members can subscribe and from which they can unsubscribe. In order for members to receive mailings from a specific list, they must be subscribed to the list.


A site may have one or more lists associated with it. To get all lists associated with a site, send a GET request to the Lists endpoint.


Sample Request:

  GET https://services.fishbowl.com/api/odata/v1/SITE_ID/Lists HTTP/1.1
Accept: application/json
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr


Sample Response:

  {
   "odata.metadata":"http://services.fishbowl.com/API/odata/v1/2147483947/
                     $metadata#Lists",
   "value":[
      {
         "ListID":"2147484225",
         "SiteID":"2147483947",
         "Name":"General Mailings",
         "Description":"General Mailings",
         "DefaultFromName":"wilson",
         "DefaultFromAddress":"wilson2",
         "DefaultReplyTo":"murrutia@fishbowl.com",
         "DefaultSubject":"",
         "DisplayName":false,
         "LockDefaultFromName":false,
         "LockDefaultFromAddress":false,
         "LockDefaultReplyTo":true,
         "LockDefaultSubject":false,
         "SubscribedByDefault":true,
         "Active":true,
         "DisplayDescription":false,
         "CreatedUtc":"2011-11-23T12:33:51.87Z"
      },
      {
         "ListID":"2147485175",
         "SiteID":"2147483947",
         "Name":"VIP List",
         "Description":"",
         "DefaultFromName":"",
         "DefaultFromAddress":"",
         "DefaultReplyTo":"",
         "DefaultSubject":"",
         "DisplayName":true,
         "LockDefaultFromName":false,
         "LockDefaultFromAddress":false,
         "LockDefaultReplyTo":false,
         "LockDefaultSubject":false,
         "SubscribedByDefault":false,
         "Active":true,
         "DisplayDescription":true,
         "CreatedUtc":"2014-11-10T15:31:33.55Z"
      }
   ]
}



To create a new list, send a POST request to the Lists endpoint.


Sample Request:

  POST http://services.fishbowl.com/api/odata/v1/SITE_ID/Lists HTTP/1.1
Accept: application/json
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
Content-Type: application/json; charset=utf-8
{        
   "ListID":"0",
   "SiteID":"2147483947",
   "Name":"My List",
   "Description":"Members sent by Partner",
   "SubscribedByDefault":false,
   "Active":true
}


Sample Response:

  {    
   "odata.metadata":"http://services.fishbowl.com/API/odata/v1/2147483947/
                     $metadata#Lists/@Element",
   "ListID":"2147485177",
   "SiteID":"2147483947",
   "Name":"Double Seat",
   "Description":"Double Seat members",
   "DefaultFromName":null,
   "DefaultFromAddress":null,
   "DefaultReplyTo":null,
   "DefaultSubject":null,
   "DisplayName":false,
   "LockDefaultFromName":false,
   "LockDefaultFromAddress":false,
   "LockDefaultReplyTo":false,
   "LockDefaultSubject":false,
   "SubscribedByDefault":false,
   "Active":true,
   "DisplayDescription":false,
   "CreatedUtc":"0001-01-01T05:00:00Z" 
}


If the list can be created successfully, the response will contain the newly created List ID. Save the List ID value so it can be used to subscribe members to the list during member creation process.