POST
/
organizations
/
{organization_id}
/
worksites
/
list
Create Worksites Bulk
curl --request POST \
  --url https://dev.intermezzo.ai/organizations/{organization_id}/worksites/list \
  --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",
    "correspondence_address": {
      "address": "<string>",
      "content": {
        "country_code": "DE",
        "address_type": "HAUSANSCHRIFT"
      }
    },
    "valid_to": "2023-12-25",
    "contacts": [
      {
        "name": "<string>",
        "email": "jsmith@example.com",
        "phone": {
          "phone_number": "<string>"
        },
        "roles": []
      }
    ],
    "tax_identifiers": {
      "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": {
      "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"
    }
  }
]
'
import requests

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

payload = [
{
"name": "<string>",
"address": {
"address": "<string>",
"content": {
"country_code": "DE",
"address_type": "HAUSANSCHRIFT"
}
},
"is_active": True,
"is_primary": True,
"valid_from": "2023-12-25",
"correspondence_address": {
"address": "<string>",
"content": {
"country_code": "DE",
"address_type": "HAUSANSCHRIFT"
}
},
"valid_to": "2023-12-25",
"contacts": [
{
"name": "<string>",
"email": "jsmith@example.com",
"phone": { "phone_number": "<string>" },
"roles": []
}
],
"tax_identifiers": {
"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": {
"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"
}
}
]
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',
correspondence_address: {
address: '<string>',
content: {country_code: 'DE', address_type: 'HAUSANSCHRIFT'}
},
valid_to: '2023-12-25',
contacts: [
{
name: '<string>',
email: 'jsmith@example.com',
phone: {phone_number: '<string>'},
roles: []
}
],
tax_identifiers: {
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: {
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'
}
}
])
};

fetch('https://dev.intermezzo.ai/organizations/{organization_id}/worksites/list', 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/list",
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',
'correspondence_address' => [
'address' => '<string>',
'content' => [
'country_code' => 'DE',
'address_type' => 'HAUSANSCHRIFT'
]
],
'valid_to' => '2023-12-25',
'contacts' => [
[
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => [
'phone_number' => '<string>'
],
'roles' => [

]
]
],
'tax_identifiers' => [
'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' => [
'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'
]
]
]),
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/list"

payload := strings.NewReader("[\n {\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 \"correspondence_address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"country_code\": \"DE\",\n \"address_type\": \"HAUSANSCHRIFT\"\n }\n },\n \"valid_to\": \"2023-12-25\",\n \"contacts\": [\n {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": {\n \"phone_number\": \"<string>\"\n },\n \"roles\": []\n }\n ],\n \"tax_identifiers\": {\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"tax_data\": {\n \"country\": \"<string>\",\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"tax_number\": \"<string>\",\n \"is_employee_flat_tax\": false,\n \"is_employee_mini_job_flat_tax\": false\n }\n },\n \"insurance_data\": {\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"insurance_country\": \"DE\",\n \"worksite_location_number\": \"98797889\",\n \"accident_insurance_company_number\": \"98797889\",\n \"accident_insurance_pin\": \"DE-WS-PIN-456\",\n \"payroll_service_provider_number\": \"98797889\",\n \"payroll_processing_location_number\": \"98797889\"\n }\n }\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/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\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 \"correspondence_address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"country_code\": \"DE\",\n \"address_type\": \"HAUSANSCHRIFT\"\n }\n },\n \"valid_to\": \"2023-12-25\",\n \"contacts\": [\n {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": {\n \"phone_number\": \"<string>\"\n },\n \"roles\": []\n }\n ],\n \"tax_identifiers\": {\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"tax_data\": {\n \"country\": \"<string>\",\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"tax_number\": \"<string>\",\n \"is_employee_flat_tax\": false,\n \"is_employee_mini_job_flat_tax\": false\n }\n },\n \"insurance_data\": {\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"insurance_country\": \"DE\",\n \"worksite_location_number\": \"98797889\",\n \"accident_insurance_company_number\": \"98797889\",\n \"accident_insurance_pin\": \"DE-WS-PIN-456\",\n \"payroll_service_provider_number\": \"98797889\",\n \"payroll_processing_location_number\": \"98797889\"\n }\n }\n]")
.asString();
require 'uri'
require 'net/http'

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

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 {\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 \"correspondence_address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"country_code\": \"DE\",\n \"address_type\": \"HAUSANSCHRIFT\"\n }\n },\n \"valid_to\": \"2023-12-25\",\n \"contacts\": [\n {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": {\n \"phone_number\": \"<string>\"\n },\n \"roles\": []\n }\n ],\n \"tax_identifiers\": {\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"tax_data\": {\n \"country\": \"<string>\",\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"tax_number\": \"<string>\",\n \"is_employee_flat_tax\": false,\n \"is_employee_mini_job_flat_tax\": false\n }\n },\n \"insurance_data\": {\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\",\n \"insurance_country\": \"DE\",\n \"worksite_location_number\": \"98797889\",\n \"accident_insurance_company_number\": \"98797889\",\n \"accident_insurance_pin\": \"DE-WS-PIN-456\",\n \"payroll_service_provider_number\": \"98797889\",\n \"payroll_processing_location_number\": \"98797889\"\n }\n }\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