Sample Request

Below is a sample URL with the appropriate authorization code and body.

πŸ“˜

Multi-Languages Samples

Here at Samdock; we will always give out sample codes in different development languages to support the majority of the developers. The API References endpoints have more than 20 programming languages.

curl --location --request GET 'https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3EiLCJlbWFpbCI6Im96ZmFyb29xQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsInRyaWFsRXhwaXJhdGlvblRpbWVzdGFtcCI6bnVsbCwibGFuZ3VhZ2UiOiJicm93c2VyIiwic3Vic2NyaXB0aW9uQWN0aXZlIjp0cnVlLCJpc0VtYWlsVmVyaWZpZWQiOnRydWUsInRlbmFudE5hbWUiOiJPWkZBUk9PUSIsImlhdCI6MTYzMDQwOTcyNiwiZXhwIjoxNjMwNDEwMDI2LCJpc3MiOiJodHRwczovL2F1dGguc2FtZG9jay5hcHAiLCJzdWIiOiJvemZhcm9vcUBnbWFpbC5jb20ifQ.ko1iXXaim8dYJA7g5X2oQPI2NLhWDYoti3wCFDPkFePqwf9iKE29BddGC3UrFPBj4sx8it6ICiSwoN3DSWdrHGpPrwTAcT_GU5iLKRtKfkCtfKEbmy9zFP9G07P-cUGtWwqHYrmxsCC1wYIKvWCumpeLVhMg4_42WC__qW9Ps-WtJ5XcUip4HbNZRkQzMegGPUD3MpSNg0RNLb1QR40iaCLHPzn0BcjX_kL0Y7WpqQ0eSMV6zIiO6fkGjDe4SVjnP0xZgQV8IVMP-J5uGVnLKBzjs2Pw6cSjTHH-pmcyLr-uMtlLBwmrlj7XV6ugCUDxzla8vXf6vXGloc6OErp3SUv8fbcpCqNj8_S3l-ke15-Yv5L3nm8UaJdM05XLYxz-_C3OOOtBHLy78LhDTMk-bkge35gVP1PPGZTV_XKneZglH1CUVupVAqpG3lj0B3HLu-u6carasXIhB2BhNFfyoEEXxWb9P0IBx_d8cX7AJFNeEfLpd2xq4845nCz49tXlJMX2L71lfFEbiLTVmsN_BbRTP40z7SUxQWNJWEC4DH2n0n5qe9Mpp3zVucC9XZGdv3-W4LRDDhoAw4lwi2_X46z3VisBfC7HKz-t-mJ2AgepEkZA1nnewFVp0UbIqYEbvAM1fh0v6YVM-VF5i-Vnf0TC1KCwoAzKmNq2OQyhtjc'
var client = new RestClient("https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3EiLCJlbWFpbCI6Im96ZmFyb29xQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsInRyaWFsRXhwaXJhdGlvblRpbWVzdGFtcCI6bnVsbCwibGFuZ3VhZ2UiOiJicm93c2VyIiwic3Vic2NyaXB0aW9uQWN0aXZlIjp0cnVlLCJpc0VtYWlsVmVyaWZpZWQiOnRydWUsInRlbmFudE5hbWUiOiJPWkZBUk9PUSIsImlhdCI6MTYzMDQwOTcyNiwiZXhwIjoxNjMwNDEwMDI2LCJpc3MiOiJodHRwczovL2F1dGguc2FtZG9jay5hcHAiLCJzdWIiOiJvemZhcm9vcUBnbWFpbC5jb20ifQ.ko1iXXaim8dYJA7g5X2oQPI2NLhWDYoti3wCFDPkFePqwf9iKE29BddGC3UrFPBj4sx8it6ICiSwoN3DSWdrHGpPrwTAcT_GU5iLKRtKfkCtfKEbmy9zFP9G07P-cUGtWwqHYrmxsCC1wYIKvWCumpeLVhMg4_42WC__qW9Ps-WtJ5XcUip4HbNZRkQzMegGPUD3MpSNg0RNLb1QR40iaCLHPzn0BcjX_kL0Y7WpqQ0eSMV6zIiO6fkGjDe4SVjnP0xZgQV8IVMP-J5uGVnLKBzjs2Pw6cSjTHH-pmcyLr-uMtlLBwmrlj7XV6ugCUDxzla8vXf6vXGloc6OErp3SUv8fbcpCqNj8_S3l-ke15-Yv5L3nm8UaJdM05XLYxz-_C3OOOtBHLy78LhDTMk-bkge35gVP1PPGZTV_XKneZglH1CUVupVAqpG3lj0B3HLu-u6carasXIhB2BhNFfyoEEXxWb9P0IBx_d8cX7AJFNeEfLpd2xq4845nCz49tXlJMX2L71lfFEbiLTVmsN_BbRTP40z7SUxQWNJWEC4DH2n0n5qe9Mpp3zVucC9XZGdv3-W4LRDDhoAw4lwi2_X46z3VisBfC7HKz-t-mJ2AgepEkZA1nnewFVp0UbIqYEbvAM1fh0v6YVM-VF5i-Vnf0TC1KCwoAzKmNq2OQyhtjc");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var form = new FormData();
var settings = {
  "url": "https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3EiLCJlbWFpbCI6Im96ZmFyb29xQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsInRyaWFsRXhwaXJhdGlvblRpbWVzdGFtcCI6bnVsbCwibGFuZ3VhZ2UiOiJicm93c2VyIiwic3Vic2NyaXB0aW9uQWN0aXZlIjp0cnVlLCJpc0VtYWlsVmVyaWZpZWQiOnRydWUsInRlbmFudE5hbWUiOiJPWkZBUk9PUSIsImlhdCI6MTYzMDQwOTcyNiwiZXhwIjoxNjMwNDEwMDI2LCJpc3MiOiJodHRwczovL2F1dGguc2FtZG9jay5hcHAiLCJzdWIiOiJvemZhcm9vcUBnbWFpbC5jb20ifQ.ko1iXXaim8dYJA7g5X2oQPI2NLhWDYoti3wCFDPkFePqwf9iKE29BddGC3UrFPBj4sx8it6ICiSwoN3DSWdrHGpPrwTAcT_GU5iLKRtKfkCtfKEbmy9zFP9G07P-cUGtWwqHYrmxsCC1wYIKvWCumpeLVhMg4_42WC__qW9Ps-WtJ5XcUip4HbNZRkQzMegGPUD3MpSNg0RNLb1QR40iaCLHPzn0BcjX_kL0Y7WpqQ0eSMV6zIiO6fkGjDe4SVjnP0xZgQV8IVMP-J5uGVnLKBzjs2Pw6cSjTHH-pmcyLr-uMtlLBwmrlj7XV6ugCUDxzla8vXf6vXGloc6OErp3SUv8fbcpCqNj8_S3l-ke15-Yv5L3nm8UaJdM05XLYxz-_C3OOOtBHLy78LhDTMk-bkge35gVP1PPGZTV_XKneZglH1CUVupVAqpG3lj0B3HLu-u6carasXIhB2BhNFfyoEEXxWb9P0IBx_d8cX7AJFNeEfLpd2xq4845nCz49tXlJMX2L71lfFEbiLTVmsN_BbRTP40z7SUxQWNJWEC4DH2n0n5qe9Mpp3zVucC9XZGdv3-W4LRDDhoAw4lwi2_X46z3VisBfC7HKz-t-mJ2AgepEkZA1nnewFVp0UbIqYEbvAM1fh0v6YVM-VF5i-Vnf0TC1KCwoAzKmNq2OQyhtjc"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3EiLCJlbWFpbCI6Im96ZmFyb29xQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsInRyaWFsRXhwaXJhdGlvblRpbWVzdGFtcCI6bnVsbCwibGFuZ3VhZ2UiOiJicm93c2VyIiwic3Vic2NyaXB0aW9uQWN0aXZlIjp0cnVlLCJpc0VtYWlsVmVyaWZpZWQiOnRydWUsInRlbmFudE5hbWUiOiJPWkZBUk9PUSIsImlhdCI6MTYzMDQwOTcyNiwiZXhwIjoxNjMwNDEwMDI2LCJpc3MiOiJodHRwczovL2F1dGguc2FtZG9jay5hcHAiLCJzdWIiOiJvemZhcm9vcUBnbWFpbC5jb20ifQ.ko1iXXaim8dYJA7g5X2oQPI2NLhWDYoti3wCFDPkFePqwf9iKE29BddGC3UrFPBj4sx8it6ICiSwoN3DSWdrHGpPrwTAcT_GU5iLKRtKfkCtfKEbmy9zFP9G07P-cUGtWwqHYrmxsCC1wYIKvWCumpeLVhMg4_42WC__qW9Ps-WtJ5XcUip4HbNZRkQzMegGPUD3MpSNg0RNLb1QR40iaCLHPzn0BcjX_kL0Y7WpqQ0eSMV6zIiO6fkGjDe4SVjnP0xZgQV8IVMP-J5uGVnLKBzjs2Pw6cSjTHH-pmcyLr-uMtlLBwmrlj7XV6ugCUDxzla8vXf6vXGloc6OErp3SUv8fbcpCqNj8_S3l-ke15-Yv5L3nm8UaJdM05XLYxz-_C3OOOtBHLy78LhDTMk-bkge35gVP1PPGZTV_XKneZglH1CUVupVAqpG3lj0B3HLu-u6carasXIhB2BhNFfyoEEXxWb9P0IBx_d8cX7AJFNeEfLpd2xq4845nCz49tXlJMX2L71lfFEbiLTVmsN_BbRTP40z7SUxQWNJWEC4DH2n0n5qe9Mpp3zVucC9XZGdv3-W4LRDDhoAw4lwi2_X46z3VisBfC7HKz-t-mJ2AgepEkZA1nnewFVp0UbIqYEbvAM1fh0v6YVM-VF5i-Vnf0TC1KCwoAzKmNq2OQyhtjc"
};

[request setAllHTTPHeaderFields:headers];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3Ei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o $response;
import requests

url = "https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O"

payload={}
files={}
headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3EiLCJlbWFpbCI6Im96ZmFyb29xQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsInRyaWFsRXhwaXJhdGlvblRpbWVzdGFtcCI6bnVsbCwibGFuZ3VhZ2UiOiJicm93c2VyIiwic3Vic2NyaXB0aW9uQWN0aXZlIjp0cnVlLCJpc0VtYWlsVmVyaWZpZWQiOnRydWUsInRlbmFudE5hbWUiOiJPWkZBUk9PUSIsImlhdCI6MTYzMDQwOTcyNiwiZXhwIjoxNjMwNDEwMDI2LCJpc3MiOiJodHRwczovL2F1dGguc2FtZG9jay5hcHAiLCJzdWIiOiJvemZhcm9vcUBnbWFpbC5jb20ifQ.ko1iXXaim8dYJA7g5X2oQPI2NLhWDYoti3wCFDPkFePqwf9iKE29BddGC3UrFPBj4sx8it6ICiSwoN3DSWdrHGpPrwTAcT_GU5iLKRtKfkCtfKEbmy9zFP9G07P-cUGtWwqHYrmxsCC1wYIKvWCumpeLVhMg4_42WC__qW9Ps-WtJ5XcUip4HbNZRkQzMegGPUD3MpSNg0RNLb1QR40iaCLHPzn0BcjX_kL0Y7WpqQ0eSMV6zIiO6fkGjDe4SVjnP0xZgQV8IVMP-J5uGVnLKBzjs2Pw6cSjTHH-pmcyLr-uMtlLBwmrlj7XV6ugCUDxzla8vXf6vXGloc6OErp3SUv8fbcpCqNj8_S3l-ke15-Yv5L3nm8UaJdM05XLYxz-_C3OOOtBHLy78LhDTMk-bkge35gVP1PPGZTV_XKneZglH1CUVupVAqpG3lj0B3HLu-u6carasXIhB2BhNFfyoEEXxWb9P0IBx_d8cX7AJFNeEfLpd2xq4845nCz49tXlJMX2L71lfFEbiLTVmsN_BbRTP40z7SUxQWNJWEC4DH2n0n5qe9Mpp3zVucC9XZGdv3-W4LRDDhoAw4lwi2_X46z3VisBfC7HKz-t-mJ2AgepEkZA1nnewFVp0UbIqYEbvAM1fh0v6YVM-VF5i-Vnf0TC1KCwoAzKmNq2OQyhtjc'
}

