Adapt a v3-style package request for a v2 server.
Converts creative_assignments to creative_ids (dropping weight and placement_ids).
Strips v3-only package fields (optimization_goals, catalogs).
When ctx is provided and the input has no buyer_ref, derives one as
package.idempotency_key || ${ctx.parentBuyerRef}-${ctx.index} so v2.5
package-request validation passes. Caller-supplied buyer_ref always wins.
Adapt a v3-style package request for a v2 server. Converts creative_assignments to creative_ids (dropping weight and placement_ids). Strips v3-only package fields (optimization_goals, catalogs).
When
ctxis provided and the input has nobuyer_ref, derives one aspackage.idempotency_key || ${ctx.parentBuyerRef}-${ctx.index}so v2.5 package-request validation passes. Caller-suppliedbuyer_refalways wins.