> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/integrations/client-sdks.md).

# Client SDKs

An official client SDK for fulfillmenttools is provided, and clients can also be generated using third-party tools.

## fulfillmenttools SDK

The official fulfillmenttools client SDK in TypeScript is available on [GitHub](https://github.com/fulfillmenttools/fulfillmenttools-sdk-typescript) and [npm](https://www.npmjs.com/package/@fulfillmenttools/fulfillmenttools-sdk-typescript) and can be used wherever you run JavaScript.

The TypeScript SDK is open source and licensed under the MIT License, so you can use it in your projects and contribute to its development.

{% hint style="info" %}
Learn how to set up and use the TypeScript SDK with the [tutorial on GitHub](https://github.com/fulfillmenttools/fulfillmenttools-sdk-typescript/blob/main/TUTORIAL.md).
{% endhint %}

Currently, this client SDK doesn't provide access to all of our API's features, but we're continuously extending it and releasing new versions. We welcome your feedback.

## Client generation

Another approach is to use [Swagger Codegen](https://swagger.io/tools/swagger-codegen/), which can generate client SDKs from our OpenAPI specification.

Other tools, such as the [OpenAPI Generator](https://openapi-generator.tech/), can also be used. It is also possible to opt out of generating `classes` or `types` and instead manually model the required components for a specific use case.

{% hint style="info" %}
The Swagger [Codegen GitHub repository](https://github.com/swagger-api/swagger-codegen) has more details on this tool.
{% endhint %}

### TypeScript example

Here's an example workflow to generate a TypeScript client from our OpenAPI specification:

{% stepper %}
{% step %}
**Follow prerequisites**

Follow the [Swagger Codegen CLI Tool instructions](https://github.com/swagger-api/swagger-codegen#prerequisites) on GitHub.
{% endstep %}

{% step %}
**Download the OpenAPI specification**

Download the fulfillmenttools OpenAPI specification:

* <https://raw.githubusercontent.com/fulfillmenttools/fulfillmenttools-api-reference/master/api.swagger.yaml>
  {% endstep %}

{% step %}
**Generate the TypeScript client**

Use the Swagger Codegen CLI tool to generate a TypeScript client. Example command:

{% code title="Generate TypeScript client" %}

```bash
java -jar swagger-codegen-cli-3.0.62.jar generate \
  -i api.swagger.yaml \
  -l typescript-fetch \
  -o client
```

{% endcode %}

This will put the generated classes into the `client` folder. In this folder, the `api.ts` file contains the generated namespaces, interfaces, and related code that are especially relevant.
{% endstep %}

{% step %}
**Review and integrate**

Depending on your preferences, you can:

* Use all the generated client classes
* Pick only the generated `enum`, `interface`, `namespace`, `type` definitions, and implement the actual client yourself
  {% endstep %}
  {% endstepper %}

### TypeScript example

This example demonstrates how to generate a TypeScript client:

1. Follow the [Swagger Codegen CLI Tool instructions](https://github.com/swagger-api/swagger-codegen#prerequisites) on GitHub.
2. Download the fulfillmenttools OpenAPI specification [api.swagger.yaml](https://raw.githubusercontent.com/fulfillmenttools/fulfillmenttools-api-reference/master/api.swagger.yaml).
3. Use the Swagger Codegen CLI tool to generate a TypeScript client:

   ```shell
   java -jar swagger-codegen-cli-3.0.62.jar generate \
     -i api.swagger.yaml \
     -l typescript-fetch \
     -o client
   ```
4. This command generates the client classes in the `client` folder. Within this folder, the `api.ts` file contains the generated `namespaces` and `interfaces`.
5. It is possible to use all the generated client classes, or to selectively use the generated `enum`, `interface`, `namespace`, and `type` definitions to implement a custom client.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fulfillmenttools.com/documentation/integrations/client-sdks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
