แชร์ผ่าน


การดําเนินการบริการ AddAccount - การจัดการลูกค้า

สร้างบัญชีใหม่ภายในลูกค้าที่มีอยู่

ผู้ใช้ที่มีข้อมูลประจําตัว Super Admin สามารถเพิ่มบัญชีภายใต้ลูกค้าของตนเองได้

เคล็ดลับ

ผู้จําหน่ายโดยทั่วไปควรเรียก SignupCustomer แทน AddAccount สําหรับรายละเอียดเพิ่มเติม โปรดดูคู่มือทางเทคนิคเกี่ยวกับลําดับชั้นของบัญชี

หมายเหตุ

ลูกค้าในแคมเปญอัจฉริยะแบบครบวงจรที่ปิดแล้วสามารถเพิ่มบัญชีใหม่สําหรับแคมเปญอัจฉริยะแบบรวมได้ AccountMode ต้องตั้งค่าเป็น "UnifiedSmart"

ร้องขอองค์ประกอบ

วัตถุ AddAccountRequest จะกําหนดองค์ประกอบ เนื้อความ และ ส่วนหัว ของการร้องขอการดําเนินการบริการ องค์ประกอบต้องอยู่ในลําดับเดียวกับที่แสดงใน Request SOAP

หมายเหตุ

เว้นแต่ระบุไว้เป็นอย่างอื่นด้านล่าง จําเป็นต้องระบุองค์ประกอบคําขอทั้งหมด

ร้องขอองค์ประกอบเนื้อความ

ธาตุ คำอธิบาย ชนิดข้อมูล
บัญชี บัญชีที่คุณต้องการเพิ่มลงในลูกค้าที่มีอยู่

คุณต้องตั้งค่า ParentCustomerId ในวัตถุบัญชีผู้โฆษณา
AdvertiserAccount

องค์ประกอบส่วนหัวของคําขอ

ธาตุ คำอธิบาย ชนิดข้อมูล
AuthenticationToken โทเค็นการเข้าถึง OAuth ที่แสดงข้อมูลประจําตัวของผู้ใช้ที่มีสิทธิ์เข้าถึงบัญชี Microsoft Advertising

สําหรับข้อมูลเพิ่มเติม ดูการรับรองความถูกต้องด้วย OAuth
เชือก
DeveloperToken โทเค็นนักพัฒนาที่ใช้เพื่อเข้าถึง Bing Ads API

สําหรับข้อมูลเพิ่มเติม ดูรับโทเค็นนักพัฒนา
เชือก
รหัสผ่าน องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ เชือก
ชื่อผู้ใช้ องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ เชือก

องค์ประกอบการตอบสนอง

วัตถุ AddAccountResponse จะกําหนดองค์ประกอบ เนื้อ ความและ ส่วนหัว ของการตอบสนองการดําเนินการบริการ องค์ประกอบจะถูกส่งกลับตามลําดับเดียวกับที่แสดงใน Response SOAP

องค์ประกอบเนื้อความการตอบสนอง

ธาตุ คำอธิบาย ชนิดข้อมูล
AccountId ตัวระบุบัญชีที่ระบบสร้างขึ้นซึ่งสอดคล้องกับบัญชีใหม่ที่ระบุไว้ในคําขอ

ใช้ตัวระบุนี้กับการร้องขอการดําเนินการที่จําเป็นต้องมีองค์ประกอบเนื้อความ AccountId และองค์ประกอบส่วนหัว CustomerAccountId SOAP
ยาว
หมายเลขบัญชี หมายเลขบัญชีที่ระบบสร้างขึ้นซึ่งใช้เพื่อระบุบัญชีในแอปพลิเคชันบนเว็บ Microsoft Advertising

หมายเลขบัญชีมีรูปแบบ xxxxxxxxx โดย ที่ xxxxxxxxx คือชุดของอักขระพยัญชนะผสมตัวเลขแปดตัว
เชือก
CreateTime วันที่และเวลาที่เพิ่มบัญชีผู้ใช้ ค่าวันที่และเวลาแสดงวันที่และเวลาที่เซิร์ฟเวอร์ ไม่ใช่ไคลเอ็นต์ สําหรับข้อมูลเกี่ยวกับรูปแบบของวันที่และเวลา ดูรายการ dateTime ในชนิดข้อมูล Primitive XML วันที่เวลา

องค์ประกอบส่วนหัวการตอบสนอง

ธาตุ คำอธิบาย ชนิดข้อมูล
TrackingId ตัวระบุของรายการบันทึกที่ประกอบด้วยรายละเอียดของการเรียกใช้ API เชือก

