> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ops-apidoc.hugin.co/llms.txt.
> For full documentation content, see https://ops-apidoc.hugin.co/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ops-apidoc.hugin.co/_mcp/server.

# Create Lead

POST https://ops.hugin.co/api/v1/leads
Content-Type: application/json

# Create Lead - Ön Sipariş Oluşturma

Yeni bir ön sipariş (lead) oluşturur. Bu endpoint, müşterinin bankaya ilk kez gitmesi durumunda kullanılır.

## Request Body

### Zorunlu Alanlar

| Parametre | Tip | Max Uzunluk | Açıklama |
| --- | --- | --- | --- |
| `firstName` | string | 60 | Ad |
| `lastName` | string | 60 | Soyad |
| `cellularPhone` | string | - | SMS alabilen cep telefonu |
| `email` | string | - | Email adresi |
| `shippingAddress` | object | - | Teslimat adresi |
| `shippingAddress.street` | string | 150 | Sokak adresi |
| `shippingAddress.district` | string | 30 | İlçe |
| `shippingAddress.cityCode` | int | - | İl kodu 0–99 |
| `companyName` | string | 100 | Firma resmi ünvanı |
| `companyKnownAs` | string | 100 | Slipteki tabela adı |
| `taxOfficeName` | string | 50 | Vergi dairesi adı |
| `vkn` | string | - | Vergi kimlik numarası (TCKN veya VKN en az biri) |
| `tckn` | string | - | TC kimlik numarası |
| `leadQuantity` | int | - | Sipariş adedi (1–999, varsayılan: 1) |
| `productCode` | string | 10 | Ürün kodu |

### Opsiyonel Alanlar

| Parametre | Tip | Max Uzunluk | Açıklama |
| --- | --- | --- | --- |
| `branchCode` | int | - | Cihazın kullanılacağı şubenin mali kodu |
| `terminalId` | string | 50 | Terminal ID (normalize edilir: son 8 karakter veya 0 ile doldurulur) |
| `merchantId` | string | 50 | Üye işyeri numarası |
| `deviceId` | string | 12 | Cihaz sicil numarası (mali id)|
| `invoiceNumber` | string | 50 | Cihazın satış faturasının numarası |
| `invoiceDate` | string | 50 |Cihazın satış faturasının tarihi |
| `bankOrderNo` | string | 50 | Banka referans numarası |
| `phone` | string | - | Sabit telefon |
| `shippingAddress.county` | string | 30 | Semt |
| `shippingAddress.postCode` | int | - | Posta kodu 0–99999 |
| `billingAddress` | object | - | Fatura adresi |
| `billingAddress.street` | string | 150 | Fatura adresi sokak |
| `billingAddress.county` | string | 20 | Fatura adresi semt |
| `billingAddress.district` | string | 20 | Fatura adresi ilçe |
| `billingAddress.postCode` | int | - | Fatura adresi posta kodu 0–99999 |
| `billingAddress.cityCode` | int | - | Fatura il kodu 0–99 |
| `comments` | string | 1000 | Açıklamalar |

## İş Kuralları

1. **TCKN/VKN Validasyonu**:
    
    - TCKN: 11 haneli, doğrulama yapılır.
    - VKN: 10 haneli, doğrulama yapılır.
    - En az biri (TCKN VEYA VKN) zorunlu
        
2. **Telefon Normalizasyonu**:
    
    - Boşluk ve parantez karakterleri temizlenir
        
    - 10 karakterden uzunsa: Son 10 karakter alınır
        
3. **Email Normalizasyonu**:
    
    - Geçersiz email formatı ise boş string yapılır (hata verilmez)
        
4. **Terminal ID ile Sipariş**:
    
    - Terminal ID ile kayıt için sadece 1 adet sipariş geçilebilir (`lead_quantity` > 1 olamaz)
        
    - Eğer terminal ID zaten varsa, mevcut sipariş döner (yeni sipariş oluşturulmaz)
   
5. **Ürün kodu**:
   Aşağıdaki tablodaki geçerli ürün kodlarını kullanabılabilir

| Değer |
|-------|
| OKC_T300 |
| OKC_S1 |
| V507_N910 |
| V507_N750 |
| MPOS_N910 |
| MPOS_N750 |

## Response

Başarılı durumda dönen `leadId` değeri, sipariş takip numarasıdır ve diğer endpoint'larda kullanılır.

Reference: https://ops-apidoc.hugin.co/hugin-ops-api/leads/create-lead

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: HuginOps API
  version: 1.0.0
