---
title: Limits
slug: limits
abstract: While we minimize hard limits in the API, some restrictions help ensure optimal performance.
content_type: reference
audience: \[architect, developer]
---
# Limits

While we minimize hard limits in the API, some restrictions help ensure optimal performance.

## XP length

Maximum length for any `xp` object: 8000 characters.

Extended properties (XP) demonstrate our [Flexibility Over Features](https://doc.sitecore.com/ordercloud/en/developers/platform/flexibility-over-features.html#extended-properties) approach. Follow our [best practices](https://doc.sitecore.com/ordercloud/en/developers/platform/extended-properties.html#best-practices) to manage `xp` size effectively. If approaching the limit, consider mapping data to an external store.

## Generated variants

Maximum variants per product: 1500.

[Generating Variants](https://api-docs.sitecore.com/ordercloud/products/products.generatevariants) creates unique combinations of spec options. Example:

- Six specs with three options each: 729 variants (allowed)
- Six specs with four options each: Exceeds limit (not allowed)

## Auto apply promotions

Maximum promotions per API call: 100.

Applies to:

- `v1/orders/{direction}/{orderID}/applypromotions`
- `v1/cart/applypromotions`

Additional evaluations require separate API calls.

## Products per collection

Maximum products per collection: 500.

This limit ensures optimal `ProductCollection` performance. No limit exists on the number of collections per user.

## Unique extended property keys

Recommended limit: ~100 unique keys for:

- Products
- Orders
- Line items

For orders with nested line item and product data, keys accumulate quickly. Example:

- 100 order keys
- 100 line item keys
- 100 product keys
Total: 300 unique keys in order search documents

Exceeding recommended limits may result in flattened extended properties and limited search capabilities.

## Line items per submitted order

Soft limit: A few hundred line items per order.

Factors affecting the limit:

- Complex indexing processes
- Line item data volume
- Product data volume

The API allows exceeding this limit but may not index orders properly, affecting list operations.

Contact us for guidance on high line item volume use cases.

## Deep paging

Recommended limit: Maximum 30 pages.

Use the LastID Method for optimal performance:

1. Initial call:

   ```
   page=1&pageSize=100&sortBy=ID
   ```

2. Track last item's ID

3. Subsequent calls:

   ```
   page=1&pageSize=100&sortBy=ID&ID=>{lastID}
   ```

4. Stop when receiving empty `Items` array

---

## Related reading

- [Using Extended Properties in Custom eCommerce Apps](https://doc.sitecore.com/ordercloud/en/developers/platform/extended-properties.html#using-extended-properties-in-custom-ecommerce-apps)
- [Ad-Hoc Products](https://doc.sitecore.com/ordercloud/en/developers/platform/ad-hoc-products.html)


