メインコンテンツへスキップ
PATCH
/
api
/
v1
/
organizations
/
{organizationId}
/
identity
/
bulk
Bulk update multiple identities
curl --request PATCH \
  --url https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "identityIds": [
    "identity-1",
    "identity-2"
  ],
  "identityUpdates": {
    "id": "<string>",
    "organizationId": 123,
    "peopleId": "<string>",
    "employeeStatus": "active",
    "employeeType": "full_time_employee",
    "managementType": "managed",
    "displayName": "Display Name",
    "firstName": "First Name",
    "lastName": "Last Name",
    "avatar": "<string>",
    "primaryEmail": "primay@email.com",
    "secondaryEmails": [
      "secondary+1@email.com",
      "secondary+2@email.com"
    ],
    "companyName": "company name",
    "workLocation": "work location",
    "department": {
      "name": "department name"
    },
    "serviceCount": 123,
    "deviceCount": 123,
    "costs": [
      {
        "amount": 100,
        "currency": "usd"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "isManager": true,
    "isMock": true,
    "isEmailEditable": true,
    "hasPresetFieldsUnlinked": true,
    "jobTitle": "CTO",
    "employeeId": "EMP12345",
    "lifecycle": {
      "contractStartAt": "2021-01-01",
      "contractEndAt": "2021-01-02",
      "suspensionStartAt": "2021-01-01",
      "suspensionEndAt": "2021-01-03"
    },
    "manager": {
      "id": "<string>",
      "displayName": "<string>",
      "people": {}
    },
    "note": "this is a note",
    "profileUrl": "https://workspace.url/employee/12345",
    "customFields": {
      "custom_text_field": "foo",
      "custom_date_field": "2024-01-01",
      "custom_number_field": 123,
      "custom_dropdown_field": "Option Displayed Value A"
    },
    "customFieldsWithMetadata": [
      {
        "id": 1,
        "attributeCode": "custom_text_field",
        "attributeName": "Text field",
        "value": "foo"
      },
      {
        "id": 2,
        "attributeCode": "custom_date_field",
        "attributeName": "Date field",
        "value": "2024-01-01"
      },
      {
        "id": 3,
        "attributeCode": "custom_number_field",
        "attributeName": "Number field",
        "value": 123
      },
      {
        "id": 4,
        "attributeCode": "custom_dropdown_field",
        "attributeName": "Dropdown field",
        "value": "Option Displayed Value A"
      }
    ]
  }
}
'
import requests

url = "https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk"

payload = {
"identityIds": ["identity-1", "identity-2"],
"identityUpdates": {
"id": "<string>",
"organizationId": 123,
"peopleId": "<string>",
"employeeStatus": "active",
"employeeType": "full_time_employee",
"managementType": "managed",
"displayName": "Display Name",
"firstName": "First Name",
"lastName": "Last Name",
"avatar": "<string>",
"primaryEmail": "primay@email.com",
"secondaryEmails": ["secondary+1@email.com", "secondary+2@email.com"],
"companyName": "company name",
"workLocation": "work location",
"department": { "name": "department name" },
"serviceCount": 123,
"deviceCount": 123,
"costs": [
{
"amount": 100,
"currency": "usd"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isManager": True,
"isMock": True,
"isEmailEditable": True,
"hasPresetFieldsUnlinked": True,
"jobTitle": "CTO",
"employeeId": "EMP12345",
"lifecycle": {
"contractStartAt": "2021-01-01",
"contractEndAt": "2021-01-02",
"suspensionStartAt": "2021-01-01",
"suspensionEndAt": "2021-01-03"
},
"manager": {
"id": "<string>",
"displayName": "<string>",
"people": {}
},
"note": "this is a note",
"profileUrl": "https://workspace.url/employee/12345",
"customFields": {
"custom_text_field": "foo",
"custom_date_field": "2024-01-01",
"custom_number_field": 123,
"custom_dropdown_field": "Option Displayed Value A"
},
"customFieldsWithMetadata": [
{
"id": 1,
"attributeCode": "custom_text_field",
"attributeName": "Text field",
"value": "foo"
},
{
"id": 2,
"attributeCode": "custom_date_field",
"attributeName": "Date field",
"value": "2024-01-01"
},
{
"id": 3,
"attributeCode": "custom_number_field",
"attributeName": "Number field",
"value": 123
},
{
"id": 4,
"attributeCode": "custom_dropdown_field",
"attributeName": "Dropdown field",
"value": "Option Displayed Value A"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identityIds: ['identity-1', 'identity-2'],
identityUpdates: {
id: '<string>',
organizationId: 123,
peopleId: '<string>',
employeeStatus: 'active',
employeeType: 'full_time_employee',
managementType: 'managed',
displayName: 'Display Name',
firstName: 'First Name',
lastName: 'Last Name',
avatar: '<string>',
primaryEmail: 'primay@email.com',
secondaryEmails: ['secondary+1@email.com', 'secondary+2@email.com'],
companyName: 'company name',
workLocation: 'work location',
department: {name: 'department name'},
serviceCount: 123,
deviceCount: 123,
costs: [{amount: 100, currency: 'usd'}],
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
isManager: true,
isMock: true,
isEmailEditable: true,
hasPresetFieldsUnlinked: true,
jobTitle: 'CTO',
employeeId: 'EMP12345',
lifecycle: {
contractStartAt: '2021-01-01',
contractEndAt: '2021-01-02',
suspensionStartAt: '2021-01-01',
suspensionEndAt: '2021-01-03'
},
manager: {id: '<string>', displayName: '<string>', people: {}},
note: 'this is a note',
profileUrl: 'https://workspace.url/employee/12345',
customFields: {
custom_text_field: 'foo',
custom_date_field: '2024-01-01',
custom_number_field: 123,
custom_dropdown_field: 'Option Displayed Value A'
},
customFieldsWithMetadata: [
{
id: 1,
attributeCode: 'custom_text_field',
attributeName: 'Text field',
value: 'foo'
},
{
id: 2,
attributeCode: 'custom_date_field',
attributeName: 'Date field',
value: '2024-01-01'
},
{
id: 3,
attributeCode: 'custom_number_field',
attributeName: 'Number field',
value: 123
},
{
id: 4,
attributeCode: 'custom_dropdown_field',
attributeName: 'Dropdown field',
value: 'Option Displayed Value A'
}
]
}
})
};

fetch('https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk', 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://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'identityIds' => [
'identity-1',
'identity-2'
],
'identityUpdates' => [
'id' => '<string>',
'organizationId' => 123,
'peopleId' => '<string>',
'employeeStatus' => 'active',
'employeeType' => 'full_time_employee',
'managementType' => 'managed',
'displayName' => 'Display Name',
'firstName' => 'First Name',
'lastName' => 'Last Name',
'avatar' => '<string>',
'primaryEmail' => 'primay@email.com',
'secondaryEmails' => [
'secondary+1@email.com',
'secondary+2@email.com'
],
'companyName' => 'company name',
'workLocation' => 'work location',
'department' => [
'name' => 'department name'
],
'serviceCount' => 123,
'deviceCount' => 123,
'costs' => [
[
'amount' => 100,
'currency' => 'usd'
]
],
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'isManager' => true,
'isMock' => true,
'isEmailEditable' => true,
'hasPresetFieldsUnlinked' => true,
'jobTitle' => 'CTO',
'employeeId' => 'EMP12345',
'lifecycle' => [
'contractStartAt' => '2021-01-01',
'contractEndAt' => '2021-01-02',
'suspensionStartAt' => '2021-01-01',
'suspensionEndAt' => '2021-01-03'
],
'manager' => [
'id' => '<string>',
'displayName' => '<string>',
'people' => [

]
],
'note' => 'this is a note',
'profileUrl' => 'https://workspace.url/employee/12345',
'customFields' => [
'custom_text_field' => 'foo',
'custom_date_field' => '2024-01-01',
'custom_number_field' => 123,
'custom_dropdown_field' => 'Option Displayed Value A'
],
'customFieldsWithMetadata' => [
[
'id' => 1,
'attributeCode' => 'custom_text_field',
'attributeName' => 'Text field',
'value' => 'foo'
],
[
'id' => 2,
'attributeCode' => 'custom_date_field',
'attributeName' => 'Date field',
'value' => '2024-01-01'
],
[
'id' => 3,
'attributeCode' => 'custom_number_field',
'attributeName' => 'Number field',
'value' => 123
],
[
'id' => 4,
'attributeCode' => 'custom_dropdown_field',
'attributeName' => 'Dropdown field',
'value' => 'Option Displayed Value A'
]
]
]
]),
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://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk"

payload := strings.NewReader("{\n \"identityIds\": [\n \"identity-1\",\n \"identity-2\"\n ],\n \"identityUpdates\": {\n \"id\": \"<string>\",\n \"organizationId\": 123,\n \"peopleId\": \"<string>\",\n \"employeeStatus\": \"active\",\n \"employeeType\": \"full_time_employee\",\n \"managementType\": \"managed\",\n \"displayName\": \"Display Name\",\n \"firstName\": \"First Name\",\n \"lastName\": \"Last Name\",\n \"avatar\": \"<string>\",\n \"primaryEmail\": \"primay@email.com\",\n \"secondaryEmails\": [\n \"secondary+1@email.com\",\n \"secondary+2@email.com\"\n ],\n \"companyName\": \"company name\",\n \"workLocation\": \"work location\",\n \"department\": {\n \"name\": \"department name\"\n },\n \"serviceCount\": 123,\n \"deviceCount\": 123,\n \"costs\": [\n {\n \"amount\": 100,\n \"currency\": \"usd\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"isManager\": true,\n \"isMock\": true,\n \"isEmailEditable\": true,\n \"hasPresetFieldsUnlinked\": true,\n \"jobTitle\": \"CTO\",\n \"employeeId\": \"EMP12345\",\n \"lifecycle\": {\n \"contractStartAt\": \"2021-01-01\",\n \"contractEndAt\": \"2021-01-02\",\n \"suspensionStartAt\": \"2021-01-01\",\n \"suspensionEndAt\": \"2021-01-03\"\n },\n \"manager\": {\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"people\": {}\n },\n \"note\": \"this is a note\",\n \"profileUrl\": \"https://workspace.url/employee/12345\",\n \"customFields\": {\n \"custom_text_field\": \"foo\",\n \"custom_date_field\": \"2024-01-01\",\n \"custom_number_field\": 123,\n \"custom_dropdown_field\": \"Option Displayed Value A\"\n },\n \"customFieldsWithMetadata\": [\n {\n \"id\": 1,\n \"attributeCode\": \"custom_text_field\",\n \"attributeName\": \"Text field\",\n \"value\": \"foo\"\n },\n {\n \"id\": 2,\n \"attributeCode\": \"custom_date_field\",\n \"attributeName\": \"Date field\",\n \"value\": \"2024-01-01\"\n },\n {\n \"id\": 3,\n \"attributeCode\": \"custom_number_field\",\n \"attributeName\": \"Number field\",\n \"value\": 123\n },\n {\n \"id\": 4,\n \"attributeCode\": \"custom_dropdown_field\",\n \"attributeName\": \"Dropdown field\",\n \"value\": \"Option Displayed Value A\"\n }\n ]\n }\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identityIds\": [\n \"identity-1\",\n \"identity-2\"\n ],\n \"identityUpdates\": {\n \"id\": \"<string>\",\n \"organizationId\": 123,\n \"peopleId\": \"<string>\",\n \"employeeStatus\": \"active\",\n \"employeeType\": \"full_time_employee\",\n \"managementType\": \"managed\",\n \"displayName\": \"Display Name\",\n \"firstName\": \"First Name\",\n \"lastName\": \"Last Name\",\n \"avatar\": \"<string>\",\n \"primaryEmail\": \"primay@email.com\",\n \"secondaryEmails\": [\n \"secondary+1@email.com\",\n \"secondary+2@email.com\"\n ],\n \"companyName\": \"company name\",\n \"workLocation\": \"work location\",\n \"department\": {\n \"name\": \"department name\"\n },\n \"serviceCount\": 123,\n \"deviceCount\": 123,\n \"costs\": [\n {\n \"amount\": 100,\n \"currency\": \"usd\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"isManager\": true,\n \"isMock\": true,\n \"isEmailEditable\": true,\n \"hasPresetFieldsUnlinked\": true,\n \"jobTitle\": \"CTO\",\n \"employeeId\": \"EMP12345\",\n \"lifecycle\": {\n \"contractStartAt\": \"2021-01-01\",\n \"contractEndAt\": \"2021-01-02\",\n \"suspensionStartAt\": \"2021-01-01\",\n \"suspensionEndAt\": \"2021-01-03\"\n },\n \"manager\": {\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"people\": {}\n },\n \"note\": \"this is a note\",\n \"profileUrl\": \"https://workspace.url/employee/12345\",\n \"customFields\": {\n \"custom_text_field\": \"foo\",\n \"custom_date_field\": \"2024-01-01\",\n \"custom_number_field\": 123,\n \"custom_dropdown_field\": \"Option Displayed Value A\"\n },\n \"customFieldsWithMetadata\": [\n {\n \"id\": 1,\n \"attributeCode\": \"custom_text_field\",\n \"attributeName\": \"Text field\",\n \"value\": \"foo\"\n },\n {\n \"id\": 2,\n \"attributeCode\": \"custom_date_field\",\n \"attributeName\": \"Date field\",\n \"value\": \"2024-01-01\"\n },\n {\n \"id\": 3,\n \"attributeCode\": \"custom_number_field\",\n \"attributeName\": \"Number field\",\n \"value\": 123\n },\n {\n \"id\": 4,\n \"attributeCode\": \"custom_dropdown_field\",\n \"attributeName\": \"Dropdown field\",\n \"value\": \"Option Displayed Value A\"\n }\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/identity/bulk")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identityIds\": [\n \"identity-1\",\n \"identity-2\"\n ],\n \"identityUpdates\": {\n \"id\": \"<string>\",\n \"organizationId\": 123,\n \"peopleId\": \"<string>\",\n \"employeeStatus\": \"active\",\n \"employeeType\": \"full_time_employee\",\n \"managementType\": \"managed\",\n \"displayName\": \"Display Name\",\n \"firstName\": \"First Name\",\n \"lastName\": \"Last Name\",\n \"avatar\": \"<string>\",\n \"primaryEmail\": \"primay@email.com\",\n \"secondaryEmails\": [\n \"secondary+1@email.com\",\n \"secondary+2@email.com\"\n ],\n \"companyName\": \"company name\",\n \"workLocation\": \"work location\",\n \"department\": {\n \"name\": \"department name\"\n },\n \"serviceCount\": 123,\n \"deviceCount\": 123,\n \"costs\": [\n {\n \"amount\": 100,\n \"currency\": \"usd\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"isManager\": true,\n \"isMock\": true,\n \"isEmailEditable\": true,\n \"hasPresetFieldsUnlinked\": true,\n \"jobTitle\": \"CTO\",\n \"employeeId\": \"EMP12345\",\n \"lifecycle\": {\n \"contractStartAt\": \"2021-01-01\",\n \"contractEndAt\": \"2021-01-02\",\n \"suspensionStartAt\": \"2021-01-01\",\n \"suspensionEndAt\": \"2021-01-03\"\n },\n \"manager\": {\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"people\": {}\n },\n \"note\": \"this is a note\",\n \"profileUrl\": \"https://workspace.url/employee/12345\",\n \"customFields\": {\n \"custom_text_field\": \"foo\",\n \"custom_date_field\": \"2024-01-01\",\n \"custom_number_field\": 123,\n \"custom_dropdown_field\": \"Option Displayed Value A\"\n },\n \"customFieldsWithMetadata\": [\n {\n \"id\": 1,\n \"attributeCode\": \"custom_text_field\",\n \"attributeName\": \"Text field\",\n \"value\": \"foo\"\n },\n {\n \"id\": 2,\n \"attributeCode\": \"custom_date_field\",\n \"attributeName\": \"Date field\",\n \"value\": \"2024-01-01\"\n },\n {\n \"id\": 3,\n \"attributeCode\": \"custom_number_field\",\n \"attributeName\": \"Number field\",\n \"value\": 123\n },\n {\n \"id\": 4,\n \"attributeCode\": \"custom_dropdown_field\",\n \"attributeName\": \"Dropdown field\",\n \"value\": \"Option Displayed Value A\"\n }\n ]\n }\n}"

response = http.request(request)
puts response.read_body
"<string>"

承認

Authorization
string
header
必須

For authenticated requests, set the Authorization: Bearer your_api_key parameter in the header.
You can create and manage your API Keys by visiting the API Keys tab in the Settings page of your organization in Admina

パスパラメータ

organizationId
number
必須

ボディ

application/json
identityIds
string[]
必須

Array of identity IDs to update

:
["identity-1", "identity-2"]
identityUpdates
object
必須

Identity updates to apply to all selected identities. All fields are optional.

レスポンス

200 - application/json

The response is of type string.

最終更新日 2026年7月14日