paths:
  /api/v1/leads:
    post:
      operationId: create-lead
      summary: Create Lead
      description: >-
        # Create Lead - Ön Sipariş Oluşturma


        Yeni bir ön sipariş (lead) oluşturur. Bu endpoint, müşterinin bankaya
        ilk kez gitmesi durumunda kullanılır.


        ## Request Body


        ### Zorunlu Alanlar


        | Parametre | Tip | Max Uzunluk | Açıklama |

        | --- | --- | --- | --- |

        | `firstName` | string | 60 | Ad |

        | `lastName` | string | 60 | Soyad |

        | `cellularPhone` | string | - | SMS alabilen cep telefonu |

        | `email` | string | - | Email adresi |

        | `shippingAddress` | object | - | Teslimat adresi |

        | `shippingAddress.street` | string | 150 | Sokak adresi |

        | `shippingAddress.district` | string | 30 | İlçe |

        | `shippingAddress.cityCode` | int | - | İl kodu 0–99 |

        | `companyName` | string | 100 | Firma resmi ünvanı |

        | `companyKnownAs` | string | 100 | Slipteki tabela adı |

        | `taxOfficeName` | string | 50 | Vergi dairesi adı |

        | `vkn` | string | - | Vergi kimlik numarası (TCKN veya VKN en az biri)
        |

        | `tckn` | string | - | TC kimlik numarası |

        | `leadQuantity` | int | - | Sipariş adedi (1–999, varsayılan: 1) |

        | `productCode` | string | 10 | Ürün kodu |


        ### Opsiyonel Alanlar


        | Parametre | Tip | Max Uzunluk | Açıklama |

        | --- | --- | --- | --- |

        | `branchCode` | int | - | Cihazın kullanılacağı şubenin mali kodu |

        | `terminalId` | string | 50 | Terminal ID (normalize edilir: son 8
        karakter veya 0 ile doldurulur) |

        | `merchantId` | string | 50 | Üye işyeri numarası |

        | `deviceId` | string | 12 | Cihaz sicil numarası (mali id)|

        | `invoiceNumber` | string | 50 | Cihazın satış faturasının numarası |

        | `invoiceDate` | string | 50 |Cihazın satış faturasının tarihi |

        | `bankOrderNo` | string | 50 | Banka referans numarası |

        | `phone` | string | - | Sabit telefon |

        | `shippingAddress.county` | string | 30 | Semt |

        | `shippingAddress.postCode` | int | - | Posta kodu 0–99999 |

        | `billingAddress` | object | - | Fatura adresi |

        | `billingAddress.street` | string | 150 | Fatura adresi sokak |

        | `billingAddress.county` | string | 20 | Fatura adresi semt |

        | `billingAddress.district` | string | 20 | Fatura adresi ilçe |

        | `billingAddress.postCode` | int | - | Fatura adresi posta kodu 0–99999
        |

        | `billingAddress.cityCode` | int | - | Fatura il kodu 0–99 |

        | `comments` | string | 1000 | Açıklamalar |


        ## İş Kuralları


        1. **TCKN/VKN Validasyonu**:
            
            - TCKN: 11 haneli, doğrulama yapılır.
            - VKN: 10 haneli, doğrulama yapılır.
            - En az biri (TCKN VEYA VKN) zorunlu
                
        2. **Telefon Normalizasyonu**:
            
            - Boşluk ve parantez karakterleri temizlenir
                
            - 10 karakterden uzunsa: Son 10 karakter alınır
                
        3. **Email Normalizasyonu**:
            
            - Geçersiz email formatı ise boş string yapılır (hata verilmez)
                
        4. **Terminal ID ile Sipariş**:
            
            - Terminal ID ile kayıt için sadece 1 adet sipariş geçilebilir (`lead_quantity` > 1 olamaz)
                
            - Eğer terminal ID zaten varsa, mevcut sipariş döner (yeni sipariş oluşturulmaz)
           
        5. **Ürün kodu**:
           Aşağıdaki tablodaki geçerli ürün kodlarını kullanabılabilir

        | Değer |

        |-------|

        | OKC_T300 |

        | OKC_S1 |

        | V507_N910 |

        | V507_N750 |

        | MPOS_N910 |

        | MPOS_N750 |


        ## Response


        Başarılı durumda dönen `leadId` değeri, sipariş takip numarasıdır ve
        diğer endpoint'larda kullanılır.
      tags:
        - subpackage_leads
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leads_Create Lead_Response_200'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostApiV1LeadsRequestBadRequestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                firstName:
                  type: string
                lastName:
                  type: string
                email:
                  type: string
                  format: email
                phone:
                  type: string
                cellularPhone:
                  type: string
                shippingAddress:
                  $ref: >-
                    #/components/schemas/ApiV1LeadsPostRequestBodyContentApplicationJsonSchemaShippingAddress
                billingAddress:
                  $ref: >-
                    #/components/schemas/ApiV1LeadsPostRequestBodyContentApplicationJsonSchemaBillingAddress
                companyName:
                  type: string
                companyKnownAs:
                  type: string
                vkn:
                  type: string
                tckn:
                  type: string
                terminalId:
                  type: string
                taxOfficeName:
                  type: string
                productCode:
                  type: string
                leadQuantity:
                  type: integer
              required:
                - firstName
                - lastName
                - email
                - phone
                - cellularPhone
                - shippingAddress
                - billingAddress
                - companyName
                - companyKnownAs
                - vkn
                - tckn
                - terminalId
                - taxOfficeName
                - productCode
                - leadQuantity
