Create policy
Creates a new policy from scratch.
Permissions
Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:
| Product | Category | Resource |
|---|---|---|
| Promotions Policy Engine | Policies | Create or Update Policy |
There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see Authentication overview.
❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.
Path parameters
Policy ID.
Headers
Type of the content being sent.
HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
Request body
Example request
{
"name": "id",
"description": "TesteMarcosPromotionsAlert",
"status": "active",
"statements": [
{
"effect": "Allow",
"actions": [
{
"id": "SendSlackMessage"
}
],
"resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert",
"condition": {
"operation": "None",
"conditions": [
{
"conditions": [
"None"
],
"operation": "None",
"key": "skuId",
"values": [
"40.00"
]
}
]
}
}
]
}Response
OK
Changes
Changed in 7 of the 51 revisions of this API.84750
- ●
removed the request property
statements/items/operationrequest-property-removed
- ●
removed the optional property
items/statements/items/operationfrom the response with the200statusresponse-optional-property-removed
- ○
added the new optional request property
statements/items/condition/operationnew-optional-request-property
- ○
added the new optional request property
statusnew-optional-request-property
- ○
added the optional property
items/statements/items/condition/operationto the response with the200statusresponse-optional-property-added
- ●
- ▲
the
statements/items/condition/conditions/items/request property type/format changed from/toobject/request-property-type-changed
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
the
effectrequest property default valueAllowwas removedrequest-property-default-value-removed
- ○
the
effectresponse's property default valueAllowwas removed for the status200response-property-default-value-removed
- ○
- ▲
removed the enum value
numericGreaterThanof the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-removed
- ▲
removed the enum value
stringEqualsof the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-removed
- ●
added the new
numericGreaterThanenum value to theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-added
- ●
added the new
stringEqualsenum value to theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-added
- ○
added the new
numericGreaterThanenum value to the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-added
- ○
added the new
stringEqualsenum value to the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-added
- ○
removed the
numericGreaterThanenum value from theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-removed
- ○
removed the
stringEqualsenum value from theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-removed
- ▲
- ●
removed the request property
statements/items/actions/idrequest-property-removed
- ●
removed the request property
statements/items/actions/metadatarequest-property-removed
- ●
removed the optional property
items/statements/items/actions/idfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
items/statements/items/actions/metadatafrom the response with the200statusresponse-optional-property-removed
- ●
- ▲
request property
statements/items/actions/idwas restricted to a list of enum valuesrequest-property-became-enum
- ▲
request property
statements/items/condition/conditions/items/conditionswas restricted to a list of enum valuesrequest-property-became-enum
- ▲
request property
statements/items/condition/conditions/items/keywas restricted to a list of enum valuesrequest-property-became-enum
- ▲
request property
statements/items/condition/conditions/items/operationwas restricted to a list of enum valuesrequest-property-became-enum
- ▲
request property
statements/items/operationwas restricted to a list of enum valuesrequest-property-became-enum
- ●
added the new
enum value to theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-added
- ●
added the new
DeactivatePromotionsenum value to theitems/statements/items/actions/idresponse property for the response status200response-property-enum-value-added
- ●
added the new
Noneenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
Noneenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
SendEmailenum value to theitems/statements/items/actions/idresponse property for the response status200response-property-enum-value-added
- ●
added the new
SendSlackMessageenum value to theitems/statements/items/actions/idresponse property for the response status200response-property-enum-value-added
- ●
added the new
andenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
andenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
betweenenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
betweenenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
boolenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
boolenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
brandIdenum value to theitems/statements/items/condition/conditions/items/keyresponse property for the response status200response-property-enum-value-added
- ●
added the new
dateTimeUtcGreaterThanenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
dateTimeUtcGreaterThanenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
dateTimeUtcLessThanenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
dateTimeUtcLessThanenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
discountPercentageenum value to theitems/statements/items/condition/conditions/items/keyresponse property for the response status200response-property-enum-value-added
- ●
added the new
notenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
notenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericEqualsenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericEqualsenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericGreaterThanenum value to theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericGreaterThanenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericGreaterThanenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericGreaterThanEqualsenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericGreaterThanEqualsenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericLessThanenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericLessThanenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericLessThanEqualsenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
numericLessThanEqualsenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
orenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
orenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
skuIdenum value to theitems/statements/items/condition/conditions/items/keyresponse property for the response status200response-property-enum-value-added
- ●
added the new
stringEqualsenum value to theitems/statements/items/condition/conditions/items/conditionsresponse property for the response status200response-property-enum-value-added
- ●
added the new
stringEqualsenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
stringEqualsenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
stringEqualsIgnoreCaseenum value to theitems/statements/items/condition/conditions/items/operationresponse property for the response status200response-property-enum-value-added
- ●
added the new
stringEqualsIgnoreCaseenum value to theitems/statements/items/operationresponse property for the response status200response-property-enum-value-added
- ○
added the new
enum value to the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-added
- ○
added the new
DeactivatePromotionsenum value to the request propertystatements/items/actions/idrequest-property-enum-value-added
- ○
added the new
Noneenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
Noneenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
SendEmailenum value to the request propertystatements/items/actions/idrequest-property-enum-value-added
- ○
added the new
SendSlackMessageenum value to the request propertystatements/items/actions/idrequest-property-enum-value-added
- ○
added the new
andenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
andenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
betweenenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
betweenenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
boolenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
boolenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
brandIdenum value to the request propertystatements/items/condition/conditions/items/keyrequest-property-enum-value-added
- ○
added the new
dateTimeUtcGreaterThanenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
dateTimeUtcGreaterThanenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
dateTimeUtcLessThanenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
dateTimeUtcLessThanenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
discountPercentageenum value to the request propertystatements/items/condition/conditions/items/keyrequest-property-enum-value-added
- ○
added the new
notenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
notenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
numericEqualsenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
numericEqualsenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
numericGreaterThanenum value to the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-added
- ○
added the new
numericGreaterThanenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
numericGreaterThanenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
numericGreaterThanEqualsenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
numericGreaterThanEqualsenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
numericLessThanenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
numericLessThanenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
numericLessThanEqualsenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
numericLessThanEqualsenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
orenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
orenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
skuIdenum value to the request propertystatements/items/condition/conditions/items/keyrequest-property-enum-value-added
- ○
added the new
stringEqualsenum value to the request propertystatements/items/condition/conditions/items/conditionsrequest-property-enum-value-added
- ○
added the new
stringEqualsenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
stringEqualsenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ○
added the new
stringEqualsIgnoreCaseenum value to the request propertystatements/items/condition/conditions/items/operationrequest-property-enum-value-added
- ○
added the new
stringEqualsIgnoreCaseenum value to the request propertystatements/items/operationrequest-property-enum-value-added
- ▲
- ○
request property
statements/items/effectdeprecatedrequest-property-deprecated
- ○
response property
items/statements/items/effectdeprecatedresponse-property-deprecated
- ○