お支払い方法

GET accounts/:account_id/funding_instruments

現在のアカウントに関連付けられている一部またはすべてのお支払い方法の詳細を取得します。

リソースURL

https://ads-api.twitter.com/10/accounts/:account_id/funding_instruments

パラメーター

名前 説明
account_id
必須

利用するアカウントのID。リソースのパス内に表示され、通常、GET accountsを除くすべての広告主APIリクエストに必須のパラメーターです。指定するアカウントは、認証済みユーザーに関連付けられている必要があります。

タイプ: 文字列

例: 18ce54d4x5t

count
任意

個別のリクエストごとに試行および取得するレコード数を指定します。

タイプ: 整数

デフォルト: 200
最小、最大: 11000
cursor
任意

結果の次のページを取得するためのカーソルを指定します。詳細については、「ページネーション」を参照してください。

タイプ: 文字列

例: 8x7v00oow

funding_instrument_ids
任意

カンマ区切りのIDリストを指定して、応答の範囲を目的のお支払い方法のみに設定します。最大200件のIDを指定できます。

タイプ: 文字列

例: lygyi

sort_by
任意

サポートされている属性で昇順または降順に並べ替えます。詳細については、「並べ替え」を参照してください。

タイプ: 文字列

例: created_at-asc

with_deleted
任意

削除した結果をリクエストに含めます。

タイプ: ブール値

デフォルト: false
使用可能な値: truefalse
with_total_count
任意

total_count応答属性を含めます。

: このパラメーターとcursorとは相互に排他的です。

: total_countを含むリクエストの場合、レート制限が低くなります。現在15分あたり200に設定されています。

タイプ: ブール値

デフォルト: false
使用可能な値: truefalse

リクエストの例

GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/funding_instruments

応答の例

{
  "request": {
    "params": {
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "start_time": "2016-07-22T04:24:04Z",
      "description": "Visa ending in 0650",
      "credit_limit_local_micro": 200000000,
      "end_time": null,
      "id": "lygyi",
      "entity_status": "ACTIVE",
      "account_id": "18ce54d4x5t",
      "reasons_not_able_to_fund": [],
      "io_header": null,
      "currency": "USD",
      "funded_amount_local_micro": 645940000,
      "created_at": "2016-07-22T04:24:04Z",
      "type": "CREDIT_CARD",
      "able_to_fund": true,
      "updated_at": "2017-04-05T00:25:13Z",
      "credit_remaining_local_micro": null,
      "deleted": false
    }
  ]
}

GET accounts/:account_id/funding_instruments/:funding_instrument_id

現在のアカウントに関連付けられている特定のお支払い方法を取得します。

リソースURL

https://ads-api.twitter.com/10/accounts/:account_id/funding_instruments/:id

パラメーター

名前 説明
account_id
必須

利用するアカウントのID。リソースのパス内に表示され、通常、GET accountsを除くすべての広告主APIリクエストに必須のパラメーターです。指定するアカウントは、認証済みユーザーに関連付けられている必要があります。

タイプ: 文字列

例: 18ce54d4x5t

funding_instrument_id
必須

リクエスト内で操作するお支払い方法への参照。

タイプ: 文字列

例: lygyi

with_deleted
任意

削除した結果をリクエストに含めます。

タイプ: ブール値

デフォルト: false
使用可能な値: truefalse

リクエストの例

GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/funding_instruments/lygyi

応答の例

