Bing Ads SearchCoupons operation fails

Pedro Avila 1 Reputation point
2022-02-03T15:11:06.06+00:00

Hello !

I've been struggling with the SearchCoupons operation.
https://learn.microsoft.com/en-us/advertising/customer-billing-service/searchcoupons?view=bingads-13

I want to check if my clients (whose ads accountas are linked to my account) have used one of my coupons.

For that I use the SearchCoupons operation with my account acccess token ( I have no problem using this for other operations like SearchInsertionOrders, reporting, etc)

The problem is that when I use that operation I get the 1001 error code.

Here is the SOAP Response (I've removed sensible data)

<?xml version="1.0" encoding="UTF-8"?>  
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Billing/v13" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ins1="https://bingads.microsoft.com/Customer/v13/Entities" xmlns:ins2="https://adapi.microsoft.com" xmlns:ins3="https://bingads.microsoft.com/Customer/v13/Exception">  
  <env:Header>  
    <tns:AuthenticationToken><tns:AuthenticationToken>  
    <tns:CustomerAccountId></tns:CustomerAccountId>  
    <tns:CustomerId></tns:CustomerId>  
    <tns:DeveloperToken></tns:DeveloperToken>  
  </env:Header>  
  <env:Body>  
    <tns:SearchCouponsRequest>  
      <tns:Predicates>  
        <ins1:Predicate>  
          <ins1:Field>CustomerId</ins1:Field>  
          <ins1:Operator>Equals</ins1:Operator>  
          <ins1:Value></ins1:Value>  
        </ins1:Predicate>  
      </tns:Predicates>  
      <tns:Ordering>  
        <tns:Field>CouponStartDate</tns:Field>  
        <tns:Order>Descending</tns:Order>  
      </tns:Ordering>  
      <tns:PageInfo>  
        <ins1:Index>0</ins1:Index>  
        <ins1:Size>100</ins1:Size>  
      </tns:PageInfo>  
    </tns:SearchCouponsRequest>  
  </env:Body>  
</env:Envelope>  
  
HTTPI /peer POST request to clientcenter.api.bingads.microsoft.com (net_http)  
SOAP response (status 500)  
<?xml version="1.0"?>  
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">  
  <s:Body>  
    <s:Fault>  
      <faultcode>s:Server</faultcode>  
      <faultstring xml:lang="en-US">Invalid client data. Check the SOAP fault details for more information. TrackingId: 5622483c-665f-49b3-83fa-a83cedc636ac.</faultstring>  
      <detail>  
        <ApiFault xmlns="https://bingads.microsoft.com/Billing/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">5622483c-665f-49b3-83fa-a83cedc636ac</TrackingId>  
          <a:OperationErrors>  
            <a:OperationError>  
              <a:Code>1001</a:Code>  
              <a:Details/>  
              <a:Message>The user is not authorized to perform this action.</a:Message>  
            </a:OperationError>  
          </a:OperationErrors>  
        </ApiFault>  
      </detail>  
    </s:Fault>  
  </s:Body>  
</s:Envelope>  

Why is that happening? I can use the same access token for any other operation like SearchInsertionOrder.

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.
382 questions
0 comments No comments
{count} votes