Atualizar o perfil comercial jurídico do parceiroUpdate the partner legal business profile

Aplica-se aApplies To

  • Partner CenterPartner Center
  • Partner Center operado pela 21VianetPartner Center operated by 21Vianet
  • Partner Center do Microsoft Cloud GermanyPartner Center for Microsoft Cloud Germany
  • Partner Center do Microsoft Cloud for US GovernmentPartner Center for Microsoft Cloud for US Government

Como atualizar o perfil comercial legal do parceiro.How to update the partner legal business profile.

Pré-requisitosPrerequisites

C#C#

Para atualizar o perfil do parceiro comercial legal, primeiro, crie uma instância de um objeto LegalBusinessProfile.To update the partner legal business profile, first instantiate a LegalBusinessProfile object and populate it with the existing profile. Para obter mais informações, consulte obter o perfil comercial legal do parceiro.For more information, see Get the partner legal business profile. Em seguida, atualize as propriedades que você precisa alterar.Then, update the properties that you need to change. O exemplo de código a seguir ilustra como alterar o endereço e os números de telefone de contato principais.The following code example illustrates changing the address and primary contact phone numbers.

Em seguida, obtenha uma interface para a coleção de operações do perfil de parceiro da propriedade IAggregatePartner.Profiles.Next, get an interface to the partner profile operations collection from the IAggregatePartner.Profiles property. Depois, recupere o valor da propriedade LegalBusinessProfile para obter uma interface para operações de perfil de negócios legais.Then, retrieve the value of the LegalBusinessProfile property to get an interface to legal business profile operations. Por fim, chame o método Update ou UpdateAsync com o objeto Changed para atualizar o perfil.Finally, call the Update or UpdateAsync method with the changed object to update the profile.

// IAggregatePartner partnerOperations;

var legalBusinessProfile = partnerOperations.Profiles.LegalBusinessProfile.Get();

// Change the address and primary contact phone number.
legalBusinessProfile.Address.PhoneNumber = "4255550110";
legalBusinessProfile.PrimaryContact.PhoneNumber = "4255550110";

// Apply changes to the profile.
var updatedLegalBusinessProfile = partnerOperations.Profiles.LegalBusinessProfile.Update(legalBusinessProfile);

Solicitação RESTREST request

Sintaxe da solicitaçãoRequest syntax

MétodoMethod URI da solicitaçãoRequest URI
PUTPUT {baseURL}/v1/Profiles/legalbusiness http/1.1{baseURL}/v1/profiles/legalbusiness HTTP/1.1

Cabeçalhos de solicitaçãoRequest headers

Para obter mais informações, confira Cabeçalhos REST do Partner Center.For more information, see Partner Center REST headers.

Corpo da solicitaçãoRequest body

O recurso de perfil comercial legal.The legal business profile resource.

Exemplo de solicitaçãoRequest example

PUT https://api.partnercenter.microsoft.com/v1/profiles/legalbusiness HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 4549ac0c-0f1d-4d8f-b02f-6d36fadcccee
MS-CorrelationId: aa2a0d8c-7a41-470f-97ae-b82e6c338ee4
X-Locale: en-US
Content-Type: application/json
Host: api.partnercenter.microsoft.com
Content-Length: 806
Expect: 100-continue

{
    "CompanyName": "Lucerne Publishing",
    "Address": {
        "Country": "US",
        "Region": null,
        "City": "Redmond",
        "State": "WA",
        "AddressLine1": "123 Main Street",
        "AddressLine2": "",
        "PostalCode": "98052",
        "FirstName": "Gena",
        "LastName": "Soto",
        "PhoneNumber": "4255550110"
    },
    "PrimaryContact": {
        "FirstName": "Gena",
        "LastName": "Soto",
        "Email": "gena@lucernepublishing.com",
        "PhoneNumber": "4255550110"
    },
    "CompanyApproverAddress": {
        "Country": "US",
        "Region": null,
        "City": "Redmond",
        "State": "WA",
        "AddressLine1": "123 Main Street",
        "AddressLine2": "",
        "PostalCode": "98052",
        "FirstName": null,
        "LastName": null,
        "PhoneNumber": null
    },
    "CompanyApproverEmail": "gena@lucernepublishing.com",
    "VettingStatus": "authorized",
    "VettingSubStatus": "none",
    "Links": {
        "Self": {
            "Uri": "/profiles/legalbusiness",
            "Method": "GET",
            "Headers": []
        }
    },
    "Attributes": {
        "ObjectType": "LegalBusinessProfile"
    }
}

Resposta RESTREST response

Se for bem-sucedido, o corpo da resposta conterá o LegalBusinessProfile atualizadoIf successful, the response body contains the updated LegalBusinessProfile

Códigos de êxito e de erro de respostaResponse success and error codes

Cada resposta vem com um código de status HTTP que indica êxito ou falha e informações de depuração adicionais.Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use uma ferramenta de rastreamento de rede para ler esse código, o tipo de erro e os parâmetros adicionais.Use a network trace tool to read this code, error type, and additional parameters. Para obter a lista completa, consulte códigos de erro do Partner Center.For the full list, see Partner Center error codes.

Exemplo de respostaResponse example

HTTP/1.1 200 OK
Content-Length: 1157
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aa2a0d8c-7a41-470f-97ae-b82e6c338ee4
MS-RequestId: 4549ac0c-0f1d-4d8f-b02f-6d36fadcccee
MS-CV: KZLU42qJ4EObO75q.0
MS-ServerId: 030020643
Date: Tue, 21 Mar 2017 22:03:15 GMT

{
    "companyName": "Lucerne Publishing",
    "address": {
        "country": "US",
        "city": "Redmond",
        "state": "WA",
        "addressLine1": "123 Main Street",
        "addressLine2": "",
        "postalCode": "98052",
        "firstName": "Gena",
        "lastName": "Soto",
        "phoneNumber": "4255550110"
    },
    "primaryContact": {
        "firstName": "Gena",
        "lastName": "Soto",
        "email": "gena@lucernepublishing.com",
        "phoneNumber": "4255550110"
    },
    "companyApproverAddress": {
        "country": "US",
        "city": "Redmond",
        "state": "WA",
        "addressLine1": "123 Main Street",
        "addressLine2": "",
        "postalCode": "98052"
    },
    "companyApproverEmail": "gena@lucernepublishing.com",
    "vettingStatus": "authorized",
    "vettingSubStatus": "none",
    "profileType": "LegalBusinessProfile",
    "links": {
        "self": {
            "uri": "/profiles/legalbusiness",
            "method": "GET",
            "headers": []
        }
    },
    "attributes": {
        "objectType": "LegalBusinessProfile"
    }
}