> 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 customer by ID and chain

GET https://api.fiftytwo.com/masterdata/customers/v1/chain/{chainId}/{customerId}



Reference: https://fiftytwo-demo.ferndocs.com/api/master-data/reference/customers/get-customer-by-id-and-chain

## Request

### Path parameters

- `customerId` (long, required) — The ID of the customer to retrieve
- `chainId` (integer, required) — The ID of the chain

## Response

### 200

Success

- `customers` (list of CustomersCustomersItems, required)

## Errors

### 400 Bad Request Error

Bad Request

- `string`

## Types

### CustomersCustomersItems

- `customerId` (integer, required) — The ID of the customer.
- `companyName` (string, optional) — Customer company name, if any.
- `address` (string, optional) — Customer address line 1
- `address2` (string, optional) — Customer address line 2
- `zipCode` (integer, optional) — Customer zipcode (postcode).
- `city` (string, optional) — Customer city name
- `telephone` (string, optional) — Customer telephone number
- `email` (string, optional) — Customer e-mail address
- `eanPublic` (string, optional) — Unique customer number for public sector administration purposes. This field must be used when customerType is = 7 (public sector institution).
- `att` (string, optional) — Contact person, if any.
- `note` (string, optional) — Information about the customer that can be shown on POS.
- `customerType` (integer, optional) — Defines customer type.1 = Customer with a credit account0 = Staff8 = Club member9 = Fiftytwo loyalty customer10 = Fiftytwo customer level A11 = Fiftytwo loyalty customer level B12 = Fiftytwo loyalty customer level C13 = Fiftytwo loyalty customer level D14 = 52 Loyalty customer level E15 = Loyalty customer level FCustomer types 2-7 may be used for specific purposes.
- `paymentTextCode` (integer, optional) — Code that refers to text records about terms of payment. Payment text records are maintained internally. Ask your Fitytwo consultant if you're in doubt
- `staffDiscountPercentage` (list of integer, optional) — Percentage rates for staff discount groups 1 to 9. Specified in hundredths of percent (5% is specified as 500). This allows for individual staff-specific discounts.
- `clubs` (list of integer, optional) — Clubs that the customer is a member of. Used to trigger club-based discounts.
- `staffDiscountLimit` (double, optional) — Specifies the maximum purchase amount for which staff discount wil be given. The period of aggregation is set by Bpar.ppers.
- `staffDiscountDisabled` (enum, optional) — Specifies if staff discount disabled.0 = No1 = Yes
  - Allowed values: `0`, `1`
- `promptForProject` (enum, optional) — Specifies if shop assistants must be prompted to enter a project number when serving the customer. 0 = No1 = YesIf yes, the project number will be inserted in the sales transaction.
  - Allowed values: `0`, `1`
- `promptForRequisition` (enum, optional) — Specifies if shop assistants must be prompted to enter a requisition number when serving the customer. 0 = No1 = YesIf yes, the requisition number will be inserted in the sales transaction.
  - Allowed values: `0`, `1`
- `promptForNote` (enum, optional) — Specifies if shop assistants must be prompted to enter a note when serving the customer. 0 = No1 = YesIf yes, the note will be inserted in the sales transaction.
  - Allowed values: `0`, `1`
- `customerStatus` (integer, optional) — Defines if the customer is valid for completing purchases. If the value is not 0, the customer is not valid, but shop assistants can (if allowed by store parameters) accept the customer despite the customer status. For debitors (that is where a debitor record exists), the status field in the debitor record overrules this field. Status descriptions are maintained internally.
- `customerGroup` (string, optional) — A reference to a customer group that holds textual description and a price list for customers in that customer group
- `creditLimit` (integer, optional) — Credit limit for the customer. A value of 0 means no credit limit check during sales, that is the customer has unlimited credit.
- `balance` (double, optional) — Ability to adjust the customer's balance if deposits have been made on the customer account in the backend system. A positive value means that the customer is in credit.
- `extendedCreditLimit` (integer, optional) — Temporarily extend the customer's credit limit.
- `extendedCreditLimitEndDate` (date, optional) — The date when the extended credit limit expires. The extended credit limit is then automatically reset.
- `blockingCode` (integer, optional) — Controls if account sales for the customer are allowed. Blocking codes are maintained internally (ask your Fiftytwo consultant if in doubt). However, the following codes can be generated by the system during balance control from the POS: 4 = Account overdraft7 = Account not found8 = Offline to account server9 = POS offline
- `projects` (list of CustomersCustomersItemsProjectsItems, optional) — List of the customer's projects, if any. Customer projects are registered on sales transactions for invoicing purposes. Projects may have individual price lists.
- `labels` (list of CustomersCustomersItemsLabelsItems, optional) — Upon completion of a customer sale, it's possible to select a label containing customer address information. The selected label will be added to the receipt.
- `cards` (list of CustomersCustomersItemsCardsItems, optional) — List of the customer's cards. May contain multiple cards because the customer may have several employees who may each have their own individual card representing the customer.

