The invocation code (ad tag) types the caller may generate for this placement, in the console's order - the values GET /rest-api/placements/{placementId}/invocation-code takes as type.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/placements/{placementId}/invocation-code-types.do
The invocation code (ad tag) types the caller may generate for this placement, in the console's order - the values GET /rest-api/placements/{placementId}/invocation-code takes as type. A type needs to apply to the placement's type and, where it has one, the caller's per-type invocation-code permission; AJAX and JS_MOUNT are offered only while the network has an AJAX invocation domain, as in the console. Requires VIEW access to the placement's site.
Path Params
placementIdintegerrequired
Placement ID
4001
Responses
200
{success, placementType, types:[..]}; types is empty when the role may generate none
400
Bad request — invalid or missing parameters
401
Authentication error
403
No VIEW access to the placement's site
404
Placement, its zone or its site not found or deleted
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/placements/4001/invocation-code-types.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());