[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides set a discount using the checkout api in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-api-overview)

[Custom Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/custom-data-1)

[Customization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/customization)

[Discounts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/discounts)

[Set a discount using the Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/set-a-discount-using-the-checkout-api)

[Features](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/features)

[Order Placement](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/orders-2)

[Security](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-security)

[Shopping Cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/shopping-cart-section-api-quick-start-guides)

[Cart Attachments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/cart-attachments-section-api-quick-start-guides)

[Configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/configuration-section-api-quick-start-guides)

[Fulfillment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/fulfillment-checkout-section-api-quick-start-guides)

[Region](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/region-section-api-quick-start-guides)

[Checkout error codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-error-codes)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-api-overview)

[Custom Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/custom-data-1)

[Customization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/customization)

[Discounts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/discounts)

[Set a discount using the Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/set-a-discount-using-the-checkout-api)

[Features](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/features)

[Order Placement](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/orders-2)

[Security](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-security)

[Shopping Cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/shopping-cart-section-api-quick-start-guides)

[Cart Attachments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/cart-attachments-section-api-quick-start-guides)

[Configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/configuration-section-api-quick-start-guides)

[Fulfillment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/fulfillment-checkout-section-api-quick-start-guides)

[Region](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/region-section-api-quick-start-guides)

[Checkout error codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-error-codes)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides)

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/checkout-api-overview)

[Discounts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/discounts)

[Set a discount using the Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/docs/guides/set-a-discount-using-the-checkout-api)

Set a discount using the Checkout API

One of the most used customer attraction strategies in ecommerce is applying a discount to the cash price when choosing a specific payment method. Commonly, the discount price is visible only at the checkout payment stage after the user has already chosen the payment method that grants the discount.

This Checkout configuration sets the discount price and links it to a payment method. To configure, follow the steps below:

1. Use the [Update orderForm configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/checkout-api%23post-/api/checkout/pvt/configuration/orderForm) endpoint to enter the desired payment method ID in the `paymentSystemToCheckFirstInstallment` property.
2. To get the payment method ID, access Settings in the **Payments** module. The ID of the condition you want to use is on the right side of the screen in the **Payments Settings > Payments Conditions** section.

