• 最終編集日時: 22 July 2019

支払先住所API通話例

支払先住所のさまざまなクエリオプション

費用レポートAPIを使用して、必要な結果セットをクエリして取得する方法の詳細な例を次に示します。

このクエリでは、合計金額が特定の金額より大きい経費レポートが表示されます

https ://.coupahost.com/api/expense_reports?total<instance> [gt] = 800

このクエリでは、Login = coupasupportで特定のユーザーによって更新された支払先住所が表示されます

https ://.coupahost.com/api/suppliers/1/addresses?updated_by<instance> [login] = coupasupport

このクエリにより、2010年3月1日以降に作成されたすべての住所に送金されます

https ://.coupahost.com/api/suppliers/1/addresses?created-at [gt<instance>] = 2010 -03 -01 T 12:00:00

このクエリにより、国コードUSを使用した住所へのすべての送金が可能になります

https ://.coupahost.com/api/suppliers/1/addresses?country<instance> [code] = US

支払先住所を1つ取得

この例では、492のIDを持つ1つの送金先住所を照会しました。

URLへのアクセスを行いました。

https<instance> ://.coupahost.com/api/suppliers/1/addresses/492
または
https<instance> ://.coupahost.com/api/suppliers/1/addresses?id=492

結果:

支払先住所サンプル結果のクエリ

<?xml version="1.0" encoding="UTF-8"?>

<remit-to-address>

	 <id type="integer">492</id>

	 2014 <created-at type="datetime">-04 -02 T 15:23:59 - 07:00</created-at>

	 2014 <updated-at type="datetime">-04 -03 T 09:04:07 - 07:00</updated-at>

	 <remit-to-code>REMIT 1</remit-to-code>

	 <name>テスト支払先住所</name>

	 <street1>123テストストリート</street1>

	 <street2>testing</street2>

	 <city>プレザントン</city>

	 <state>カナダ</state>

	 <postal-code>94566</postal-code>

	 <active type="boolean">true</active>

	 <country>

			<id type="integer">223</id>

			<code>US</code>

			<name>米国</name>

	 </country>

	 <created-by>

			<id type="integer">1</id>

			<login>coupasupport</login>

			<email>upgrade@coupa.com</email>

			<employee-number />

			<firstname>Coupa</firstname>

			<lastname>サポート</lastname>

			<salesforce-id nil="true" />

			<mycustom-userfield />

	 </created-by>

	 <updated-by>

			<id type="integer">1</id>

			<login>coupasupport</login>

			<email>upgrade@coupa.com</email>

			<employee-number />

			<firstname>Coupa</firstname>

			<lastname>サポート</lastname>

			<salesforce-id nil="true" />

			<mycustom-userfield />

	 </updated-by>

</remit-to-address>

支払先住所作成

この例では、IDが「1」のサプライヤーの支払先住所を有効なステータスで作成しています。参照用のCoupaシステムサプライヤーIDを使用しています。

次のURLに投稿しました: https ://<instance url>/api/suppliers<supplier id> // addresses/ これにより、支払先住所が有効なステータスになりました。

支払先住所を作成するためのコード

<?xml version="1.0" encoding="UTF-8"?>

<remit-to-address>

	 <remit-to-code>REMIT 2</remit-to-code>

	 <name>テスト支払先住所</name>

	 <street1>123テストストリート</street1>

	 <street2>testing</street2>

	 <city>プレザントン</city>

	 <state>カナダ</state>

	 <postal-code>94566</postal-code>

	 <active>true</active>

	 <country>

			<name>米国</name>

	 </country>

</remit-to-address>

支払先住所の更新

これらの例では、単一の支払先住所レコードを更新しています。

URLを入力しました: https://instance.coupahost.com/api/expense_reports/<id> 

たとえば、ID 1のサプライヤーのために、ID 495の支払先住所のステータスを更新するには

URL : https://instance.coupahost.com/api/s.../addresses/495

支払先住所のステータスを更新するためのサンプルコード

<?xml version="1.0" encoding="UTF-8"?>

<remit-to-address>

	 <active>true</active>

</remit-to-address>

たとえば、ID 495の支払先住所の支払先コード値を更新するには

支払先住所の支払先コードを更新するためのサンプルコード

<?xml version="1.0" encoding="UTF-8"?>

<remit-to-address>

	 <remit-to-code>REMIT 5</remit-to-code>

</remit-to-address> 

 

関連アイテム


Coupa Core API

CoupaのRESTful APIは、お客様のデータをCoupaプラットフォームで読み取り、編集し、統合するための堅牢なアクセスを提供します。

APIの開始

Coupa APIの使用に関する一般情報、およびCSVの使用を検討するタイミング。

OAuth 2.0およびOIDCへの移行

Coupaは従来のAPIキーを廃止し、OAuth 2.0 / OIDCの使用を必要としています。R34以降、新しいAPIキーは発行されず、R35ではAPIキーはサポートされなくなります。

リソース

参照データ、トランザクションデータ、共有リソースなど、オブジェクトのタイプ別にAPIエンドポイントを整理しました。