Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions docs/_partials/planner-api/cross-screen.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import CopyUrl from '@site/src/components/CopyUrl';
import Caret from '@site/static/img/caret.svg'
import { creativeTypes } from '@site/src/data/enums/creativeTypes';
import { planObjectives } from '@site/src/data/enums/planObjectives';
import { splitTypes } from '@site/src/data/enums/splitTypes';
Expand Down Expand Up @@ -354,19 +355,9 @@ Computation time for this endpoint may take more than 60 seconds depending on th
| `audienceTypes` <br /><span class="type-text">array of integers</span> | [Audience type IDs](/guidelines/audience-api/#audience-type-list). <br /><EnumWidget values={audienceTypes} /> |
| `creatives` <br /><span class="type-text">array of integers</span> | [Creative type IDs](/guidelines/creative-api/#get-creative-types-list). <br /><EnumWidget values={creativeTypes} /> |

<details className="objectPropertiesDetails" style={{ maxWidth: "800px", padding: "1rem" }}>
<summary style={{ fontSize: "16px" }}>Response properties</summary>
<table className="objectProperties">
<tr>
<td>`id` <br /><span class="type-text">integer</span></td>
<td>[Proposal ID](#get-list-of-proposals).</td>
</tr>
<tr>
<td>`message` <br /><span class="type-text">string</span></td>
<td>Confirmation message.</td>
</tr>
</table>
</details>
Returns the updated proposal, in the same shape as [Get proposal details](#get-proposal-details).

<a href="#political-planner-resource-properties"><button className="responsePropertiesButton"><Caret />Proposal resource properties</button></a>

</div>
<div class="child2">
Expand All @@ -382,7 +373,17 @@ Computation time for this endpoint may take more than 60 seconds depending on th
"success": true,
"data": {
"id": 42,
"message": "Proposal updated successfully."
"name": "sample",
"startTime": 1730658720000,
"endTime": 1733250720000,
"owId": 202500,
"statusId": 1,
"reach": 122344433,
"impressions": 12232323,
"budget": 1212233.2323,
"frequencyCap": 3,
"campaignGeneratable": true,
"proposedCampaigns": []
}
}
```
Expand Down
1 change: 0 additions & 1 deletion docs/_partials/planner-api/hcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,6 @@ Delete one or more Healthcare proposal Planners by IDs.

| Query parameters | |
| ---- | --- |
| `proposalIds` <br /><span class="type-text">string</span> | Comma separated proposal IDs to delete. |
| `planIds` <br /><span class="type-text">string</span> | Comma separated plan IDs to delete. |

<details className="objectPropertiesDetails" style={{ maxWidth: "800px", padding: "1rem" }}>
Expand Down
4 changes: 4 additions & 0 deletions docs/_partials/planner-api/political.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,8 @@ Create a new ready or draft Political plan. A ready plan requires name, details,

A draft plan requires only a name; all other fields are optional but validated if present.

For a ready plan, the <var>targeting.creative</var>/<var>targeting.device</var> selection is sent to an external strategy-generation service, which computes viable strategies from real-time inventory/forecast data -- there is no fixed, enumerable list of valid creative/device combinations within this API itself. If no viable strategy exists for the given combination (even one where every individual ID is valid), the request is rejected with "No strategies meet your criteria. Edit the plan to explore more options." rather than a field-specific validation error.

See resource properties for request schema.

<a href="#political-planner-resource-properties"><button className="responsePropertiesButton"><Caret />Plan resource properties</button></a>
Expand Down Expand Up @@ -2316,6 +2318,8 @@ Estimate the reach for a Political plan based on optional CVA details and target

Generate custom strategies for an existing plan by calling the DSI API with the provided targeting and budget parameters. This endpoint persists the resulting strategies, proposals, and campaigns, then returns strategy summaries.

Each returned summary's <var>id</var> is the external strategy-generation service's own identifier for that strategy, not the real, persisted planner-api strategy ID -- passing this <var>id</var> directly to [Activate proposal](#activate-proposal)'s <var>strategyId</var> will fail with "Strategy with strategy id X does not exist." To get the real, usable strategy ID, call [Get list of strategies](#get-list-of-strategies) for this <var>planId</var> after this completes and use the <var>id</var> it returns instead.

| Request schema | |
| ---- | --- |
| `planId` <br /><span class="type-text">integer</span> | [Plan ID](#get-list-of-political-plans). |
Expand Down
77 changes: 62 additions & 15 deletions docs/guidelines/planner-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ Get summary of maximum reach and impressions for different targeting parameters
"success": false,
"errorObjects": [
{
"error": "Requested Proposal details is not accessible to logged-in user"
"error": "Requested proposal is not accessible for the user"
}
]
}
Expand All @@ -1181,8 +1181,7 @@ Get summary of maximum reach and impressions for different targeting parameters
"success": false,
"errorObjects": [
{
"error": "Proposal not found",
"field": "proposalId"
"error": "Requested proposal with id [id] does not exist"
}
]
}
Expand Down Expand Up @@ -1587,7 +1586,7 @@ Get summary of impressions distribution for different device types targeted in a
"success": false,
"errorObjects": [
{
"error": "Requested Proposal details is not accessible to logged-in user"
"error": "Requested proposal is not accessible for the user"
}
]
}
Expand All @@ -1598,8 +1597,7 @@ Get summary of impressions distribution for different device types targeted in a
"success": false,
"errorObjects": [
{
"error": "Proposal not found",
"field": "proposalId"
"error": "Requested proposal with id [id] does not exist"
}
]
}
Expand Down Expand Up @@ -2007,7 +2005,7 @@ Get summary of impressions distribution for different channel types targeted in
"success": false,
"errorObjects": [
{
"error": "Requested Proposal details is not accessible to logged-in user"
"error": "Requested proposal is not accessible for the user"
}
]
}
Expand All @@ -2018,8 +2016,7 @@ Get summary of impressions distribution for different channel types targeted in
"success": false,
"errorObjects": [
{
"error": "Proposal not found",
"field": "proposalId"
"error": "Requested proposal with id [id] does not exist"
}
]
}
Expand Down Expand Up @@ -2436,7 +2433,7 @@ Get summary of impressions distribution for different bid landscapes targeted in
"success": false,
"errorObjects": [
{
"error": "Requested Proposal details is not accessible to logged-in user"
"error": "Requested proposal is not accessible for the user"
}
]
}
Expand All @@ -2447,8 +2444,7 @@ Get summary of impressions distribution for different bid landscapes targeted in
"success": false,
"errorObjects": [
{
"error": "Proposal not found",
"field": "proposalId"
"error": "Requested proposal with id [id] does not exist"
}
]
}
Expand Down Expand Up @@ -3863,7 +3859,7 @@ Update draft proposal details.
<td>Unix epoch timestamp (in milliseconds) of end time. </td>
</tr>
<tr>
<td>`advertiserId` <br /><span class="type-text">integer</span></td>
<td>`politicalAdvertiserId` <br /><span class="type-text">integer</span></td>
<td>[Advertiser ID](/guidelines/workspace-api#get-list-of-advertiser-profile-and-details).</td>
</tr>
<tr>
Expand Down Expand Up @@ -4061,7 +4057,7 @@ Update draft proposal details.
"name": "sample_planner",
"startTime": 1730658720000,
"endTime": 1733250720000,
"advertiserId": 644,
"politicalAdvertiserId": 644,
"margin": 10,
"location": {
"country": 30100001,
Expand Down Expand Up @@ -4721,6 +4717,10 @@ function softDeleteProposal(): Promise<Responses> {

Get a list of proposal status IDs.

| Query parameters | |
| --- | --- |
| `plannerTypeId` <br /><span class="type-text">integer</span> | Planner type, default: <var>1</var> (Generic Planner). Pass <var>2</var> for HCP Planner statuses, which include <var>7</var> (IO Created) instead of <var>1</var> (Converted). |

<details className="objectPropertiesDetails" style={{ maxWidth: "800px", padding: "1rem" }}>
<summary style={{ fontSize: "16px" }}>Response properties</summary>
<table className="objectProperties">
Expand Down Expand Up @@ -4761,7 +4761,7 @@ Get a list of proposal status IDs.
<Tabs>
<TabItem value="JSON" label="JSON" default>

```json title="Response 200"
```json title="Response 200 (plannerTypeId=1, Generic Planner)"
{
"success": true,
"data": {
Expand Down Expand Up @@ -4809,6 +4809,48 @@ Get a list of proposal status IDs.
}
```

```json title="Response 200 (plannerTypeId=2, HCP Planner)"
{
"success": true,
"data": {
"totalRecords": 5,
"filteredRecords": 5,
"proposalStatusList": [
{
"id": 2,
"name": "draft",
"order": 1,
"label": "Draft"
},
{
"id": 6,
"name": "ready",
"order": 2,
"label": "Ready"
},
{
"id": 5,
"name": "processing",
"order": 4,
"label": "Processing"
},
{
"id": 4,
"name": "failed",
"order": 6,
"label": "Failed"
},
{
"id": 7,
"name": "io_created",
"order": 7,
"label": "IO Created"
}
]
}
}
```

</TabItem>
<TabItem value="TypeScript" label="TypeScript">

Expand Down Expand Up @@ -4848,6 +4890,11 @@ function ProposalStatusList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/plan/static/proposal/status',
params: {
query: {
plannerTypeId: `number`,
},
},
};

return axios.request(options).then(({ data }: { data: Responses }) => data);
Expand Down
5 changes: 4 additions & 1 deletion src/data/enums/proposalStatus.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import type { EnumValue } from '@site/src/components/EnumWidget';

// Source: "Proposal status list" response in planner-api.mdx
// Source: ProposalStatusEnum.java. id 7 (IO Created) is HCP-only - it's the
// terminal status HCPCampaignService sets on a successful publish, parallel to
// how Political/generic proposals terminate at id 1 (Converted) instead.
export const proposalStatus: EnumValue[] = [
{ id: 1, label: 'Converted' },
{ id: 2, label: 'Draft' },
{ id: 3, label: 'Expired' },
{ id: 4, label: 'Failed' },
{ id: 5, label: 'Processing' },
{ id: 6, label: 'Ready' },
{ id: 7, label: 'IO Created' },
];
Loading