Skip to content

Modify actions for a line item

Request

Modifies the list of actions for a line item. The existing actions can be re-ordered, modified or omitted, and new actions can be added to the list. If an action is omitted, it will be completely removed and the current counts for a related allocation will be lost; therefore, care should be taken when making any changes.

Security
AdministrationAccess or ClientAccess
Path
instanceIdstring, (uuid)required

The UUID of the Dynamic Monetization instance.

lineItemIdstringrequired

Line item ID. Note: This is also known as the activation ID.

Bodyapplication/json
actionsArray of objects(Action)
curl -i -X PUT \
  'https://siteID.flexnetoperations.com/dynamicmonetization/api/v1.1/instances/{instanceId}/line-items/{lineItemId}/actions' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "actions": [
      {
        "name": "string",
        "conditionId": "1e06e0eb-07f6-4fcd-8750-870cbafd1693",
        "action": "ALLOW",
        "allocation": 1000
      }
    ]
  }'

Responses

The replacement list of actions that has been saved.

Bodyapplication/json
Array [
idstring, (uuid)read-only

A generated identifier to uniquely identify the action.

namestring

A human readable name to help a user identify the action. The same name may be re-used in other line items.

conditionIdstring, (uuid)

The unique identifier of the condition that triggers this action.

Required, unless defining a default action. Only one default action may be defined per line item.

actionstringrequired

The action to take when the condition is met.

Enum:"ALLOW""DENY"
allocationnumber, (number)

The maximum number of tokens that may be consumed from the stated line item by requests satisfying the condition.

Required for ALLOW, but may be omitted at most once per line item to create a default ALLOW action. Not used for DENY.

Example:1000
usednumber, (double)read-only

The total count that has been consumed from the allocation by access requests.

This field is only present for actions which have an allocation.

]
Response
[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "conditionId": "1e06e0eb-07f6-4fcd-8750-870cbafd1693", "action": "ALLOW", "allocation": 1000, "used": 0.1 } ]