何かお探しですか? 製品 プラットフォーム 統合プレイブックとリソース 統合ナレッジ記事 API:新しいAPIクエリパラメータ"fields"を使用して、"return object"に代わる

API:新しいAPIクエリパラメータ"fields"を使用して、"return object"に代わる

Revised: 19 November 2021

はじめに

APIを使用する際のパフォーマンスを向上させるために、クエリでAPIフィルターまたはreturn_objectを使用することをお勧めしますが、APIフィルターは特定のオブジェクトタイプでのみ使用でき、将来のリリースではreturn_objectを非推奨にします。その一環として、必要に応じて動的APIフィルターを作成する別の方法を、必要なフィールドを持つAPIクエリパラメーターとして指定できます。

API内に新しく追加されたフィールドは、APIレスポンスフィルターまたは「フィールド」クエリパラメーターに記載されている特定のフィールドが付いている場合にのみ、APIレスポンスに表示されます。

インテグレーションオブジェクト

これらのオブジェクトは、クエリパラメータ: fieldsと連動します。

承認API

https ://.coupahost.com/api/approvals?fields =<customer> [" id ", "created - at "]& limit = 1

https ://.coupahost.com/api/approvals?approvable-type=EasyFormResponse&status [in<customer> ]= pending_approval, approved&updated-at [gt_or_eq ]= 2021 -11 -01 T 00:00:00 & fields = [" id ", "approvable - type "," approvable - id "]

料金API

https ://.coupahost.com/api/charges?fields =["<customer> id "," external - ref - id "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/charges?fields =["<customer> id ", "external - ref - id ", {" currency ":[" code "]}]& limit = 1

契約API :

例: https<customer> ://.coupahost.com/api/contracts?status=published&fields =[" id "," status "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/charges?? limit<customer> = 1 & fields = [" id ", "external - ref - id ", {" supplier ": [" id "," name "]}]

CoupaPay支払API

https ://.coupahost.com/api/coupa_pay/payments?status=published&fields<customer> = [" id ", "status "]& limit = 1

ネストされたフィールドの例:

fields = [" id ", "payment - batch - id "," status ", "exchange_rate "," updated_at ", {" pay_from_account ": [" id ", {" currency ": [" code "]}]}, {" pay_to_currency ": [" code "]}, {" payee ": [" number "]}, {" digital_check ": [" check_number "]}, {" payment_details ": [" id ", "updated_at "," source_transaction_id ", "source_transaction_reference "," discount_total ", "payment_total ", {" payable_allocations ": [" id "," updated_at ", "payable_to_amount "," source_transaction_to_reference ", "source_transaction_to_id "]}, {" currency ": [" code "]}]]]

カスタムオブジェクトAPI

https ://.coupahost.com/api/custom_objects// object<customer>_<ID>instances? updated_at [gt_or_eq ]= 2021 -11 -10 & fields = [" id ", "created_at "," updated_at ", "custom_object_name "," custom_object_code ", "form_response_id "," owner_id ", "due_date "," start_date ", "duration "," percentage ", "linkable_type "," linkable_id ", {" created_by ":[" id "]}, {" updated_by ":[" id "]}, {" custom_fields ":{}}]

簡易フォームの回答API

https ://.coupahost.com/api/easy_form_responses/?<customer> fields<ID> = [" id "," created_at "," updated_at "," easy_form_id "," name "," status "," submitted_at ",{" subject ":[" id "," supplier_id "," custom_object_name "," custom_object_code "]},{" easy_form_widget_responses ":[" id "," easy_form_id "," easy_form_widget_id "," easy_form_response_id "," answer "," type "," field_name "," widget_label "]},{" requested_by ":[" id "]},{" created_by ":[" id "]},{" updated_by ":[" id ":[" id "]}]]]]

経費レポートAPI

https ://.coupahost.com/api/expense_reports?status=approved_for_payment&fields<customer> = [" id ", "title "] & limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/users?status=active&fields<customer> =[" id ", {" expense_lines ":[" id ", "amount "]}]& limit = 1

インボイスAPI

https ://.coupahost.com/api/invoices?status=approved&fields<customer> = [" id ", "status "]& limit = 1

ネストされたフィールドの例:

/invoices /: id? fields =[" id "," invoice - number ",{" currency ":[" code "]},{" account_type ":[" id "," name "]}]

アイテムAPI

https ://.coupahost.com/api/items?fields =<customer> [" id ", "created - at "]& limit = 1

発注書API

