Error creating a Microsoft ads account though the API

Rodrigo Munoz 0 Reputation points
2023-10-30T17:07:15.6366667+00:00

We have been experiencing an issue with the API while trying to create a new account for the past few weeks. The response we receive is always the same: "The Address.StateOrProvince property is invalid".

We have attempted to create accounts with different countries, addresses with and without StateOrProvince, and even with the ID instead of the string, but we were unsuccessful in our attempts to make it work.

Example of Request | Response:

REQUEST

  <env:Body>
    <tns:SignupCustomerRequest>
      <tns:Customer>
        <ins0:Industry>NA</ins0:Industry>
        <ins0:MarketCountry>ES</ins0:MarketCountry>
        <ins0:MarketLanguage>Spanish</ins0:MarketLanguage>
        <ins0:Name>Clever momo</ins0:Name>
      </tns:Customer>
      <tns:Account>
        <ins0:CurrencyCode>EUR</ins0:CurrencyCode>
        <ins0:Language>English</ins0:Language>
        <ins0:Name>Account 1</ins0:Name>
        <ins0:ParentCustomerId>168489787</ins0:ParentCustomerId>
        <ins0:BusinessAddress>
          <ins0:City>Madrid</ins0:City>
          <ins0:CountryCode>ES</ins0:CountryCode>
          <ins0:Line1>C/ San quintin</ins0:Line1>
          <ins0:Line2>10, bajo izq</ins0:Line2>
          <ins0:PostalCode>28013</ins0:PostalCode>
          <ins0:StateOrProvince>Madrid</ins0:StateOrProvince>
          <ins0:BusinessName>CleverPPC S.L.</ins0:BusinessName>
        </ins0:BusinessAddress>
      </tns:Account>
      <tns:UserInvitation>
        <ins0:FirstName>Rodrigo</ins0:FirstName>
        <ins0:LastName>Muñoz</ins0:LastName>
        <ins0:Email>rodrigomunoz@live.com</ins0:Email>
        <ins0:RoleId>203</ins0:RoleId>
        <ins0:Lcid>SpanishSpain</ins0:Lcid>
      </tns:UserInvitation>
      <tns:UserId xsi:nil="true"/>
      <tns:User xsi:nil="true"/>
    </tns:SignupCustomerRequest>
  </env:Body>
RESPONSE

  <s:Body>
    <s:Fault>
      <faultcode>s:Server</faultcode>
      <faultstring>Invalid client data. Check the SOAP fault details for more information. TrackingId: 47423ffc-d53a-44a9-b961-93b3763d9771.</faultstring>
      <detail>
        <ApiFault xmlns="https://bingads.microsoft.com/Customer/v13" xmlns:a="https://bingads.microsoft.com/Customer/v13/Exception" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <TrackingId xmlns="https://adapi.microsoft.com">47423ffc-d53a-44a9-b961-93b3763d9771</TrackingId>
          <a:OperationErrors>
            <a:OperationError>
              <a:Code>211</a:Code>
              <a:Details/>
              <a:Message>The Address.StateOrProvince property is invalid.</a:Message>
            </a:OperationError>
          </a:OperationErrors>
        </ApiFault>
      </detail>
    </s:Fault>
  </s:Body>

We have been using this service for some time now, but it started to fail in the last few weeks, so... we can only think that there is some kind of bug in the last deployment of the API

thanks for the support.

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
394 questions
0 comments No comments
{count} votes