顧客 ID に関連付けられているクーポンに関する情報を取得します。
Request 要素
GetCouponInfoRequest オブジェクトは、サービス操作要求の本文要素とヘッダー要素を定義します。 要素は、 要求 SOAP に示されている順序と同じ順序である必要があります。
注:
以下に特に記載がない限り、すべての要求要素が必要です。
要求本文要素
要素 | 説明 | データ型 |
---|---|---|
CustomerId | 顧客 ID。 | long |
要求ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
AuthenticationToken | Microsoft Advertising アカウントへのアクセス許可を持つユーザーの資格情報を表す OAuth アクセス トークン。 詳細については、「 OAuth による認証」を参照してください。 |
string |
DeveloperToken | Bing Ads API へのアクセスに使用される開発者トークン。 詳細については、「 開発者トークンを取得する」を参照してください。 |
string |
Password | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
UserName | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
Response 要素
GetCouponInfoResponse オブジェクトは、サービス操作応答の本文要素とヘッダー要素を定義します。 要素は、 応答 SOAP に示されている順序と同じ順序で返されます。
応答本文の要素
要素 | 説明 | データ型 |
---|---|---|
CouponInfoData | クーポン情報データ オブジェクトの一覧。 | CouponInfoData 配列 |
応答ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
TrackingId | API 呼び出しの詳細を含むログ エントリの識別子。 | string |
SOAP を要求する
このテンプレートは、SOAP 要求の本文要素とヘッダー要素の順序を示すツールによって生成されました。 このサービス操作で使用できるサポートされる型については、上記の 要求本文要素 のリファレンスを参照してください。
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Billing/v13">
<Action mustUnderstand="1">GetCouponInfo</Action>
<AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
<DeveloperToken i:nil="false">ValueHere</DeveloperToken>
</s:Header>
<s:Body>
<GetCouponInfoRequest xmlns="https://bingads.microsoft.com/Billing/v13">
<CustomerId>ValueHere</CustomerId>
</GetCouponInfoRequest>
</s:Body>
</s:Envelope>
応答 SOAP
このテンプレートは、SOAP 応答の 本文 要素と ヘッダー 要素の順序を示すツールによって生成されました。
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Billing/v13">
<TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
</s:Header>
<s:Body>
<GetCouponInfoResponse xmlns="https://bingads.microsoft.com/Billing/v13">
<CouponInfoData xmlns:e19="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<e19:CouponInfoData>
<e19:AccountId>ValueHere</e19:AccountId>
<e19:CouponId d4p1:nil="false">ValueHere</e19:CouponId>
<e19:ClaimDate d4p1:nil="false">ValueHere</e19:ClaimDate>
<e19:Status d4p1:nil="false">ValueHere</e19:Status>
<e19:RedemptionDate d4p1:nil="false">ValueHere</e19:RedemptionDate>
<e19:ExpirationDate d4p1:nil="false">ValueHere</e19:ExpirationDate>
<e19:PercentOff d4p1:nil="false">ValueHere</e19:PercentOff>
<e19:CouponValue d4p1:nil="false">ValueHere</e19:CouponValue>
<e19:UpfrontSpending d4p1:nil="false">ValueHere</e19:UpfrontSpending>
<e19:ActiveDuration d4p1:nil="false">ValueHere</e19:ActiveDuration>
<e19:SpendToThreshold d4p1:nil="false">ValueHere</e19:SpendToThreshold>
<e19:StartDate d4p1:nil="false">ValueHere</e19:StartDate>
<e19:EndDate d4p1:nil="false">ValueHere</e19:EndDate>
<e19:Balance d4p1:nil="false">ValueHere</e19:Balance>
<e19:CurrencyCode d4p1:nil="false">ValueHere</e19:CurrencyCode>
<e19:FeatureId d4p1:nil="false">ValueHere</e19:FeatureId>
<e19:CouponType d4p1:nil="false">ValueHere</e19:CouponType>
</e19:CouponInfoData>
</CouponInfoData>
</GetCouponInfoResponse>
</s:Body>
</s:Envelope>
コード構文
構文の例は、 Bing広告 SDK で使用できます。 その他 の例については、「Bing広告 API コードの例 」を参照してください。
public async Task<GetCouponInfoResponse> GetCouponInfoAsync(
long customerId)
{
var request = new GetCouponInfoRequest
{
CustomerId = customerId
};
return (await CustomerBillingService.CallAsync((s, r) => s.GetCouponInfoAsync(r), request));
}
static GetCouponInfoResponse getCouponInfo(
java.lang.Long customerId) throws RemoteException, Exception
{
GetCouponInfoRequest request = new GetCouponInfoRequest();
request.setCustomerId(customerId);
return CustomerBillingService.getService().getCouponInfo(request);
}
static function GetCouponInfo(
$customerId)
{
$GLOBALS['Proxy'] = $GLOBALS['CustomerBillingProxy'];
$request = new GetCouponInfoRequest();
$request->CustomerId = $customerId;
return $GLOBALS['CustomerBillingProxy']->GetService()->GetCouponInfo($request);
}
response=customerbilling_service.GetCouponInfo(
CustomerId=CustomerId)
要件
サービス: CustomerBillingService.svc v13
Namespace: https://bingads.microsoft.com/Billing/v13
要求 URL
https://clientcenter.api.bingads.microsoft.com/CustomerBilling/v13/CouponInfo/Query
Request 要素
GetCouponInfoRequest オブジェクトは、サービス操作要求の本文要素とヘッダー要素を定義します。
注:
以下に特に記載がない限り、すべての要求要素が必要です。
要求本文要素
要素 | 説明 | データ型 |
---|---|---|
CustomerId | 顧客 ID。 | long |
要求ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
Authorization | Microsoft Advertising アカウントへのアクセス許可を持つユーザーの資格情報を表す OAuth アクセス トークン。 トークンのプレフィックスに "Bearer" があることを確認してください。これは、適切な認証に必要です。 詳細については、「 OAuth による認証」を参照してください。 |
string |
DeveloperToken | Bing Ads API へのアクセスに使用される開発者トークン。 詳細については、「 開発者トークンを取得する」を参照してください。 |
string |
Password | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
UserName | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
Response 要素
GetCouponInfoResponse オブジェクトは、サービス操作応答の本文要素とヘッダー要素を定義します。 要素は、 Response JSON に示されている順序と同じ順序で返されます。
応答本文の要素
要素 | 説明 | データ型 |
---|---|---|
CouponInfoData | クーポン情報データ オブジェクトの一覧。 | CouponInfoData 配列 |
応答ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
TrackingId | API 呼び出しの詳細を含むログ エントリの識別子。 | string |
JSON を要求する
このテンプレートは、JSON 要求の 本文 と ヘッダー 要素を表示するツールによって生成されました。 このサービス操作で使用できるサポートされる型については、上記の 要求本文要素 のリファレンスを参照してください。
{
"CustomerId": "LongValueHere"
}
応答 JSON
このテンプレートは、JSON 応答の 本文 と ヘッダー 要素を表示するツールによって生成されました。
{
"CouponInfoData": [
{
"AccountId": IntValueHere,
"ActiveDuration": IntValueHere,
"Balance": DecimalValueHere,
"ClaimDate": "ValueHere",
"CouponId": IntValueHere,
"CouponType": "ValueHere",
"CouponValue": DecimalValueHere,
"CurrencyCode": "ValueHere",
"EndDate": "ValueHere",
"ExpirationDate": "ValueHere",
"FeatureId": IntValueHere,
"PercentOff": DoubleValueHere,
"RedemptionDate": "ValueHere",
"SpendToThreshold": DecimalValueHere,
"StartDate": "ValueHere",
"Status": "ValueHere",
"UpfrontSpending": DecimalValueHere
}
]
}
コード構文
SDK を使用して REST API を呼び出すには、SDK を特定のバージョンにアップグレードし、システム パラメーターを構成する必要があります。構文の例は、 Bing広告 SDK で使用できます。 その他 の例については、「Bing広告 API コードの例 」を参照してください。
public async Task<GetCouponInfoResponse> GetCouponInfoAsync(
long customerId)
{
var request = new GetCouponInfoRequest
{
CustomerId = customerId
};
return (await CustomerBillingService.CallAsync((s, r) => s.GetCouponInfoAsync(r), request));
}
static GetCouponInfoResponse getCouponInfo(
java.lang.Long customerId) throws RemoteException, Exception
{
GetCouponInfoRequest request = new GetCouponInfoRequest();
request.setCustomerId(customerId);
return CustomerBillingService.getService().getCouponInfo(request);
}
static function GetCouponInfo(
$customerId)
{
$GLOBALS['Proxy'] = $GLOBALS['CustomerBillingProxy'];
$request = new GetCouponInfoRequest();
$request->CustomerId = $customerId;
return $GLOBALS['CustomerBillingProxy']->GetService()->GetCouponInfo($request);
}
response=customerbilling_service.GetCouponInfo(
CustomerId=CustomerId)