Helper scripts of general purpose for Commercetools API features.
- Import API: container, operation, summary, category, product type, product, product draft, product variant, product variant patch, inventory, embedded price, standalone price, order, order patch, and customer.
- Root API: cart, order, and payment.
Create .env
file based on .env.template
and fill the content with the necessary credentials.
These credentials will be used by the Commercetools SDK.
Before starting, you will need to have the following tools installed on your machine: Git and Node.js.
# Clone this repository
$ git clone https://github.com/emanuel-imaginationmedia/commercetools-api-scripts.git
# Access the project folder via the terminal/cmd
$ cd commercetools-api-scripts
# Install dependencies
$ npm install
# Run scripts
npx tsx src/examples/import-api/import-container.ts
The prebuilt scripts are generic examples. You can create your own scripts, import and use the methods in your own way to attend your demand.