![{"base64":"  ","img":{"width":1423,"height":364,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":32447,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/set-a-discount-using-the-checkout-api-0.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/set-a-discount-using-the-checkout-api-0.png)

1. After updating `paymentSystemToCheckFirstInstallment`, you can [Simulate a shopping cart](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/simulate-a-shopping-cart). Thus, you will be able to verify that the chosen payment method has been updated with the discount in the cash payment option in the `installmentOptions` section, within `paymentData`.

`1

"paymentData":{

2

 "installmentOptions":[

3

 {

4

 "paymentSystem":"6",

5

 "paymentName":"Boleto Bancário",

6

 "paymentGroupName":"bankInvoicePaymentGroup",

7

 "value":10000,

8

 "installments":[

9

 {

10

 "count":1,

11

 "hasInterestRate":false,

12

 "interestRate":0,

13

 "value":9000,

14

 "total":9000,

15

 }

16

 ]

17

 }

18

 ]

19

}

`

For more information, check [Configuring a discount for orders prepaid in full](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/configurar-desconto-de-preco-a-vista--7Lfcj9Wb5dpYfA2gKkACIt).

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F87548049%3Fv%3D4%26w=64%26q=75)](https://github.com/ricardoaerobr)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Checkout/discounts/set-a-discount-using-the-checkout-api.md)

[Discounts« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api//docs/guides/discounts)[FeaturesNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api//docs/guides/features)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F87548049%3Fv%3D4%26w=64%26q=75)](https://github.com/ricardoaerobr)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/set-a-discount-using-the-checkout-api/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Checkout/discounts/set-a-discount-using-the-checkout-api.md)

Copy page

On this page

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Explain the VTEX api reference storefront permissions api API and how to use it.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/updates/release-notes)

API Reference

Filter By

Post

Get

Put

Delete

Patch

[Anti-fraud Provider API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/antifraud-provider-protocol/)

---

[Audience API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/audience-api/)

---

[Buyer organizations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/buyer-organizations/)

---

[Budgets API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/budgets-api/)

---

[Legacy CMS Portal API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/legacy-cms-portal-api/)

---

[Card Token Vault API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/card-token-vault-api/)

---

[Catalog API - Seller Portal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/catalog-api-seller-portal/)

---

[Catalog API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/catalog-api/)

---

[Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/checkout-api/)

---

[Customer Credit API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/customer-credit-api/)

---

[Delivery Promise Notification API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/delivery-promise-notification-api/)

---

[GiftCard API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/giftcard-api/)

---

[Giftcard Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/giftcard-provider-protocol/)

---

[GiftCard Hub API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/giftcard-hub-api/)

---

[Headless CMS](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/headless-cms-api/)

---

[Intelligent Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/intelligent-search-api/)

---

[Intelligent Search Events API - Headless](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/intelligent-search-events-api-headless/)

---

[License Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/license-manager-api/)

---

[Logistics API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/logistics-api/)

---

[Marketplace API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/marketplace-apis/)

---

[Marketplace Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/marketplace-protocol/)

---

[Master Data API - v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/master-data-api-v2/)

---

[Master Data API - v1](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/masterdata-api/)

---

[Message Center API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/message-center-api/)

---

[mTLS API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/mtls-api/)

---

[Operational Capacity API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/operational-capacity-api/)

---

[Orders API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/orders-api/)

---

[Organization Units API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/organization-units-api/)

---

[Payment Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/payment-provider-protocol/)

---

[Payments Gateway API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/payments-gateway-api/)

---

[Pick and Pack API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pick-and-pack-api/)

---

[Pick and Pack Last Mile Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pick-and-pack-protocol-api/)

---

[Pick and Pack Order Changes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pick-and-pack-order-changes-api/)

---

[Policies System API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/policies-system-api/)

---

[Pricing API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pricing-api/)

---

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pricing-hub/)

---

[Promotions & Taxes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/promotions-and-taxes-api/)

---

[Promotions & Taxes API v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/promotions-and-taxes-api-v2/)

---

[Punchout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/punchout-api/)

---

[Reviews and Ratings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/reviews-and-ratings-api/)

---

[Recommendations BFF API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/recommendations-bff-api/)

---

[SKU Bindings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/sku-bindings-api/)

---

[Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/search-api/)

---

[Session Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/session-manager-api/)

---

[SSL Certificates API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/ssl-certificates-api/)

---

[Storefront Permissions API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/storefront-permissions-api/)

Storefront Permissions

---

[Subscriptions API (v3)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/subscriptions-api-v3/)

---

[VTEX Ads API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-ads-api/)

---

[VTEX Shipping Network API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-shipping-network-api/)

---

[VTEX Tracking APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/tracking/)

---

[VTEX DO API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-do-api/)

---

[VTEX ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-id-api/)

---

[Profile System (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/profile-system/)

---

[Orders API - PII Data Architecture (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/orders-api-pii-version/)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/updates/release-notes)

API Reference

Filter By

Post

Get

Put

Delete

Patch

[Anti-fraud Provider API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/antifraud-provider-protocol/)

---

[Audience API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/audience-api/)

---

[Buyer organizations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/buyer-organizations/)

---

[Budgets API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/budgets-api/)

---

[Legacy CMS Portal API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/legacy-cms-portal-api/)

---

[Card Token Vault API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/card-token-vault-api/)

---

[Catalog API - Seller Portal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/catalog-api-seller-portal/)

---

[Catalog API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/catalog-api/)

---

[Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/checkout-api/)

---

[Customer Credit API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/customer-credit-api/)

---

[Delivery Promise Notification API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/delivery-promise-notification-api/)

---

[GiftCard API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/giftcard-api/)

---

[Giftcard Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/giftcard-provider-protocol/)

---

[GiftCard Hub API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/giftcard-hub-api/)

---

[Headless CMS](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/headless-cms-api/)

---

[Intelligent Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/intelligent-search-api/)

---

[Intelligent Search Events API - Headless](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/intelligent-search-events-api-headless/)

---

[License Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/license-manager-api/)

---

[Logistics API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/logistics-api/)

---

[Marketplace API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/marketplace-apis/)

---

[Marketplace Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/marketplace-protocol/)

---

[Master Data API - v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/master-data-api-v2/)

---

[Master Data API - v1](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/masterdata-api/)

---

[Message Center API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/message-center-api/)

---

[mTLS API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/mtls-api/)

---

[Operational Capacity API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/operational-capacity-api/)

---

[Orders API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/orders-api/)

---

[Organization Units API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/organization-units-api/)

---

[Payment Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/payment-provider-protocol/)

---

[Payments Gateway API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/payments-gateway-api/)

---

[Pick and Pack API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pick-and-pack-api/)

---

[Pick and Pack Last Mile Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pick-and-pack-protocol-api/)

---

[Pick and Pack Order Changes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pick-and-pack-order-changes-api/)

---

[Policies System API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/policies-system-api/)

---

[Pricing API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pricing-api/)

---

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/pricing-hub/)

---

[Promotions & Taxes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/promotions-and-taxes-api/)

---

[Promotions & Taxes API v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/promotions-and-taxes-api-v2/)

---

[Punchout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/punchout-api/)

---

[Reviews and Ratings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/reviews-and-ratings-api/)

---

[Recommendations BFF API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/recommendations-bff-api/)

---

[SKU Bindings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/sku-bindings-api/)

---

[Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/search-api/)

---

[Session Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/session-manager-api/)

---

[SSL Certificates API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/ssl-certificates-api/)

---

[Storefront Permissions API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/storefront-permissions-api/)

Storefront Permissions

---

[Subscriptions API (v3)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/subscriptions-api-v3/)

---

[VTEX Ads API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-ads-api/)

---

[VTEX Shipping Network API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-shipping-network-api/)

---

[VTEX Tracking APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/tracking/)

---

[VTEX DO API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-do-api/)

---

[VTEX ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/vtex-id-api/)

---

[Profile System (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/profile-system/)

---

[Orders API - PII Data Architecture (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/orders-api-pii-version/)

---

[PuInstall or renew SSL certificate« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/ssl-certificates-api%23put-/api/edge/certificates)[PoAssign storefront roles or create user with storefront rolesNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/storefront-permissions-api/docs/api-reference/storefront-permissions-api%23post-/api/license-manager/storefront/users)

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides using weni run to execute tool tests in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/data-protection-plus)

---

Weni by VTEX

Weni by VTEX CLI

[Using the Weni by VTEX CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-the-weni-by-vtex-cli)

[Weni by VTEX CLI Command Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/weni-by-vtex-cli-command-reference)

[Authenticating with your Weni by VTEX account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/authenticating-with-your-weni-by-vtex-account)

[Managing your Weni by VTEX projects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/managing-your-weni-by-vtex-projects)

[Understanding the core concepts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/weni-by-vtex-understanding-the-core-concepts)

[Working with Weni by VTEX agents](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/working-with-weni-by-vtex-agents)

[Fetching and filtering logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/weni-by-vtex-fetching-and-filtering-logs)

[Using Weni Run to execute tool tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/data-protection-plus)

---

Weni by VTEX

Weni by VTEX CLI

[Using the Weni by VTEX CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-the-weni-by-vtex-cli)

[Weni by VTEX CLI Command Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/weni-by-vtex-cli-command-reference)

[Authenticating with your Weni by VTEX account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/authenticating-with-your-weni-by-vtex-account)

[Managing your Weni by VTEX projects](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/managing-your-weni-by-vtex-projects)

[Understanding the core concepts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/weni-by-vtex-understanding-the-core-concepts)

[Working with Weni by VTEX agents](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/working-with-weni-by-vtex-agents)

[Fetching and filtering logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/weni-by-vtex-fetching-and-filtering-logs)

[Using Weni Run to execute tool tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides)

Weni by VTEX

Weni by VTEX CLI

[Using Weni Run to execute tool tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests)

Using Weni Run to execute tool tests

Learn how to use the Tool Run feature.

Weni Run is a scalable way to build your tool and test it in real-time. With this feature, it's simple to debug problems and create a tool that is both scalable and performant at the same time.

### What is required to run a tool?

First, you need to have your tool. If you don't know how to create a tool or still have questions about this subject, you can read the [Tools](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/core-concepts%23tools) page.

Next, you need to write your test. Let's take the following tool as an example:

`1

tools:

2

 - get_address:

3

 name: "Get Address"

4

 source:

5

 path: "tools/get_address"

6

 entrypoint: "main.GetAddressWithAuth"

7

 path_test: "test_definition.yaml"

8

 description: "Function to get the address from the postal code"

9

 parameters:

10

 - cep:

11

 description: "postal code of a place"

12

 type: "string"

13

 required: true

14

 contact_field: true

`

Notice that my tool has a specific parameter called "cep". Therefore, the expected input for this tool to be processed is a postal code. This way, I'll create a test file for this tool in the same directory as the specific tool code.

My test file would look something like this:

**test\_definition.yaml:**

`1

tests:

2

 test_1:

3

 parameters:

4

 cep: "57160000"

5

 test_2:

6

 parameters:

7

 cep: "57038-635"

8

 test_3:

9

 parameters:

10

 cep: "57160-000"

`

Make sure that `path_test` corresponds to the correct path of your tool test.

It's also important to note that if your tool uses any external libraries, you must include a `requirements.txt` file in the same directory as your tool code. This file should list all the dependencies needed for your tool to run properly.

### How to run a test

Following the previous steps, we can now run a test, but how?

The command works as follows:

`1

weni run [agent_definition_file] [agent_key] [tool_key] [-f FILE] [-v]

`

A practical example of the command considering the agent definition that was mentioned above would be:

`1

weni run agent_definition.yaml cep_agent get_address

`

Result:

> An error occurred while loading the image https://github.com/vtexdocs/dev-portal-content/main/docs/guides/Weni-by-VTEX/CLI/assets/run-no-v.png

There is also a variation of this command in case you need to include ways to debug the code. You can add the `-v` argument at the end of the command to get more detailed logs of your tool, like this:

`1

weni run agent_definition.yaml cep_agent get_address -v

`

#### Choosing a test file

* Use `-f/--file` to specify a test definition YAML located in the tool folder.
* If `-f` is omitted, the CLI looks for `test_definition.yaml` in the tool's `source.path` directory.
* You can also set `source.path_test` in your agent definition to point to a custom test file; when present, the CLI uses that path by default.

#### Credentials and globals discovery

For development, the CLI will read optional files from the tool directory:

* `.env` for credentials exposed to your tool via `context.credentials`
* `.globals` for key/value pairs exposed via `context.globals`

Both files follow a simple `KEY=VALUE` per line format.

Result:

> An error occurred while loading the image https://github.com/vtexdocs/dev-portal-content/main/docs/guides/Weni-by-VTEX/CLI/assets/run-with-v.png

### Running Tools That Require Credentials

When your tool needs to interact with external services that require authentication, you'll need to provide credentials during testing. The official method for handling credentials with `weni run` is using your agent definition and a `.env` file.

#### Using Agent Definition and .env File

This approach mimics how credentials work in production, making your local development environment consistent with deployment.

First, update your agent definition to include credentials:

`1

agents:

2

 cep_agent:

3

 credentials:

4

 api_key:

5

 label: "API Key"

6

 placeholder: "Api Key"

7

 name: "CEP Agent"

8

 description: "Weni's CEP agent"

9

 instructions:

10

 - "You are an expert in providing addresses to the user based on a postal code provided by the user"

11

 - "The user will send a ZIP code (postal code) and you must provide the address corresponding to this code."

12

 guardrails:

13

 - "Don't talk about politics, religion or any other sensitive topic. Keep it neutral."

14

 tools:

15

 - get_address:

16

 name: "Get Address"

17

 source:

18

 path: "tools/get_address"

19

 entrypoint: "main.GetAddressWithAuth"

20

 path_test: "test_definition.yaml"

21

 description: "Function to get the address from the postal code"

22

 parameters:

23

 - cep:

24

 description: "postal code of a place"

25

 type: "string"

26

 required: true

27

 contact_field: true

`

Then, create a `.env` file inside the tool folder (e.g., `tools/get_address/.env`) with the actual credential values:

`1

api_key=your_actual_api_key_here

`

Now you can run your tool test with credentials using the same command:

`1

weni run agent_definition.yaml cep_agent get_address

`

The CLI will automatically pick up the credentials from the tool folder `.env` file and make them available to your tool during execution.

#### Accessing Credentials in Your Tool Code

Your tool code should access credentials through the `Context` object as shown below:

`1

from weni import Tool

2

from weni.context import Context

3

from weni.responses import TextResponse

4

import requests

5

6

class GetAddressWithAuth(Tool):

7

 def execute(self, context: Context) -> TextResponse:

8

 # Get parameters from context

9

 cep = context.parameters.get("cep", "")

10

11

 # Get credentials from context

12

 api_key = context.credentials.get("api_key")

13

14

 address_response = self.get_address_by_cep(cep=cep, api_key=api_key)

15

16

 return TextResponse(data=address_response)

17

18

 def get_address_by_cep(self, cep, api_key):

19

 url = f"https://viacep.com.br/ws/{cep}/json/"

20

21

 headers = {

22

 "Authorization": f"Bearer {api_key}"

23

 }

24

25

 response = requests.get(url, headers=headers)

26

27

 return response.json()

`

The key line is `api_key = context.credentials.get("api_key")`, which retrieves the credential value that was defined in your agent definition and stored in your tool folder `.env` file.

> **Important**: Never hardcode credentials in your tool code. Always access them through the Context object to ensure your code remains secure and works consistently across different environments.

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F170467615%3Fv%3D4%26w=64%26q=75)](https://github.com/mariananantua)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Weni-by-VTEX/CLI/using-weni-run-to-execute-tool-tests.md)

[Fetching and filtering logs« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests//docs/guides/weni-by-vtex-fetching-and-filtering-logs)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F170467615%3Fv%3D4%26w=64%26q=75)](https://github.com/mariananantua)

ON THIS PAGE

[What is required to run a tool?](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests%23what-is-required-to-run-a-tool)

[How to run a test](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests%23how-to-run-a-test)[Running Tools That Require Credentials](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests%23running-tools-that-require-credentials)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Weni-by-VTEX/CLI/using-weni-run-to-execute-tool-tests.md)

Copy page

On this page

ON THIS PAGE

[What is required to run a tool?](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests%23what-is-required-to-run-a-tool)

[How to run a test](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests%23how-to-run-a-test)[Running Tools That Require Credentials](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/using-weni-run-to-execute-tool-tests/docs/guides/using-weni-run-to-execute-tool-tests%23running-tools-that-require-credentials)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides services 1 getting started with the boilerplate in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/app-development-guides)

