Syntch Gateway API

<back to all web services

GetEntityTreeRequest

Entity Relationships
Requires Authentication
Requires the role:Reseller
The following routes are available for this service:
GET/entityrelationshipsGets a list of related resellers and merchants
GetEntityTreeRequest Parameters:
NameParameterData TypeRequiredDescription
ResellerKeyqueryint?NoReseller key to use as the starting point of the hierarchy
GetEntityTreeResult Parameters:
NameParameterData TypeRequiredDescription
EntitiesmodelList<RelatedEntity>NoA collection of entities.
RelatedEntity Parameters:
NameParameterData TypeRequiredDescription
KeyformintNo
NameformstringNo
EntityTypeformstringNo
ParentKeyformint?No
MerchantsformList<RelatedEntity>No

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /entityrelationships HTTP/1.1 
Host: syntch.simpay.net 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetEntityTreeResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gateway.RestApi.EntityRelationships.BindingModels">
  <Entities>
    <RelatedEntity>
      <EntityType>String</EntityType>
      <Key>0</Key>
      <Merchants>
        <RelatedEntity>
          <EntityType>String</EntityType>
          <Key>0</Key>
          <Merchants>
            <RelatedEntity>
              <EntityType>String</EntityType>
              <Key>0</Key>
              <Merchants i:nil="true" />
              <Name>String</Name>
              <ParentKey>0</ParentKey>
            </RelatedEntity>
          </Merchants>
          <Name>String</Name>
          <ParentKey>0</ParentKey>
        </RelatedEntity>
      </Merchants>
      <Name>String</Name>
      <ParentKey>0</ParentKey>
    </RelatedEntity>
  </Entities>
</GetEntityTreeResult>