Returns the placement's invocation code of the given type, with its default invocation-code parameters applied.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/placements/{placementId}/invocation-code.do
Returns the placement's invocation code of the given type, with its default invocation-code parameters applied. Unlike GET /rest-api/placement/{key}/code this is addressed by placement ID and checks access: it requires VIEW access to the placement's site and, for types that have one, the per-type invocation-code permission.
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/placements/4001/invocation-code.do?type=AJAX");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());