js-api-client

Access Crystallize GraphQL APIs with typed JavaScript and TypeScript clients.

4|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/CrystallizeAPI/ai --skill js-api-client
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: js-api-client
Source: https://github.com/CrystallizeAPI/ai/tree/main/use-crystallize/skills/js-api-client
Command: npx skills add https://github.com/CrystallizeAPI/ai --skill js-api-client

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Developers need a reliable way to call Crystallize GraphQL APIs from JavaScript or TypeScript without writing repetitive request, authentication, and client-setup logic.

Core Features & Use Cases

  • Typed GraphQL API callers: Use dedicated callers for catalogue, discovery, PIM (legacy and nextPim), per-user me, and shop cart flows.
  • High-level helpers: Build common workflows like catalogue fetching, navigation retrieval, product hydration, order fetching/management, customer management, subscription contracts, and cart management.
  • Flexible authentication: Support static auth tokens for read-only storefront calls, access token ID/secret for PIM and shop operations, sessionId for alternative auth, and bearerToken for JWT-based plugin/delegated calls.

Quick Start

Ask the js-api-client skill to generate a ready-to-run createClient setup using your tenantIdentifier and the authentication method you have, then fetch a catalogue response for the path /shop in language en.

Frequently Asked Questions about js-api-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Crystallize GraphQL APIs from JavaScript or TypeScript?

You can connect to Crystallize GraphQL APIs by configuring a createClient instance with your tenantIdentifier and an authentication method like staticAuthToken or accessTokenId, then using typed API callers for catalogue, PIM, or cart operations.

What authentication methods does the Crystallize JavaScript API client support?

The Crystallize JavaScript API client supports multiple authentication methods: staticAuthToken for read-only storefront calls, accessTokenId and accessTokenSecret for PIM operations, sessionId for alternative auth, and bearerToken for JWT-based delegated calls.

Can I manage ecommerce shopping carts and checkout workflows with a typed JavaScript API client?

Yes, you can manage ecommerce carts and checkout workflows using the Crystallize JavaScript API client. It provides dedicated shop cart API callers and high-level helpers for cart management, order fetching, and subscription contract workflows.

How do I fetch catalogue and navigation data from Crystallize using TypeScript?

Fetch catalogue and navigation data from Crystallize using TypeScript by calling the high-level catalogue helpers provided by the JavaScript API client, which support path-based discovery browsing and product hydration for a specified tenant and language.

Do I need an access token secret for Crystallize PIM admin operations in JavaScript?

Yes, Crystallize PIM admin operations in JavaScript require accessTokenId and accessTokenSecret credentials for authentication. Read-only storefront catalogue calls can use a simpler staticAuthToken instead.

What is the best way to handle per-user me calls and nextPim tenant access in a Crystallize JavaScript client?

The best way to handle per-user me calls and nextPim tenant access is using the dedicated typed API callers provided by the Crystallize JavaScript client, which scope GraphQL queries to the authenticated user context and nextPim tenant.