Skip to main content
POST
/
organizations
/
{organization_id}
/
worksites
/
list
Create Worksites Bulk
curl --request POST \
  --url https://preview.intermezzo.ai/organizations/{organization_id}/worksites/list \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "name": "<string>",
    "address": {
      "address": "<string>",
      "content": {
        "countryCode": "DE",
        "addressType": "HAUSANSCHRIFT"
      }
    },
    "isActive": true,
    "isPrimary": true,
    "validFrom": "2023-12-25",
    "correspondenceAddress": {
      "address": "<string>",
      "content": {
        "countryCode": "DE",
        "addressType": "HAUSANSCHRIFT"
      }
    },
    "validTo": "2023-12-25",
    "contacts": [
      {
        "name": "<string>",
        "email": "jsmith@example.com",
        "phone": {
          "phoneNumber": "<string>"
        },
        "roles": []
      }
    ],
    "taxIdentifiers": {
      "validFrom": "2023-12-25",
      "validTo": "2023-12-25",
      "taxData": {
        "country": "<string>",
        "validFrom": "2023-12-25",
        "validTo": "2023-12-25",
        "taxNumber": "<string>",
        "isEmployeeFlatTax": false,
        "isEmployeeMiniJobFlatTax": false
      }
    },
    "insuranceData": {
      "validFrom": "2023-12-25",
      "validTo": "2023-12-25",
      "insuranceCountry": "DE",
      "worksiteLocationNumber": "98797889",
      "accidentInsuranceCompanyNumber": "98797889",
      "accidentInsurancePin": "DE-WS-PIN-456",
      "payrollServiceProviderNumber": "98797889",
      "payrollProcessingLocationNumber": "98797889"
    }
  }
]
'
import requests

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

payload = [
{
"name": "<string>",
"address": {
"address": "<string>",
"content": {
"countryCode": "DE",
"addressType": "HAUSANSCHRIFT"
}
},
"isActive": True,
"isPrimary": True,
"validFrom": "2023-12-25",
"correspondenceAddress": {
"address": "<string>",
"content": {
"countryCode": "DE",
"addressType": "HAUSANSCHRIFT"
}
},
"validTo": "2023-12-25",
"contacts": [
{
"name": "<string>",
"email": "jsmith@example.com",
"phone": { "phoneNumber": "<string>" },
"roles": []
}
],
"taxIdentifiers": {
"validFrom": "2023-12-25",
"validTo": "2023-12-25",
"taxData": {
"country": "<string>",
"validFrom": "2023-12-25",
"validTo": "2023-12-25",
"taxNumber": "<string>",
"isEmployeeFlatTax": False,
"isEmployeeMiniJobFlatTax": False
}
},
"insuranceData": {
"validFrom": "2023-12-25",
"validTo": "2023-12-25",
"insuranceCountry": "DE",
"worksiteLocationNumber": "98797889",
"accidentInsuranceCompanyNumber": "98797889",
"accidentInsurancePin": "DE-WS-PIN-456",
"payrollServiceProviderNumber": "98797889",
"payrollProcessingLocationNumber": "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: {countryCode: 'DE', addressType: 'HAUSANSCHRIFT'}
},
isActive: true,
isPrimary: true,
validFrom: '2023-12-25',
correspondenceAddress: {
address: '<string>',
content: {countryCode: 'DE', addressType: 'HAUSANSCHRIFT'}
},
validTo: '2023-12-25',
contacts: [
{
name: '<string>',
email: 'jsmith@example.com',
phone: {phoneNumber: '<string>'},
roles: []
}
],
taxIdentifiers: {
validFrom: '2023-12-25',
validTo: '2023-12-25',
taxData: {
country: '<string>',
validFrom: '2023-12-25',
validTo: '2023-12-25',
taxNumber: '<string>',
isEmployeeFlatTax: false,
isEmployeeMiniJobFlatTax: false
}
},
insuranceData: {
validFrom: '2023-12-25',
validTo: '2023-12-25',
insuranceCountry: 'DE',
worksiteLocationNumber: '98797889',
accidentInsuranceCompanyNumber: '98797889',
accidentInsurancePin: 'DE-WS-PIN-456',
payrollServiceProviderNumber: '98797889',
payrollProcessingLocationNumber: '98797889'
}
}
])
};

