SDK
Get the tools and resources you need to integrate with API2Cart. This page covers three ways to get an SDK: ready-made clients for 24 languages, a form that builds one scoped to your integration, and the steps to generate one yourself.
How these are generated: every SDK on this page is produced automatically from API2Cart's OpenAPI specification using openapi-generator — the same tool our own build pipeline runs. The GitHub repositories directly below hold clients built from the general specification, covering the common set of methods and parameters across every supported cart. An individual integration can support a different subset of methods and parameters than what a generic client exposes — if you only work with one platform, use the generator in the section below instead to get a client scoped to exactly what that integration supports.
Ready-made SDKs
Before you use a generated client, know this:
• A generic client exposes every method in the general specification, including ones your specific cart platform doesn't support — calling an unsupported method returns an API error at request time, not a compile-time error. Prefer the per-integration generator below if you only integrate with one platform.
• Authenticate generated clients with two headers: x-api-key (your
account's API key) and x-store-key (the key of the store you're calling) —
check the generated README for how the client exposes them.
• openapi-generator ships some language targets as beta or experimental. Expect occasional naming quirks or gaps in edge-case handling, especially for less common languages — treat a generated client as a starting point, not hand-audited code.
• These repositories are regenerated as the API changes (the TypeScript Angular client is maintained separately and can lag behind). If your build needs a reproducible SDK version, pin a specific commit or vendor the generated code into your own repository.
Installing a ready-made SDK
Open the repository for your language above and follow the instructions in its
README.md file.
- If you use PHP, you can instead install the SDK with Composer rather than cloning the repository.
Generate an SDK for your integration
Pick your programming language and the cart platform you're integrating with. We'll build a client scoped to exactly the methods and parameters that integration supports. The first request for a given language/integration pair takes up to about 15 seconds to build; every request after that is instant, for everyone.
Generate an SDK yourself
Both sections above run the same generator you can run locally
— useful if you need a language or a client framework we don't offer as a ready-made
download (openapi-generator supports 50+ targets, from typescript-axios to
dart to kotlin-spring), or if you want the SDK built as part of your
own CI pipeline.
1. Get the OpenAPI specification
- General specification, covering every supported integration:
https://app.api2cart.com/openapi/openapi.json - Specification scoped to one integration — open the
interactive docs for that platform
(swap
Shopifyin thecart_idparameter for the integration id shown in the picker above, for exampleMagento,WooCommerce,BigcommerceApi) and use the Link to openapi.json link at the top of the page.
2. Run openapi-generator against it
With Node.js and a Java runtime (JRE 11 or newer) installed, via npx — the
wrapper downloads the openapi-generator JAR for you:
npx @openapitools/openapi-generator-cli generate \
-g python \
-i https://app.api2cart.com/openapi/Shopify/openapi.json \
-o ./api2cart-python-sdk
Or with Docker, no local Java or Node.js needed:
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-g python \
-i https://app.api2cart.com/openapi/Shopify/openapi.json \
-o /local/api2cart-python-sdk
Replace python with any
generator name openapi-generator supports.
The languages listed at the top of this page currently use these generator names:
ada,android,bash,cpp-qt-client,csharp,c,elixir,go,javascript,java,julia-client,kotlin,lua,perl,php,powershell,python,r,ruby,rust,scala-akka,swift5,swift6
Same caveats as above apply to a client you generate
yourself: it reflects whatever OpenAPI specification you feed it, so a generic spec still
produces a generic client, and authentication is still the x-api-key /
x-store-key headers described earlier on this page.