I have a peculiar issue which may be a bug with the API.
I am setting 2 AdGroupExtensionSettings within one API call containing 2 operations.
The first ad group already contains ExtensionFeedItems.
The second ad group was previously empty, in this operation I am adding a new ExtensionFeedItem.
The second operation triggers an error [EntityNotFound.INVALID_ID @ operations[1].operand.extensionSetting.extensions[1].feedItemId; trigger:'FeedItemId{id=11747797807}']
However, 11747797807 does exist and is also in the first ad group!
The weird thing about this is, both ad groups were previously empty or populated this error doesn't occur. Only when one was empty and the other was not.
I am pasting the soap body and error response below:
<SOAP-ENV:Body>
<ns1:mutate>
<ns1:operations>
<ns1:operator>SET</ns1:operator>
<ns1:operand>
<ns1:adGroupId>40165941349</ns1:adGroupId>
<ns1:extensionType>CALLOUT</ns1:extensionType>
<ns1:extensionSetting>
<ns1:extensions xsi:type="ns1:CalloutFeedItem">
<ns1:feedItemId>10123934571</ns1:feedItemId>
</ns1:extensions>
<ns1:extensions xsi:type="ns1:CalloutFeedItem">
<ns1:feedItemId>11685414683</ns1:feedItemId>
</ns1:extensions>
<ns1:extensions xsi:type="ns1:CalloutFeedItem">
<ns1:feedItemId>11747797807</ns1:feedItemId>
</ns1:extensions>
<ns1:extensions xsi:type="ns1:CalloutFeedItem">
</ns1:extensions>
<ns1:platformRestrictions>NONE</ns1:platformRestrictions>
</ns1:extensionSetting>
</ns1:operand>
</ns1:operations>
<ns1:operations>
<ns1:operator>SET</ns1:operator>
<ns1:operand>
<ns1:adGroupId>40165941509</ns1:adGroupId>
<ns1:extensionType>SITELINK</ns1:extensionType>
<ns1:extensionSetting>
<ns1:extensions xsi:type="ns1:CalloutFeedItem">
<ns1:feedItemId>10161302851</ns1:feedItemId>
</ns1:extensions>
<ns1:extensions xsi:type="ns1:CalloutFeedItem">
<ns1:feedItemId>11747797807</ns1:feedItemId>
<ns1:feedType>CALLOUT</ns1:feedType>
</ns1:extensions>
<ns1:platformRestrictions>NONE</ns1:platformRestrictions>
</ns1:extensionSetting>
</ns1:operand>
</ns1:operations>
</ns1:mutate>
</SOAP-ENV:Body>
And the error response
<soap:Envelope
<soap:Header>
<ResponseHeader
<requestId>00054b7e39d25f200a62a0c52b0036ee</requestId>
<serviceName>AdGroupExtensionSettingService</serviceName>
<methodName>mutate</methodName>
<operations>8</operations>
<responseTime>159</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[EntityNotFound.INVALID_ID @ operations[1].operand.extensionSetting.extensions[1].feedItemId; trigger:'FeedItemId{id=11747797807}']</faultstring>
<detail>
<ApiExceptionFault
<message>[EntityNotFound.INVALID_ID @ operations[1].operand.extensionSetting.extensions[1].feedItemId; trigger:'FeedItemId{id=11747797807}']</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors
<fieldPath>operations[1].operand.extensionSetting.extensions[1].feedItemId</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>1</index>
</fieldPathElements>
<fieldPathElements>
<field>operand</field>
</fieldPathElements>
<fieldPathElements>
<field>extensionSetting</field>
</fieldPathElements>
<fieldPathElements>
<field>extensions</field>
<index>1</index>
</fieldPathElements>
<fieldPathElements>
<field>feedItemId</field>
</fieldPathElements>
<trigger>FeedItemId{id=11747797807}</trigger>
<errorString>EntityNotFound.INVALID_ID</errorString>
<ApiError.Type>EntityNotFound</ApiError.Type>
<reason>INVALID_ID</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>