> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.sqril.io/llms.txt.
> For full documentation content, see https://docs.sqril.io/llms-full.txt.

# Check Customer

GET https://api.sqril.com/checkCustomer

Retrieves a registered customer profile for the authenticated account.

**Authentication:**
- **REQUIRED**: Basic Auth only.

**Query Parameters:**
- `customer_id` (required): Customer identifier returned by `registerCustomer`.

**Response:**
- Returns flat sender profile fields, `customer_id`, optional timestamps, and `allowed` (country -> boolean).

**Field code references:**
- `ic_type` must be one of the supported identification document type codes: `NIC`, `PP`, `WEP`.
- `occupation` must be one of the supported occupation codes: `OCC1` through `OCC11`.

Reference: https://docs.sqril.io/sqril-saa-s-api/payout-endpoints/check-customer

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /checkCustomer:
    get:
      operationId: check-customer
      summary: Check Customer
      description: >-
        Retrieves a registered customer profile for the authenticated account.


        **Authentication:**

        - **REQUIRED**: Basic Auth only.


        **Query Parameters:**

        - `customer_id` (required): Customer identifier returned by
        `registerCustomer`.


        **Response:**

        - Returns flat sender profile fields, `customer_id`, optional
        timestamps, and `allowed` (country -> boolean).


        **Field code references:**

        - `ic_type` must be one of the supported identification document type
        codes: `NIC`, `PP`, `WEP`.

        - `occupation` must be one of the supported occupation codes: `OCC1`
        through `OCC11`.
      tags:
        - subpackage_payoutEndpoints
      parameters:
        - name: customer_id
          in: query
          description: 'Required: customer_id returned by registerCustomer'
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Payout Endpoints_Check
                  Customer_Response_200
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCheckcustomerRequestNotFoundError'
servers:
  - url: https://api.sqril.com
  - url: https://your-app.com
components:
  schemas:
    CheckCustomerGetResponsesContentApplicationJsonSchemaAllowed:
      type: object
      properties:
        ID:
          type: boolean
        PH:
          type: boolean
        VN:
          type: boolean
      required:
        - ID
        - PH
        - VN
      title: CheckCustomerGetResponsesContentApplicationJsonSchemaAllowed
    Payout Endpoints_Check Customer_Response_200:
      type: object
      properties:
        customer_id:
          type: string
        name_first:
          type: string
        name_last:
          type: string
        gender:
          type: string
        ic_number:
          type: string
        ic_type:
          type: string
        ic_country:
          type: string
        occupation:
          type: string
        country_of_residence:
          type: string
        phone:
          type: string
        email:
          type: string
          format: email
        nationality:
          type: string
        dob:
          type: string
          format: date
        address:
          type: string
        ic_expiry_date:
          type: string
          format: date
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        allowed:
          $ref: >-
            #/components/schemas/CheckCustomerGetResponsesContentApplicationJsonSchemaAllowed
      required:
        - customer_id
        - name_first
        - name_last
        - gender
        - ic_number
        - ic_type
        - ic_country
        - occupation
        - country_of_residence
        - phone
        - email
        - nationality
        - dob
        - address
        - ic_expiry_date
        - created_at
        - updated_at
        - allowed
      title: Payout Endpoints_Check Customer_Response_200
    CheckCustomerGetResponsesContentApplicationJsonSchemaDetails:
      type: object
      properties:
        customer_id:
          type: string
      required:
        - customer_id
      title: CheckCustomerGetResponsesContentApplicationJsonSchemaDetails
    GetCheckcustomerRequestNotFoundError:
      type: object
      properties:
        error_code:
          type: string
        error_message:
          type: string
        details:
          $ref: >-
            #/components/schemas/CheckCustomerGetResponsesContentApplicationJsonSchemaDetails
      required:
        - error_code
        - error_message
        - details
      title: GetCheckcustomerRequestNotFoundError

```

## SDK Code Examples

```python Payout Endpoints_Check Customer_example
import requests

url = "https://api.sqril.com/checkCustomer"

querystring = {"customer_id":"{{customer_id}}"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript Payout Endpoints_Check Customer_example
const url = 'https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D';
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 Payout Endpoints_Check Customer_example
package main

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

func main() {

	url := "https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D"

	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 Payout Endpoints_Check Customer_example
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D")

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

HttpResponse<String> response = Unirest.get("https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D")
  .asString();
```

```php Payout Endpoints_Check Customer_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D');

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

```csharp Payout Endpoints_Check Customer_example
using RestSharp;

var client = new RestClient("https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Payout Endpoints_Check Customer_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/checkCustomer?customer_id=%7B%7Bcustomer_id%7D%7D")! 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()
```