Difference between revisions of "Getting and Creating List"

From Enterprise Help
Jump to: navigation, search
Line 6: Line 6:
  
  
==== Example: ====
+
==== Sample Request:<br/> ====
  
 
   GET [https://enterprise.qa.fishbowl.com/api/odata/v1/SITE_ID/Lists https://services.fishbowl.com/api/odata/v1/SITE_ID/Lists] HTTP/1.1
 
   GET [https://enterprise.qa.fishbowl.com/api/odata/v1/SITE_ID/Lists https://services.fishbowl.com/api/odata/v1/SITE_ID/Lists] HTTP/1.1
  Accept: application/json
+
Accept: application/json
  Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
+
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
  g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
+
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
  AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
+
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
  BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
+
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
  
  
  
==== Example Response: ====
+
==== Sample Response:<br/> ====
  
 
   {
 
   {
    "odata.metadata":"[http://enterprise.qa.fishbowl.com/API/odata/v1/2147483947/ http://services.fishbowl.com/API/odata/v1/2147483947/]
+
    "odata.metadata":"[http://enterprise.qa.fishbowl.com/API/odata/v1/2147483947/ http://services.fishbowl.com/API/odata/v1/2147483947/]
                      $metadata#Lists",
+
                      $metadata#Lists",
    "value":[
+
    "value":[
        {
+
      {
          "ListID":"2147484225",
+
          "ListID":"2147484225",
          "SiteID":"2147483947",
+
          "SiteID":"2147483947",
          "Name":"General Mailings",
+
          "Name":"General Mailings",
          "Description":"General Mailings",
+
          "Description":"General Mailings",
          "DefaultFromName":"wilson",
+
          "DefaultFromName":"wilson",
          "DefaultFromAddress":"wilson2",
+
          "DefaultFromAddress":"wilson2",
          "DefaultReplyTo":"murrutia@fishbowl.com",
+
          "DefaultReplyTo":"murrutia@fishbowl.com",
          "DefaultSubject":"",
+
          "DefaultSubject":"",
          "DisplayName":false,
+
          "DisplayName":false,
          "LockDefaultFromName":false,
+
          "LockDefaultFromName":false,
          "LockDefaultFromAddress":false,
+
          "LockDefaultFromAddress":false,
          "LockDefaultReplyTo":true,
+
          "LockDefaultReplyTo":true,
          "LockDefaultSubject":false,
+
          "LockDefaultSubject":false,
          "SubscribedByDefault":true,
+
          "SubscribedByDefault":true,
          "Active":true,
+
          "Active":true,
          "DisplayDescription":false,
+
          "DisplayDescription":false,
          "CreatedUtc":"2011-11-23T12:33:51.87Z"
+
          "CreatedUtc":"2011-11-23T12:33:51.87Z"
        },
+
      },
        {
+
      {
          "ListID":"2147485175",
+
          "ListID":"2147485175",
          "SiteID":"2147483947",
+
          "SiteID":"2147483947",
          "Name":"VIP List",
+
          "Name":"VIP List",
          "Description":"",
+
          "Description":"",
          "DefaultFromName":"",
+
          "DefaultFromName":"",
          "DefaultFromAddress":"",
+
          "DefaultFromAddress":"",
          "DefaultReplyTo":"",
+
          "DefaultReplyTo":"",
          "DefaultSubject":"",
+
          "DefaultSubject":"",
          "DisplayName":true,
+
          "DisplayName":true,
          "LockDefaultFromName":false,
+
          "LockDefaultFromName":false,
          "LockDefaultFromAddress":false,
+
          "LockDefaultFromAddress":false,
          "LockDefaultReplyTo":false,
+
          "LockDefaultReplyTo":false,
          "LockDefaultSubject":false,
+
          "LockDefaultSubject":false,
          "SubscribedByDefault":false,
+
          "SubscribedByDefault":false,
          "Active":true,
+
          "Active":true,
          "DisplayDescription":true,
+
          "DisplayDescription":true,
          "CreatedUtc":"2014-11-10T15:31:33.55Z"
+
          "CreatedUtc":"2014-11-10T15:31:33.55Z"
        }
+
      }
    ]
+
    ]
  }
+
}
  
  
Line 70: Line 70:
  
  
==== Example: ====
+
==== Sample Request:<br/> ====
  
 
   POST [http://enterprise.qa.fishbowl.com/api/odata/v1/SITE_ID/Lists http://services.fishbowl.com/api/odata/v1/SITE_ID/Lists] HTTP/1.1
 
   POST [http://enterprise.qa.fishbowl.com/api/odata/v1/SITE_ID/Lists http://services.fishbowl.com/api/odata/v1/SITE_ID/Lists] HTTP/1.1
  Accept: application/json
+
Accept: application/json
  Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
+
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
  g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
+
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
  AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
+
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
  BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
+
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
  Content-Type: application/json; charset=utf-8
+
Content-Type: application/json; charset=utf-8
  {         
+
{         
    "ListID":"0",
+
    "ListID":"0",
    "SiteID":"2147483947",
+
    "SiteID":"2147483947",
    "Name":"My List",
+
    "Name":"My List",
    "Description":"Members sent by Partner",
+
    "Description":"Members sent by Partner",
    "SubscribedByDefault":false,
+
    "SubscribedByDefault":false,
    "Active":true
+
    "Active":true
  }
+
}
  
  
  
==== Example Response: ====
+
==== Sample Response:<br/> ====
  
 
   {     
 
   {     
    "odata.metadata":"[http://enterprise.qa.fishbowl.com/API/odata/v1/2147483947/ http://services.fishbowl.com/API/odata/v1/2147483947/]
+
    "odata.metadata":"[http://enterprise.qa.fishbowl.com/API/odata/v1/2147483947/ http://services.fishbowl.com/API/odata/v1/2147483947/]
                      $metadata#Lists/@Element",
+
                      $metadata#Lists/@Element",
    "ListID":"2147485177",
+
    "ListID":"2147485177",
    "SiteID":"2147483947",
+
    "SiteID":"2147483947",
    "Name":"Double Seat",
+
    "Name":"Double Seat",
    "Description":"Double Seat members",
+
    "Description":"Double Seat members",
    "DefaultFromName":null,
+
    "DefaultFromName":null,
    "DefaultFromAddress":null,
+
    "DefaultFromAddress":null,
    "DefaultReplyTo":null,
+
    "DefaultReplyTo":null,
    "DefaultSubject":null,
+
    "DefaultSubject":null,
    "DisplayName":false,
+
    "DisplayName":false,
    "LockDefaultFromName":false,
+
    "LockDefaultFromName":false,
    "LockDefaultFromAddress":false,
+
    "LockDefaultFromAddress":false,
    "LockDefaultReplyTo":false,
+
    "LockDefaultReplyTo":false,
    "LockDefaultSubject":false,
+
    "LockDefaultSubject":false,
    "SubscribedByDefault":false,
+
    "SubscribedByDefault":false,
    "Active":true,
+
    "Active":true,
    "DisplayDescription":false,
+
    "DisplayDescription":false,
    "CreatedUtc":"0001-01-01T05:00:00Z"  
+
    "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.
 
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.

Revision as of 08:50, 14 May 2015

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.