[Services](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-service)

[Developing services on VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/developing-services-on-vtex-io)

[1\. Getting started with the boilerplate](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate)

[2\. Handling and receiving events](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-2-handling-and-receiving-events)

[3\. Using the Analytics client](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-3-using-the-analytics-client)

[4\. Using events as triggers](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-4-using-events-as-triggers)

[5\. Using the Master Data client](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-5-using-the-master-data-client)

[6\. Using GraphQL to retrieve data from Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-6-graphql-retrieving-data-from-master-data)

[7\. Using GraphiQL](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-7-using-graphiql)

[Services - Conclusion](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-conclusion)

[Calling commerce APIs on VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/calling-commerce-apis-on-vtex-io)

[Clients](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-clients)

Handling events

[Path patterns](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/service-path-patterns)

[Configuring dynamic routes in VTEX IO services](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/configuring-dynamic-routes-in-vtex-io-services)

[Developing service configuration apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-developing-service-configuration-apps)

[Node builder 7.x migration guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/node-builder-7x-migration-guide)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/app-development-guides)

[Services](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-service)

[Developing services on VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/developing-services-on-vtex-io)

[1\. Getting started with the boilerplate](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate)

[2\. Handling and receiving events](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-2-handling-and-receiving-events)

[3\. Using the Analytics client](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-3-using-the-analytics-client)

