# Data Access

### **Purpose allowed**

```swift
func purposeAllowed(iabId: UInt32) -> Bool
```

Return `true` if purpose with `iabId`  is allowed, `false` if propose is not in the allowed purpose list.\
\
&#x20;:warning:  When this method return `false` does not mean this purpose is disallowed. \
\
If you receive a `false` , you can fetch all purposes `func getAllPurposes() -> [ConsentCollection]?`   and filter them based on your purpose's `iadId` to get extra information about the consent status.

### **Extra Purpose allowed**

```swift
func extraPurposeAllowed(iabId: String) -> Bool
```

Return `true` if extra purpose with `iabId`  is allowed, `false` if this extra purpose is not in the allowed extra purpose list.

&#x20;:warning:  When this method return `false` it does not mean this extra purpose is disallowed. \
\
If you receive a `false`, you can fetch all  extra purposes  `func getAllExtraPurposes() -> [ConsentCollection]?` and filter them based on your extra purposes `iadId` in order to get extra information about the consent status.

### **Feature allowed**

```swift
func featureAllowed(iabId: UInt32) -> Bool
```

Return `true` if feature with `iabId`  is allowed, `false` if this feature is not in the allowed  feature list.

&#x20;:warning:  When this method return `false` it does not mean this feature is disallowed. \
\
If you receive a `false`, you can fetch all  all features `func getAllFeatures() -> [ConsentCollection]?` and filter them based on your feature `iadId` in order to get extra information about the consent status.

### **Stack allowed**

```swift
func stackAllowed(iabId: UInt32) -> Bool 
```

Return `true` if stack with `iabId`  is allowed, `false` if this stack is not in the allowed stack list.\
\
&#x20;:warning:  When this method return `false` it does not mean this stack is disallowed. \
\
If you receive a `false` , you can fetch all stacks `func getAllStacks() -> [ConsentCollection]?`  and filter them based on your stack `iadId` in order to get extra information about the consent status.

### **Vendor allowed**

```swift
 func vendorAllowed(iabId: UInt32) -> Bool
```

Return `true` if vendor with `iabId` is allowed, `false` if this vendor is not in the allowed vendor list.

&#x20;:warning:  When this method return `false` it does not mean this vendor is disallowed. \
\
If you receive a `false`, you can fetch all vendors `func getAllVendors() -> [ConsentCollection]?` and filter them based on your vendor `iadId` in order to get extra information about the consent status.

### **Extra Vendor allowed**

```swift
func extraVendorAllowed(extraId: String) -> Bool 
```

Return `true` if extra vendor with `extraId`  is allowed, `false` if this extra vendor is not in the allowed extra vendor list.

&#x20;:warning:  When this method return `false` it does not mean this extra vendor is disallowed. \
\
If you receive a `false`, you can fetch all  extra vendors `func getExtraAllVendors() -> [ConsentCollection]?` and filter them based on your extra vendor `iadId` in order to get extra information about the consent status.

### **All Extra Vendors**

```swift
func getAllExtraVendors() -> [ConsentCollection]?
```

Return all consent informations for all extra vendors. \
\
`ConsentCollection`  payload has this data below (not exclusive)

```
{
    "id": "1",
    "type": "0",
    "status": "0",
}
```

### **All Vendors**

```swift
func getAllVendors() -> [ConsentCollection]?
```

Return all consent informations for all vendors. \
\
`ConsentCollection`  payload has this data below (not exclusive)

```
{
    "id": "1",
    "type": "0",
    "status": "0",
}
```

### **All Vendors Consent Status**

```swift
func allVendorStatus() -> ACConsentStatus
```

Returns a `ACConsentStatus` object representing the overall consent status of your vendors. The consent status is defined as an enum with the following possible values:

```
pending = 0
allowed = 1
mixed = 2
denied = -1
undefined = -2
```

### **All Stack Consent Status**

```swift
func allStacksStatus() -> ACConsentStatus
```

Returns a `ACConsentStatus` object representing the overall consent status of your stacks. The consent status is defined as an enum with the following possible values:

```
pending = 0
allowed = 1
mixed = 2
denied = -1
undefined = -2
```

### **All Purposes**

```swift
func getAllPurposes() -> [ConsentCollection]?
```

Return all consent informations for all purposes. \
\
`ConsentCollection`  payload has this data below (not exclusive)

```
{
    "id": "1",
    "type": "0",
    "status": "0", // 1 if consent, 0 if denied
}
```

### **All Purposes filtered by Consent Status**

```swift
func getAllPurposes(by status: ACConsentStatus) -> [ConsentCollection]?
```

Return all consent informations for all purposes filtered by Consent Status (pending = 0,  allowed = 1, mixed = 2, denied = -1, undefined = -2)

### **All Purposes Consent Status**

```swift
func allPurposesStatus() -> ACConsentStatus
```

Returns a `ACConsentStatus` object representing the overall consent status of your purposes. The consent status is defined as an enum with the following possible values:

```
pending = 0
allowed = 1
mixed = 2
denied = -1
undefined = -2
```

### **All Features**

```swift
func getAllFeatures() -> [ConsentCollection]?
```

Return all consent informations for all features. \
\
`ConsentCollection`  payload has this data below (not exclusive)

```
{
    "id": "1",
    "type": "0",
    "status": "0", // 1 if consent, 0 if denied
}

```

### **All Special Features**

```swift
func getAllSpecialFeatures() -> [ConsentCollection]?
```

Return all consent informations for all features. \
\
`ConsentCollection`  payload has this data below (not exclusive)

```
{
    "id": "1",
    "type": "0",
    "status": "0", // 1 if consent, 0 if denied
}

```

### **All Stacks**

```swift
func getAllStacks() -> [ConsentCollection]?
```

Return all consent informations for all stacks. \
\
`ConsentCollection`  payload has this data below (not exclusive)

```
{
    "id": "1",
    "type": "0",
    "status": "0", // 1 if consent, 0 if denied
}
```

### **All Stacks filtered by Consent Status**

```swift
func getAllStacks(by status: ACConsentStatus) -> [ConsentCollection]?
```

Return all consent informations for all stacks filtered by Consent Status.

### **All Stacks Consent Status**

```swift
func allStacksStatus() -> ACConsentStatus
```

Returns a `ACConsentStatus` object representing the overall consent status of your stacks. The consent status is defined as an enum with the following possible values:

```
pending = 0
allowed = 1
mixed = 2
denied = -1
undefined = -2
```

### **General Consent Status**

```swift
 func consentStatus() -> ACConsentStatus 
```

Returns a `ACConsentStatus` object representing the general overall consent status. The consent status is defined as an enum with the following possible values:

```
pending = 0
allowed = 1
mixed = 2
denied = -1
undefined = -2
```