https ://.coupahost.com/api/purchase_orders?status=issued&fields<customer> = [" id ", "status "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/purchase_orders?limit=1&fields =<customer> [" id ", "created_at "," updated_at ", "order_header_id "," po_number ", "status "," version ", {" custom_fields ": {}}, {" ship_to_address ": [" id ", "created_at "," updated_at ", "name "," location_code ", "street 1 "," street 2 ", "city "," state ", "postal_code "," attention ", "active ", {" country ": [" code "]}, {" custom_fields ": {}]}, {" ship_to_user ": [" id "," login "]}, {" supplier ": [" id ", "name "," display_name ", "number ", {" primary_address ": [" id "," name ", "location_code "," street 1 ", "street 2 "," city ", "state ", "," postal_code ", "attention "," active ", {" country ": "code "]}}, {" payment_term ": [id "," code "]}, {" currency ": "code "]}, {" shipping_code ": {"," code ", "order_id "," changes ", "line "," created ", "at" updated_at "、"line_num "、" description "、"order_header_change_id "、" order_line_id "、"price "、" quantity "、"total "、{" account ":[" id "、"name "、" code "、"segment_1 "、" segment_2 "、"segment_3 "、" segment_4 "]}、{"custom_fields ":{}}、{" currency ":[" code "]}、{"commodity ":[" name "、{" custom_fields ":{}}}、{"uom ":[" code "]}]}、{" current_approval ":[" id "、"created_at "、" updated_at "、"position "、" approval_chain_id "、"status "、" approval_date "、"note "、" type "、"approvable_type "、" approvable_id "、"delegate_id "、{" approver "id "}、{" approved_by ":[" id "、"login "、" employee_number "}]}、{"approvals ":" id "、" created_at "、"、"position_chain_id "、"、" approval_date "、"、"日付" note "、"type "、" approvable_type "、"approvable_id "、"、" delegate_id "、"、{"approvable_id ":{" id" id "、"id "、{" approved_id "、"、"承認_id "、"、"、"承認チェーンID、"、"、"、"、"承認日付"、"、"、"、"承認日付"、"、"、"、"承認可能"、"、"、"、"承認可能な"、"、"承認可能な"、"、"承認可能な"、"、"委任"、"、" ", {" approved_by ": [" id ", "login "," employee_number "]}]]

発注書の変更API

https ://.coupahost.com/api/purchase_order_changes?fields =<customer> [" id ", "created - at "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/purchase_orders?limit=1&fields =<customer> [" id ", "created_at "," updated_at ", "order_header_id "," po_number ", "status "," version ", {" custom_fields ": {}}, {" ship_to_address ": [" id ", "created_at "," updated_at ", "name "," location_code ", "street 1 "," street 2 ", "city "," state ", "postal_code "," attention ", "active ", {" country ": [" code "]}, {" custom_fields ": {}]}, {" ship_to_user ": [" id "," login "]}, {" supplier ": [" id ", "name "," display_name ", "number ", {" primary_address ": [" id "," name ", "location_code "," street 1 ", "street 2 "," city ", "state ", "," postal_code ", "attention "," active ", {" country ": "code "]}}, {" payment_term ": [id "," code "]}, {" currency ": "code "]}, {" shipping_code ": {"," code ", "order_id "," changes ", "line "," created ", "at" updated_at "、"line_num "、" description "、"order_header_change_id "、" order_line_id "、"price "、" quantity "、"total "、{" account ":[" id "、"name "、" code "、"segment_1 "、" segment_2 "、"segment_3 "、" segment_4 "]}、{"custom_fields ":{}}、{" currency ":[" code "]}、{"commodity ":[" name "、{" custom_fields ":{}}}、{"uom ":[" code "]}]}、{" current_approval ":[" id "、"created_at "、" updated_at "、"position "、" approval_chain_id "、"status "、" approval_date "、"note "、" type "、"approvable_type "、" approvable_id "、"delegate_id "、{" approver "id "}、{" approved_by ":[" id "、"login "、" employee_number "}]}、{"approvals ":" id "、" created_at "、"、"position_chain_id "、"、" approval_date "、"、"日付" note "、"type "、" approvable_type "、"approvable_id "、"、" delegate_id "、"、{"approvable_id ":{" id" id "、"id "、{" approved_id "、"、"承認_id "、"、"、"承認チェーンID、"、"、"、"、"承認日付"、"、"、"、"承認日付"、"、"、"、"承認可能"、"、"、"、"承認可能な"、"、"承認可能な"、"、"承認可能な"、"、"委任"、"、" ", {" approved_by ": [" id ", "login "," employee_number "]}]]

申請API

