Kuruluş profili güncelleştirme
Uygulama hedefi: Iş Ortağı Merkezi | 21Vianet tarafından işletilen iş ortağı Merkezi | Microsoft Bulut Almanya için iş ortağı Merkezi | Microsoft Cloud for US Government için iş ortağı Merkezi
Bir ortağın faturalandırma profilini güncelleştirir.
Önkoşullar
- Iş ortağı merkezi kimlik doğrulamasındaaçıklandığı gibi kimlik bilgileri. Bu senaryo yalnızca uygulama + kullanıcı kimlik bilgileriyle kimlik doğrulamayı destekler.
C#
Kuruluş profilinizi güncelleştirmek için, profili alın ve gerekli değişiklikleri yapın. Ardından, ıaggregatepartner. Profiles koleksiyonunuzu kullanın ve OrganizationProfile özelliğini çağırın. Son olarak Update () yöntemini çağırın.
// IAggregatePartner partnerOperations;
OrganizationProfile organizationProfile = partnerOperations.Profiles.OrganizationProfile.Get();
// Generating a random phone number to update in the organization profile
organizationProfile.DefaultAddress.PhoneNumber = ((long)(new Random().NextDouble() * 9000000000) + 1000000000).ToString(CultureInfo.InvariantCulture);
OrganizationProfile updatedOrganizationProfile = partnerOperations.Profiles.OrganizationProfile.Update(organizationProfile);
Örnek: konsol test uygulaması. Project: partnercentersdk. featuressamples sınıfı: updateorganizationprofile. cs
REST isteği
İstek sözdizimi
| Yöntem | İstek URI'si |
|---|---|
| PUT | {BaseUrl}/v1/Profiles/kuruluş http/1.1 |
İstek üst bilgileri
Daha fazla bilgi için bkz. Iş ortağı MERKEZI Rest üstbilgileri.
İstek gövdesi
Yok.
İstek örneği
PUT https://api.partnercenter.microsoft.com/v1/profiles/organization HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: fe76387b-9658-47d7-939d-0c70032ef589
MS-CorrelationId: cb9f3209-d020-4bf9-871c-e1f1c75348f8
Content-Length: 624
Expect: 100-continue
{
"id":<id>,
"companyName":"TEST_TEST_BugBash1",
"defaultAddress":{
"country":"US",
"city":"Redmond",
"state":"WA",
"addressLine1":"Two Microsoft Way",
"addressLine2":"",
"postalCode":"98052",
"firstName":"Test",
"lastName":"Account",
"phoneNumber":""
},
"tenantId":<tenantID>,
"domain":"testtestbugbash1.onmicrosoft.com",
"email":"test-partner@microsoft.com",
"language":"es",
"culture":"es-US",
"links":{
"self":{
"uri":"/profiles/organization",
"method":"GET",
"headers":[]
}
},
"attributes":{
"etag":<etag>,
"objectType":"OrganizationProfile"
}
}
REST yanıtı
Başarılı olursa, bu yöntem yanıt gövdesinde bir OrganizationProfile nesnesi döndürür.
Yanıt başarısı ve hata kodları
Her yanıt başarı veya başarısızlık ve ek hata ayıklama bilgilerini gösteren bir HTTP durum kodu ile gelir. Bu kodu, hata türünü ve ek parametreleri okumak için bir ağ izleme aracı kullanın. Tam liste için bkz. hata kodları.
Yanıt örneği
HTTP/1.1 200 OK
Content-Length: 648
Content-Type: application/json; charset=utf-8
MS-CorrelationId: cb9f3209-d020-4bf9-871c-e1f1c75348f8
MS-RequestId: fe76387b-9658-47d7-939d-0c70032ef589
Date: Mon, 21 Mar 2016 05:48:41 GMT
{
"id":<id>,
"companyName":"TEST_TEST_BugBash1",
"defaultAddress":{
"country":"US",
"city":"Redmond",
"state":"WA",
"addressLine1":"Two Microsoft Way",
"addressLine2":"",
"postalCode":"98052",
"firstName":"Test",
"lastName":"Account",
"phoneNumber":""
},
"tenantId":<tenantID>,
"domain":"testtestbugbash1.onmicrosoft.com",
"email":"test-partner@microsoft.com",
"language":"es",
"culture":"es-US",
"profileType":"OrganizationProfile",
"links":{
"self":{
"uri":"/profiles/organization",
"method":"GET",
"headers":[]
}
},
"attributes":{
"etag":<etag>,
"objectType":"OrganizationProfile"
}
}