js-api-client
Installation
SKILL.md
Crystallize JS API Client
The @crystallize/js-api-client package provides typed utilities for working with all Crystallize APIs in JavaScript/TypeScript environments.
Consultation Approach
Before writing code, understand the context. Ask clarifying questions:
- What are you trying to do? Read data, write data, manage carts, handle webhooks?
- Do you need raw GraphQL or a high-level helper? Helpers reduce boilerplate for common workflows (orders, carts, navigation). Use raw GraphQL via API callers for custom queries or when helpers don't cover the use case.
- Which API? Catalogue/Discovery for storefront reads, PIM for admin writes, Shop Cart for checkout flows.
- What auth do you have?
staticAuthTokenis enough for read-only. PIM/Shop operations needaccessTokenId+accessTokenSecret. - Is this server-side or client-side? The client works in both, but credentials should only live server-side.