[4\. Using events as triggers](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-4-using-events-as-triggers)

[5\. Using the Master Data client](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-5-using-the-master-data-client)

[6\. Using GraphQL to retrieve data from Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-6-graphql-retrieving-data-from-master-data)

[7\. Using GraphiQL](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-7-using-graphiql)

[Services - Conclusion](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-conclusion)

[Calling commerce APIs on VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/calling-commerce-apis-on-vtex-io)

[Clients](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-clients)

Handling events

[Path patterns](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/service-path-patterns)

[Configuring dynamic routes in VTEX IO services](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/configuring-dynamic-routes-in-vtex-io-services)

[Developing service configuration apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-developing-service-configuration-apps)

[Node builder 7.x migration guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/node-builder-7x-migration-guide)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/app-development)

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/app-development-guides)

[Services](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/vtex-io-documentation-service)

[Developing services on VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/developing-services-on-vtex-io)

[1\. Getting started with the boilerplate](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate)

Getting started with the boilerplate

The first thing you need to do is clone the [service-course-template](https://read.calvincode.net/reader?url=https://github.com/vtex-trainings/service-course-template) boilerplate, which is a template repository that we provide with all the initial files that you need to get started in this course.

Follow the step-by-step instructions to get started with the boilerplate and its dependencies.

## Cloning the boilerplate repository

Clone the `service-course-template` boilerplate by running the command presented in the left. This will create a local copy of the project, equipping you with the necessary files to start the course.

## Understanding the app structure

Open the [service-course-template](https://read.calvincode.net/reader?url=https://github.com/vtex-trainings/service-course-template) project in the code editor of your preference. You will notice the project contains three directories (`/docs`, `/node` and `/graphql`), the `manifest.json` file and the `package.json` file.

### `manifest.json` file

At the heart of this structure lies the [manifest.json](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-manifest) file, a crucial document encapsulating metadata about the app. This file not only contains fundamental details such as the app's `name`, `version`, and `title` but also outlines the `builders`, `policies`, and `dependencies` necessary for the app functionality. Let's delve deeper into some of these concepts:

| Field        | Type   | Description                                                                                |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| builders     | object | Specifies the [builders](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-builders) required by the app. Note that the app uses the node builder, which is responsible for interpreting [Node.js](https://read.calvincode.net/reader?url=https://nodejs.org/en) code. For each declared builder, there will be a dedicated folder specifically designed to be interpreted by that particular builder. |
| policies     | array  | Declares [policies](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-policies) for accessing external services or specific resources needed for the app functioning.                                                                                |
| dependencies | object | Lists other VTEX IO apps on which the app relies. For example, the app is dependent on the [events-example](https://read.calvincode.net/reader?url=https://github.com/vtex-apps/events-example) app, which we will use in the following steps to trigger events.                                                                                |

### `/node` folder

The `/node` folder houses the backend logic of the app, written in [Node.js](https://read.calvincode.net/reader?url=https://nodejs.org/en/). Here, Node packages and native libraries, such as [@vtex/clients](https://read.calvincode.net/reader?url=https://github.com/vtex/io-clients), can be employed to enhance code development.

In this project, our Node code is organized as in the following:

| Folder or file     | Description                                                                                |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /node/clients      | Holds placeholder files for implementing custom [VTEX IO clients](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-clients).                                                                                |
| /node/handlers     | Contains handler functions and logic designed to handle specific tasks and events.                                                                                |
| /node/utils        | Holds global constants declarations (/node/constants.ts) and other utility fuctions.                                                                                |
| /node/index.ts     | Encompasses initial declarations for app functionality, such as cache and service declarations. This file will evolve throughout the course and also allow for the export of resolver function implementations for GraphQL. |
| /node/service.json | Describes the behavior of the service and attributes that impact the app's infrastructure.                                                                                |

Note that most of the directories are empty and will be filled throughout this course.

#### `service.json` file

Located within the `/node` folder, the [service.json](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-service) file configures the app's infrastructure attributes. Key details are summarized in the following table:

| Field       | Type    | Description                                                                                |
| ----------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| memory      | integer | Memory size allocated to the app, in megabytes. This value is subjective to automatic adjustments if excessive usage is detected. |
| timeout     | integer | Maximum duration for fulfilling a request, in seconds. Requests exceeding this timeout are aborted.                               |
| minReplicas | integer | Minimum number of replicas available when the app is operational.                                                                 |
| maxReplicas | integer | Maximum numbers of replicas available for the app.                                                                                |
| routes      | object  | Describes the app's REST routes.                                                                                |

### `/graphql` folder

The `/graphql` folder, though currently empty, will be used to house GraphQL-related files in the project. The `/graphql/schema.graphql` file is a common convention for storing the GraphQL schema definition. In a GraphQL schema, you define the types, queries, mutations, and subscriptions that your GraphQL service supports. As our app evolves, we will populate this file with our GraphQL schema.

`git clone https://github.com/vtex-trainings/service-course-template

1

root

2

 ┣ 📂 docs

3

 ┣ 📂 node

4

 ┣ 📂 graphql

5

 ┣ 📄 README.md

6

 ┣ 📄 manifest.json

7

 ┗ 📄 package.json

`

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F7026595%3Fv%3D4%26w=64%26q=75)](https://github.com/henriquessb)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/services/services-1-getting-started-with-the-boilerplate.mdx)

[Developing services on VTEX IO« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate//docs/guides/developing-services-on-vtex-io)[2\. Handling and receiving eventsNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate//docs/guides/services-2-handling-and-receiving-events)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F7026595%3Fv%3D4%26w=64%26q=75)](https://github.com/henriquessb)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Cloning the boilerplate repository](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23cloning-the-boilerplate-repository)

[Understanding the app structure](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23understanding-the-app-structure)

[manifest.json file](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23manifestjson-file)[/node folder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23node-folder)[/graphql folder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23graphql-folder)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/services/services-1-getting-started-with-the-boilerplate.mdx)

Copy page

On this page

ON THIS PAGE

[Cloning the boilerplate repository](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23cloning-the-boilerplate-repository)

[Understanding the app structure](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23understanding-the-app-structure)

[manifest.json file](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23manifestjson-file)[/node folder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23node-folder)[/graphql folder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/services-1-getting-started-with-the-boilerplate/docs/guides/services-1-getting-started-with-the-boilerplate%23graphql-folder)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)