LEAF API Documentation
You are in: API » Release 1 » Memberships

Get Membership List GET

Obtain a list of LEAF charity memberships to which the current authenticated user has access.

Parameters

Response Parameters
ParameterNameTypeDescription
MembershipsMembershipsList (Optional)The list of charity memberships to which the user has been granted access as a contact
MembershipGUID
Membership IdentifierStringThe unique identifier for the membership
CharityNumber
LEAF Charity NumberStringThe charity number assigned to the membership
MembershipType
Membership TypeEnumerationThe type of membership
Name
NameString (Optional)The name of the farm, company, organisation or individual associated with the membership
Address
AddressString (Optional)The postal address of the membership
Postcode
PostcodeString (Optional)The postcode for the membership
Country
CountryString (Optional)The country of the membership

Enumerations

Membership Type (Response)
ValueDescription
Please SelectPlease Select
Individual MemberIndividual Member
Corporate MemberCorporate Member
College MemberCollege Member
Advisor or ConsultantAdvisor or Consultant
Producer GroupProducer Group
Non-Paying AgentNon-Paying Agent
Green Box SubscriberGreen Box Subscriber
FriendFriend
IndustryIndustry
Non-MemberNon-Member
LEAF Marque buyers and sellersLEAF Marque buyers and sellers
LEAF Education - Farmer/EducatorLEAF Education - Farmer/Educator
LEAF Education - CorporateLEAF Education - Corporate
Joint LEAF and LEAF Education - CorporateJoint LEAF and LEAF Education - Corporate
Individual ProducerIndividual Producer
Multisite with QMSMultisite with QMS
Multisite without QMSMultisite without QMS
Equivalence MemberEquivalence Member

XML

Example Request
GET https://api.leaf.eco/r1/memberships.eb HTTP/1.1
Accept: text/xml
Response Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="MembershipList">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Memberships" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The list of charity memberships to which the user has been granted access as a contact</xsd:documentation>
          </xsd:annotation>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="Item" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="MembershipGUID" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The unique identifier for the membership</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="CharityNumber" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The charity number assigned to the membership</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="MembershipType">
                      <xsd:annotation>
                        <xsd:documentation>The type of membership</xsd:documentation>
                      </xsd:annotation>
                      <xsd:simpleType>
                        <xsd:restriction base="xsd:string">
                          <xsd:enumeration value="Please Select" />
                          <xsd:enumeration value="Individual Member" />
                          <xsd:enumeration value="Corporate Member" />
                          <xsd:enumeration value="College Member" />
                          <xsd:enumeration value="Advisor or Consultant" />
                          <xsd:enumeration value="Producer Group" />
                          <xsd:enumeration value="Non-Paying Agent" />
                          <xsd:enumeration value="Green Box Subscriber" />
                          <xsd:enumeration value="Friend" />
                          <xsd:enumeration value="Industry" />
                          <xsd:enumeration value="Non-Member" />
                          <xsd:enumeration value="LEAF Marque buyers and sellers" />
                          <xsd:enumeration value="LEAF Education - Farmer/Educator" />
                          <xsd:enumeration value="LEAF Education - Corporate" />
                          <xsd:enumeration value="Joint LEAF and LEAF Education - Corporate" />
                          <xsd:enumeration value="Individual Producer" />
                          <xsd:enumeration value="Multisite with QMS" />
                          <xsd:enumeration value="Multisite without QMS" />
                          <xsd:enumeration value="Equivalence Member" />
                        </xsd:restriction>
                      </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name="Name" minOccurs="0" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The name of the farm, company, organisation or individual associated with the membership</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Address" minOccurs="0" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The postal address of the membership</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Postcode" minOccurs="0" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The postcode for the membership</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Country" minOccurs="0" type="xsd:string">
                      <xsd:annotation>
                        <xsd:documentation>The country of the membership</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Example Response
HTTP/1.1 200 OK
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<MembershipList>
  <Memberships>
    <Item>
      <MembershipGUID>xsd:string</MembershipGUID>
      <CharityNumber>xsd:string</CharityNumber>
      <MembershipType>xsd:string</MembershipType>
      <Name>xsd:string</Name>
      <Address>xsd:string</Address>
      <Postcode>xsd:string</Postcode>
      <Country>xsd:string</Country>
    </Item>...</Memberships>
</MembershipList>

JSON

Example Request
GET https://api.leaf.eco/r1/memberships.eb HTTP/1.1
Accept: application/json
Example Response
HTTP/1.1 200 OK
Content-Type: application/json

{"Memberships":[{"MembershipGUID":String,
      "CharityNumber":String,
      "MembershipType":String,
      "Name":String,
      "Address":String,
      "Postcode":String,
      "Country":String},
    ...]}

Test