{
  "request": {
    "params": {
      "funding_instrument_id": "lygyi",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "start_time": "2016-07-22T04:24:04Z",
    "description": "Visa ending in 0650",
    "credit_limit_local_micro": 200000000,
    "end_time": null,
    "id": "lygyi",
    "entity_status": "ACTIVE",
    "account_id": "18ce54d4x5t",
    "reasons_not_able_to_fund": [],
    "io_header": null,
    "currency": "USD",
    "funded_amount_local_micro": 645940000,
    "created_at": "2016-07-22T04:24:04Z",
    "type": "CREDIT_CARD",
    "able_to_fund": true,
    "updated_at": "2017-04-05T00:25:13Z",
    "credit_remaining_local_micro": null,
    "deleted": false
  }
}

POST accounts/:account_id/funding_instruments

サンドボックスのみ

サンドボックス環境でお支払い方法を作成します。

サンドボックスのお支払い方法を使用している間は、費用が発生するリスクはありません。

リソースURL

https://ads-api-sandbox.twitter.com/10/accounts/:account_id/funding_instruments

パラメーター

名前 説明
account_id
必須

利用するアカウントのID。リソースのパス内に表示され、通常、GET accountsを除くすべての広告主APIリクエストに必須のパラメーターです。指定するアカウントは、認証済みユーザーに関連付けられている必要があります。

タイプ: 文字列

例: gq1844

currency
必須

通貨。ISO-4217で表します。

タイプ: 文字列

例: USD

start_time
必須

お支払い方法が有効および使用可能になる日付。ISO 8601で表します。

タイプ: 文字列

例: 2017-05-19T07:00:00Z

type
必須

作成するお支払い方法のタイプ。

タイプ: 列挙

使用可能な値: AGENCY_CREDIT_LINECREDIT_CARDCREDIT_LINEINSERTION_ORDERPARTNER_MANAGED

end_time
必須の場合あり

お支払い方法が無効になる日付。ISO 8601で表します。

タイプ: 文字列

例: 2017-05-26T07:00:00Z

credit_limit_local_micro
任意

このお支払い方法で利用可能な合計クレジット額。

: 一部のお支払い方法タイプにのみ適用されます。

タイプ: 長整数型

例: 37500000

funded_amount_local_micro
任意

このお支払い方法に割り当てられた合計予算額。

: 一部のお支払い方法タイプにのみ適用されます。

タイプ: 長整数型

例: 37500000

リクエストの例

POST https://ads-api-sandbox.twitter.com/10/accounts/gq1844/funding_instruments?currency=USD&start_time=2017-07-10T00:00:00Z&type=INSERTION_ORDER&end_time=2018-01-10T00:00:00Z&funded_amount_local_micro=140000000000

応答の例

{
  "data": {
    "start_time": "2017-07-10T00:00:00Z",
    "description": "(no payment method has been set up yet)",
    "credit_limit_local_micro": null,
    "end_time": "2018-01-10T00:00:00Z",
    "id": "hxtet",
    "entity_status": "ACTIVE",
    "account_id": "gq1844",
    "reasons_not_able_to_fund": [],
    "io_header": null,
    "currency": "USD",
    "funded_amount_local_micro": 140000000000,
    "created_at": "2017-09-09T05:23:28Z",
    "type": "INSERTION_ORDER",
    "able_to_fund": true,
    "updated_at": "2017-09-09T05:23:28Z",
    "credit_remaining_local_micro": null,
    "deleted": false
  },
  "request": {
    "params": {
      "start_time": "2017-07-10T00:00:00Z",
      "end_time": "2018-01-10T00:00:00Z",
      "account_id": "gq1844",
      "currency": "USD",
      "funded_amount_local_micro": 140000000000,
      "type": "INSERTION_ORDER"
    }
  }
}

DELETE accounts/:account_id/funding_instruments/:funding_instrument_id

サンドボックスのみ

サンドボックス環境でお支払い方法を削除します。

リソースURL

https://ads-api-sandbox.twitter.com/10/accounts/:account_id/funding_instruments/:funding_instrument_id

パラメーター

名前 説明
account_id
必須

利用するアカウントのID。リソースのパス内に表示され、通常、GET accountsを除くすべての広告主APIリクエストに必須のパラメーターです。指定するアカウントは、認証済みユーザーに関連付けられている必要があります。

タイプ: 文字列

例: gq1844

funding_instrument_id
必須

リクエスト内で操作するお支払い方法への参照。

タイプ: 文字列

例: hxt82

リクエストの例

DELETE https://ads-api-sandbox.twitter.com/10/accounts/gq1844/funding_instruments/hxt82

応答の例

{
  "data": {
    "start_time": "2017-08-30T19:23:47Z",
    "description": "(no payment method has been set up yet)",
    "credit_limit_local_micro": 500000000,
    "end_time": null,
    "id": "hxt82",
    "entity_status": "ACTIVE",
    "account_id": "gq1844",
    "reasons_not_able_to_fund": [
      "DELETED"
    ],
    "io_header": null,
    "currency": "USD",
    "funded_amount_local_micro": null,
    "created_at": "2017-08-30T19:23:47Z",
    "type": "CREDIT_CARD",
    "able_to_fund": false,
    "updated_at": "2017-09-09T02:08:30Z",
    "credit_remaining_local_micro": null,
    "deleted": true
  },
  "request": {
    "params": {
      "funding_instrument_id": "hxt82",
      "account_id": "gq1844"
    }
  }
}