Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create a bundle rule

Creates a new bundle rule within a bundle, specifying products, quantity, discount settings, and optional tag conditions for product matching.

POST/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}/rules
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
app_slugstringrequired

App slug

team_slugstringrequired

Team slug

bundle_idstringrequired

Bundle ID

bundle_group_idstringrequired
Request body
requiredapplication/json

Bundle rule configuration

discount_percentageinteger
discount_typestring
discountsinternal_pkg_webserver_v1.BundleGroupDiscount[]
Show properties
Array of internal_pkg_webserver_v1.BundleGroupDiscount
amount_centsinteger
min 0
currency_codestring
exclude_discounted_priceboolean

If products with discounts should be excluded from the bundle

exclude_full_priceboolean

If products with no discounts should be excluded from the bundle

itemsstring[]required

Ensure at least one element is present

quantityinteger
tag_conditionsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionsReq
Show properties
brandsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionReq
Show properties
idsstring[]required
min items 1
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityModerequired
Allowed:includeexclude
categoriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionReq
Show properties
idsstring[]required
min items 1
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityModerequired
Allowed:includeexclude
collectionsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionReq
Show properties
idsstring[]required
min items 1
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityModerequired
Allowed:includeexclude
seriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionReq
Show properties
idsstring[]required
min items 1
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityModerequired
Allowed:includeexclude
tagsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionReq
Show properties
idsstring[]required
min items 1
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityModerequired
Allowed:includeexclude
Responses
200

Bundle rule created successfully

datagithub_com_enadhq_nabbit_internal_pkg_webserver_models.BundleRulerequired
Show properties
bundle_idstring

Bundle ID

discount_percentageinteger | null

Discount percentage [1-100]

discount_typestring | null

Discount type [fixed, relative]

discountsobject | null

Discount for bundle. Amount is stored in cents

exclude_discounted_priceboolean

If products with discounted price should be excluded

exclude_full_priceboolean

If products with full price should be excluded

idstring

ID

itemsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.BundleItem[] | null

Products associated with the bundle rule

Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.BundleItem
descriptionstring
idstring
image_urlsstring[] | null
product_namestring
product_numberstring
slugstring
quantityinteger

Quantity of products needed to trigger the bundle

tag_conditionsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionsResp

Conditions for discount tags

Show properties
brandsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityMode
Allowed:includeexclude
valuesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionTag[] | null
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionTag
idstring
namestring
null
null
categoriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
collectionsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
seriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
tagsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
201

Successful response

datagithub_com_enadhq_nabbit_internal_pkg_webserver_models.BundleRulerequired
Show properties
bundle_idstring

Bundle ID

discount_percentageinteger | null

Discount percentage [1-100]

discount_typestring | null

Discount type [fixed, relative]

discountsobject | null

Discount for bundle. Amount is stored in cents

exclude_discounted_priceboolean

If products with discounted price should be excluded

exclude_full_priceboolean

If products with full price should be excluded

idstring

ID

itemsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.BundleItem[] | null

Products associated with the bundle rule

Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.BundleItem
descriptionstring
idstring
image_urlsstring[] | null
product_namestring
product_numberstring
slugstring
quantityinteger

Quantity of products needed to trigger the bundle

tag_conditionsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionsResp

Conditions for discount tags

Show properties
brandsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
modegithub_com_enadhq_nabbit_internal_pkg_webserver_models.DiscountTagEntityMode
Allowed:includeexclude
valuesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionTag[] | null
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.TagConditionTag
idstring
namestring
null
null
categoriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
collectionsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
seriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
tagsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp | null
Show properties
Any of:
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
github_com_enadhq_nabbit_internal_pkg_webserver_models.SingleTagConditionResp
null
null
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid request

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
404

Bundle not found

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v1/string/string/bundle-groups/string/bundles/string/rules' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "discount_percentage": 0,
  "discount_type": "string",
  "discounts": [
    {
      "amount_cents": 0,
      "currency_code": "string"
    }
  ],
  "exclude_discounted_price": true,
  "exclude_full_price": true,
  "items": [
    "string"
  ],
  "quantity": 0,
  "tag_conditions": {
    "brands": {
      "ids": [
        "string"
      ],
      "mode": "include"
    },
    "categories": {
      "ids": [
        "string"
      ],
      "mode": "include"
    },
    "collections": {
      "ids": [
        "string"
      ],
      "mode": "include"
    },
    "series": {
      "ids": [
        "string"
      ],
      "mode": "include"
    },
    "tags": {
      "ids": [
        "string"
      ],
      "mode": "include"
    }
  }
}'
Response
{
  "data": {
    "bundle_id": "string",
    "discount_percentage": 0,
    "discount_type": "string",
    "discounts": {
      "property1": 0,
      "property2": 0
    },
    "exclude_discounted_price": true,
    "exclude_full_price": true,
    "id": "string",
    "items": [
      {
        "description": "string",
        "id": "string",
        "image_urls": [
          "string"
        ],
        "product_name": "string",
        "product_number": "string",
        "slug": "string"
      }
    ],
    "quantity": 0,
    "tag_conditions": {
      "brands": {
        "mode": "include",
        "values": [
          {
            "id": "string",
            "name": "string"
          }
        ]
      },
      "categories": {
        "mode": "include",
        "values": [
          {
            "id": "string",
            "name": "string"
          }
        ]
      },
      "collections": {
        "mode": "include",
        "values": [
          {
            "id": "string",
            "name": "string"
          }
        ]
      },
      "series": {
        "mode": "include",
        "values": [
          {
            "id": "string",
            "name": "string"
          }
        ]
      },
      "tags": {
        "mode": "include",
        "values": [
          {
            "id": "string",
            "name": "string"
          }
        ]
      }
    }
  },
  "details": [
    "string"
  ],
  "success": true
}