VTEX · Example Payload

Vtex Policy Createorupdate Example

CommerceE-CommerceRetailMarketplacePayments

Vtex Policy Createorupdate Example is an example object payload from VTEX, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummaryrequestExamplesresponseExamples

Example Payload

Raw ↑
{
  "operationId": "Policy_CreateOrUpdate",
  "method": "POST",
  "path": "/api/policy-engine/policies/{id}",
  "summary": "VTex Create policy",
  "requestExamples": [],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/octet-stream",
      "example": [
        {
          "id": "pa_test_001",
          "name": "TestAlarmBerenice",
          "description": "TesteMarcosPromotionsAlert",
          "statements": [
            {
              "effect": "Allow",
              "actions": [
                {
                  "id": "SendSlackMessage",
                  "metadata": {
                    "channel": "C01NJFF35R6",
                    "relatedUsers": [
                      "URUNDC2NB"
                    ],
                    "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%."
                  }
                }
              ],
              "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert",
              "condition": {
                "conditions": [
                  {
                    "conditions": [],
                    "operation": "stringEquals",
                    "key": "brandId",
                    "values": [
                      "2000001"
                    ]
                  },
                  {
                    "conditions": [],
                    "operation": "numericGreaterThan",
                    "key": "discountPercentage",
                    "values": [
                      "70.00"
                    ]
                  }
                ],
                "operation": "and"
              }
            }
          ]
        }
      ]
    }
  ]
}