POST
/
organizations
/
{organization_id}
/
worksites
Create Worksite
curl --request POST \
  --url https://dev.intermezzo.ai/organizations/{organization_id}/worksites \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "address": {
    "address": "<string>",
    "content": {
      "country_code": "DE",
      "address_type": "HAUSANSCHRIFT"
    }
  },
  "is_active": true,
  "is_primary": true,
  "valid_from": "2023-12-25"
}
'
import requests

url = "https://dev.intermezzo.ai/organizations/{organization_id}/worksites"

payload = {
"name": "<string>",
"address": {
"address": "<string>",
"content": {
"country_code": "DE",
"address_type": "HAUSANSCHRIFT"
}
},
"is_active": True,
"is_primary": True,
"valid_from": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
address: {
address: '<string>',
content: {country_code: 'DE', address_type: 'HAUSANSCHRIFT'}
},
is_active: true,
is_primary: true,
valid_from: '2023-12-25'
})
};

fetch('https://dev.intermezzo.ai/organizations/{organization_id}/worksites', 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://dev.intermezzo.ai/organizations/{organization_id}/worksites",
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([
'name' => '<string>',
'address' => [
'address' => '<string>',
'content' => [
'country_code' => 'DE',
'address_type' => 'HAUSANSCHRIFT'
]
],
'is_active' => true,
'is_primary' => true,
'valid_from' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://dev.intermezzo.ai/organizations/{organization_id}/worksites"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"country_code\": \"DE\",\n \"address_type\": \"HAUSANSCHRIFT\"\n }\n },\n \"is_active\": true,\n \"is_primary\": true,\n \"valid_from\": \"2023-12-25\"\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(string(body))

}
HttpResponse<String> response = Unirest.post("https://dev.intermezzo.ai/organizations/{organization_id}/worksites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"country_code\": \"DE\",\n \"address_type\": \"HAUSANSCHRIFT\"\n }\n },\n \"is_active\": true,\n \"is_primary\": true,\n \"valid_from\": \"2023-12-25\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.intermezzo.ai/organizations/{organization_id}/worksites")

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 \"name\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"country_code\": \"DE\",\n \"address_type\": \"HAUSANSCHRIFT\"\n }\n },\n \"is_active\": true,\n \"is_primary\": true,\n \"valid_from\": \"2023-12-25\"\n}"

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "address": {
    "id": "<string>",
    "address": "<string>",
    "components": {
      "formatted_address": "<string>",
      "street_number": "<string>",
      "road": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>",
      "postal_code": "<string>",
      "postal_code_suffix": "<string>",
      "latitude": 123,
      "longitude": 123
    },
    "content": {
      "normalized_address": "<string>",
      "country_code": "DE",
      "address_type": "HAUSANSCHRIFT"
    }
  },
  "is_active": true,
  "is_primary": true,
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "correspondence_address": {
    "id": "<string>",
    "address": "<string>",
    "components": {
      "formatted_address": "<string>",
      "street_number": "<string>",
      "road": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>",
      "postal_code": "<string>",
      "postal_code_suffix": "<string>",
      "latitude": 123,
      "longitude": 123
    },
    "content": {
      "normalized_address": "<string>",
      "country_code": "DE",
      "address_type": "HAUSANSCHRIFT"
    }
  },
  "valid_from": "2023-12-25",
  "valid_to": "2023-12-25",
  "org_id": "<string>",
  "contacts": [
    {
      "name": "<string>",
      "id": "<string>",
      "email": "jsmith@example.com",
      "phone": {
        "phone_number": "<string>"
      },
      "roles": []
    }
  ],
  "tax_identifiers": {
    "id": 123,
    "valid_from": "2023-12-25",
    "valid_to": "2023-12-25",
    "tax_data": {
      "country": "<string>",
      "valid_from": "2023-12-25",
      "valid_to": "2023-12-25",
      "tax_number": "<string>",
      "is_employee_flat_tax": false,
      "is_employee_mini_job_flat_tax": false
    }
  },
  "insurance_data": {
    "id": 123,
    "valid_from": "2023-12-25",
    "valid_to": "2023-12-25",
    "insurance_country": "DE",
    "worksite_location_number": "98797889",
    "accident_insurance_company_number": "98797889",
    "accident_insurance_pin": "DE-WS-PIN-456",
    "payroll_service_provider_number": "98797889",
    "payroll_processing_location_number": "98797889"
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Get token from Auth0 and paste it here

Path Parameters

organization_id
required

Body

application/json
name
string
required
address
AddressRequest · object
required
is_active
boolean
required
is_primary
boolean
required
valid_from
string<date>
required
correspondence_address
AddressRequest · object | null
valid_to
string<date> | null
contacts
ContactRequest · object[] | null
tax_identifiers
TaxIdentifiersRequest · object | null
insurance_data
DEWorksiteInsuranceDetailsRequest · object | null

Response

Successful Response

name
string
required
address
AddressResponse · object
required
is_active
boolean
required
is_primary
boolean
required
id
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
correspondence_address
AddressResponse · object | null
valid_from
string<date> | null
valid_to
string<date> | null
org_id
string | null
contacts
ContactResponse · object[] | null
tax_identifiers
TaxIdentifiersResponse · object | null
insurance_data
DEWorksiteInsuranceDetailsResponse · object | null