Update the partner billing profile
Applies to: Partner Center | Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government
Updates a partner's billing profile
Prerequisites
- Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
C#
To update a partner billing profile, retrieve the existing profile. Once you've updated the profile, use your IAggregatePartner.Profiles collection and call the BillingProfile property. Finally, call the Update() method.
// IAggregatePartner partnerOperations;
BillingProfile existingBillingProfile = partnerOperations.Profiles.BillingProfile.Get();
// update the profile with a purchase order number
existingBillingProfile.PurchaseOrderNumber = new Random().Next(9000, 10000).ToString(CultureInfo.InvariantCulture);
BillingProfile updatedPartnerBillingProfile = partnerOperations.Profiles.BillingProfile.Update(existingBillingProfile);
Sample: Console test app. Project: Partner Center SDK Samples Class: UpdateBillingProfile.cs
REST request
Request syntax
Method | Request URI |
---|---|
PUT | {baseURL}/v1/profiles/billing HTTP/1.1 |
Request headers
For more information, see Partner Center REST headers.
Request body
None.
Request example
PUT https://api.partnercenter.microsoft.com/v1/profiles/billing HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 9231559e-ed95-41e4-810b-e754ae32dc2f
MS-CorrelationId: cb9f3209-d020-4bf9-871c-e1f1c75348f8
Content-Length: 613
Expect: 100-continue
{
"CompanyName":"TEST_TEST_BugBash1",
"Address":{
"Country":"US",
"Region":null,
"City":"Redmond",
"State":"WA",
"AddressLine1":"1 Microsoft Way",
"AddressLine2":"","PostalCode":"98052",
"FirstName":null,
"LastName":null,
"PhoneNumber":null
},
"PrimaryContact":{
"FirstName":"Test",
"LastName":"Customer",
"Email":null,
"PhoneNumber":""
},
"PurchaseOrderNumber":"9888",
"TaxId":<TaxId>,
"BillingCurrency":"USD",
"Links":{
"Self":{
"Uri":"/profiles/billing",
"Method":"GET","Headers":[]
}
},
"Attributes":{
"Etag":<etag>,
"ObjectType":"BillingProfile"
}
}
REST response
If successful, this method returns a BillingProfile object in the response body.
Response success and error codes
Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Error Codes.
Response example
HTTP/1.1 200 OK
Content-Length: 568
Content-Type: application/json; charset=utf-8
MS-CorrelationId: cb9f3209-d020-4bf9-871c-e1f1c75348f8
MS-RequestId: 9231559e-ed95-41e4-810b-e754ae32dc2f
Date: Mon, 21 Mar 2016 05:47:16 GMT
{
"CompanyName":"TEST_TEST_BugBash1",
"Address":{
"Country":"US",
"Region":null,
"City":"Redmond",
"State":"WA",
"AddressLine1":"1 Microsoft Way",
"AddressLine2":"","PostalCode":"98052",
"FirstName":null,
"LastName":null,
"PhoneNumber":null
},
"PrimaryContact":{
"FirstName":"Test",
"LastName":"Customer",
"Email":null,
"PhoneNumber":""
},
"PurchaseOrderNumber":"9888",
"TaxId":<TaxId>,
"BillingCurrency":"USD",
"Links":{
"Self":{
"Uri":"/profiles/billing",
"Method":"GET","Headers":[]
}
},
"Attributes":{
"Etag":<etag>,
"ObjectType":"BillingProfile"
}
}
प्रतिक्रिया
https://aka.ms/ContentUserFeedback.
जल्द आ रहा है: 2024 के दौरान हम सामग्री के लिए फीडबैक तंत्र के रूप में GitHub मुद्दों को चरणबद्ध तरीके से समाप्त कर देंगे और इसे एक नई फीडबैक प्रणाली से बदल देंगे. अधिक जानकारी के लिए, देखें:के लिए प्रतिक्रिया सबमिट करें और देखें