# View Debit Organizations Hierarchy

## View Debit Organizations Hierarchy

The View Debit Organizations Hierarchy API returns the organization hierarchy.

## Input Parameters:

| Name        | Required | Definition                                                                         | Comments |
| ----------- | -------- | ---------------------------------------------------------------------------------- | -------- |
| IssuingBank | Y        | Format: Alphanumeric, 40                                                           |          |
| OrgId       | Y        | <p>Format: Alphanumeric, 20<br>Value can be multiple org\_id’s split by commas</p> |          |

## Output Parameters:

| Name                    | Definition               | Failure Case | Success Case | Comments                          |
| ----------------------- | ------------------------ | ------------ | ------------ | --------------------------------- |
| ParentOrgId             | Format: Alphanumeric, 20 | Not returned | Returned     |                                   |
| ParentOrgName           | Format: Alphanumeric, 30 | Not returned | Returned     |                                   |
| ParentOrgType           | Format: Alphanumeric, 30 | Not returned | Returned     |                                   |
| UnderOrganizationId     | Format: Alphanumeric, 20 | Not returned | Returned     | In tag UnderOrgs sub-tag UnderOrg |
| UnderOrganizationName   | Format: Alphanumeric, 30 | Not returned | Returned     | In tag UnderOrgs sub-tag UnderOrg |
| UnderOrganizationStatus | Format: Alphanumeric, 1  | Not returned | Returned     | In tag UnderOrgs sub-tag UnderOrg |
| UnderOrganizationType   | Format: Alphanumeric, 30 | Not returned | Returned     | In tag UnderOrgs sub-tag UnderOrg |

## XML Samples

### Input XML

```json
<?xml version="1.0" ?>
  <PraxellMessage>
   <ServiceRequest>
     <UserName>test_pm</UserName>
     <UniqueRequestId>1212121212121213</UniqueRequestId>
     <OriginType>Praxell- internal: web portal API</OriginType>
     <SessionId>05200637022706028152</SessionId> 
     <ProviderServiceId></ProviderServiceId>
     <ServiceName>ViewDebitOrganizationsHierarchy</ServiceName>
        <OrgId>1234</OrgId>
   </ServiceRequest>
</PraxellMessage>
```

```json
<?xml version="1.0" ?>
  <PraxellMessage>
    <ServiceResponse>
      <ServiceName>ViewDebitOrganizationsHierarchy</ServiceName>
      <ServiceStatusId>0</ServiceStatusId>
      <ServiceStatusName>StatusOK</ServiceStatusName>
      <UpdateDate>2010-07-25 17:10:06</UpdateDate>
      <ServiceId>40618217201010070</ServiceId>
      <LoginServiceId>05200637022706028152</LoginServiceId>
      <ParentOrgId>0002</ParentOrgId>
      <ParentOrgName>ProgMngr</ParentOrgName>
      <ParentOrgType>ProgMngr</ParentOrgType>
      <UnderOrgs>
          <UnderOrg>
             <UnderOrganizationId>12345</UnderOrganizationId>
             <UnderOrganizationName>Reseller1</UnderOrganizationName>
             <UnderOrganizationType>Reseller</UnderOrganizationType>
             <UnderOrganizationStatus>A</UnderOrganizationStatus>
         </UnderOrg>
       <UnderOrg>
             <UnderOrganizationId>123456</UnderOrganizationId>
             <UnderOrganizationName>Reseller2</UnderOrganizationName>
             <UnderOrganizationType>Reseller</UnderOrganizationType>
             <UnderOrganizationStatus>N</UnderOrganizationStatus>
        </UnderOrg>
     </UnderOrgs>
   </ServiceResponse>
</PraxellMessage>
```

```json
<?xml version="1.0"?>
<PraxellXMLResponse>
  <ResponseDetails>
    <ServiceName>ViewDebitOrganizationsHierarchy</ServiceName>
    <SessionId>07071612200737105</SessionId>
    <StatusCode>70029</StatusCode>
    <StatusName>Data not found (cardholder not found)</StatusName>
    <StatusDescription>Data not found (cardholder not found)</StatusDescription>
    <ServiceDate>2021-10-01 12:37:50</ServiceDate>
    <ServiceId>07071612200737105</ServiceId>
  </ResponseDetails>
  <ResponseParams>
  </ResponseParams>
</PraxellXMLResponse>
```
