---
title: Get Scope API
slug: api-marketplace/get-scope-api
description: Learn how to utilize Digilocker's consent-based framework to select which documents to share with requestors. This document provides a CURL request example, including Authorization, Content-Type, and Task parameters, to retrieve the accessible documents' 
createdAt: 2022-09-19T04:54:28.000Z
---

### Introduction

With the release of the consent-based framework by Digilocker, customers can choose which documents they want to share with requestors. If a requestor wants to see what documents they can access, they can use our 'Get Scope' API.&#x20;

### Sample CURL request

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST '<https://preproduction.signzy.tech/api/v2/patrons/<Your> Patron ID>/digilockers' \
--header 'Authorization: <auth_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "task": "getScope",
    "essentials": {
        "requestId": "<Returned as part of create URL API>"
    }
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST '<https://signzy.tech/api/v2/patrons/<Your> Patron ID>/digilockers' \
--header 'Authorization: <auth_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "task": "getScope",
    "essentials": {
        "requestId": "<Returned as part of create URL API>"
    }
}'
```
:::
::::

### Input Parameters

| Parameter Name | Description                                                                        |
| -------------- | ---------------------------------------------------------------------------------- |
| Authorization  | Contains the id parameter returned from the login step                             |
| Content-Type   | application/json                                                                   |
| Task           | Type of Tasks to be performed in Signzy System, eg: "getScope" in case of this API |

### Sample API Response

```json
{
    "essentials": {
        "requestId": ""
    },
    "id": "651fb8d39ca472ab2",
    "patronId": "<your-patron-id>",
    "task": "getScope",
    "result": {
        "scope": [
            "file.partners/PANCR",
            "issued/in.gov.transport-DRVLC-DL0120230100001"
        ]
    }
}
```

### Output Parameters

| Parameter Name | Description                                                     |
| -------------- | --------------------------------------------------------------- |
| id             | Unique ID of the request.                                       |
| patronId       | Patron ID of the user from the login call                       |
| task           | The task would be "getScope" same as passed in the request      |
| result.scope   | Defines the consent given by the end customer to the requestor. |



<font color="#2166ae">**Note\:**</font> Requestors can view the scope information through the "scope" query parameter. The value of the scope parameter would be base64 encoded string. This parameter is appended to the "successRedirectUrl" provided in the Create URL API.



:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

