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 and npm 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.
Learn how to set up and use the TypeScript SDK with the tutorial on GitHub.
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, which can generate client SDKs from our OpenAPI specification.
Other tools, such as the OpenAPI Generator, 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.
The Swagger Codegen GitHub repository has more details on this tool.
TypeScript example
Here's an example workflow to generate a TypeScript client from our OpenAPI specification:
Follow prerequisites
Follow the Swagger Codegen CLI Tool instructions on GitHub.
Download the OpenAPI specification
Download the fulfillmenttools OpenAPI specification:
https://raw.githubusercontent.com/fulfillmenttools/fulfillmenttools-api-reference/master/api.swagger.yaml
Generate the TypeScript client
Use the Swagger Codegen CLI tool to generate a TypeScript client. Example command:
java -jar swagger-codegen-cli-3.0.62.jar generate \
-i api.swagger.yaml \
-l typescript-fetch \
-o clientThis 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.
Review and integrate
Depending on your preferences, you can:
Use all the generated client classes
Pick only the generated
enum,interface,namespace,typedefinitions, and implement the actual client yourself
TypeScript example
This example demonstrates how to generate a TypeScript client:
Follow the Swagger Codegen CLI Tool instructions on GitHub.
Download the fulfillmenttools OpenAPI specification api.swagger.yaml.
Use the Swagger Codegen CLI tool to generate a TypeScript client:
This command generates the client classes in the
clientfolder. Within this folder, theapi.tsfile contains the generatednamespacesandinterfaces.It is possible to use all the generated client classes, or to selectively use the generated
enum,interface,namespace, andtypedefinitions to implement a custom client.
Last updated