servers:
  - url: https://ops.hugin.co
    description: https://ops.hugin.co
components:
  schemas:
    ApiV1LeadsPostRequestBodyContentApplicationJsonSchemaShippingAddress:
      type: object
      properties:
        street:
          type: string
        district:
          type: string
        county:
          type: string
        postCode:
          type: integer
        cityCode:
          type: integer
      required:
        - street
        - district
        - county
        - postCode
        - cityCode
      title: ApiV1LeadsPostRequestBodyContentApplicationJsonSchemaShippingAddress
    ApiV1LeadsPostRequestBodyContentApplicationJsonSchemaBillingAddress:
      type: object
      properties:
        street:
          type: string
        district:
          type: string
        county:
          type: string
        postCode:
          type: integer
        cityCode:
          type: integer
      required:
        - street
        - district
        - county
        - postCode
        - cityCode
      title: ApiV1LeadsPostRequestBodyContentApplicationJsonSchemaBillingAddress
    ApiV1LeadsPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        leadId:
          type: integer
      required:
        - leadId
      title: ApiV1LeadsPostResponsesContentApplicationJsonSchemaData
    ApiV1LeadsPostResponsesContentApplicationJsonSchemaMetadata:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
      required:
        - timestamp
      title: ApiV1LeadsPostResponsesContentApplicationJsonSchemaMetadata
    Leads_Create Lead_Response_200:
      type: object
      properties:
        status:
          type: string
        data:
          $ref: >-
            #/components/schemas/ApiV1LeadsPostResponsesContentApplicationJsonSchemaData
        metadata:
          $ref: >-
            #/components/schemas/ApiV1LeadsPostResponsesContentApplicationJsonSchemaMetadata
      required:
        - status
        - data
        - metadata
      title: Leads_Create Lead_Response_200
    ApiV1LeadsPostResponsesContentApplicationJsonSchemaErrorFields:
      type: object
      properties:
        email:
          type: string
      required:
        - email
      title: ApiV1LeadsPostResponsesContentApplicationJsonSchemaErrorFields
    ApiV1LeadsPostResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        description:
          type: string
        fields:
          $ref: >-
            #/components/schemas/ApiV1LeadsPostResponsesContentApplicationJsonSchemaErrorFields
      required:
        - code
        - title
        - description
        - fields
      title: ApiV1LeadsPostResponsesContentApplicationJsonSchemaError
    PostApiV1LeadsRequestBadRequestError:
      type: object
      properties:
        status:
          type: string
        error:
          $ref: >-
            #/components/schemas/ApiV1LeadsPostResponsesContentApplicationJsonSchemaError
        metadata:
          $ref: >-
            #/components/schemas/ApiV1LeadsPostResponsesContentApplicationJsonSchemaMetadata
      required:
        - status
        - error
        - metadata
      title: PostApiV1LeadsRequestBadRequestError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples

### Success - Lead Created



**Request**

```json
undefined
```

**Response**

```json
{
  "status": "SUCCESS",
  "data": {
    "leadId": 2600011
  },
  "metadata": {
    "timestamp": "2026-01-02T06:22:04.141230Z",
    "instance": "/api/v1/leads"
  }
}
```

**SDK Code**