fetch('https://preview.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://preview.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' => [
'countryCode' => 'DE',
'addressType' => 'HAUSANSCHRIFT'
]
],
'isActive' => true,
'isPrimary' => true,
'validFrom' => '2023-12-25',
'correspondenceAddress' => [
'address' => '<string>',
'content' => [
'countryCode' => 'DE',
'addressType' => 'HAUSANSCHRIFT'
]
],
'validTo' => '2023-12-25',
'contacts' => [
[
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => [
'phoneNumber' => '<string>'
],
'roles' => [

]
]
],
'taxIdentifiers' => [
'validFrom' => '2023-12-25',
'validTo' => '2023-12-25',
'taxData' => [
'country' => '<string>',
'validFrom' => '2023-12-25',
'validTo' => '2023-12-25',
'taxNumber' => '<string>',
'isEmployeeFlatTax' => false,
'isEmployeeMiniJobFlatTax' => false
]
],
'insuranceData' => [
'validFrom' => '2023-12-25',
'validTo' => '2023-12-25',
'insuranceCountry' => 'DE',
'worksiteLocationNumber' => '98797889',
'accidentInsuranceCompanyNumber' => '98797889',
'accidentInsurancePin' => 'DE-WS-PIN-456',
'payrollServiceProviderNumber' => '98797889',
'payrollProcessingLocationNumber' => '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://preview.intermezzo.ai/organizations/{organization_id}/worksites/list"

payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"content\": {\n \"countryCode\": \"DE\",\n \"addressType\": \"HAUSANSCHRIFT\"\n }\n },\n \"isActive\": true,\n \"isPrimary\": true,\n \"validFrom\": \"2023-12-25\",\n \"correspondenceAddress\": {\n \"address\": \"<string>\",\n \"content\": {\n \"countryCode\": \"DE\",\n \"addressType\": \"HAUSANSCHRIFT\"\n }\n },\n \"validTo\": \"2023-12-25\",\n \"contacts\": [\n {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": {\n \"phoneNumber\": \"<string>\"\n },\n \"roles\": []\n }\n ],\n \"taxIdentifiers\": {\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"taxData\": {\n \"country\": \"<string>\",\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"taxNumber\": \"<string>\",\n \"isEmployeeFlatTax\": false,\n \"isEmployeeMiniJobFlatTax\": false\n }\n },\n \"insuranceData\": {\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"insuranceCountry\": \"DE\",\n \"worksiteLocationNumber\": \"98797889\",\n \"accidentInsuranceCompanyNumber\": \"98797889\",\n \"accidentInsurancePin\": \"DE-WS-PIN-456\",\n \"payrollServiceProviderNumber\": \"98797889\",\n \"payrollProcessingLocationNumber\": \"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://preview.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 \"countryCode\": \"DE\",\n \"addressType\": \"HAUSANSCHRIFT\"\n }\n },\n \"isActive\": true,\n \"isPrimary\": true,\n \"validFrom\": \"2023-12-25\",\n \"correspondenceAddress\": {\n \"address\": \"<string>\",\n \"content\": {\n \"countryCode\": \"DE\",\n \"addressType\": \"HAUSANSCHRIFT\"\n }\n },\n \"validTo\": \"2023-12-25\",\n \"contacts\": [\n {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": {\n \"phoneNumber\": \"<string>\"\n },\n \"roles\": []\n }\n ],\n \"taxIdentifiers\": {\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"taxData\": {\n \"country\": \"<string>\",\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"taxNumber\": \"<string>\",\n \"isEmployeeFlatTax\": false,\n \"isEmployeeMiniJobFlatTax\": false\n }\n },\n \"insuranceData\": {\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"insuranceCountry\": \"DE\",\n \"worksiteLocationNumber\": \"98797889\",\n \"accidentInsuranceCompanyNumber\": \"98797889\",\n \"accidentInsurancePin\": \"DE-WS-PIN-456\",\n \"payrollServiceProviderNumber\": \"98797889\",\n \"payrollProcessingLocationNumber\": \"98797889\"\n }\n }\n]")
.asString();
require 'uri'
require 'net/http'

url = URI("https://preview.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 \"countryCode\": \"DE\",\n \"addressType\": \"HAUSANSCHRIFT\"\n }\n },\n \"isActive\": true,\n \"isPrimary\": true,\n \"validFrom\": \"2023-12-25\",\n \"correspondenceAddress\": {\n \"address\": \"<string>\",\n \"content\": {\n \"countryCode\": \"DE\",\n \"addressType\": \"HAUSANSCHRIFT\"\n }\n },\n \"validTo\": \"2023-12-25\",\n \"contacts\": [\n {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": {\n \"phoneNumber\": \"<string>\"\n },\n \"roles\": []\n }\n ],\n \"taxIdentifiers\": {\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"taxData\": {\n \"country\": \"<string>\",\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"taxNumber\": \"<string>\",\n \"isEmployeeFlatTax\": false,\n \"isEmployeeMiniJobFlatTax\": false\n }\n },\n \"insuranceData\": {\n \"validFrom\": \"2023-12-25\",\n \"validTo\": \"2023-12-25\",\n \"insuranceCountry\": \"DE\",\n \"worksiteLocationNumber\": \"98797889\",\n \"accidentInsuranceCompanyNumber\": \"98797889\",\n \"accidentInsurancePin\": \"DE-WS-PIN-456\",\n \"payrollServiceProviderNumber\": \"98797889\",\n \"payrollProcessingLocationNumber\": \"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": {
        "normalizedAddress": "<string>",
        "countryCode": "DE",
        "addressType": "HAUSANSCHRIFT"
      }
    },
    "isActive": true,
    "isPrimary": true,
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "correspondenceAddress": {
      "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": {
        "normalizedAddress": "<string>",
        "countryCode": "DE",
        "addressType": "HAUSANSCHRIFT"
      }
    },
    "validFrom": "2023-12-25",
    "validTo": "2023-12-25",
    "orgId": "<string>",
    "contacts": [
      {
        "name": "<string>",
        "id": "<string>",
        "email": "jsmith@example.com",
        "phone": {
          "phoneNumber": "<string>"
        },
        "roles": []
      }
    ],
    "taxIdentifiers": {
      "id": 123,
      "validFrom": "2023-12-25",
      "validTo": "2023-12-25",
      "taxData": {
        "country": "<string>",
        "validFrom": "2023-12-25",
        "validTo": "2023-12-25",
        "taxNumber": "<string>",
        "isEmployeeFlatTax": false,
        "isEmployeeMiniJobFlatTax": false
      }
    },
    "insuranceData": {
      "id": 123,
      "validFrom": "2023-12-25",
      "validTo": "2023-12-25",
      "insuranceCountry": "DE",
      "worksiteLocationNumber": "98797889",
      "accidentInsuranceCompanyNumber": "98797889",
      "accidentInsurancePin": "DE-WS-PIN-456",
      "payrollServiceProviderNumber": "98797889",
      "payrollProcessingLocationNumber": "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
isActive
boolean
required
isPrimary
boolean
required
validFrom
string<date>
required
correspondenceAddress
AddressRequest · object | null
validTo
string<date> | null
contacts
ContactRequest · object[] | null
taxIdentifiers
TaxIdentifiersRequest · object | null
insuranceData
DEWorksiteInsuranceDetailsRequest · object | null

Response

Successful Response

name
string
required
address
AddressResponse · object
required
isActive
boolean
required
isPrimary
boolean
required
id
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
correspondenceAddress
AddressResponse · object | null
validFrom
string<date> | null
validTo
string<date> | null
orgId
string | null
contacts
ContactResponse · object[] | null
taxIdentifiers
TaxIdentifiersResponse · object | null
insuranceData
DEWorksiteInsuranceDetailsResponse · object | null