ร้องขอ 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/Customer/v13">
    <Action mustUnderstand="1">AddAccount</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <AddAccountRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <Account xmlns:e1="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e1:BillToCustomerId i:nil="false">ValueHere</e1:BillToCustomerId>
        <e1:CurrencyCode i:nil="false">ValueHere</e1:CurrencyCode>
        <e1:AccountFinancialStatus i:nil="false">ValueHere</e1:AccountFinancialStatus>
        <e1:Id i:nil="false">ValueHere</e1:Id>
        <e1:Language i:nil="false">ValueHere</e1:Language>
        <e1:LastModifiedByUserId i:nil="false">ValueHere</e1:LastModifiedByUserId>
        <e1:LastModifiedTime i:nil="false">ValueHere</e1:LastModifiedTime>
        <e1:Name i:nil="false">ValueHere</e1:Name>
        <e1:Number i:nil="false">ValueHere</e1:Number>
        <e1:ParentCustomerId>ValueHere</e1:ParentCustomerId>
        <e1:PaymentMethodId i:nil="false">ValueHere</e1:PaymentMethodId>
        <e1:PaymentMethodType i:nil="false">ValueHere</e1:PaymentMethodType>
        <e1:PrimaryUserId i:nil="false">ValueHere</e1:PrimaryUserId>
        <e1:AccountLifeCycleStatus i:nil="false">ValueHere</e1:AccountLifeCycleStatus>
        <e1:TimeStamp i:nil="false">ValueHere</e1:TimeStamp>
        <e1:TimeZone i:nil="false">ValueHere</e1:TimeZone>
        <e1:PauseReason i:nil="false">ValueHere</e1:PauseReason>
        <e1:ForwardCompatibilityMap xmlns:e2="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e2:KeyValuePairOfstringstring>
            <e2:key i:nil="false">ValueHere</e2:key>
            <e2:value i:nil="false">ValueHere</e2:value>
          </e2:KeyValuePairOfstringstring>
        </e1:ForwardCompatibilityMap>
        <e1:LinkedAgencies i:nil="false">
          <e1:CustomerInfo>
            <e1:Id i:nil="false">ValueHere</e1:Id>
            <e1:Name i:nil="false">ValueHere</e1:Name>
          </e1:CustomerInfo>
        </e1:LinkedAgencies>
        <e1:SalesHouseCustomerId i:nil="false">ValueHere</e1:SalesHouseCustomerId>
        <e1:TaxInformation xmlns:e3="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e3:KeyValuePairOfstringstring>
            <e3:key i:nil="false">ValueHere</e3:key>
            <e3:value i:nil="false">ValueHere</e3:value>
          </e3:KeyValuePairOfstringstring>
        </e1:TaxInformation>
        <e1:BackUpPaymentInstrumentId i:nil="false">ValueHere</e1:BackUpPaymentInstrumentId>
        <e1:BillingThresholdAmount i:nil="false">ValueHere</e1:BillingThresholdAmount>
        <e1:BusinessAddress i:nil="false">
          <e1:City i:nil="false">ValueHere</e1:City>
          <e1:CountryCode i:nil="false">ValueHere</e1:CountryCode>
          <e1:Id i:nil="false">ValueHere</e1:Id>
          <e1:Line1 i:nil="false">ValueHere</e1:Line1>
          <e1:Line2 i:nil="false">ValueHere</e1:Line2>
          <e1:Line3 i:nil="false">ValueHere</e1:Line3>
          <e1:Line4 i:nil="false">ValueHere</e1:Line4>
          <e1:PostalCode i:nil="false">ValueHere</e1:PostalCode>
          <e1:StateOrProvince i:nil="false">ValueHere</e1:StateOrProvince>
          <e1:TimeStamp i:nil="false">ValueHere</e1:TimeStamp>
          <e1:BusinessName i:nil="false">ValueHere</e1:BusinessName>
        </e1:BusinessAddress>
        <e1:AutoTagType i:nil="false">ValueHere</e1:AutoTagType>
        <e1:SoldToPaymentInstrumentId i:nil="false">ValueHere</e1:SoldToPaymentInstrumentId>
        <e1:TaxCertificate i:nil="false">
          <e1:TaxCertificateBlobContainerName i:nil="false">ValueHere</e1:TaxCertificateBlobContainerName>
          <e1:TaxCertificates xmlns:e4="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e4:KeyValuePairOfstringbase64Binary>
              <e4:key i:nil="false">ValueHere</e4:key>
              <e4:value i:nil="false">ValueHere</e4:value>
            </e4:KeyValuePairOfstringbase64Binary>
          </e1:TaxCertificates>
          <e1:Status i:nil="false">ValueHere</e1:Status>
        </e1:TaxCertificate>
        <e1:AccountMode i:nil="false">ValueHere</e1:AccountMode>
      </Account>
    </AddAccountRequest>
  </s:Body>
</s:Envelope>

Response SOAP

เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดงลําดับขององค์ประกอบ เนื้อ ความและ ส่วนหัว สําหรับการตอบสนอง SOAP

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <AddAccountResponse xmlns="https://bingads.microsoft.com/Customer/v13">
      <AccountId>ValueHere</AccountId>
      <AccountNumber d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</AccountNumber>
      <CreateTime>ValueHere</CreateTime>
    </AddAccountResponse>
  </s:Body>
</s:Envelope>

ไวยากรณ์โค้ด

ไวยากรณ์ตัวอย่างสามารถใช้กับ Bing Ads SDKs ได้ ดู ตัวอย่างโค้ด API ของโฆษณา Bing สําหรับตัวอย่างเพิ่มเติม

public async Task<AddAccountResponse> AddAccountAsync(
	AdvertiserAccount account)
{
	var request = new AddAccountRequest
	{
		Account = account
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.AddAccountAsync(r), request));
}
static AddAccountResponse addAccount(
	AdvertiserAccount account) throws RemoteException, Exception
{
	AddAccountRequest request = new AddAccountRequest();

	request.setAccount(account);

	return CustomerManagementService.getService().addAccount(request);
}
static function AddAccount(
	$account)
{

	$GLOBALS['Proxy'] = $GLOBALS['CustomerManagementProxy'];

	$request = new AddAccountRequest();

	$request->Account = $account;

	return $GLOBALS['CustomerManagementProxy']->GetService()->AddAccount($request);
}
response=customermanagement_service.AddAccount(
	Account=Account)

ข้อกําหนด

บริการ: CustomerManagementService.svc v13
Namespace: https://bingads.microsoft.com/Customer/v13

URL การร้องขอ

https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13/Account

ร้องขอองค์ประกอบ

วัตถุ AddAccountRequest จะกําหนดองค์ประกอบ เนื้อความ และ ส่วนหัว ของการร้องขอการดําเนินการบริการ

หมายเหตุ

เว้นแต่ระบุไว้เป็นอย่างอื่นด้านล่าง จําเป็นต้องระบุองค์ประกอบคําขอทั้งหมด

ร้องขอองค์ประกอบเนื้อความ

ธาตุ คำอธิบาย ชนิดข้อมูล
บัญชี บัญชีที่คุณต้องการเพิ่มลงในลูกค้าที่มีอยู่

คุณต้องตั้งค่า ParentCustomerId ในวัตถุบัญชีผู้โฆษณา
AdvertiserAccount

องค์ประกอบส่วนหัวของคําขอ

ธาตุ คำอธิบาย ชนิดข้อมูล
การอนุญาต โทเค็นการเข้าถึง OAuth ที่แสดงข้อมูลประจําตัวของผู้ใช้ที่มีสิทธิ์เข้าถึงบัญชี Microsoft Advertising โปรดตรวจสอบให้แน่ใจว่าโทเค็นขึ้นต้นด้วย "Bearer " ซึ่งจําเป็นสําหรับการรับรองความถูกต้องที่เหมาะสม

สําหรับข้อมูลเพิ่มเติม ดูการรับรองความถูกต้องด้วย OAuth
เชือก
DeveloperToken โทเค็นนักพัฒนาที่ใช้เพื่อเข้าถึง Bing Ads API

สําหรับข้อมูลเพิ่มเติม ดูรับโทเค็นนักพัฒนา
เชือก
รหัสผ่าน องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ เชือก
ชื่อผู้ใช้ องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ เชือก

องค์ประกอบการตอบสนอง

วัตถุ AddAccountResponse จะกําหนดองค์ประกอบ เนื้อ ความและ ส่วนหัว ของการตอบสนองการดําเนินการบริการ องค์ประกอบจะถูกส่งกลับตามลําดับเดียวกับที่แสดงในการตอบสนอง JSON

องค์ประกอบเนื้อความการตอบสนอง

ธาตุ คำอธิบาย ชนิดข้อมูล
AccountId ตัวระบุบัญชีที่ระบบสร้างขึ้นซึ่งสอดคล้องกับบัญชีใหม่ที่ระบุไว้ในคําขอ

ใช้ตัวระบุนี้กับการร้องขอการดําเนินการที่จําเป็นต้องมีองค์ประกอบเนื้อความ AccountId และองค์ประกอบส่วนหัว CustomerAccountId SOAP
ยาว
หมายเลขบัญชี หมายเลขบัญชีที่ระบบสร้างขึ้นซึ่งใช้เพื่อระบุบัญชีในแอปพลิเคชันบนเว็บ Microsoft Advertising

