Campaign Audiences

Create campaign audience

Creates a new campaign audience.

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:

ProductCategoryResource
Rates and BenefitsManage benefits and ratesGerenciarPromocoesETarifas

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.

post/api/rnb/pvt/campaignConfiguration

Headers

Content-Typestring required

Describes the type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

beginDateUtcstring

Start date of the campaign audience in UTC format.

endDateUtcstring

End date of the campaign audience in UTC format.

idstring

Campaign audience ID.

namestring

Campaign audience name.

isActiveboolean

Defines if the campaign audience is active (true) or not (false).

isAndOperatorboolean

When true, determines that all the targetConfigurations need to be valid for the campaign audience to be active. When false, determines that if at least one of the targetConfigurations is valid, the campaign audience will be active.

isArchivedboolean

Defines if the campaign audience is archived (true) or not (false).

Example request

{
  "beginDateUtc": "2020-05-01T21:30:00Z",
  "endDateUtc": "2020-05-02T01:30:00Z",
  "id": "dd270d06-1ed1-47fc-b04e-a2431121b5a4",
  "name": "Interna",
  "isActive": true,
  "isAndOperator": true,
  "lastModified": {
    "dateUtc": "2020-05-01T21:22:01.807398Z",
    "user": "email@email.com"
  },
  "targetConfigurations": [
    {
      "id": "77ae1e4c-a216-4b15-a4a3-ae64ec298988",
      "name": "Social Sellers",
      "origin": "Marketplace",
      "idsSalesChannel": [
        "Principal"
      ],
      "marketingTags": [
        "MKT1"
      ],
      "paymentsMethods": [
        {
          "id": "2",
          "name": "Visa (2)"
        }
      ],
      "stores": [
        "store"
      ],
      "campaigns": [
        "campaign"
      ],
      "categories": [
        {
          "id": "1",
          "name": "Vinhos Tintos (1)"
        }
      ],
      "categoriesAreInclusive": true,
      "brands": [
        {
          "id": "1",
          "name": "Brand (1)"
        }
      ],
      "brandsAreInclusive": true,
      "products": [
        {
          "id": "1",
          "name": "Vinho (1)"
        }
      ],
      "productsAreInclusive": true,
      "skus": [
        {
          "id": "1",
          "name": "Vinho tinto (1)"
        }
      ],
      "skusAreInclusive": true,
      "collections1BuyTogether": [
        {
          "id": "157",
          "name": "Inverno (157)"
        }
      ],
      "collections2BuyTogether": [
        {
          "id": "157",
          "name": "Inverno (157)"
        }
      ],
      "minimumQuantityBuyTogether": 1,
      "listSku1BuyTogether": [
        {
          "id": "1",
          "name": "Vinho"
        }
      ],
      "listSku2BuyTogether": [
        {
          "id": "1",
          "name": "Vinho"
        }
      ],
      "listBrand1BuyTogether": [
        {
          "id": "1",
          "name": "Malbec"
        }
      ],
      "listCategory1BuyTogether": [
        {
          "id": "1",
          "name": "Vinhos Tintos"
        }
      ],
      "coupon": [
        "coupon code."
      ],
      "totalValueFloor": 40,
      "totalValueMode": "IncludeMatchedItems",
      "collections": [
        {
          "id": "1",
          "name": "Collection (1)"
        }
      ],
      "collectionsIsInclusive": true,
      "restrictionsBins": [
        "1234"
      ],
      "cardIssuers": [
        "issuer"
      ],
      "slasIds": [
        "Express"
      ],
      "zipCodeRanges": [
        {
          "zipCodeFrom": "20000-000",
          "zipCodeTo": "20000-100",
          "inclusive": true
        }
      ],
      "installment": 1,
      "merchants": [
        "merchant"
      ],
      "clusterExpressions": [
        "email contains user@mail.com"
      ],
      "clusterOperator": "operator",
      "paymentsRules": [
        "rule1"
      ],
      "giftListTypes": [
        "Wishlist"
      ],
      "productsSpecifications": [
        "spec"
      ],
      "affiliates": [
        {
          "id": "1",
          "name": "Amazon"
        }
      ],
      "type": "campaign",
      "idTypeDiscountBuyTogether": 5
    }
  ]
}

Response

OK

beginDateUtcstring

Start date of the campaign audience in UTC format.

endDateUtcstring

End date of the campaign audience in UTC format.

idstring

Campaign audience ID.

namestring

Campaign audience name.

isActiveboolean

Defines if the campaign audience is active (true) or not (false).

isAndOperatorboolean

When true, determines that all the targetConfigurations need to be valid for the campaign audience to be active. When false, determines that if at least one of the targetConfigurations is valid, the campaign audience will be active.

isArchivedboolean

Defines if the campaign audience is archived (true) or not (false).

Changes

Changed in 5 of the 52 revisions of this API.315

    • added the new optional request property targetConfigurations/items/idTypeDiscountBuyTogether

      new-optional-request-property

    • added the new optional request property targetConfigurations/items/type

      new-optional-request-property

    • added the optional property targetConfigurations/items/idTypeDiscountBuyTogether to the response with the 200 status

      response-optional-property-added

    • added the optional property targetConfigurations/items/type to the response with the 200 status

      response-optional-property-added

    • request property targetConfigurations/items/coupon/items/ deprecated

      request-property-deprecated

    • response property targetConfigurations/items/coupon/items/ deprecated

      response-property-deprecated

  • 7a856118329128See the full diff
    • the targetConfigurations/items/collections1BuyTogether/items/ request property type/format changed from string/ to object/

      request-property-type-changed

    • the targetConfigurations/items/collections1BuyTogether/items/ response's property type/format changed from string/ to object/ for status 200

      response-property-type-changed

    • added the new optional request property targetConfigurations/items/collections1BuyTogether/items/id

      new-optional-request-property

    • added the new optional request property targetConfigurations/items/collections1BuyTogether/items/name

      new-optional-request-property

    • added the new optional request property targetConfigurations/items/zipCodeRanges/items/zipCodeFrom

      new-optional-request-property

    • added the new optional request property targetConfigurations/items/zipCodeRanges/items/zipCodeTo

      new-optional-request-property

    • added the optional property targetConfigurations/items/collections1BuyTogether/items/id to the response with the 200 status

      response-optional-property-added

    • added the optional property targetConfigurations/items/collections1BuyTogether/items/name to the response with the 200 status

      response-optional-property-added

    • added the optional property targetConfigurations/items/zipCodeRanges/items/zipCodeFrom to the response with the 200 status

      response-optional-property-added

    • added the optional property targetConfigurations/items/zipCodeRanges/items/zipCodeTo to the response with the 200 status

      response-optional-property-added

    This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog