curl --request POST \
--url http://localhost:3000/v2/users/ \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"id": "36920",
"general": {
"firstName": "John",
"lastName": "Doe",
"sex": "male",
"birthDate": "15.08.1990",
"language": "de",
"insuranceNumber": "12345678901",
"deviceToken": "dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=",
"webPushToken": "BKP4z...",
"profileImage": "https://example.com/profiles/user123.jpg",
"description": "Team lead with 5 years experience",
"lastNpsScoreSend": "2023-11-07T05:31:56Z",
"badges": [
{
"type": "experience",
"level": "senior"
}
],
"myTutorialUsername": "mytutorial_user123"
},
"access": {
"dashboardAccess": true,
"password": "<string>",
"webAccess": "1",
"token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "user@company.com",
"loginTries": 0,
"passwordChangeToken": "reset-token-12345",
"passwordChangeDate": "2023-12-01T10:30:00Z"
},
"contract": {
"startDate": "2023-01-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"department": "service",
"salary": 15.5,
"salaryType": "hourly",
"employment": "full-time",
"payment": "direct-deposit",
"dailyWorkingHours": {},
"payTypeId": "<string>",
"vacationDays": 30,
"remainingLeave": [
{
"year": 2023,
"days": 5
}
],
"allowedToTrackDrivingTime": true
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"accessGroupId": "service",
"totalTargetHours": 40,
"jobs": [
{}
],
"setUpDone": true,
"location": {
"latitude": 48.8566,
"longitude": 2.3522,
"location": {
"type": "Point",
"coordinates": [
2.3522,
48.8566
]
}
},
"activityTypeIds": [
"cleaning",
"maintenance",
"inspection"
],
"implementation": {
"hasJob": true,
"hasTimeTracking": true,
"isSuccessfullyImplemented": false,
"lastTimeActive": "2023-12-01T14:30:00Z"
},
"workedOnObjectIds": [
"507f1f77bcf86cd799439011",
"507f191e810c19729de860ea"
],
"tags": [
"full-time",
"certified",
"team-lead"
],
"analytics": {
"createdProfile": "2023-01-15T09:00:00Z"
}
}
'import requests
url = "http://localhost:3000/v2/users/"
payload = {
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"id": "36920",
"general": {
"firstName": "John",
"lastName": "Doe",
"sex": "male",
"birthDate": "15.08.1990",
"language": "de",
"insuranceNumber": "12345678901",
"deviceToken": "dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=",
"webPushToken": "BKP4z...",
"profileImage": "https://example.com/profiles/user123.jpg",
"description": "Team lead with 5 years experience",
"lastNpsScoreSend": "2023-11-07T05:31:56Z",
"badges": [
{
"type": "experience",
"level": "senior"
}
],
"myTutorialUsername": "mytutorial_user123"
},
"access": {
"dashboardAccess": True,
"password": "<string>",
"webAccess": "1",
"token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "user@company.com",
"loginTries": 0,
"passwordChangeToken": "reset-token-12345",
"passwordChangeDate": "2023-12-01T10:30:00Z"
},
"contract": {
"startDate": "2023-01-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"department": "service",
"salary": 15.5,
"salaryType": "hourly",
"employment": "full-time",
"payment": "direct-deposit",
"dailyWorkingHours": {},
"payTypeId": "<string>",
"vacationDays": 30,
"remainingLeave": [
{
"year": 2023,
"days": 5
}
],
"allowedToTrackDrivingTime": True
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"accessGroupId": "service",
"totalTargetHours": 40,
"jobs": [{}],
"setUpDone": True,
"location": {
"latitude": 48.8566,
"longitude": 2.3522,
"location": {
"type": "Point",
"coordinates": [2.3522, 48.8566]
}
},
"activityTypeIds": ["cleaning", "maintenance", "inspection"],
"implementation": {
"hasJob": True,
"hasTimeTracking": True,
"isSuccessfullyImplemented": False,
"lastTimeActive": "2023-12-01T14:30:00Z"
},
"workedOnObjectIds": ["507f1f77bcf86cd799439011", "507f191e810c19729de860ea"],
"tags": ["full-time", "certified", "team-lead"],
"analytics": { "createdProfile": "2023-01-15T09:00:00Z" }
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
number: 123,
companyId: '<string>',
status: {
status: 123,
createdAt: '2023-11-07T05:31:56Z',
createdBy: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
lastModifiedBy: '<string>'
},
chatId: '<string>',
id: '36920',
general: {
firstName: 'John',
lastName: 'Doe',
sex: 'male',
birthDate: '15.08.1990',
language: 'de',
insuranceNumber: '12345678901',
deviceToken: 'dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=',
webPushToken: 'BKP4z...',
profileImage: 'https://example.com/profiles/user123.jpg',
description: 'Team lead with 5 years experience',
lastNpsScoreSend: '2023-11-07T05:31:56Z',
badges: [{type: 'experience', level: 'senior'}],
myTutorialUsername: 'mytutorial_user123'
},
access: {
dashboardAccess: true,
password: '<string>',
webAccess: '1',
token: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
email: 'user@company.com',
loginTries: 0,
passwordChangeToken: 'reset-token-12345',
passwordChangeDate: '2023-12-01T10:30:00Z'
},
contract: {
startDate: '2023-01-01T00:00:00Z',
endDate: '2024-12-31T23:59:59Z',
department: 'service',
salary: 15.5,
salaryType: 'hourly',
employment: 'full-time',
payment: 'direct-deposit',
dailyWorkingHours: {},
payTypeId: '<string>',
vacationDays: 30,
remainingLeave: [{year: 2023, days: 5}],
allowedToTrackDrivingTime: true
},
contact: {
telephone: '+1-555-123-4567',
mobile: '+1-555-987-6543',
email: 'contact@company.com',
sms: '+1-555-111-2222',
smsCount: 5,
smsChatCount: 12,
smsSendDate: '2024-01-15T10:30:00Z',
smsSendBy: 'user123',
website: 'https://www.company.com',
lastSMSStatus: 'delivered',
secondSmsSendDate: '2024-01-16T14:45:00Z'
},
address: {
street: '<string>',
zip: '<string>',
city: '<string>',
country: '<string>',
co: '<string>',
state: '<string>'
},
accessGroupId: 'service',
totalTargetHours: 40,
jobs: [{}],
setUpDone: true,
location: {
latitude: 48.8566,
longitude: 2.3522,
location: {type: 'Point', coordinates: [2.3522, 48.8566]}
},
activityTypeIds: ['cleaning', 'maintenance', 'inspection'],
implementation: {
hasJob: true,
hasTimeTracking: true,
isSuccessfullyImplemented: false,
lastTimeActive: '2023-12-01T14:30:00Z'
},
workedOnObjectIds: ['507f1f77bcf86cd799439011', '507f191e810c19729de860ea'],
tags: ['full-time', 'certified', 'team-lead'],
analytics: {createdProfile: '2023-01-15T09:00:00Z'}
})
};
fetch('http://localhost:3000/v2/users/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/users/",
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([
'_id' => '<string>',
'number' => 123,
'companyId' => '<string>',
'status' => [
'status' => 123,
'createdAt' => '2023-11-07T05:31:56Z',
'createdBy' => '<string>',
'lastModifiedAt' => '2023-11-07T05:31:56Z',
'lastModifiedBy' => '<string>'
],
'chatId' => '<string>',
'id' => '36920',
'general' => [
'firstName' => 'John',
'lastName' => 'Doe',
'sex' => 'male',
'birthDate' => '15.08.1990',
'language' => 'de',
'insuranceNumber' => '12345678901',
'deviceToken' => 'dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=',
'webPushToken' => 'BKP4z...',
'profileImage' => 'https://example.com/profiles/user123.jpg',
'description' => 'Team lead with 5 years experience',
'lastNpsScoreSend' => '2023-11-07T05:31:56Z',
'badges' => [
[
'type' => 'experience',
'level' => 'senior'
]
],
'myTutorialUsername' => 'mytutorial_user123'
],
'access' => [
'dashboardAccess' => true,
'password' => '<string>',
'webAccess' => '1',
'token' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'email' => 'user@company.com',
'loginTries' => 0,
'passwordChangeToken' => 'reset-token-12345',
'passwordChangeDate' => '2023-12-01T10:30:00Z'
],
'contract' => [
'startDate' => '2023-01-01T00:00:00Z',
'endDate' => '2024-12-31T23:59:59Z',
'department' => 'service',
'salary' => 15.5,
'salaryType' => 'hourly',
'employment' => 'full-time',
'payment' => 'direct-deposit',
'dailyWorkingHours' => [
],
'payTypeId' => '<string>',
'vacationDays' => 30,
'remainingLeave' => [
[
'year' => 2023,
'days' => 5
]
],
'allowedToTrackDrivingTime' => true
],
'contact' => [
'telephone' => '+1-555-123-4567',
'mobile' => '+1-555-987-6543',
'email' => 'contact@company.com',
'sms' => '+1-555-111-2222',
'smsCount' => 5,
'smsChatCount' => 12,
'smsSendDate' => '2024-01-15T10:30:00Z',
'smsSendBy' => 'user123',
'website' => 'https://www.company.com',
'lastSMSStatus' => 'delivered',
'secondSmsSendDate' => '2024-01-16T14:45:00Z'
],
'address' => [
'street' => '<string>',
'zip' => '<string>',
'city' => '<string>',
'country' => '<string>',
'co' => '<string>',
'state' => '<string>'
],
'accessGroupId' => 'service',
'totalTargetHours' => 40,
'jobs' => [
[
]
],
'setUpDone' => true,
'location' => [
'latitude' => 48.8566,
'longitude' => 2.3522,
'location' => [
'type' => 'Point',
'coordinates' => [
2.3522,
48.8566
]
]
],
'activityTypeIds' => [
'cleaning',
'maintenance',
'inspection'
],
'implementation' => [
'hasJob' => true,
'hasTimeTracking' => true,
'isSuccessfullyImplemented' => false,
'lastTimeActive' => '2023-12-01T14:30:00Z'
],
'workedOnObjectIds' => [
'507f1f77bcf86cd799439011',
'507f191e810c19729de860ea'
],
'tags' => [
'full-time',
'certified',
'team-lead'
],
'analytics' => [
'createdProfile' => '2023-01-15T09:00:00Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-API-Key: <api-key>"
],
]);
$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 := "http://localhost:3000/v2/users/"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"id\": \"36920\",\n \"general\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"sex\": \"male\",\n \"birthDate\": \"15.08.1990\",\n \"language\": \"de\",\n \"insuranceNumber\": \"12345678901\",\n \"deviceToken\": \"dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=\",\n \"webPushToken\": \"BKP4z...\",\n \"profileImage\": \"https://example.com/profiles/user123.jpg\",\n \"description\": \"Team lead with 5 years experience\",\n \"lastNpsScoreSend\": \"2023-11-07T05:31:56Z\",\n \"badges\": [\n {\n \"type\": \"experience\",\n \"level\": \"senior\"\n }\n ],\n \"myTutorialUsername\": \"mytutorial_user123\"\n },\n \"access\": {\n \"dashboardAccess\": true,\n \"password\": \"<string>\",\n \"webAccess\": \"1\",\n \"token\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"email\": \"user@company.com\",\n \"loginTries\": 0,\n \"passwordChangeToken\": \"reset-token-12345\",\n \"passwordChangeDate\": \"2023-12-01T10:30:00Z\"\n },\n \"contract\": {\n \"startDate\": \"2023-01-01T00:00:00Z\",\n \"endDate\": \"2024-12-31T23:59:59Z\",\n \"department\": \"service\",\n \"salary\": 15.5,\n \"salaryType\": \"hourly\",\n \"employment\": \"full-time\",\n \"payment\": \"direct-deposit\",\n \"dailyWorkingHours\": {},\n \"payTypeId\": \"<string>\",\n \"vacationDays\": 30,\n \"remainingLeave\": [\n {\n \"year\": 2023,\n \"days\": 5\n }\n ],\n \"allowedToTrackDrivingTime\": true\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"accessGroupId\": \"service\",\n \"totalTargetHours\": 40,\n \"jobs\": [\n {}\n ],\n \"setUpDone\": true,\n \"location\": {\n \"latitude\": 48.8566,\n \"longitude\": 2.3522,\n \"location\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 2.3522,\n 48.8566\n ]\n }\n },\n \"activityTypeIds\": [\n \"cleaning\",\n \"maintenance\",\n \"inspection\"\n ],\n \"implementation\": {\n \"hasJob\": true,\n \"hasTimeTracking\": true,\n \"isSuccessfullyImplemented\": false,\n \"lastTimeActive\": \"2023-12-01T14:30:00Z\"\n },\n \"workedOnObjectIds\": [\n \"507f1f77bcf86cd799439011\",\n \"507f191e810c19729de860ea\"\n ],\n \"tags\": [\n \"full-time\",\n \"certified\",\n \"team-lead\"\n ],\n \"analytics\": {\n \"createdProfile\": \"2023-01-15T09:00:00Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-API-Key", "<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("http://localhost:3000/v2/users/")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"id\": \"36920\",\n \"general\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"sex\": \"male\",\n \"birthDate\": \"15.08.1990\",\n \"language\": \"de\",\n \"insuranceNumber\": \"12345678901\",\n \"deviceToken\": \"dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=\",\n \"webPushToken\": \"BKP4z...\",\n \"profileImage\": \"https://example.com/profiles/user123.jpg\",\n \"description\": \"Team lead with 5 years experience\",\n \"lastNpsScoreSend\": \"2023-11-07T05:31:56Z\",\n \"badges\": [\n {\n \"type\": \"experience\",\n \"level\": \"senior\"\n }\n ],\n \"myTutorialUsername\": \"mytutorial_user123\"\n },\n \"access\": {\n \"dashboardAccess\": true,\n \"password\": \"<string>\",\n \"webAccess\": \"1\",\n \"token\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"email\": \"user@company.com\",\n \"loginTries\": 0,\n \"passwordChangeToken\": \"reset-token-12345\",\n \"passwordChangeDate\": \"2023-12-01T10:30:00Z\"\n },\n \"contract\": {\n \"startDate\": \"2023-01-01T00:00:00Z\",\n \"endDate\": \"2024-12-31T23:59:59Z\",\n \"department\": \"service\",\n \"salary\": 15.5,\n \"salaryType\": \"hourly\",\n \"employment\": \"full-time\",\n \"payment\": \"direct-deposit\",\n \"dailyWorkingHours\": {},\n \"payTypeId\": \"<string>\",\n \"vacationDays\": 30,\n \"remainingLeave\": [\n {\n \"year\": 2023,\n \"days\": 5\n }\n ],\n \"allowedToTrackDrivingTime\": true\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"accessGroupId\": \"service\",\n \"totalTargetHours\": 40,\n \"jobs\": [\n {}\n ],\n \"setUpDone\": true,\n \"location\": {\n \"latitude\": 48.8566,\n \"longitude\": 2.3522,\n \"location\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 2.3522,\n 48.8566\n ]\n }\n },\n \"activityTypeIds\": [\n \"cleaning\",\n \"maintenance\",\n \"inspection\"\n ],\n \"implementation\": {\n \"hasJob\": true,\n \"hasTimeTracking\": true,\n \"isSuccessfullyImplemented\": false,\n \"lastTimeActive\": \"2023-12-01T14:30:00Z\"\n },\n \"workedOnObjectIds\": [\n \"507f1f77bcf86cd799439011\",\n \"507f191e810c19729de860ea\"\n ],\n \"tags\": [\n \"full-time\",\n \"certified\",\n \"team-lead\"\n ],\n \"analytics\": {\n \"createdProfile\": \"2023-01-15T09:00:00Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/users/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"id\": \"36920\",\n \"general\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"sex\": \"male\",\n \"birthDate\": \"15.08.1990\",\n \"language\": \"de\",\n \"insuranceNumber\": \"12345678901\",\n \"deviceToken\": \"dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=\",\n \"webPushToken\": \"BKP4z...\",\n \"profileImage\": \"https://example.com/profiles/user123.jpg\",\n \"description\": \"Team lead with 5 years experience\",\n \"lastNpsScoreSend\": \"2023-11-07T05:31:56Z\",\n \"badges\": [\n {\n \"type\": \"experience\",\n \"level\": \"senior\"\n }\n ],\n \"myTutorialUsername\": \"mytutorial_user123\"\n },\n \"access\": {\n \"dashboardAccess\": true,\n \"password\": \"<string>\",\n \"webAccess\": \"1\",\n \"token\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"email\": \"user@company.com\",\n \"loginTries\": 0,\n \"passwordChangeToken\": \"reset-token-12345\",\n \"passwordChangeDate\": \"2023-12-01T10:30:00Z\"\n },\n \"contract\": {\n \"startDate\": \"2023-01-01T00:00:00Z\",\n \"endDate\": \"2024-12-31T23:59:59Z\",\n \"department\": \"service\",\n \"salary\": 15.5,\n \"salaryType\": \"hourly\",\n \"employment\": \"full-time\",\n \"payment\": \"direct-deposit\",\n \"dailyWorkingHours\": {},\n \"payTypeId\": \"<string>\",\n \"vacationDays\": 30,\n \"remainingLeave\": [\n {\n \"year\": 2023,\n \"days\": 5\n }\n ],\n \"allowedToTrackDrivingTime\": true\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"accessGroupId\": \"service\",\n \"totalTargetHours\": 40,\n \"jobs\": [\n {}\n ],\n \"setUpDone\": true,\n \"location\": {\n \"latitude\": 48.8566,\n \"longitude\": 2.3522,\n \"location\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 2.3522,\n 48.8566\n ]\n }\n },\n \"activityTypeIds\": [\n \"cleaning\",\n \"maintenance\",\n \"inspection\"\n ],\n \"implementation\": {\n \"hasJob\": true,\n \"hasTimeTracking\": true,\n \"isSuccessfullyImplemented\": false,\n \"lastTimeActive\": \"2023-12-01T14:30:00Z\"\n },\n \"workedOnObjectIds\": [\n \"507f1f77bcf86cd799439011\",\n \"507f191e810c19729de860ea\"\n ],\n \"tags\": [\n \"full-time\",\n \"certified\",\n \"team-lead\"\n ],\n \"analytics\": {\n \"createdProfile\": \"2023-01-15T09:00:00Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>"
}Create User
Creates a new user in the system with the provided information
curl --request POST \
--url http://localhost:3000/v2/users/ \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"id": "36920",
"general": {
"firstName": "John",
"lastName": "Doe",
"sex": "male",
"birthDate": "15.08.1990",
"language": "de",
"insuranceNumber": "12345678901",
"deviceToken": "dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=",
"webPushToken": "BKP4z...",
"profileImage": "https://example.com/profiles/user123.jpg",
"description": "Team lead with 5 years experience",
"lastNpsScoreSend": "2023-11-07T05:31:56Z",
"badges": [
{
"type": "experience",
"level": "senior"
}
],
"myTutorialUsername": "mytutorial_user123"
},
"access": {
"dashboardAccess": true,
"password": "<string>",
"webAccess": "1",
"token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "user@company.com",
"loginTries": 0,
"passwordChangeToken": "reset-token-12345",
"passwordChangeDate": "2023-12-01T10:30:00Z"
},
"contract": {
"startDate": "2023-01-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"department": "service",
"salary": 15.5,
"salaryType": "hourly",
"employment": "full-time",
"payment": "direct-deposit",
"dailyWorkingHours": {},
"payTypeId": "<string>",
"vacationDays": 30,
"remainingLeave": [
{
"year": 2023,
"days": 5
}
],
"allowedToTrackDrivingTime": true
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"accessGroupId": "service",
"totalTargetHours": 40,
"jobs": [
{}
],
"setUpDone": true,
"location": {
"latitude": 48.8566,
"longitude": 2.3522,
"location": {
"type": "Point",
"coordinates": [
2.3522,
48.8566
]
}
},
"activityTypeIds": [
"cleaning",
"maintenance",
"inspection"
],
"implementation": {
"hasJob": true,
"hasTimeTracking": true,
"isSuccessfullyImplemented": false,
"lastTimeActive": "2023-12-01T14:30:00Z"
},
"workedOnObjectIds": [
"507f1f77bcf86cd799439011",
"507f191e810c19729de860ea"
],
"tags": [
"full-time",
"certified",
"team-lead"
],
"analytics": {
"createdProfile": "2023-01-15T09:00:00Z"
}
}
'import requests
url = "http://localhost:3000/v2/users/"
payload = {
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"id": "36920",
"general": {
"firstName": "John",
"lastName": "Doe",
"sex": "male",
"birthDate": "15.08.1990",
"language": "de",
"insuranceNumber": "12345678901",
"deviceToken": "dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=",
"webPushToken": "BKP4z...",
"profileImage": "https://example.com/profiles/user123.jpg",
"description": "Team lead with 5 years experience",
"lastNpsScoreSend": "2023-11-07T05:31:56Z",
"badges": [
{
"type": "experience",
"level": "senior"
}
],
"myTutorialUsername": "mytutorial_user123"
},
"access": {
"dashboardAccess": True,
"password": "<string>",
"webAccess": "1",
"token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "user@company.com",
"loginTries": 0,
"passwordChangeToken": "reset-token-12345",
"passwordChangeDate": "2023-12-01T10:30:00Z"
},
"contract": {
"startDate": "2023-01-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"department": "service",
"salary": 15.5,
"salaryType": "hourly",
"employment": "full-time",
"payment": "direct-deposit",
"dailyWorkingHours": {},
"payTypeId": "<string>",
"vacationDays": 30,
"remainingLeave": [
{
"year": 2023,
"days": 5
}
],
"allowedToTrackDrivingTime": True
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"accessGroupId": "service",
"totalTargetHours": 40,
"jobs": [{}],
"setUpDone": True,
"location": {
"latitude": 48.8566,
"longitude": 2.3522,
"location": {
"type": "Point",
"coordinates": [2.3522, 48.8566]
}
},
"activityTypeIds": ["cleaning", "maintenance", "inspection"],
"implementation": {
"hasJob": True,
"hasTimeTracking": True,
"isSuccessfullyImplemented": False,
"lastTimeActive": "2023-12-01T14:30:00Z"
},
"workedOnObjectIds": ["507f1f77bcf86cd799439011", "507f191e810c19729de860ea"],
"tags": ["full-time", "certified", "team-lead"],
"analytics": { "createdProfile": "2023-01-15T09:00:00Z" }
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
number: 123,
companyId: '<string>',
status: {
status: 123,
createdAt: '2023-11-07T05:31:56Z',
createdBy: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
lastModifiedBy: '<string>'
},
chatId: '<string>',
id: '36920',
general: {
firstName: 'John',
lastName: 'Doe',
sex: 'male',
birthDate: '15.08.1990',
language: 'de',
insuranceNumber: '12345678901',
deviceToken: 'dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=',
webPushToken: 'BKP4z...',
profileImage: 'https://example.com/profiles/user123.jpg',
description: 'Team lead with 5 years experience',
lastNpsScoreSend: '2023-11-07T05:31:56Z',
badges: [{type: 'experience', level: 'senior'}],
myTutorialUsername: 'mytutorial_user123'
},
access: {
dashboardAccess: true,
password: '<string>',
webAccess: '1',
token: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
email: 'user@company.com',
loginTries: 0,
passwordChangeToken: 'reset-token-12345',
passwordChangeDate: '2023-12-01T10:30:00Z'
},
contract: {
startDate: '2023-01-01T00:00:00Z',
endDate: '2024-12-31T23:59:59Z',
department: 'service',
salary: 15.5,
salaryType: 'hourly',
employment: 'full-time',
payment: 'direct-deposit',
dailyWorkingHours: {},
payTypeId: '<string>',
vacationDays: 30,
remainingLeave: [{year: 2023, days: 5}],
allowedToTrackDrivingTime: true
},
contact: {
telephone: '+1-555-123-4567',
mobile: '+1-555-987-6543',
email: 'contact@company.com',
sms: '+1-555-111-2222',
smsCount: 5,
smsChatCount: 12,
smsSendDate: '2024-01-15T10:30:00Z',
smsSendBy: 'user123',
website: 'https://www.company.com',
lastSMSStatus: 'delivered',
secondSmsSendDate: '2024-01-16T14:45:00Z'
},
address: {
street: '<string>',
zip: '<string>',
city: '<string>',
country: '<string>',
co: '<string>',
state: '<string>'
},
accessGroupId: 'service',
totalTargetHours: 40,
jobs: [{}],
setUpDone: true,
location: {
latitude: 48.8566,
longitude: 2.3522,
location: {type: 'Point', coordinates: [2.3522, 48.8566]}
},
activityTypeIds: ['cleaning', 'maintenance', 'inspection'],
implementation: {
hasJob: true,
hasTimeTracking: true,
isSuccessfullyImplemented: false,
lastTimeActive: '2023-12-01T14:30:00Z'
},
workedOnObjectIds: ['507f1f77bcf86cd799439011', '507f191e810c19729de860ea'],
tags: ['full-time', 'certified', 'team-lead'],
analytics: {createdProfile: '2023-01-15T09:00:00Z'}
})
};
fetch('http://localhost:3000/v2/users/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/users/",
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([
'_id' => '<string>',
'number' => 123,
'companyId' => '<string>',
'status' => [
'status' => 123,
'createdAt' => '2023-11-07T05:31:56Z',
'createdBy' => '<string>',
'lastModifiedAt' => '2023-11-07T05:31:56Z',
'lastModifiedBy' => '<string>'
],
'chatId' => '<string>',
'id' => '36920',
'general' => [
'firstName' => 'John',
'lastName' => 'Doe',
'sex' => 'male',
'birthDate' => '15.08.1990',
'language' => 'de',
'insuranceNumber' => '12345678901',
'deviceToken' => 'dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=',
'webPushToken' => 'BKP4z...',
'profileImage' => 'https://example.com/profiles/user123.jpg',
'description' => 'Team lead with 5 years experience',
'lastNpsScoreSend' => '2023-11-07T05:31:56Z',
'badges' => [
[
'type' => 'experience',
'level' => 'senior'
]
],
'myTutorialUsername' => 'mytutorial_user123'
],
'access' => [
'dashboardAccess' => true,
'password' => '<string>',
'webAccess' => '1',
'token' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'email' => 'user@company.com',
'loginTries' => 0,
'passwordChangeToken' => 'reset-token-12345',
'passwordChangeDate' => '2023-12-01T10:30:00Z'
],
'contract' => [
'startDate' => '2023-01-01T00:00:00Z',
'endDate' => '2024-12-31T23:59:59Z',
'department' => 'service',
'salary' => 15.5,
'salaryType' => 'hourly',
'employment' => 'full-time',
'payment' => 'direct-deposit',
'dailyWorkingHours' => [
],
'payTypeId' => '<string>',
'vacationDays' => 30,
'remainingLeave' => [
[
'year' => 2023,
'days' => 5
]
],
'allowedToTrackDrivingTime' => true
],
'contact' => [
'telephone' => '+1-555-123-4567',
'mobile' => '+1-555-987-6543',
'email' => 'contact@company.com',
'sms' => '+1-555-111-2222',
'smsCount' => 5,
'smsChatCount' => 12,
'smsSendDate' => '2024-01-15T10:30:00Z',
'smsSendBy' => 'user123',
'website' => 'https://www.company.com',
'lastSMSStatus' => 'delivered',
'secondSmsSendDate' => '2024-01-16T14:45:00Z'
],
'address' => [
'street' => '<string>',
'zip' => '<string>',
'city' => '<string>',
'country' => '<string>',
'co' => '<string>',
'state' => '<string>'
],
'accessGroupId' => 'service',
'totalTargetHours' => 40,
'jobs' => [
[
]
],
'setUpDone' => true,
'location' => [
'latitude' => 48.8566,
'longitude' => 2.3522,
'location' => [
'type' => 'Point',
'coordinates' => [
2.3522,
48.8566
]
]
],
'activityTypeIds' => [
'cleaning',
'maintenance',
'inspection'
],
'implementation' => [
'hasJob' => true,
'hasTimeTracking' => true,
'isSuccessfullyImplemented' => false,
'lastTimeActive' => '2023-12-01T14:30:00Z'
],
'workedOnObjectIds' => [
'507f1f77bcf86cd799439011',
'507f191e810c19729de860ea'
],
'tags' => [
'full-time',
'certified',
'team-lead'
],
'analytics' => [
'createdProfile' => '2023-01-15T09:00:00Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-API-Key: <api-key>"
],
]);
$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 := "http://localhost:3000/v2/users/"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"id\": \"36920\",\n \"general\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"sex\": \"male\",\n \"birthDate\": \"15.08.1990\",\n \"language\": \"de\",\n \"insuranceNumber\": \"12345678901\",\n \"deviceToken\": \"dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=\",\n \"webPushToken\": \"BKP4z...\",\n \"profileImage\": \"https://example.com/profiles/user123.jpg\",\n \"description\": \"Team lead with 5 years experience\",\n \"lastNpsScoreSend\": \"2023-11-07T05:31:56Z\",\n \"badges\": [\n {\n \"type\": \"experience\",\n \"level\": \"senior\"\n }\n ],\n \"myTutorialUsername\": \"mytutorial_user123\"\n },\n \"access\": {\n \"dashboardAccess\": true,\n \"password\": \"<string>\",\n \"webAccess\": \"1\",\n \"token\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"email\": \"user@company.com\",\n \"loginTries\": 0,\n \"passwordChangeToken\": \"reset-token-12345\",\n \"passwordChangeDate\": \"2023-12-01T10:30:00Z\"\n },\n \"contract\": {\n \"startDate\": \"2023-01-01T00:00:00Z\",\n \"endDate\": \"2024-12-31T23:59:59Z\",\n \"department\": \"service\",\n \"salary\": 15.5,\n \"salaryType\": \"hourly\",\n \"employment\": \"full-time\",\n \"payment\": \"direct-deposit\",\n \"dailyWorkingHours\": {},\n \"payTypeId\": \"<string>\",\n \"vacationDays\": 30,\n \"remainingLeave\": [\n {\n \"year\": 2023,\n \"days\": 5\n }\n ],\n \"allowedToTrackDrivingTime\": true\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"accessGroupId\": \"service\",\n \"totalTargetHours\": 40,\n \"jobs\": [\n {}\n ],\n \"setUpDone\": true,\n \"location\": {\n \"latitude\": 48.8566,\n \"longitude\": 2.3522,\n \"location\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 2.3522,\n 48.8566\n ]\n }\n },\n \"activityTypeIds\": [\n \"cleaning\",\n \"maintenance\",\n \"inspection\"\n ],\n \"implementation\": {\n \"hasJob\": true,\n \"hasTimeTracking\": true,\n \"isSuccessfullyImplemented\": false,\n \"lastTimeActive\": \"2023-12-01T14:30:00Z\"\n },\n \"workedOnObjectIds\": [\n \"507f1f77bcf86cd799439011\",\n \"507f191e810c19729de860ea\"\n ],\n \"tags\": [\n \"full-time\",\n \"certified\",\n \"team-lead\"\n ],\n \"analytics\": {\n \"createdProfile\": \"2023-01-15T09:00:00Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-API-Key", "<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("http://localhost:3000/v2/users/")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"id\": \"36920\",\n \"general\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"sex\": \"male\",\n \"birthDate\": \"15.08.1990\",\n \"language\": \"de\",\n \"insuranceNumber\": \"12345678901\",\n \"deviceToken\": \"dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=\",\n \"webPushToken\": \"BKP4z...\",\n \"profileImage\": \"https://example.com/profiles/user123.jpg\",\n \"description\": \"Team lead with 5 years experience\",\n \"lastNpsScoreSend\": \"2023-11-07T05:31:56Z\",\n \"badges\": [\n {\n \"type\": \"experience\",\n \"level\": \"senior\"\n }\n ],\n \"myTutorialUsername\": \"mytutorial_user123\"\n },\n \"access\": {\n \"dashboardAccess\": true,\n \"password\": \"<string>\",\n \"webAccess\": \"1\",\n \"token\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"email\": \"user@company.com\",\n \"loginTries\": 0,\n \"passwordChangeToken\": \"reset-token-12345\",\n \"passwordChangeDate\": \"2023-12-01T10:30:00Z\"\n },\n \"contract\": {\n \"startDate\": \"2023-01-01T00:00:00Z\",\n \"endDate\": \"2024-12-31T23:59:59Z\",\n \"department\": \"service\",\n \"salary\": 15.5,\n \"salaryType\": \"hourly\",\n \"employment\": \"full-time\",\n \"payment\": \"direct-deposit\",\n \"dailyWorkingHours\": {},\n \"payTypeId\": \"<string>\",\n \"vacationDays\": 30,\n \"remainingLeave\": [\n {\n \"year\": 2023,\n \"days\": 5\n }\n ],\n \"allowedToTrackDrivingTime\": true\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"accessGroupId\": \"service\",\n \"totalTargetHours\": 40,\n \"jobs\": [\n {}\n ],\n \"setUpDone\": true,\n \"location\": {\n \"latitude\": 48.8566,\n \"longitude\": 2.3522,\n \"location\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 2.3522,\n 48.8566\n ]\n }\n },\n \"activityTypeIds\": [\n \"cleaning\",\n \"maintenance\",\n \"inspection\"\n ],\n \"implementation\": {\n \"hasJob\": true,\n \"hasTimeTracking\": true,\n \"isSuccessfullyImplemented\": false,\n \"lastTimeActive\": \"2023-12-01T14:30:00Z\"\n },\n \"workedOnObjectIds\": [\n \"507f1f77bcf86cd799439011\",\n \"507f191e810c19729de860ea\"\n ],\n \"tags\": [\n \"full-time\",\n \"certified\",\n \"team-lead\"\n ],\n \"analytics\": {\n \"createdProfile\": \"2023-01-15T09:00:00Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/users/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"id\": \"36920\",\n \"general\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"sex\": \"male\",\n \"birthDate\": \"15.08.1990\",\n \"language\": \"de\",\n \"insuranceNumber\": \"12345678901\",\n \"deviceToken\": \"dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=\",\n \"webPushToken\": \"BKP4z...\",\n \"profileImage\": \"https://example.com/profiles/user123.jpg\",\n \"description\": \"Team lead with 5 years experience\",\n \"lastNpsScoreSend\": \"2023-11-07T05:31:56Z\",\n \"badges\": [\n {\n \"type\": \"experience\",\n \"level\": \"senior\"\n }\n ],\n \"myTutorialUsername\": \"mytutorial_user123\"\n },\n \"access\": {\n \"dashboardAccess\": true,\n \"password\": \"<string>\",\n \"webAccess\": \"1\",\n \"token\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"email\": \"user@company.com\",\n \"loginTries\": 0,\n \"passwordChangeToken\": \"reset-token-12345\",\n \"passwordChangeDate\": \"2023-12-01T10:30:00Z\"\n },\n \"contract\": {\n \"startDate\": \"2023-01-01T00:00:00Z\",\n \"endDate\": \"2024-12-31T23:59:59Z\",\n \"department\": \"service\",\n \"salary\": 15.5,\n \"salaryType\": \"hourly\",\n \"employment\": \"full-time\",\n \"payment\": \"direct-deposit\",\n \"dailyWorkingHours\": {},\n \"payTypeId\": \"<string>\",\n \"vacationDays\": 30,\n \"remainingLeave\": [\n {\n \"year\": 2023,\n \"days\": 5\n }\n ],\n \"allowedToTrackDrivingTime\": true\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"accessGroupId\": \"service\",\n \"totalTargetHours\": 40,\n \"jobs\": [\n {}\n ],\n \"setUpDone\": true,\n \"location\": {\n \"latitude\": 48.8566,\n \"longitude\": 2.3522,\n \"location\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 2.3522,\n 48.8566\n ]\n }\n },\n \"activityTypeIds\": [\n \"cleaning\",\n \"maintenance\",\n \"inspection\"\n ],\n \"implementation\": {\n \"hasJob\": true,\n \"hasTimeTracking\": true,\n \"isSuccessfullyImplemented\": false,\n \"lastTimeActive\": \"2023-12-01T14:30:00Z\"\n },\n \"workedOnObjectIds\": [\n \"507f1f77bcf86cd799439011\",\n \"507f191e810c19729de860ea\"\n ],\n \"tags\": [\n \"full-time\",\n \"certified\",\n \"team-lead\"\n ],\n \"analytics\": {\n \"createdProfile\": \"2023-01-15T09:00:00Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>"
}Authorizations
Body
A system user representing an employee or team member. Inherits common entity fields and includes personal information, contact details, contract information, and system access settings.
Unique identifier of the entity
Unique number of the entity, used for identification
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
ID of the chat associated with this entity
Login ID
"36920"
General personal information and profile data for a user
Show child attributes
Show child attributes
User authentication and access control information including login credentials, permissions, and security settings
Show child attributes
Show child attributes
Employment contract information including dates, salary, working hours, and employment terms
Show child attributes
Show child attributes
Contact information structure containing phone numbers, email, SMS details, and website
Show child attributes
Show child attributes
Address
Show child attributes
Show child attributes
Access group ID defining user permissions and role within the system
"service"
Total target working hours per week for the user
40
Associated jobs and assignments for the user
Whether initial user setup has been completed
true
GPS coordinates and location information used for time tracking and object positioning
Show child attributes
Show child attributes
List of activity type IDs the user is qualified or assigned to perform
["cleaning", "maintenance", "inspection"]
Tracks user onboarding progress and system integration status
Show child attributes
Show child attributes
Array of customer object IDs the user has worked on
[
"507f1f77bcf86cd799439011",
"507f191e810c19729de860ea"
]
Tags for categorizing and filtering users
["full-time", "certified", "team-lead"]
Analytics and performance tracking information for users
Show child attributes
Show child attributes
Response
User created successfully
ID of the created user
Was this page helpful?

