> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fiftytwo-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fiftytwo-demo.ferndocs.com/_mcp/server.

# Get userCategory by Id and Chain

GET https://api.fiftytwo.com/masterdata/usercategories/v1/chain/{chainId}/{userCategoryId}



Reference: https://fiftytwo-demo.ferndocs.com/api/master-data/reference/user-categories/get-user-category-by-id-and-chain

## Request

### Path parameters

- `userCategoryId` (string, required) — The Id of the userCategory to retrieve
- `chainId` (integer, required) — The Id of the Chain

## Response

### 200

Success

- `userCategories` (list of UserCategoriesUserCategoriesItems, required)

## Errors

### 400 Bad Request Error

Bad Request

- `string`

## Types

### UserCategoriesUserCategoriesItems

- `userCategoryId` (string, required) — Operator/Cashier category code (A–Z or 0–9)
- `name` (string, required) — A name that describes what the user category is used for
- `permissions` (list of userCategories_Permission, required) — Array of permission keys with associated level codes. **Level codes:** - `0` = Not allowed - `1` = Allowed if key 1 is set - `2` = Allowed if key 2 is set - `3` = Allowed if key 3 is set - `4` = Allowed if key 4 is set - `8` = Random key function - `9` = Always allowed.

### userCategories_Permission

Listed permission keys with their level codes.

