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

Get Permissions and Personas GET

Obtains a list of memberships to which the user has been granted access as a contact, along with a list of the general personas under which the user may access data and services

Parameters

Response Parameters
ParameterNameTypeDescription
EntityGUIDEntity GUIDStringUnique identifier for the current user
EntityNameEntity NameString (Optional)The name associated with the current user
UsernameUsernameString (Optional)The unique username assigned to the current user
EmailAddressEmail AddressString (Optional)The email address associated with the current user
PersonasPersonasEnumeration (Optional)The list of personas under which the user has been granted access to LEAF services
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
Name
LEAF Charity NumberString (Optional)The name of the farm, company, organisation or individual associated with the membership
MembershipType
Membership TypeEnumerationThe type of membership
ContactType
Contact TypeEnumeration (Optional)Indicates if the user is a named contact for the membership

Enumerations

Personas (Response)
ValueDescription
MemberUser is a contact for a LEAF charity membership
StaffUser is a member of staff
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
Contact Type (Response)
ValueDescription
PrimaryContactUser is the primary contact
BillingContactUser is the billing contact
MarketingContactUser is the marketing contact
TechnicalContactUser is the technical contact

XML

Example Request
GET https://api.leaf.eco/r1/authorisation.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="Authorisation">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="EntityGUID" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Unique identifier for the current user</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="EntityName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The name associated with the current user</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Username" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique username assigned to the current user</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="EmailAddress" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The email address associated with the current user</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Personas" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The list of personas under which the user has been granted access to LEAF services</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:list>
              <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="Member">
                    <xsd:annotation>
                      <xsd:documentation>User is a contact for a LEAF charity membership</xsd:documentation>
                    </xsd:annotation>
                  </xsd:enumeration>
                  <xsd:enumeration value="Staff">
                    <xsd:annotation>
                      <xsd:documentation>User is a member of staff</xsd:documentation>
                    </xsd:annotation>
                  </xsd:enumeration>
                </xsd:restriction>
              </xsd:simpleType>
            </xsd:list>
          </xsd:simpleType>
        </xsd:element>
        <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="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="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="ContactType" minOccurs="0">
                      <xsd:annotation>
                        <xsd:documentation>Indicates if the user is a named contact for the membership</xsd:documentation>
                      </xsd:annotation>
                      <xsd:simpleType>
                        <xsd:list>
                          <xsd:simpleType>
                            <xsd:restriction base="xsd:string">
                              <xsd:enumeration value="PrimaryContact">
                                <xsd:annotation>
                                  <xsd:documentation>User is the primary contact</xsd:documentation>
                                </xsd:annotation>
                              </xsd:enumeration>
                              <xsd:enumeration value="BillingContact">
                                <xsd:annotation>
                                  <xsd:documentation>User is the billing contact</xsd:documentation>
                                </xsd:annotation>
                              </xsd:enumeration>
                              <xsd:enumeration value="MarketingContact">
                                <xsd:annotation>
                                  <xsd:documentation>User is the marketing contact</xsd:documentation>
                                </xsd:annotation>
                              </xsd:enumeration>
                              <xsd:enumeration value="TechnicalContact">
                                <xsd:annotation>
                                  <xsd:documentation>User is the technical contact</xsd:documentation>
                                </xsd:annotation>
                              </xsd:enumeration>
                            </xsd:restriction>
                          </xsd:simpleType>
                        </xsd:list>
                      </xsd:simpleType>
                    </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"?>
<Authorisation>
  <EntityGUID>xsd:string</EntityGUID>
  <EntityName>xsd:string</EntityName>
  <Username>xsd:string</Username>
  <EmailAddress>xsd:string</EmailAddress>
  <Personas>xsd:string</Personas>
  <Memberships>
    <Item>
      <MembershipGUID>xsd:string</MembershipGUID>
      <CharityNumber>xsd:string</CharityNumber>
      <Name>xsd:string</Name>
      <MembershipType>xsd:string</MembershipType>
      <ContactType>xsd:string</ContactType>
    </Item>...</Memberships>
</Authorisation>

JSON

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

{"EntityGUID":String,
  "EntityName":String,
  "Username":String,
  "EmailAddress":String,
  "Personas":String,
  "Memberships":[{"MembershipGUID":String,
      "CharityNumber":String,
      "Name":String,
      "MembershipType":String,
      "ContactType":String},
    ...]}

Test