```python Success - Lead Created
import requests

url = "https://ops.hugin.co/api/v1/leads"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Success - Lead Created
const url = 'https://ops.hugin.co/api/v1/leads';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Success - Lead Created
package main

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

func main() {

	url := "https://ops.hugin.co/api/v1/leads"

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Success - Lead Created
require 'uri'
require 'net/http'

url = URI("https://ops.hugin.co/api/v1/leads")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'

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

```java Success - Lead Created
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://ops.hugin.co/api/v1/leads")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Success - Lead Created
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://ops.hugin.co/api/v1/leads', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Success - Lead Created
using RestSharp;

var client = new RestClient("https://ops.hugin.co/api/v1/leads");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Success - Lead Created
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://ops.hugin.co/api/v1/leads")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

### Leads_Create Lead_example



**Request**

```json
{
  "firstName": "Dilan",
  "lastName": "Gümüş",
  "email": "dilan.gumus@hugin.com.tr",
  "phone": "02125551234",
  "cellularPhone": "5070728177",
  "shippingAddress": {
    "street": "ABC",
    "district": "OF",
    "county": "OF",
    "postCode": 34744,
    "cityCode": 34
  },
  "billingAddress": {
    "street": "",
    "district": "",
    "county": "",
    "postCode": 34744,
    "cityCode": 34
  },
  "companyName": "Test Örnek Firma",
  "companyKnownAs": "Test",
  "vkn": "4640507936",
  "tckn": "25729369856",
  "terminalId": "03777111",
  "taxOfficeName": "ABC",
  "productCode": "OKC_T300",
  "leadQuantity": 1
}
```

**Response**

```json
{
  "status": "SUCCESS",
  "data": {
    "leadId": 2600011
  },
  "metadata": {
    "timestamp": "2026-01-02T06:22:04.141230Z",
    "instance": "/api/v1/leads"
  }
}
```

**SDK Code**

```python Leads_Create Lead_example
import requests

url = "https://ops.hugin.co/api/v1/leads"

payload = {
    "firstName": "Dilan",
    "lastName": "Gümüş",
    "email": "dilan.gumus@hugin.com.tr",
    "phone": "02125551234",
    "cellularPhone": "5070728177",
    "shippingAddress": {
        "street": "ABC",
        "district": "OF",
        "county": "OF",
        "postCode": 34744,
        "cityCode": 34
    },
    "billingAddress": {
        "street": "",
        "district": "",
        "county": "",
        "postCode": 34744,
        "cityCode": 34
    },
    "companyName": "Test Örnek Firma",
    "companyKnownAs": "Test",
    "vkn": "4640507936",
    "tckn": "25729369856",
    "terminalId": "03777111",
    "taxOfficeName": "ABC",
    "productCode": "OKC_T300",
    "leadQuantity": 1
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Leads_Create Lead_example
const url = 'https://ops.hugin.co/api/v1/leads';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"firstName":"Dilan","lastName":"Gümüş","email":"dilan.gumus@hugin.com.tr","phone":"02125551234","cellularPhone":"5070728177","shippingAddress":{"street":"ABC","district":"OF","county":"OF","postCode":34744,"cityCode":34},"billingAddress":{"street":"","district":"","county":"","postCode":34744,"cityCode":34},"companyName":"Test Örnek Firma","companyKnownAs":"Test","vkn":"4640507936","tckn":"25729369856","terminalId":"03777111","taxOfficeName":"ABC","productCode":"OKC_T300","leadQuantity":1}'
};

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

```go Leads_Create Lead_example
package main

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

