In the GAM background, create a Line Item. If the Line Item Type selects Ad Exchange (12), some required fields can be left unfilled, such as costPerUnit. But I use the api to create, and costPerUnit must be passed.
My request parameters:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="
https://www.google.com/apis/ads/publisher/v202508">
<SOAP-ENV:Header>
<ns1:RequestHeader>
<ns1:networkCode>**</ns1:networkCode>
<ns1:applicationName>**</ns1:applicationName>
</ns1:RequestHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:createLineItems>
<ns1:lineItems>
<ns1:orderId>***</ns1:orderId>
<ns1:name>ApiTest-LineItem</ns1:name>
<ns1:startDateTimeType>IMMEDIATELY</ns1:startDateTimeType>
<ns1:unlimitedEndDateTime>1</ns1:unlimitedEndDateTime>
<ns1:creativeRotationType>EVEN</ns1:creativeRotationType>
<ns1:frequencyCaps>
<ns1:maxImpressions>1</ns1:maxImpressions>
<ns1:numTimeUnits>1</ns1:numTimeUnits>
<ns1:timeUnit>MINUTE</ns1:timeUnit>
</ns1:frequencyCaps>
<ns1:lineItemType>AD_EXCHANGE</ns1:lineItemType>
<ns1:environmentType>BROWSER</ns1:environmentType>
<ns1:webPropertyCode>**</ns1:webPropertyCode>
<ns1:targeting>
<ns1:inventoryTargeting>
<ns1:targetedAdUnits>
<ns1:adUnitId>**</ns1:adUnitId>
<ns1:includeDescendants>true</ns1:includeDescendants>
</ns1:targetedAdUnits>
</ns1:inventoryTargeting>
</ns1:targeting>
</ns1:lineItems>
</ns1:createLineItems>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failed: requestId: b141617bf1223cf60fbd589921945897, status: 500, faultcode: soap:Server, faultstring: [NotNullError.NULL @ costPerUnit]