調達API (/quote_requests)
概要
調達APIを使用すると、以下の操作が可能です。
- RFP、RFI、またはRFQタイプのイベントを作成
- イベントに対するサプライヤーの回答を抽出
- 明細レベルでイベントをサプライヤーに発注
Coupaバックエンドでは、ソーシングイベントは見積依頼として認識されます。
エンドポイント
調達APIでは、次のエンドポイントを使用できます。
| リソース | パス | Description |
|---|---|---|
| ソーシングイベント | /api/quote_requests | 新規ソーシングイベントの作成および既存イベントの管理用エンドポイント |
| サプライヤーの回答 | /api/quote_responses | サプライヤーの回答の処理用エンドポイント |
| 調達サプライヤー | /api/quote_suppliers | ソーシングイベントにおけるサプライヤー情報の取得用エンドポイント |
呼び出しの例
新しいソーシングイベントの作成
POST/api/quote_requests/
新しいイベントを作成するには、基本的なPOSTを送信します。 <event-type> 要素を含めるか、そうでない場合、CoupaはデフォルトでRFIになります。
ペイロード
<?xml version="1.0" encoding="UTF-8" ?> <quote-request> <event-type type="symbol">RFQ</event-type> </quote-request>201成功レスポンス
Coupaは、一意の <id> を持つ新しく作成されたソーシングイベントを返します。
<?xml version="1.0" encoding="UTF-8"?> <quote-request> <id type="integer">1434</id> <created-at type="dateTime">2018 -04 -11 T 10:37:25 - 07:00</created-at> <updated-at type="dateTime">2018 -04 -11 T 10:46:58 - 07:00</updated-at> <description nil="true" /> <start-time type="dateTime">2018 -04 -11 T 17:00:00 - 07:00</start-time> <start-on-submit type="boolean">true</start-on-submit> <event-type type="symbol">rfi</event-type> <end-time type="dateTime">2018 -04 -25 T 17:00:00 - 07:00</end-time> <state>draft</state> <comments nil="true" /> <allow-multiple-response type="boolean">true</allow-multiple-response> <sealed-bids type="boolean">true</sealed-bids> <allow-award-individual-line-items type="boolean">false</allow-award-individual-line-items> <automatic-bid-unsealing type="boolean">true</automatic-bid-unsealing> <timezone>US/Pacific</timezone> <currency>...</currency> <lots type="array" /> <lines type="array" /> <quote-suppliers type="array" /> <attachments type="array" /> <forms type="array" /> <quote-request-attachments type="array" /> <tags type="array" /> <business-partners type="array" /> </business-partners> <created-by>...</created-by> <updated-by>...</updated-by> <custom-fields /> </quote-request>特定のイベントに対するすべてのサプライヤーの回答を表示
GET/api/quote_requests/{event_id}/quote_responses200 OKレスポンス
<?xml version="1.0" encoding="UTF-8"?> <quote-responses type="array"> <quote-response> <id type="integer">1080</id> <created-at type="dateTime">2018 -04 -10 T 05:51:28 - 07:00</created-at> <updated-at type="dateTime">2018 -04 -10 T 05:51:34 - 07:00</updated-at> <quote-request-id type="integer">1429</quote-request-id> <submitted-at type="dateTime">2018 -04 -10 T 05:51:34 - 07:00</submitted-at> <state>提出</state> <position type="integer">2</position> <comments nil="true" /> <lines type="array"> <line> <id type="integer">7447</id> <created-at type="dateTime">2018 -04 -10 T 05:51:28 - 07:00</created-at> <updated-at type="dateTime">2018 -04 -10 T 05:51:33 - 07:00</updated-at> <price-amount type="decimal">200.0</price-amount> <quantity type="decimal">1.0</quantity> <reporting-price-amount type="decimal">200.0</reporting-price-amount> <price-currency>...</price-currency> <quote-request-line-id type="integer">5834</quote-request-line-id> <lot-id type="integer">0</lot-id> </line> </lines> <quote-supplier> <id type="integer">1714</id> <created-at type="dateTime">2018 -04 -10 T 05:50:21 - 07:00</created-at> <updated-at type="dateTime">2018 -04 -10 T 05:51:34 - 07:00</updated-at> <name>bnew</name> <display-name>bnew</display-name> <email>iraira666555@gmail.com</email> <contact-name /> <supplier nil="true" /> <created-by>...</created-by> <updated-by>...</updated-by> </quote-supplier> </quote-response> </quote-responses>サプライヤーにイベントを発注
投稿/api/quote_responses/{response_id}/award
レスポンス <id> を受け取ったら、それを使用してレスポンスをアワードすることができます。
選定用のペイロード
<?xml version="1.0" encoding="UTF-8"?> <root> <quote_response_line_ids>7447</quote_response_line_ids> </root>上記の例のように見積回答明細ID (例: 7447)を指定しない場合は、すべての明細を一括で選定することができます。
200 OKレスポンス
Coupaは本文なしの200 OKを返します。