func main() {

	url := "https://ops.hugin.co/api/v1/leads"

	payload := strings.NewReader("{\n  \"firstName\": \"Dilan\",\n  \"lastName\": \"Gümüş\",\n  \"email\": \"dilan.gumus@hugin.com.tr\",\n  \"phone\": \"02125551234\",\n  \"cellularPhone\": \"5070728177\",\n  \"shippingAddress\": {\n    \"street\": \"ABC\",\n    \"district\": \"OF\",\n    \"county\": \"OF\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"billingAddress\": {\n    \"street\": \"\",\n    \"district\": \"\",\n    \"county\": \"\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"companyName\": \"Test Örnek Firma\",\n  \"companyKnownAs\": \"Test\",\n  \"vkn\": \"4640507936\",\n  \"tckn\": \"25729369856\",\n  \"terminalId\": \"03777111\",\n  \"taxOfficeName\": \"ABC\",\n  \"productCode\": \"OKC_T300\",\n  \"leadQuantity\": 1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Leads_Create Lead_example
require 'uri'
require 'net/http'

url = URI("https://ops.hugin.co/api/v1/leads")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"firstName\": \"Dilan\",\n  \"lastName\": \"Gümüş\",\n  \"email\": \"dilan.gumus@hugin.com.tr\",\n  \"phone\": \"02125551234\",\n  \"cellularPhone\": \"5070728177\",\n  \"shippingAddress\": {\n    \"street\": \"ABC\",\n    \"district\": \"OF\",\n    \"county\": \"OF\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"billingAddress\": {\n    \"street\": \"\",\n    \"district\": \"\",\n    \"county\": \"\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"companyName\": \"Test Örnek Firma\",\n  \"companyKnownAs\": \"Test\",\n  \"vkn\": \"4640507936\",\n  \"tckn\": \"25729369856\",\n  \"terminalId\": \"03777111\",\n  \"taxOfficeName\": \"ABC\",\n  \"productCode\": \"OKC_T300\",\n  \"leadQuantity\": 1\n}"

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

```java Leads_Create Lead_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://ops.hugin.co/api/v1/leads")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"firstName\": \"Dilan\",\n  \"lastName\": \"Gümüş\",\n  \"email\": \"dilan.gumus@hugin.com.tr\",\n  \"phone\": \"02125551234\",\n  \"cellularPhone\": \"5070728177\",\n  \"shippingAddress\": {\n    \"street\": \"ABC\",\n    \"district\": \"OF\",\n    \"county\": \"OF\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"billingAddress\": {\n    \"street\": \"\",\n    \"district\": \"\",\n    \"county\": \"\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"companyName\": \"Test Örnek Firma\",\n  \"companyKnownAs\": \"Test\",\n  \"vkn\": \"4640507936\",\n  \"tckn\": \"25729369856\",\n  \"terminalId\": \"03777111\",\n  \"taxOfficeName\": \"ABC\",\n  \"productCode\": \"OKC_T300\",\n  \"leadQuantity\": 1\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://ops.hugin.co/api/v1/leads', [
  'body' => '{
  "firstName": "Dilan",
  "lastName": "Gümüş",
  "email": "dilan.gumus@hugin.com.tr",
  "phone": "02125551234",
  "cellularPhone": "5070728177",
  "shippingAddress": {
    "street": "ABC",
    "district": "OF",
    "county": "OF",
    "postCode": 34744,
    "cityCode": 34
  },
  "billingAddress": {
    "street": "",
    "district": "",
    "county": "",
    "postCode": 34744,
    "cityCode": 34
  },
  "companyName": "Test Örnek Firma",
  "companyKnownAs": "Test",
  "vkn": "4640507936",
  "tckn": "25729369856",
  "terminalId": "03777111",
  "taxOfficeName": "ABC",
  "productCode": "OKC_T300",
  "leadQuantity": 1
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Leads_Create Lead_example
using RestSharp;

var client = new RestClient("https://ops.hugin.co/api/v1/leads");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"firstName\": \"Dilan\",\n  \"lastName\": \"Gümüş\",\n  \"email\": \"dilan.gumus@hugin.com.tr\",\n  \"phone\": \"02125551234\",\n  \"cellularPhone\": \"5070728177\",\n  \"shippingAddress\": {\n    \"street\": \"ABC\",\n    \"district\": \"OF\",\n    \"county\": \"OF\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"billingAddress\": {\n    \"street\": \"\",\n    \"district\": \"\",\n    \"county\": \"\",\n    \"postCode\": 34744,\n    \"cityCode\": 34\n  },\n  \"companyName\": \"Test Örnek Firma\",\n  \"companyKnownAs\": \"Test\",\n  \"vkn\": \"4640507936\",\n  \"tckn\": \"25729369856\",\n  \"terminalId\": \"03777111\",\n  \"taxOfficeName\": \"ABC\",\n  \"productCode\": \"OKC_T300\",\n  \"leadQuantity\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Leads_Create Lead_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "firstName": "Dilan",
  "lastName": "Gümüş",
  "email": "dilan.gumus@hugin.com.tr",
  "phone": "02125551234",
  "cellularPhone": "5070728177",
  "shippingAddress": [
    "street": "ABC",
    "district": "OF",
    "county": "OF",
    "postCode": 34744,
    "cityCode": 34
  ],
  "billingAddress": [
    "street": "",
    "district": "",
    "county": "",
    "postCode": 34744,
    "cityCode": 34
  ],
  "companyName": "Test Örnek Firma",
  "companyKnownAs": "Test",
  "vkn": "4640507936",
  "tckn": "25729369856",
  "terminalId": "03777111",
  "taxOfficeName": "ABC",
  "productCode": "OKC_T300",
  "leadQuantity": 1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://ops.hugin.co/api/v1/leads")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```