Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23H2KR5 | Pricing Hub #1069

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions PostmanCollections/VTEX - Pricing Hub.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"_": {
"postman_id": "33baa44e-0613-42e6-97e0-eb4f7f523c1e"
"postman_id": "e79d721f-74cc-4d03-8e24-8892f272ab57"
},
"item": [
{
"id": "d9495fd3-e74a-4c36-9553-171911cfd29c",
"id": "fa275606-0356-4bbd-b319-8b0b5f042cc3",
"name": "Pricing Hub Prices",
"description": {
"content": "",
"type": "text/plain"
},
"item": [
{
"id": "8b264e80-5f42-4adf-8074-6ca969328dbf",
"id": "f11f0f0a-6e0f-4455-bf5a-4658c7f10ba6",
"name": "Retrieve prices",
"request": {
"name": "Retrieve prices",
Expand Down Expand Up @@ -78,7 +78,7 @@
"_": {
"postman_previewlanguage": "json"
},
"id": "e88800cc-18e4-4e1e-813b-4493a9e164e4",
"id": "abbdcf7c-d425-44d9-9f21-f98e8ee8b159",
"name": "OK",
"originalRequest": {
"url": {
Expand Down Expand Up @@ -167,7 +167,7 @@
{
"listen": "test",
"script": {
"id": "6b3fc779-2094-40d7-8c6e-d6d0bb84d0cc",
"id": "c674e783-befe-4804-836c-2e0b377b1522",
"type": "text/javascript",
"exec": [
"// Validate status 2xx \npm.test(\"[POST]::/api/pricing-hub/prices - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n",
Expand All @@ -183,7 +183,7 @@
}
},
{
"id": "1a507e94-c724-4ef1-a7e1-cf62985cf0ae",
"id": "c3809958-3025-4bc2-b647-f30b451ad45b",
"name": "Configure external price source",
"request": {
"name": "Configure external price source",
Expand Down Expand Up @@ -246,7 +246,7 @@
"_": {
"postman_previewlanguage": "text"
},
"id": "ad50f49c-f948-4465-a684-86e04e5e2103",
"id": "c7c98c21-d0b0-4735-be5c-5b02345222d4",
"name": "OK",
"originalRequest": {
"url": {
Expand Down Expand Up @@ -332,7 +332,7 @@
{
"listen": "test",
"script": {
"id": "52fcd773-7344-48ef-808e-b8bb5c320b9f",
"id": "ee8bf9a9-5450-4988-b0e5-73f0d37bc7e7",
"type": "text/javascript",
"exec": [
"// Validate status 2xx \npm.test(\"[PUT]::/api/pricing-hub/prices/config - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n"
Expand Down Expand Up @@ -386,11 +386,11 @@
}
],
"info": {
"_postman_id": "33baa44e-0613-42e6-97e0-eb4f7f523c1e",
"_postman_id": "e79d721f-74cc-4d03-8e24-8892f272ab57",
"name": "Pricing Hub",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"description": {
"content": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https://user-images.githubusercontent.com/77292838/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https://github.com/vtex-apps/external-prices-app)\r\n- [Node template](https://github.com/vtex-apps/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https://developers.vtex.com/docs/api-reference/pricing-hub#post-/api/pricing-hub/prices?endpoint=post-/api/pricing-hub/prices)\r\n- [PUT - Configure External Price Source](https://developers.vtex.com/docs/api-reference/pricing-hub#put-/api/pricing-hub/prices/config)",
"content": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https://user-images.githubusercontent.com/77292838/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https://github.com/vtex-apps/external-prices-app)\r\n- [Node template](https://github.com/vtex-apps/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https://developers.vtex.com/docs/api-reference/pricing-hub#post-/api/pricing-hub/prices?endpoint=post-/api/pricing-hub/prices)\r\n- [PUT - Configure External Price Source](https://developers.vtex.com/docs/api-reference/pricing-hub#put-/api/pricing-hub/prices/config)\r\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n|---------------------------|-----------------------------------------------------------------------------------------|\r\n| `{{accountName}}` | Store account name. |\r\n| `{{environment}}` | The environment that will be called. |\r\n| `{{X-VTEX-API-AppKey}}` | Located in the headers of the requests, user authentication key. |\r\n| `{{X-VTEX-API-AppToken}}` | Located in the headers of the requests, authentication password. |\r\n",
"type": "text/plain"
}
}
Expand Down
2 changes: 1 addition & 1 deletion VTEX - Pricing Hub.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "Pricing Hub",
"description": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https:\/\/support.vtex.com\/hc\/en-us\/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https:\/\/user-images.githubusercontent.com\/77292838\/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https:\/\/github.com\/vtex-apps\/external-prices-app)\r\n- [Node template](https:\/\/github.com\/vtex-apps\/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#post-\/api\/pricing-hub\/prices?endpoint=post-\/api\/pricing-hub\/prices)\r\n- [PUT - Configure External Price Source](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#put-\/api\/pricing-hub\/prices\/config)",
"description": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https://user-images.githubusercontent.com/77292838/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https://github.com/vtex-apps/external-prices-app)\r\n- [Node template](https://github.com/vtex-apps/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- `POST` [Retrieve prices](https://developers.vtex.com/docs/api-reference/pricing-hub#post-/api/pricing-hub/prices)\r\n- `PUT` [Configure External Price Source](https://developers.vtex.com/docs/api-reference/pricing-hub#put-/api/pricing-hub/prices/config)\r\n\r\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n| - | - |\r\n| `{{an}}` | Name of the VTEX account.\r\n|\r\n| `{{environment}}` | Name of the VTEX account. |\r\n| `{{X-VTEX-API-AppKey}}` | Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys). |\r\n| `{{X-VTEX-API-AppToken}}` | Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys). |",
"contact": {},
"version": "1.0"
},
Expand All @@ -28,7 +28,7 @@
"Pricing Hub Prices"
],
"summary": "Retrieve prices",
"description": "This route retrieves and applies prices for the items that are passed in the request. Pricing Hub will select the pricing method that will be used for each item and will fetch their respective price from the selected pricing method. \r\n\r\n>ℹ️ This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). ",

Check warning on line 31 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

endpoint-permissions

Endpoint descriptions must include a "Permissions" section, with information about License Manager resources and roles.
"parameters": [
{
"name": "an",
Expand Down Expand Up @@ -64,7 +64,7 @@
}
],
"requestBody": {
"content": {

Check failure on line 67 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

items-description

Each request or response body array "items" property must contain a description.

Check failure on line 67 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

items-type

Each request or response body array "items" property must contain a type.
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetPricesRequestObject"
Expand Down Expand Up @@ -97,7 +97,7 @@
"responses": {
"200": {
"description": "OK",
"content": {

Check failure on line 100 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

items-type

Each request or response body array "items" property must contain a type.

Check failure on line 100 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

items-description

Each request or response body array "items" property must contain a description.
"application/json": {
"schema": {
"$ref": "#/components/schemas/response2"
Expand Down Expand Up @@ -137,7 +137,7 @@
"Pricing Hub Prices"
],
"summary": "Configure external price source",
"description": "This route facilitates setting up an external price source in Pricing Hub. It also allows you to activate or deactivate that source in a given account. \r\n\r\n>ℹ️ This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). ",

Check warning on line 140 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

endpoint-permissions

Endpoint descriptions must include a "Permissions" section, with information about License Manager resources and roles.
"operationId": "ConfigExternalPriceSource",
"parameters": [
{
Expand Down Expand Up @@ -265,7 +265,7 @@
"index": {
"description": "Index of the item at Checkout's cart. It has to be unique in the items array.",
"type": "integer",
"example": 0

Check failure on line 268 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

request-body-properties-example

Each request body property must contain an example.
},
"skuId": {
"description": "ID of the SKU that will be priced.",
Expand Down Expand Up @@ -380,7 +380,7 @@
"properties": {
"active": {
"type": "boolean",
"example": false,

Check failure on line 383 in VTEX - Pricing Hub.json

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

request-body-properties-example

Each request body property must contain an example.
"description": "Defines if the external price source is active (`true`) or not (`false`). If not set, the default value will be `false`."
},
"appName": {
Expand Down
Loading