https ://.coupahost.com/api/requisitions?status=ordered&fields<customer> = [" id ", "status "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/requisitions?limit=1&fields = [" id ",<customer> "submitted_at "," us_estimated_tax ", {" currency ": [" code "]}, {" ship_to_address ": [" id ", "name "," location_code ", "street 1 "," street 2 ", "city "," state ", "postal_code "," attention ", "active "," vat_number ", {" country ": [" code "]}, {" custom_fields ": {}}}, {" requisition_lines ": [" id ", "description "," line_num ", "need_by_date "," order_line_id ", "quantity "," source_part_num ", "unspsc_code "," status ", "supp_aux_part_num "," total ", "line_type "," supplier_site_id ", "unit_price ", {" account "," name ", "code "," segment ", "segment_2 "," segment_3 ", "segment_4 "," account_type "[ name]}, {" uom ": [" code "], {" shipping_term "code "], {" name "," name ", "primary_address "," name ", "street_id "," street_location ", "street "," street ", "street_id "," street_id ", "street "," street ", "street_id ", """""," status ", "", "state_type "," date ", ", "approval_type "," date ", "", "承認","承認"{"日付", "{"承認", "日付"}: {" date "," date "}, "承認"日付": {" date ", ": {" date ", "date "," date ", {", "承認","承認",}}, "承認"日付", "日付"{","承認", "の「承認", ","日付", "の「承認", ","の「承認"の"の「承認"{"}}: "{"日付", "の「承認","の"の「承認", "{"日付", ", ","の「承認"の"の", "の「承認"{"日付"{"に"に", "の"の"の"の"に"に"に"を追加"を追加"、{"付け}}}},"を追加した"日付"した"、{"は、{"に「承認した"に、{"、{"に"、{"、{"に「承認した"、{"、{"、{"、{"、{"、[「承認した"日付"、{"には"、{"、{"、{"、「承認した"、"日付"日付"日付"に"には"には"、{"の"、"、{"、{"、"承認した"日付"には"、{"承認した"、"には"、{"には、"、"、{"承認した"には、"には"、{"付け"、「承認した"、{"、{"承認"、"、"、"、"、{"承認した"、"承認した"、"、"承認した"{承認した"には、"、{"コード"{承認"、{"、"、"、{"、"{承認した"、"、"、{"、"で"、"には"、"、"、"には"、"、"、"、"、"、"、"、"、"で"、"、"、"、"、"、"、"、"、"、"、"{{ }}、"承認した"、"{承認した"、"、"、"、"、"、"、"、"は"は"、"、"、"、"、"承認"、"、"、"、"、{"、"、"、"承認"、"は"、"、"{"、"、"承認"{ }}、"{承認"、"、"、"、"は"、"、"、"承認"は"{"、"日付}}、"は"、{"、"承認した"{"、"、"承認"、"、"承認した"は"承認"、"承認"承認"{

サプライヤーAPI

例: https<customer> ://.coupahost.com/api/suppliers?status=active&fields =[" id "," name "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/users?status=active&fields<customer> = [" id ", {" primary_contact ": [" name - given "]}] & limit = 1

サプライヤーアイテムAPI

https ://.coupahost.com/api/supplier_items?fields =<customer> [" id ", "created - at "]& limit = 1

サプライヤーのRisk AwareフィードAPI

https ://.coupahost.com/api/supplier_risk_aware_feed?fields =<customer> [" id ", "number - field -01 "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/users?status=active&fields<customer> = [" id ", {" supplier ": [" id ", "name "]}]& limit = 1

タスクAPI

https ://.coupahost.com/api/tasks?& updated<customer>_at [gt_or_eq ]= 2021 -07 -01 & linkable - type = Project&owner - id [blank ]= false&linkable [status] [not_eq ]= draft&fields = [" id ", "created_at "," updated_at ", "title "," description ", "status "," status ", "owner_id "," due_date ", "start_date "," duration ", "percentage "," linkable_type ", "linkable_id ", {" owner ": [" id "]}, {" resolved_by ":[" id "]}, {" linkable ": [" id "," created_at ", "updated_at "," name ", "active "," open ", "description "," mention_name ", "start_date "," external_reference_number ", "end_date "," commodity_id ", "status ", {" template_group ": [" id "," name ", {" custom_fields "}}, {" category ": "id "," name "{"," custom_fields ":{}}}, {" department "id "," name "," name "{"," custom_fields "}}, {" user ":{" user "id "," custom_id ",", "custom_field ", {" id "}}, {" custom_field ": {", "{"," custom_id ", "{" by "}}, "{" custom_fields ","{"," custom_id ","{":"}},"{" custom_id ","{":","{"{"{" id "}}}}," custom_fields ","{":"{","{"," custom_id ","{":"{","{""{"}}}":"{"," custom_id "," by "}}","{"{" custom_fields "}}":"

ユーザーAPI

例: https<customer> ://.coupahost.com/api/users?status=active&fields =[" id ", "email "]& limit = 1

ネストされたフィールドの例:

https ://.coupahost.com/api/users?status=active&fields =["<customer> id ", "external - ref - id ", {" roles ":[" name "]}]& limit = 1

APIフィルターリファレンスドキュメント

Success Portalの記事: https://success.coupa.com/Integrate/Integration_Knowledge_Articles/API_Response_Filters#As_an_operator