# Retrieve a feature

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Retrieve a specific feature using its ID.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/features/fea-user-licenes \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Feature.Retrieve("fea-user-licenes").Request();

Feature feature = result.Feature;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    featureAction "github.com/chargebee/chargebee-go/v3/actions/feature"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := featureAction.Retrieve("fea-user-licenes").Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Feature := res.Feature
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.FeatureRetrieveRequest{
    Id : "fea-user-licenes",
}
  res, err := client.Feature.Retrieve(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Feature := res.Feature
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = Feature.retrieve("fea-user-licenes").request();

        Feature feature = result.feature();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.feature.Feature;
import com.chargebee.v4.models.feature.params.FeatureRetrieveParams;
import com.chargebee.v4.models.feature.responses.FeatureRetrieveResponse;

public class FeatureRetrieve {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        FeatureRetrieveResponse response = client.features().retrieve("fea-user-licenes");

        Feature feature = response.getFeature();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.feature.retrieve("fea-user-licenes");

    console.log(result);
    const feature = result.feature;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->feature()->retrieve("fea-user-licenes");
$feature = $result->feature;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Feature.retrieve("fea-user-licenes")
feature = response.feature
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::Feature.retrieve("fea-user-licenes")

feature = result.feature
```

## Sample Response

```json
{
  "feature": {
    "id": "fea-custom-id-121",
    "name": "User Licenses",
    "description": "Maximum Available User Licenses",
    "status": "draft",
    "type": "range",
    "levels": [
      {
        "name": "3 Users",
        "value": "3",
        "is_unlimited": false,
        "level": 1
      },
      {..}
    ],
    "object": "feature"
  }
}
```

## URL Format

**GET** https://[site].chargebee.com/api/v2/features/{feature-id}

## Returns

- `feature` (Feature object)
  Resource object representing feature
