Destek 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

Kullanıcının destek profilini güncelleştirir.

Önkoşullar

C#

Destek profilinizi güncelleştirmek için öncelikle destek profilinizi alın ve istediğiniz değişiklikleri yapın. Ardından, ıpartneroperations. Profiles koleksiyonunuzu kullanın. Supportprofile özelliğini çağırın, ardından Update () veya UpdateAsync () yöntemi.

// IAggregatePartner partnerOperations;

// updated profile
SupportProfile newSupportProfile = new SupportProfile
{
   Email = supportProfile.Email,
   Website = supportProfile.Website,
   Telephone = new Random().Next(10000000, 99999999).ToString(CultureInfo.InvariantCulture)
};

SupportProfile updatedSupportProfile = partnerOperations.Profiles.SupportProfile.Update(newSupportProfile);

Örnek: konsol test uygulaması. Project: partnercentersdk. featuressamples sınıfı: updatesupportprofile. cs

REST isteği

İstek sözdizimi

Yöntem İstek URI'si
PUT {BaseUrl}/v1/Profiles/supportprofile http/1.1

İstek üst bilgileri

Daha fazla bilgi için bkz. Iş ortağı MERKEZI Rest üstbilgileri.

İstek gövdesi

Tam destek profili kaynağı.

İstek örneği

PUT https://api.partnercenter.microsoft.com/v1/profiles/supportprofile HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 603f3cd9-01b8-48f2-b65d-855a246f5bfd
MS-CorrelationId: 20604323-50bf-4738-9968-c5486ab32be0
Content-Type: application/json
Content-Length: 167
Expect: 100-continue

{
    "Email": "email@sample.com",
    "Telephone": "4255555555",
    "Website": "www.microsoft.com",
    "ProfileType": "support_profile",
    "Attributes": {
        "ObjectType": "PartnerSupportProfile"
    }
}

REST yanıtı

Başarılı olursa, bu yöntem yanıt gövdesinde güncelleştirilmiş supportprofile nesne özellikleri 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: 502
Content-Type: application/json
MS-CorrelationId: 20604323-50bf-4738-9968-c5486ab32be0
MS-RequestId: 603f3cd9-01b8-48f2-b65d-855a246f5bfd
Date: Wed, 25 Nov 2015 07:16:18 GMT

{
    "email": "email@sample.com",
    "telephone": "4255555555",
    "website": "www.microsoft.com",
    "profileType": "support_profile",
    "links": {
        "self": {
            "uri": "/v1/profiles/support",
            "method": "GET",
            "headers": []
        }
    },
    "attributes": {
        "objectType": "PartnerSupportProfile"
    }
}