Skip to main content
POST
/
api
/
v1
/
customer
Creates a new customer item.
curl --request POST \
  --url https://api.example.com/api/v1/customer \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "externalId": "<string>",
  "brandId": "<string>",
  "clickKey": "<string>",
  "username": "<string>",
  "registrationDate": "2023-11-07T05:31:56Z",
  "country_code": "<string>",
  "operatorId": "<string>"
}
'
import requests

url = "https://api.example.com/api/v1/customer"

payload = {
"externalId": "<string>",
"brandId": "<string>",
"clickKey": "<string>",
"username": "<string>",
"registrationDate": "2023-11-07T05:31:56Z",
"country_code": "<string>",
"operatorId": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalId: '<string>',
brandId: '<string>',
clickKey: '<string>',
username: '<string>',
registrationDate: '2023-11-07T05:31:56Z',
country_code: '<string>',
operatorId: '<string>'
})
};

fetch('https://api.example.com/api/v1/customer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '<string>',
'brandId' => '<string>',
'clickKey' => '<string>',
'username' => '<string>',
'registrationDate' => '2023-11-07T05:31:56Z',
'country_code' => '<string>',
'operatorId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.example.com/api/v1/customer"

payload := strings.NewReader("{\n \"externalId\": \"<string>\",\n \"brandId\": \"<string>\",\n \"clickKey\": \"<string>\",\n \"username\": \"<string>\",\n \"registrationDate\": \"2023-11-07T05:31:56Z\",\n \"country_code\": \"<string>\",\n \"operatorId\": \"<string>\"\n}")

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

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/customer")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"<string>\",\n \"brandId\": \"<string>\",\n \"clickKey\": \"<string>\",\n \"username\": \"<string>\",\n \"registrationDate\": \"2023-11-07T05:31:56Z\",\n \"country_code\": \"<string>\",\n \"operatorId\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/customer")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"<string>\",\n \"brandId\": \"<string>\",\n \"clickKey\": \"<string>\",\n \"username\": \"<string>\",\n \"registrationDate\": \"2023-11-07T05:31:56Z\",\n \"country_code\": \"<string>\",\n \"operatorId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "operatorId": "<string>",
  "updatedTs": "2023-11-07T05:31:56Z",
  "createdTs": "2023-11-07T05:31:56Z",
  "isIdEmpty": true,
  "createdBy": "<string>",
  "hidden": true,
  "deleted": true,
  "importId": "<string>",
  "externalId": "<string>",
  "externalBrandId": "<string>",
  "username": "<string>",
  "country": "<string>",
  "country_code": "<string>",
  "registerIp": "<string>",
  "registrationDate": "2023-11-07T05:31:56Z",
  "hasDeposited": true,
  "ftdDate": "2023-11-07T05:31:56Z",
  "cpaQualified": true,
  "cpaQualificationDate": "2023-11-07T05:31:56Z",
  "lifetimeRevenue": 123,
  "firstDepositAmount": 123,
  "firstRevenueAmount": 123,
  "lifetimeDeposits": 123,
  "lifetimeRevShareCommission": 123,
  "lifetimeCpaCommission": 123,
  "lifetimeFixedCommission": 123,
  "lifetimeCommission": 123,
  "tracking": {
    "clickId": "<string>",
    "affiliateId": "<string>",
    "affiliateName": "<string>",
    "affiliateTrackerId": "<string>",
    "affiliateTrackerName": "<string>",
    "brandId": "<string>",
    "brandName": "<string>",
    "productId": "<string>",
    "productName": "<string>",
    "mediaId": "<string>",
    "media": {
      "type": "<string>",
      "text": "<string>",
      "imageUrl": "<string>"
    },
    "customParameter": "<string>",
    "date": "2023-11-07T05:31:56Z",
    "referringUrl": "<string>"
  },
  "category": "<string>",
  "label": "<string>",
  "revShareExcluded": true,
  "cpaExcluded": true,
  "transactions": [
    {
      "id": "<string>",
      "operatorId": "<string>",
      "updatedTs": "2023-11-07T05:31:56Z",
      "createdTs": "2023-11-07T05:31:56Z",
      "isIdEmpty": true,
      "createdBy": "<string>",
      "hidden": true,
      "deleted": true,
      "importId": "<string>",
      "integrationType": "<string>",
      "customerId": "<string>",
      "type": "<string>",
      "externalId": "<string>",
      "externalCustomerId": "<string>",
      "externalBrandId": "<string>",
      "externalProductId": "<string>",
      "country": "<string>",
      "country_code": "<string>",
      "depositAmount": 123,
      "firstTransaction": true,
      "grossRevenue": 123,
      "revenueAmount": 123,
      "wageredAmount": 123,
      "taxes": 123,
      "costOfGoodsSold": 123,
      "paymentFees": 123,
      "cpaQualified": true,
      "revShareCommission": 123,
      "cpaCommission": 123,
      "fixedCommission": 123,
      "transactionDate": "2023-11-07T05:31:56Z",
      "periodId": 123,
      "tracking": {
        "clickId": "<string>",
        "affiliateId": "<string>",
        "affiliateName": "<string>",
        "affiliateTrackerId": "<string>",
        "affiliateTrackerName": "<string>",
        "brandId": "<string>",
        "brandName": "<string>",
        "productId": "<string>",
        "productName": "<string>",
        "mediaId": "<string>",
        "media": {
          "type": "<string>",
          "text": "<string>",
          "imageUrl": "<string>"
        },
        "customParameter": "<string>",
        "date": "2023-11-07T05:31:56Z",
        "referringUrl": "<string>"
      },
      "category": "<string>",
      "label": "<string>",
      "note": "<string>",
      "childAffiliateIds": [
        "<string>"
      ],
      "payoutInfo": {
        "affiliateId": "<string>",
        "affiliateName": "<string>",
        "invoicePeriod": "<string>",
        "invoiceDate": "2023-11-07T05:31:56Z",
        "dueDate": "2023-11-07T05:31:56Z",
        "payoutMethod": {
          "id": "<string>",
          "operatorId": "<string>",
          "updatedTs": "2023-11-07T05:31:56Z",
          "createdTs": "2023-11-07T05:31:56Z",
          "isIdEmpty": true,
          "createdBy": "<string>",
          "hidden": true,
          "deleted": true,
          "companyId": "<string>",
          "companyName": "<string>",
          "type": "<string>",
          "payee": "<string>",
          "walletAddress": "<string>",
          "email": "<string>",
          "iban": "<string>",
          "swift": "<string>",
          "accountNumber": "<string>",
          "sortcode": "<string>",
          "bankName": "<string>",
          "bankAddress": {
            "addressLine": "<string>",
            "addressLine2": "<string>",
            "city": "<string>",
            "region": "<string>",
            "country": "<string>",
            "postcode": "<string>"
          }
        },
        "paymentDate": "2023-11-07T05:31:56Z",
        "amount": 123,
        "tax": 123,
        "total": 123,
        "notes": "<string>",
        "email": "<string>",
        "website": "<string>",
        "affiliateContact": "<string>",
        "affiliateCompany": "<string>",
        "affiliateCompanyNo": "<string>",
        "affiliateAddress": {
          "addressLine": "<string>",
          "addressLine2": "<string>",
          "city": "<string>",
          "region": "<string>",
          "country": "<string>",
          "postcode": "<string>"
        },
        "affiliateTaxIds": [
          {
            "id": "<string>",
            "value": "<string>",
            "type": "<string>",
            "country": "<string>",
            "stripeId": "<string>",
            "stripeStatus": "<string>"
          }
        ],
        "affiliateVatRegistered": true,
        "affiliateTaxRate": 123,
        "companyName": "<string>",
        "companyInvoiceAddress": {
          "addressLine": "<string>",
          "addressLine2": "<string>",
          "city": "<string>",
          "region": "<string>",
          "country": "<string>",
          "postcode": "<string>"
        },
        "companyTaxIds": [
          {
            "id": "<string>",
            "value": "<string>",
            "type": "<string>",
            "country": "<string>",
            "stripeId": "<string>",
            "stripeStatus": "<string>"
          }
        ],
        "companyNumber": "<string>",
        "accountsEmail": "<string>",
        "currencyCode": "<string>"
      },
      "planId": "<string>",
      "planName": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Headers

X-Api-Key
string

Body

The new customer item body.

externalId
string
required
Minimum string length: 1
brandId
string
required
Minimum string length: 1
clickKey
string | null
username
string | null
registrationDate
string<date-time>
country_code
string | null
operatorId
string | null

Response

OK

id
string | null
operatorId
string | null
updatedTs
string<date-time>
createdTs
string<date-time> | null
isIdEmpty
boolean
read-only
createdBy
string | null
hidden
boolean
deleted
boolean
importId
string | null
externalId
string | null
externalBrandId
string | null
username
string | null
country
string | null
country_code
string | null
registerIp
string | null
registrationDate
string<date-time>
hasDeposited
boolean
ftdDate
string<date-time>
cpaQualified
boolean
cpaQualificationDate
string<date-time>
lifetimeRevenue
number<double>
firstDepositAmount
number<double> | null
firstRevenueAmount
number<double> | null
lifetimeDeposits
number<double> | null
lifetimeRevShareCommission
number<double>
lifetimeCpaCommission
number<double>
lifetimeFixedCommission
number<double>
lifetimeCommission
number<double>
tracking
object | null
category
string | null
label
string | null
revShareExcluded
boolean
cpaExcluded
boolean
transactions
object[] | null