Delete Line Item
Remove a line item from an existing campaign that has not served impressions
Remove a line item from an existing campaign. A line item can only be deleted if it has not served any impressions.
Endpoint
DELETE
https://lifeapi.pulsepoint.com/RestApi/v2/account/{accountId}/lineItems/{lineItemId}
Path Parameters
| Name | Data Type | Required | Notes |
|---|---|---|---|
| accountId | integer | yes | The account ID the line item belongs to |
| lineItemId | integer | yes | The unique identifier of the line item to delete |
Request Body
| Name | Data Type | Required | Notes |
|---|---|---|---|
| campaignId | integer | yes | The ID of the campaign the line item belongs to |
Response Field List
| Name | Data Type | Notes |
|---|---|---|
| success | boolean | Returns true on successful deletion |
| message | string | Confirmation message describing the deletion |
| data | object | Contains details about the deleted line item and its impact |
| data.campaignId | integer | The ID of the campaign the line item belonged to |
| data.deletedLineItem | object | Details about the line item that was deleted |
| data.deletedLineItem.id | string | The ID of the deleted line item |
| data.deletedLineItem.name | string | The name of the deleted line item |
| data.deletedLineItem.deletedAt | string | Timestamp of when the deletion occurred. Format: YYYY-MM-DD HH:mm:ss |
| data.impact | object | Summary of cascading deletions resulting from the line item deletion |
| data.impact.flightsRemoved | integer | Number of flights removed as a result of the deletion |
| data.impact.customFieldsRemoved | integer | Number of custom fields removed as a result of the deletion |
Example Response
{
"success": true,
"message": "Line item li_789012345 has been successfully deleted",
"data": {
"campaignId": 281902,
"deletedLineItem": {
"id": "li_789012345",
"name": "Q2 Display Targeting",
"deletedAt": "2025-09-10 17:30:00"
},
"impact": {
"flightsRemoved": 2,
"customFieldsRemoved": 2
}
}
}Errors
| HTTP Status | Error | Description |
|---|---|---|
| 403 | Forbidden | You do not have permission to delete line item {lineItemId} |
| 404 | Not Found | Line item with ID {lineItemId} does not exist |
| 409 | Conflict | Line item has served impressions and cannot be deleted |
Updated about 1 month ago
