作業員API
作業員データへのアクセスおよび更新。 たとえば、作業員のアバターを操作したり、作業員を作成、クエリ、招待したり、作業員レコードを更新したりできます。
アクション
| 動詞 | パス | アクション | 説明 |
|---|---|---|---|
| DELETE | /api/workers/:id/avatar | avatar_delete | すべての作業員の割り当てを取得。 |
| GET | /api/workers/:id/avatar | avatar_show | 単一の作業員の割り当てデータを取得。 |
| POST | /api/workers/:id/avatar | avatar_update | 作業員のアバターを更新します。 |
| PUT | /api/workers/:id/avatar | avatar_update | 作業員のアバターを更新します。 |
| POST | /api/workers | 作成 | 作業員を作成します。 |
| GET | /api/workers | インデックス | Query worker。 |
| POST | /api/workers/:id/invite_worker | invite_worker | 作業員を招待します。 |
| GET | /api/workers/:id | 表示 | 作業員を表示します。 |
| PATCH | /api/workers/:id | 更新 | 作業員を表示します。 |
| PUT | /api/workers/:id | 更新 | 作業員を表示します。 |
スコープ
このAPIには、次のスコープが必要です。
- core.services_procurement.workers.read
- core.services_procurement.workers.write
Elements
| 要素 | Description | 必須 | 一意 | 許容値 | 入力 | 出力 | データタイプ |
|---|---|---|---|---|---|---|---|
アクティブ | Active | yes | boolean | ||||
| avatar - content - type | アバターコンテンツタイプ | yes | string(255) | ||||
| avatar - file - name | アバターファイル名 | yes | string(255) | ||||
| 国籍 | 作業員の国籍 | yes | Country | ||||
country-of-residence | 居住国 | yes | yes | Country | |||
作成日時 | CoupaがYYY-MM-DDTHH:MM:SS+HH:MMZの形式で自動的に作成します | yes | datetime | ||||
created-by | 作成したユーザー | yes | |||||
current-title | 現在の役職 | yes | yes | string(255) | |||
| 生年月日 | 生年月日 | yes | yes | yes | 日付 | ||
external-identifiers | 外部識別子 | yes | yes | Worker::WorkerExternalReferenceIdentifier | |||
first-name | 名 | yes | yes | yes | string(255) | ||
gender | 性別 | yes | 文字列 | ||||
gender-code | 性別コード | yes | yes | yes | string(255) | ||
ID | Coupaの一意の識別子 | yes | 整数 | ||||
last-name | 姓 | yes | yes | yes | string(255) | ||
middle-name | ミドルネーム | yes | yes | string(255) | |||
national-identifiers | 国民ID | yes | yes | Worker::WorkerNationalIdentifier | |||
nationality | 国籍 | yes | Country | ||||
portal-access | ポータルアクセス | yes | 文字列 | ||||
| portal - access - info | ポータルアクセス情報 | yes | ユーザー | ||||
ステータス | Status | yes | string(50) | ||||
supplier | supplier | yes | yes | ||||
total-experience-in-years | 合計経験年数 | yes | yes | yes | decimal(19,2) | ||
updated-at | CoupaがYYY-MM-DDTHH:MM:SS+HH:MMZの形式で自動的に作成します | yes | datetime | ||||
updated-by | 更新したユーザー | yes | |||||
worker-addresses | 作業員の住所 | yes | yes | ||||
worker-documents | 作業員の文書 | yes | |||||
worker-emails | 作業員のメールアドレス | yes | yes | ||||
worker-phone-numbers | 作業員の電話番号 | yes | yes | ||||
worker-skills | 作業員のスキル | yes | yes | Worker::WorkerSkill |
労働者を獲得する
- メソッド
GET
/api/workers- cURLリクエスト例
curl --location 'https://<your-instance>.coupadev.com/api/workers' \ --header 'Accept: application/json' \ --header 'Accept: application/xml' \ --header 'Accept: application/octet-stream' \ --header 'Authorization: ••••••' \ --header 'Cookie: _mkra_ctxt=e02b500d225375af25ce02956b7b1cae29525e55fa9ff4667d28169023f67f60--200'- レスポンス例
[ { "id": 1, "created-at": "2025-07-28T03:43:08-07:00", "updated-at": "2025-07-30T18:00:44-07:00", "first-name": "Test", "last-name": "Worker", "middle-name": null, "active": true, "status": "assigned", "current-title": "", "total-experience-in-years": "10.0", "portal-access": "Not Registered", "date-of-birth": "2000-07-01", "avatar-file-name": null, "avatar-content-type": null, "gender-code": "m", "gender": "Male", "supplier": { "id": 132, "name": "FieldQA supplier SM", "display-name": "FieldQA Supplier SM" }, "country-of-residence": { "id": 222, "code": "AE", "name": "United Arab Emirates" }, "nationality": null, "portal-access-info": null, "worker-emails": [ { "id": 1, "created-at": "2025-07-28T03:43:08-07:00", "updated-at": "2025-07-28T03:43:08-07:00", "email-address": "stage@coupa.com", "email-type": "work" } ], "worker-skills": [], "worker-addresses": [ { "id": 382, "created-at": "2025-07-28T03:43:08-07:00", "updated-at": "2025-07-28T03:43:08-07:00", "street1": "abc", "street2": null, "street3": null, "street4": null, "city": "asd", "state": "AZ", "state-iso-code": null, "postal-code": "1237710", "active": true, "worker-address-purpose": { "id": 33, "code": "Home", "name": "Home" } } ], "external-identifiers": [], "worker-documents": [], "worker-phone-numbers": [ { "id": 1, "created-at": "2025-07-28T03:43:08-07:00", "updated-at": "2025-07-28T03:43:08-07:00", "phone-type": "mobile", "phone-number": { "number": "022345678", "extension": "", "country-code": "AL" } } ], "national-identifiers": [], "created-by": { "id": 371, "login": "amandeep.vashishtha@coupa.com", "employee-number": null, "fullname": "Amandeep V" }, "updated-by": { "id": 371, "login": "amandeep.v@coupa.com", "employee-number": null, "fullname": "Amandeep V" } }, { "id": 2, "created-at": "2025-07-30T03:54:59-07:00", "updated-at": "2025-07-30T03:54:59-07:00", "first-name": "Test 2", "last-name": "Worker", "middle-name": null, "active": true, "status": "open", "current-title": "", "total-experience-in-years": "4.0", "portal-access": "Not Registered", "date-of-birth": "1990-07-03", "avatar-file-name": null, "avatar-content-type": null, "gender-code": "f", "gender": "Female", "supplier": { "id": 132, "name": "FieldQA supplier SM", "display-name": "FieldQA Supplier SM" }, "country-of-residence": { "id": 223, "code": "US", "name": "United States" }, "nationality": null, "portal-access-info": null, "worker-emails": [ { "id": 2, "created-at": "2025-07-30T03:54:59-07:00", "updated-at": "2025-07-30T03:54:59-07:00", "email-address": "stage+testworker@Coupa.com", "email-type": "personal" } ], "worker-skills": [], "worker-addresses": [ { "id": 399, "created-at": "2025-07-30T03:54:59-07:00", "updated-at": "2025-07-30T03:54:59-07:00", "street1": "abc", "street2": null, "street3": null, "street4": null, "city": "new york", "state": "NY", "state-iso-code": null, "postal-code": "1112223", "active": true, "worker-address-purpose": { "id": 33, "code": "Home", "name": "Home" } } ], "external-identifiers": [], "worker-documents": [], "worker-phone-numbers": [ { "id": 2, "created-at": "2025-07-30T03:54:59-07:00", "updated-at": "2025-07-30T03:54:59-07:00", "phone-type": "mobile", "phone-number": { "number": "07410410123", "extension": "", "country-code": "IN" } } ], "national-identifiers": [], "created-by": { "id": 371, "login": "amandeep.v@coupa.com", "employee-number": null, "fullname": "Amandeep V" }, "updated-by": { "id": 371, "login": "amandeep.v@coupa.com", "employee-number": null, "fullname": "Amandeep V" } } ]