### CustomersCustomersItemsProjectsItems

- `projectId` (integer, required) — The ID of the project, which must be unique for the customer, so only one project with this ID can exist for the customer.
- `description` (string, optional) — A description of the project.
- `priceList` (integer, optional) — A reference to the price list that applies to the project. Price lists are maintained internally. Ask your Fiftytwo consultant of in doubt.
- `notes` (string, optional) — Notes to staff when they deal with the customer project. Example: Instructions to shop assistants about how to handle the customer project.

### CustomersCustomersItemsLabelsItems

- `labelId` (integer, required) — The ID of the required label, which must be unique for the customer, so only one label with this label ID can exist for the customer.
- `label` (string, optional) — A short textual description of the label.
- `closed` (enum, optional) — Specifies if the label is closed for adding to the customer's receipts? 1 = Yes 0 = No
  - Allowed values: `0`, `1`
- `description` (string, optional) — Use if an additional longer description if needed.
- `name` (string, optional) — Customer name information for the label.
- `address` (string, optional) — Customer address information for the label.
- `zipCode` (string, optional) — Customer zipcode (postcode) information for the label.
- `city` (string, optional) — Customer city information for the label.

### CustomersCustomersItemsCardsItems

- `card` (string, required) — Card number including ISO code.
- `blockingCode` (integer, optional) — Specifies if use of the card in question is blocked. Valid values are: 0 = OK1 = Card lost2 = Card blocked3 = Lost4 =5 =6 =7 = Card blocked (foreign card)8 =During sales, the system can generate 9 = POS offline.
- `cardHolderName` (string, optional) — Name of cardholder.
- `idNumber` (integer, optional)
- `salutation` (string, optional) — Up to four-letter salutation, for example Miss, Mrs, or Mr.

## Examples

**Response**

```json
{
  "customers": [
    {
      "customerId": 2345678901,
      "companyName": "Customer 1",
      "address": "Customer road  2",
      "address2": "3. door right hand",
      "zipCode": 1234,
      "city": "Cust",
      "telephone": "002991234567890",
      "email": "ernie@bernie.gl",
      "eanPublic": "1234567890123",
      "att": "Attention",
      "note": "Customernote",
      "customerType": 0,
      "paymentTextCode": 99,
      "staffDiscountPercentage": [
        1000,
        1500,
        2000,
        2500,
        3000,
        3500,
        4000,
        4500,
        5000
      ],
      "promptForProject": 1,
      "promptForRequisition": 1,
      "promptForNote": 1,
      "customerStatus": 0,
      "customerGroup": "G1",
      "creditLimit": 1000,
      "balance": 500.95,
      "extendedCreditLimit": 2000,
      "extendedCreditLimitEndDate": "2018-12-10",
      "blockingCode": 0,
      "projects": [
        {
          "projectId": 1234,
          "description": "project 1234",
          "priceList": 123456789012345680,
          "notes": "Notes for the project - any length"
        },
        {
          "projectId": 2345,
          "description": "project 2345",
          "priceList": 234567890123456800,
          "notes": "Notes for the project - any length"
        }
      ],
      "labels": [
        {
          "labelId": 123456789023,
          "closed": 1,
          "description": "Label for project 123456789023",
          "name": "Gary Label 2",
          "address": "Open road 7",
          "zipCode": "CM27180",
          "city": "Label 1 town"
        },
        {
          "labelId": 123456789012,
          "closed": 0,
          "description": "Label for project 123456789012",
          "name": "Rita Label2",
          "address": "Closed road 9",
          "zipCode": "CR3218",
          "city": "Label2 town"
        }
      ],
      "cards": [
        {
          "card": "1234567890123456789",
          "blockingCode": 0,
          "cardHolderName": "cardholder 1",
          "idNumber": 1234567890,
          "salutation": "Mrs."
        },
        {
          "card": "2345678901234567890",
          "blockingCode": 0,
          "cardHolderName": "cardholder 2",
          "idNumber": 2345678901,
          "salutation": "Mr."
        }
      ]
    }
  ]
}
```

**SDK Code**

```python Customers_getCustomerByIdAndChain_example
import requests

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

response = requests.get(url)

print(response.json())
```

```javascript Customers_getCustomerByIdAndChain_example
const url = 'https://api.fiftytwo.com/masterdata/customers/v1/chain/1/1';
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 Customers_getCustomerByIdAndChain_example
package main

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

func main() {

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

	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 Customers_getCustomerByIdAndChain_example
require 'uri'
require 'net/http'

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

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 Customers_getCustomerByIdAndChain_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Customers_getCustomerByIdAndChain_example
using RestSharp;

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

```swift Customers_getCustomerByIdAndChain_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fiftytwo.com/masterdata/customers/v1/chain/1/1")! 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()
```