API Development And
Integration Guid

7.3. cURL Examples

1. Fetch Product List

This is a standard example of the response from the Fetch Product List endpoint (/api/product/merchant/invited/list). It illustrates how data is structured and what each field represents:

bash
url -X POST https://sandbox-service.wupex.com/api/product/merchant/invited/list \
  -H "x-api-key: YOUR_SANDBOX_KEY" \
  -H "Accept-Language: en-US" \
  -H "Content-Type: application/json" \
  -d '{"page":1,"pageSize":20}'
  

For production, switch domain and key:

bash
curl -X POST https://service.wupex.com/api/product/merchant/invited/list \
  -H "x-api-key: YOUR_PRODUCTION_KEY" \
  -H "Accept-Language: en-US" \
  -H "Content-Type: application/json" \
  -d '{"page":1,"pageSize":20}'
  

2. Place Order (pull-codes)

bash
curl -X POST https://sandbox-service.wupex.com/api/order/pull-codes \
  -H "x-api-key: YOUR_SANDBOX_KEY" \
  -H "Accept-Language: en-US" \
  -H "Content-Type: application/json" \
  -d '[
        {
          "merchant": "MyMerchant",
          "sku": "GOOGLE-USA-10USD",
          "quantity": 2
        }
      ]'
  

Then in production:

bash
curl -X POST https://service.wupex.com/api/order/pull-codes \
  -H "x-api-key: YOUR_PRODUCTION_KEY" \
  -H "Accept-Language: en-US" \
  -H "Content-Type: application/json" \
  -d '[{"merchant":"MyMerchant","sku":"APPLE-USA-15USD","quantity":1}]'
  

3. View Order History (order-list)

bash
curl -X POST https://sandbox-service.wupex.com/api/order/list \
  -H "x-api-key: YOUR_SANDBOX_KEY" \
  -H "Accept-Language: en-US" \
  -H "Content-Type: application/json" \
  -d '{
        "page":1,
        "pageSize":20,
        "orderColumn":"orderDate",
        "order":"DESC"
      }'
  

4. View Order Details (order-detail)t

bash
curl -X GET "https://sandbox-service.wupex.com/api/order/detail?orderName=A00000000000123" \
  -H "x-api-key: YOUR_SANDBOX_KEY" \
  -H "Accept-Language: en-US"
  

5. Check Account Balance

bash
curl -X GET https://sandbox-service.wupex.com/api/customer/balance \
  -H "x-api-key: YOUR_SANDBOX_KEY" \
  -H "Accept-Language: en-US"
  

Notes & Best Practices

  • Always use the correct base URL and x-api-key for sandbox vs. production.
  • Include Accept-Language: en-US and Content-Type: application/json in all requests.
  • Wrap JSON payloads in single quotes to avoid shell parsing issues.
  • Ensure your sku, merchant, and orderName values are valid for your environment.

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.