หมายเลขบัญชีมีรูปแบบ xxxxxxxxx โดย ที่ xxxxxxxxx คือชุดของอักขระพยัญชนะผสมตัวเลขแปดตัว
เชือก
CreateTime วันที่และเวลาที่เพิ่มบัญชีผู้ใช้ ค่าวันที่และเวลาแสดงวันที่และเวลาที่เซิร์ฟเวอร์ ไม่ใช่ไคลเอ็นต์ สําหรับข้อมูลเกี่ยวกับรูปแบบของวันที่และเวลา ดูรายการ dateTime ในชนิดข้อมูล Primitive XML วันที่เวลา

องค์ประกอบส่วนหัวการตอบสนอง

ธาตุ คำอธิบาย ชนิดข้อมูล
TrackingId ตัวระบุของรายการบันทึกที่ประกอบด้วยรายละเอียดของการเรียกใช้ API เชือก

ร้องขอ JSON

เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดงองค์ประกอบ เนื้อความ และ ส่วนหัว สําหรับคําขอ JSON สําหรับชนิดที่สนับสนุนที่คุณสามารถใช้กับการดําเนินการบริการนี้ โปรดดูการอ้างอิง องค์ประกอบเนื้อความคําขอ ด้านบน

{
  "Account": {
    "AccountFinancialStatus": "ValueHere",
    "AccountLifeCycleStatus": "ValueHere",
    "AccountMode": "ValueHere",
    "AutoTagType": "ValueHere",
    "BackUpPaymentInstrumentId": "LongValueHere",
    "BillingThresholdAmount": DecimalValueHere,
    "BillToCustomerId": "LongValueHere",
    "BusinessAddress": {
      "BusinessName": "ValueHere",
      "City": "ValueHere",
      "CountryCode": "ValueHere",
      "Id": "LongValueHere",
      "Line1": "ValueHere",
      "Line2": "ValueHere",
      "Line3": "ValueHere",
      "Line4": "ValueHere",
      "PostalCode": "ValueHere",
      "StateOrProvince": "ValueHere",
      "TimeStamp": "ValueHere"
    },
    "CurrencyCode": "ValueHere",
    "ForwardCompatibilityMap": [
      {
        "key": "ValueHere",
        "value": "ValueHere"
      }
    ],
    "Id": "LongValueHere",
    "Language": "ValueHere",
    "LastModifiedByUserId": "LongValueHere",
    "LastModifiedTime": "ValueHere",
    "LinkedAgencies": [
      {
        "Id": "LongValueHere",
        "Name": "ValueHere"
      }
    ],
    "Name": "ValueHere",
    "Number": "ValueHere",
    "ParentCustomerId": "LongValueHere",
    "PauseReason": "ValueHere",
    "PaymentMethodId": "LongValueHere",
    "PaymentMethodType": "ValueHere",
    "PrimaryUserId": "LongValueHere",
    "SalesHouseCustomerId": "LongValueHere",
    "SoldToPaymentInstrumentId": "LongValueHere",
    "TaxCertificate": {
      "Status": "ValueHere",
      "TaxCertificateBlobContainerName": "ValueHere",
      "TaxCertificates": [
        {
          "key": "ValueHere",
          "value": "ValueHere"
        }
      ]
    },
    "TaxInformation": [
      {
        "key": "ValueHere",
        "value": "ValueHere"
      }
    ],
    "TimeStamp": "ValueHere",
    "TimeZone": "ValueHere"
  }
}

การตอบสนอง JSON

เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดงองค์ประกอบ เนื้อความ และ ส่วนหัว สําหรับการตอบสนอง JSON

{
  "AccountId": "LongValueHere",
  "AccountNumber": "ValueHere",
  "CreateTime": "ValueHere"
}

ไวยากรณ์โค้ด

หากต้องการเรียกใช้ REST API ผ่าน SDK คุณจําเป็นต้องอัปเกรด SDK เป็นเวอร์ชันเฉพาะและกําหนดค่าพารามิเตอร์ระบบ ไวยากรณ์ตัวอย่างสามารถใช้กับ Bing Ads SDKs ได้ ดู ตัวอย่างโค้ด API ของโฆษณา Bing สําหรับตัวอย่างเพิ่มเติม

public async Task<AddAccountResponse> AddAccountAsync(
	AdvertiserAccount account)
{
	var request = new AddAccountRequest
	{
		Account = account
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.AddAccountAsync(r), request));
}
static AddAccountResponse addAccount(
	AdvertiserAccount account) throws RemoteException, Exception
{
	AddAccountRequest request = new AddAccountRequest();

	request.setAccount(account);

	return CustomerManagementService.getService().addAccount(request);
}
static function AddAccount(
	$account)
{

	$GLOBALS['Proxy'] = $GLOBALS['CustomerManagementProxy'];

	$request = new AddAccountRequest();

	$request->Account = $account;

	return $GLOBALS['CustomerManagementProxy']->GetService()->AddAccount($request);
}
response=customermanagement_service.AddAccount(
	Account=Account)