- `sale` (enum, optional) — Permission for performing a sale
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `creditFinance` (enum, optional) — Credit-based financial transactions
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `debitFinance` (enum, optional) — Debit-based financial transactions
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `pctDiscount` (enum, optional) — Apply percentage discount
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `amountDiscount` (enum, optional) — Apply fixed amount discount
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `markDown` (enum, optional) — Mark down item price
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `return` (enum, optional) — Process item returns
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `returnLotto` (enum, optional) — Return lottery items
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `staffSale` (enum, optional) — Perform staff-exclusive sales
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `withoutVAT` (enum, optional) — Sell items without VAT
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `transVoidPay` (enum, optional) — Void payment transaction
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `lineCancel` (enum, optional) — Cancel individual sale lines
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `depositAccount` (enum, optional) — Deposit into account
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `withdrawAcc` (enum, optional) — Withdraw from account
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `float` (enum, optional) — Handle float cash
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `banking` (enum, optional) — Perform banking-related actions
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `statement` (enum, optional) — Print or access statements
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `cit` (enum, optional) — Cash-in-transit handling
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `pluEnquiry` (enum, optional) — Price look-up enquiry
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `transVoidSal` (enum, optional) — Void a sales transaction
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `correctionRcp` (enum, optional) — Issue correction receipt
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `enqStatement` (enum, optional) — Enquire about statements
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `minMaxOrder` (enum, optional) — Access min/max order settings
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `exchange` (enum, optional) — Handle exchanges
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `lineVoid` (enum, optional) — Void individual transaction lines
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `fixedPrice` (enum, optional) — Set fixed pricing for items
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `prcCorrection` (enum, optional) — Correct prices after entry
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `suspendKIV` (enum, optional) — Suspend or hold transactions
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `key1` (enum, optional) — Custom permission key 1
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `key2` (enum, optional) — Custom permission key 2
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `key3` (enum, optional) — Custom permission key 3
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`
- `key4` (enum, optional) — Custom permission key 4
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `8`, `9`

## Examples

**Response**

```json
{
  "userCategories": [
    {
      "userCategoryId": "A",
      "name": "Basic Cashier",
      "permissions": [
        {
          "sale": 1
        },
        {
          "creditFinance": 0
        },
        {
          "debitFinance": 0
        },
        {
          "pctDiscount": 1
        },
        {
          "amountDiscount": 1
        },
        {
          "markDown": 0
        },
        {
          "return": 1
        },
        {
          "returnLotto": 0
        },
        {
          "staffSale": 1
        },
        {
          "withoutVAT": 0
        },
        {
          "transVoidPay": 0
        },
        {
          "lineCancel": 1
        },
        {
          "depositAccount": 0
        },
        {
          "withdrawAcc": 0
        },
        {
          "float": 1
        },
        {
          "banking": 0
        },
        {
          "statement": 1
        },
        {
          "cit": 0
        },
        {
          "pluEnquiry": 1
        },
        {
          "transVoidSal": 0
        },
        {
          "correctionRcp": 0
        },
        {
          "enqStatement": 1
        },
        {
          "minMaxOrder": 1
        },
        {
          "exchange": 1
        },
        {
          "lineVoid": 1
        },
        {
          "fixedPrice": 0
        },
        {
          "prcCorrection": 0
        },
        {
          "suspendKIV": 1
        },
        {
          "key1": 1
        },
        {
          "key2": 1
        },
        {
          "key3": 1
        },
        {
          "key4": 1
        }
      ]
    },
    {
      "userCategoryId": "B",
      "name": "Supervisor",
      "permissions": [
        {
          "sale": 3
        },
        {
          "creditFinance": 2
        },
        {
          "debitFinance": 2
        },
        {
          "pctDiscount": 3
        },
        {
          "amountDiscount": 3
        },
        {
          "markDown": 2
        },
        {
          "return": 3
        },
        {
          "returnLotto": 2
        },
        {
          "staffSale": 3
        },
        {
          "withoutVAT": 1
        },
        {
          "transVoidPay": 2
        },
        {
          "lineCancel": 2
        },
        {
          "depositAccount": 2
        },
        {
          "withdrawAcc": 2
        },
        {
          "float": 2
        },
        {
          "banking": 2
        },
        {
          "statement": 3
        },
        {
          "cit": 1
        },
        {
          "pluEnquiry": 2
        },
        {
          "transVoidSal": 2
        },
        {
          "correctionRcp": 2
        },
        {
          "enqStatement": 2
        },
        {
          "minMaxOrder": 2
        },
        {
          "exchange": 2
        },
        {
          "lineVoid": 2
        },
        {
          "fixedPrice": 1
        },
        {
          "prcCorrection": 2
        },
        {
          "suspendKIV": 2
        },
        {
          "key1": 2
        },
        {
          "key2": 2
        },
        {
          "key3": 2
        },
        {
          "key4": 2
        }
      ]
    },
    {
      "userCategoryId": "C",
      "name": "Manager",
      "permissions": [
        {
          "sale": 4
        },
        {
          "creditFinance": 4
        },
        {
          "debitFinance": 4
        },
        {
          "pctDiscount": 4
        },
        {
          "amountDiscount": 4
        },
        {
          "markDown": 4
        },
        {
          "return": 4
        },
        {
          "returnLotto": 4
        },
        {
          "staffSale": 4
        },
        {
          "withoutVAT": 4
        },
        {
          "transVoidPay": 4
        },
        {
          "lineCancel": 4
        },
        {
          "depositAccount": 4
        },
        {
          "withdrawAcc": 4
        },
        {
          "float": 4
        },
        {
          "banking": 4
        },
        {
          "statement": 4
        },
        {
          "cit": 4
        },
        {
          "pluEnquiry": 4
        },
        {
          "transVoidSal": 4
        },
        {
          "correctionRcp": 4
        },
        {
          "enqStatement": 4
        },
        {
          "minMaxOrder": 4
        },
        {
          "exchange": 4
        },
        {
          "lineVoid": 4
        },
        {
          "fixedPrice": 4
        },
        {
          "prcCorrection": 4
        },
        {
          "suspendKIV": 4
        },
        {
          "key1": 4
        },
        {
          "key2": 4
        },
        {
          "key3": 4
        },
        {
          "key4": 4
        }
      ]
    }
  ]
}
```

**SDK Code**

```python UserCategories_getUserCategoryByIdAndChain_example
import requests

url = "https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId"

response = requests.get(url)

print(response.json())
```

```javascript UserCategories_getUserCategoryByIdAndChain_example
const url = 'https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go UserCategories_getUserCategoryByIdAndChain_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby UserCategories_getUserCategoryByIdAndChain_example
require 'uri'
require 'net/http'

url = URI("https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java UserCategories_getUserCategoryByIdAndChain_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId")
  .asString();
```

```php UserCategories_getUserCategoryByIdAndChain_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId');

echo $response->getBody();
```

```csharp UserCategories_getUserCategoryByIdAndChain_example
using RestSharp;

var client = new RestClient("https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift UserCategories_getUserCategoryByIdAndChain_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fiftytwo.com/masterdata/usercategories/v1/chain/1/userCategoryId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```