Products V2 FAQ

Frequently asked questions about the Products V2 API, covering common use cases, troubleshooting, and best practices.

General Questions

What authentication method does V2 use?

Products V2 API uses API key authentication. Include your API key in the x-api-key header:

x-api-key: YOUR_API_KEY_HERE

What permissions do I need?

You need:

  • Required Roles: Admin or Editor
  • Required Scope: Products

How do I get API access?

  1. Request API Access
  2. Provide details about your use case and expected volume
  3. Complete the setup process with our team

Localization & Multi-language Support

What languages are supported?

The API supports multiple languages including:

  • en-US - English (US)
  • en-GB - English (UK)
  • fr-FR - French (France)
  • de-DE - German (Germany)
  • es-ES - Spanish (Spain)
  • it-IT - Italian (Italy)
  • pt-BR - Portuguese (Brazil)
  • ja-JP - Japanese (Japan)
  • ko-KR - Korean (South Korea)
  • zh-CN - Chinese (Simplified)

How do I get a product in a specific language?

Include the language parameter in your request:

const response = await fetch(
  `https://api.joinsherpa.io/v2/products/${productId}?language=fr-FR`,
  {
    headers: {
      'x-api-key': `${API_KEY}`,
    },
  }
);

Pricing & Currency

What currencies are supported?

The API supports multiple currencies including:

  • USD - US Dollar
  • EUR - Euro
  • GBP - British Pound
  • CAD - Canadian Dollar
  • AUD - Australian Dollar
  • JPY - Japanese Yen
  • CHF - Swiss Franc
  • SEK - Swedish Krona
  • NOK - Norwegian Krone
  • DKK - Danish Krone

How do I get pricing in a specific currency?

Include the currency parameter in your request:

const response = await fetch(
  `https://api.joinsherpa.io/v2/products/${productId}?currency=EUR`,
  {
    headers: {
      'x-api-key': `${API_KEY}`,
    },
  }
);

Are exchange rates updated in real-time?

Yes, the API uses current exchange rates for currency conversion. Prices are automatically converted based on the latest rates.

How do I filter products by destination?

Use the destination parameter:

const response = await fetch(
  `https://api.joinsherpa.io/v2/products?destination=TUR`,
  {
    headers: {
      'x-api-key': `${API_KEY}`,
    },
  }
);

How do I filter products by nationality?

Use the nationality parameter:

const response = await fetch(
  `https://api.joinsherpa.io/v2/products?nationality=USA`,
  {
    headers: {
      'x-api-key': `${API_KEY}`,
    },
  }
);

How do I filter products by travel purpose?

Use the travelPurpose parameter:

const response = await fetch(
  `https://api.joinsherpa.io/v2/products?travelPurpose=TOURISM`,
  {
    headers: {
      'x-api-key': `${API_KEY}`,
    },
  }
);

Can I combine multiple filters?

Yes, you can combine multiple filters:

const response = await fetch(
  `https://api.joinsherpa.io/v2/products?destination=TUR&nationality=USA&travelPurpose=TOURISM&status=ACTIVE`,
  {
    headers: {
      'x-api-key': `${API_KEY}`,
    },
  }
);

What is product consolidation?

Product consolidation merges product variants into single products. Use consolidateProducts=true to get one SHERPA product and one GOVERNMENT product per destination.

Error Handling

What are the common error codes?

  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Missing or invalid authentication
  • 403 Forbidden - Insufficient permissions
  • 404 Not Found - Product or resource not found
  • 409 Conflict - Resource conflict (e.g., product ID already exists)
  • 500 Internal Server Error - Server-side error

Performance & Caching

How long should I cache responses?

The API returns Cache-Control: public, max-age=3600 (1 hour). Follow this cache duration for optimal performance.

How do I optimize API calls?

  • Use specific filters to reduce response size
  • Implement pagination for large datasets
  • Cache responses according to cache headers
  • Use bulk operations for multiple updates

How should I implement error handling?

  • Always check HTTP status codes
  • Implement retry logic for transient errors
  • Log errors for debugging and monitoring
  • Provide meaningful error messages to users

Support & Resources

Where can I get help?

  • Quickstart: Follow our Quickstart Guide
  • Use Cases: Explore practical Use Cases
  • Support: Contact our support team for assistance

Are there any code examples?

Yes, we provide comprehensive code examples in:

How do I report bugs or request features?

Contact our support team with detailed information about:

  • The issue or feature request
  • Steps to reproduce (for bugs)
  • Expected vs. actual behavior
  • Your API key (for debugging)
💡 Still Have Questions?

If you can't find the answer to your question here, check our comprehensive documentation or contact our support team for personalized assistance.

🚀 Ready to Get Started?

Check out our Quickstart Guide to begin using the Products V2 API in minutes.