help center

| Submit or View Help Requests | Developer Docs |
|

Modify or Reverese One or More Items in an Action via API

Modify one or more items in an action via API

If you're tracking at the item level (i.e., passing item data when reporting conversions), you can use the API to modify the quantity or reported revenue amount of item(s) within an action.

To modify items in an action, you'll need:

  • The ActionId of the action.

  • The Reason for updating the action (when modifying items in action, always submit ORDER_UPDATE).

  • The Sku of the item(s) to be modified (can be found when retrieving an action via API).

  • The new Quantity value for the item.

  • The new revenue Amount value for the item — only include this in the call if this value is changing (e.g., the reported item revenue amount was reported incorrectly).

Once you have all of these values, use the call below to modify an item within an action.

Example calls

New item quantity
curl 'https://api.impact.com/Advertisers/{AccountSID}/Actions' \
  -X PUT \
  -u '{AccountSID}:{AuthToken}' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'ActionId={ActionId}' \
  -d 'Sku={Sku}' \
  -d 'Quantity={Quantity}' \
  -d 'Reason=ORDER_UPDATE' \
New item revenue amount
  curl 'https://api.impact.com/Advertisers/{AccountSID}/Actions' \
    -X PUT \
    -u '{AccountSID}:{AuthToken}' \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'ActionId={ActionId}' \
    -d 'Sku={Sku}' \
    -d 'Amount={Amount}' \
    -d 'Reason=ORDER_UPDATE' \
  
Parameter reference

AccountId

Your impact.com account's API account ID value. Learn how to find this value.

AuthToken

Your impact.com account's API authorization token value. Learn how to find this value.

ActionId

The ID value of the action to be modified.

Sku

The stock-keeping unit value of the item — this can be found when retrieving an action via API.

Quantity

The new quantity value for the item.

Reason

When reversing or modifying an item, always submit ORDER_UPDATE as the reason.

Amount

The new revenue amount value for the item.

Example response

{
  "Status": "QUEUED",
  "QueuedUri": "/Advertisers/{AccountSID}/APISubmissions/A-86b9-56992f50eefe"
}

Reverse one or more items in an action via API

If you're tracking at the item-level (i.e., passing item data when reporting conversions), you can use the API to reverse one or more item by setting Quantity to 0.

To reverse items in an action, you'll need:

  • The ActionId of the action.

  • The Reason for updating the action (when reversing items in action, always submit ORDER_UPDATE).

  • The Sku of the item(s) to be reversed (can be found when retrieving an action via API).

  • The new Quantity value for the item — in this case, 0

Once you have all of these values, use the call below to reverse items in an action.

Example call

curl 'https://api.impact.com/Advertisers/{AccountSID}/Actions' \
  -X PUT \
  -u '{AccountSID}:{AuthToken}' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'ActionId={ActionId}' \
  -d 'Sku={Sku}' \
  -d 'Quantity=0' \
  -d 'Reason=ORDER_UPDATE'
Parameter reference

AccountId

Your impact.com account's API account ID value. Learn how to find this value.

AuthToken

Your impact.com account's API authorization token value. Learn how to find this value.

ActionId

The ID value of the action to be modified.

Sku

The stock-keeping unit value of the item — this can be found when retrieving an action via API.

Quantity

The new quantity value for the item.

Reason

When reversing or modifying an item, always submit ORDER_UPDATE as the reason.

Example response

{
  "Status": "QUEUED",
  "QueuedUri": "/Advertisers/{AccountSID}/APISubmissions/A-86b9-56992f50eefe"
}  

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.