API Development And
Integration Guid

Filtering & Pagination

Efficient filtering and pagination are key to handling large product catalogs and order histories in WUPEX. This section illustrates best practices to enhance performance and user experience.

Pagination Standards

WUPEX employs offset-based pagination using page and pageSize parameters:

Request Body:

http
{
  "page": 1,         // Start from page 1
  "pageSize": 20     // Up to 100 items per page
}
  

Response (Sample):

http
{
  "pageInfo": {
    "totalPage": 5,
    "totalCount": 95,
    "pageSize": 20,
    "currentPage": 1
  },
  "data": [ … ],
  "status": true
}
  

Why It Matters:

Large datasets impact performance and UX. Break data into smaller chunks for faster loading and responsive designs.

Filtering Requests

While WUPEX’s core APIs (products, orders) currently use simple offset pagination, you can enhance them with server-side or client-side filters:

Typical Filter Payload:

json
{
  "page": 1,
  "pageSize": 20,
  "search": [
    {
      "column": "productType",
      "operator": "Equals",
      "value": "Google Play"
    }
  ]
}
  

Use Cases:

Pairing filters with pagination (e.g., ?page=1&pageSize=20&productType=Apple) reduces bandwidth and improves response times .

Best Practices

  1. Default Reasonable Limits

    Provide sensible defaults (e.g., page 1, size 20) to avoid empty or excessively large responses.

  2. Include Clear Metadata

    
Always return pagination info—totalPage, totalCount, etc.—for UI navigation

  3. Stable Sorting

    Ensure consistent sorting (e.g., by productCode or orderDate) so pagination doesn’t skip or repeat items .

  4. Handle Edge Cases Gracefully

    Return an empty list with pageInfo when page exceeds total pages. Include helpful error messages for invalid input

  5. Rate Limit & Performance Awareness

    Pagination reduces overhead. Help developers avoid performance issues by discouraging fetching full datasets without limits

Pro Tips

Let’s Boost Your
Business Efficiency

Say goodbye to delays, fraud, and complex setups—our solution is built for speed and trust.

Get Latest News for Free!

Sign up to get product updates, new partner alerts, and
exclusive API insights
No spam. Unsubscribe anytime

Why WUPEX?

Partners

Industries

Resources

Company

Downloads

Features

Support

Copyright © 2024 WUPEX | All Rights Reserved.

Why WUPEX?

Partners

Industries

Features

Support

Company

Resources

Downloads

Copyright © 2024 WUPEX | All Rights Reserved.