response = requests.request("GET", url, headers=headers, data=payload, files=files)

print(response.text)
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJydTRienpqY2UzMGJCa1E4NkNaUDEiLCJfdGVuYW50SUQiOiJTUEdQc1UteWh5LTdaMzVUTGFEci0iLCJmaXJzdE5hbWUiOiJPbWVyIiwibGFzdE5hbWUiOiJGYXJvb3EiLCJlbWFpbCI6Im96ZmFyb29xQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsInRyaWFsRXhwaXJhdGlvblRpbWVzdGFtcCI6bnVsbCwibGFuZ3VhZ2UiOiJicm93c2VyIiwic3Vic2NyaXB0aW9uQWN0aXZlIjp0cnVlLCJpc0VtYWlsVmVyaWZpZWQiOnRydWUsInRlbmFudE5hbWUiOiJPWkZBUk9PUSIsImlhdCI6MTYzMDQwOTcyNiwiZXhwIjoxNjMwNDEwMDI2LCJpc3MiOiJodHRwczovL2F1dGguc2FtZG9jay5hcHAiLCJzdWIiOiJvemZhcm9vcUBnbWFpbC5jb20ifQ.ko1iXXaim8dYJA7g5X2oQPI2NLhWDYoti3wCFDPkFePqwf9iKE29BddGC3UrFPBj4sx8it6ICiSwoN3DSWdrHGpPrwTAcT_GU5iLKRtKfkCtfKEbmy9zFP9G07P-cUGtWwqHYrmxsCC1wYIKvWCumpeLVhMg4_42WC__qW9Ps-WtJ5XcUip4HbNZRkQzMegGPUD3MpSNg0RNLb1QR40iaCLHPzn0BcjX_kL0Y7WpqQ0eSMV6zIiO6fkGjDe4SVjnP0xZgQV8IVMP-J5uGVnLKBzjs2Pw6cSjTHH-pmcyLr-uMtlLBwmrlj7XV6ugCUDxzla8vXf6vXGloc6OErp3SUv8fbcpCqNj8_S3l-ke15-Yv5L3nm8UaJdM05XLYxz-_C3OOOtBHLy78LhDTMk-bkge35gVP1PPGZTV_XKneZglH1CUVupVAqpG3lj0B3HLu-u6carasXIhB2BhNFfyoEEXxWb9P0IBx_d8cX7AJFNeEfLpd2xq4845nCz49tXlJMX2L71lfFEbiLTVmsN_BbRTP40z7SUxQWNJWEC4DH2n0n5qe9Mpp3zVucC9XZGdv3-W4LRDDhoAw4lwi2_X46z3VisBfC7HKz-t-mJ2AgepEkZA1nnewFVp0UbIqYEbvAM1fh0v6YVM-VF5i-Vnf0TC1KCwoAzKmNq2OQyhtjc")

$response = Invoke-RestMethod 'https://dev.samdock.app/api/contacts/Persons/BT75vH9MGf2P0pQtqId6O' -Method 'GET' -Headers $headers
$response | ConvertTo-Json

This request is responded by a 200 Response Code with the following JSON.

{
    "_id": "BT75vH9MGf2P0pQtqId6O",
    "gender": "male",
    "firstName": "Thomas",
    "lastName": "Miller (Sample)",
    "email": "[email protected]",
    "phoneNumber": "081673923",
    "employers": [
        {
            "_organizationID": "PK6gNTFOEBys2haPaKFgz",
            "isContactPerson": false,
            "role": "Head of Sales"
        }
    ],
    "deals": [
        {
            "_dealID": "e6v62cb7p6vGNX-OxCCTx",
            "isContactPerson": true
        }
    ],
    "consents": [],
    "address": {
        "_id": "cYREeeSU2PrhjdHzBoOpi",
        "street": null,
        "number": null,
        "postcode": "10119",
        "city": "Berlin",
        "country": "DE"
    },
    "_tenantID": "SPGPsU-yhy-7Z35TLaDr-",
    "__v": 0,
    "lastActivity": 1628248285000
}