From 14b57cfaa982f23189b75165811bd2b1245e0422 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Fri, 28 Feb 2025 08:14:58 -0600 Subject: [PATCH] DEVDOCS-6037: [UPDATE] updated Postman collection (#838) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [DEVDOCS-6037] ## What changed? * Updated the unified billing postman collection ## Release notes draft * Updated the unified billing postman collection * ## Anything else? ping {names} [DEVDOCS-6037]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6037?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .../unified-billing/postman-collection.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/integrations/apps/unified-billing/postman-collection.mdx b/docs/integrations/apps/unified-billing/postman-collection.mdx index 2d8598b34..45fee0130 100644 --- a/docs/integrations/apps/unified-billing/postman-collection.mdx +++ b/docs/integrations/apps/unified-billing/postman-collection.mdx @@ -4,7 +4,7 @@ We've integrated our sample app with Unified Billing to provide best practices for app developers. You can work with our [core sample app (GitHub)](https://github.com/bigcommerce/sample-app-nodejs). ```json filename="Unified Billing Postman collection" showLineNumbers copy -{ + { "info": { "_postman_id": "9ae83029-8429-4cac-944e-630a27a99f52", "name": "Unified Billing API", @@ -13,7 +13,7 @@ We've integrated our sample app with Unified Billing to provide best practices f }, "item": [ { - "name": "Create Checkout", + "name": "Checkout Query", "request": { "method": "POST", "header": [ @@ -29,8 +29,8 @@ We've integrated our sample app with Unified Billing to provide best practices f "body": { "mode": "graphql", "graphql": { - "query": "mutation ($checkout: CreateCheckoutInput!) {\n checkout {\n createCheckout(input: $checkout) {\n checkout {\n id\n accountId\n status\n checkoutUrl\n items(first: 1) {\n edges {\n node {\n subscriptionId\n status\n product {\n id\n type\n productLevel\n }\n scope {\n id\n type\n }\n pricingPlan {\n interval\n price {\n value\n currencyCode\n }\n trialDays\n }\n redirectUrl\n description\n }\n }\n }\n }\n }\n }\n}\n", - "variables": "{\n \"checkout\": {\n \"accountId\": \"bc/account/account/{{merchant_account_uuid}}\",\n \"items\": [\n {\n \"product\": {\n \"type\": \"APPLICATION\",\n \"id\": \"bc/account/product/{{application_id}}\",\n \"productLevel\": \"Standard Plan\"\n },\n \"scope\": {\n \"type\": \"STORE\",\n \"id\": \"bc/account/scope/{{store_hash}}\"\n },\n \"description\": \"App Name\",\n \"pricingPlan\": {\n \"interval\": \"MONTH\",\n \"price\": {\n \"value\": 3.99,\n \"currencyCode\": \"USD\"\n }\n },\n \"redirectUrl\": \"myapp.com\"\n }\n ]\n }\n}" + "query": "query q1($id: ID!) {\n account {\n checkout(id: $id) {\n id\n accountId\n status\n checkoutUrl\n items {\n edges {\n node {\n subscriptionId\n status\n product {\n id\n type\n }\n scope {\n id\n type\n }\n pricingPlan {\n interval\n price {\n value\n currencyCode\n }\n trialDays\n }\n redirectUrl\n description\n }\n }\n }\n }\n }\n}\n", + "variables": "{\n \"id\": \"bc/account/checkout/{{checkout_id}}\"\n}" } }, "url": { @@ -49,7 +49,7 @@ We've integrated our sample app with Unified Billing to provide best practices f "response": [] }, { - "name": "Checkout Query", + "name": "Subscriptions Query", "request": { "method": "POST", "header": [ @@ -65,8 +65,8 @@ We've integrated our sample app with Unified Billing to provide best practices f "body": { "mode": "graphql", "graphql": { - "query": "query q1($id: ID!) {\n account {\n checkout(id: $id) {\n id\n accountId\n status\n checkoutUrl\n items {\n edges {\n node {\n subscriptionId\n status\n product {\n id\n type\n }\n scope {\n id\n type\n }\n pricingPlan {\n interval\n price {\n value\n currencyCode\n }\n trialDays\n }\n redirectUrl\n description\n }\n }\n }\n }\n }\n}\n", - "variables": "{\n \"id\": \"bc/account/checkout/{{checkout_id}}\"\n}" + "query": "query ($filters: SubscriptionFiltersInput) {\n account {\n subscriptions(filters: $filters) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n cursor\n node {\n id\n accountId\n activationDate\n billingInterval\n currentPeriodEnd\n pricePerInterval {\n value\n currencyCode\n }\n product {\n productLevel\n id\n type\n }\n scope {\n type\n id\n }\n status\n createdAt\n updatedAt\n }\n }\n }\n }\n}\n", + "variables": "{\n \"filters\": {\n \"ids\": [\"bc/account/subscription/{{subscription_id}}\"],\n \"productId\": \"bc/account/product/{{application_id}}\",\n \"productType\": \"APPLICATION\",\n \"updatedAfter\": \"2024-10-21T11:00:00Z\",\n \"status\": \"ACTIVE\"\n }\n}" } }, "url": { @@ -85,7 +85,7 @@ We've integrated our sample app with Unified Billing to provide best practices f "response": [] }, { - "name": "Subscriptions Query", + "name": "Create Checkout", "request": { "method": "POST", "header": [ @@ -101,8 +101,8 @@ We've integrated our sample app with Unified Billing to provide best practices f "body": { "mode": "graphql", "graphql": { - "query": "query ($filters: SubscriptionFiltersInput) {\n account {\n subscriptions(filters: $filters) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n cursor\n node {\n id\n accountId\n activationDate\n billingInterval\n currentPeriodEnd\n pricePerInterval {\n value\n currencyCode\n }\n product {\n productLevel\n id\n type\n }\n scope {\n type\n id\n }\n status\n createdAt\n updatedAt\n }\n }\n }\n }\n}\n", - "variables": "{\n \"filters\": {\n \"ids\": [\"bc/account/subscription/{{subscription_id}}\"],\n \"productId\": \"bc/account/product/{{application_id}}\",\n \"productType\": \"APPLICATION\",\n \"updatedAfter\": \"2024-10-21T11:00:00Z\",\n \"status\": \"ACTIVE\"\n }\n}" + "query": "mutation ($checkout: CreateCheckoutInput!) {\n checkout {\n createCheckout(input: $checkout) {\n checkout {\n id\n accountId\n status\n checkoutUrl\n items(first: 1) {\n edges {\n node {\n subscriptionId\n status\n product {\n id\n type\n productLevel\n }\n scope {\n id\n type\n }\n pricingPlan {\n interval\n price {\n value\n currencyCode\n }\n trialDays\n }\n redirectUrl\n description\n }\n }\n }\n }\n }\n }\n}\n", + "variables": "{\n \"checkout\": {\n \"accountId\": \"bc/account/account/{{merchant_account_uuid}}\",\n \"items\": [\n {\n \"product\": {\n \"type\": \"APPLICATION\",\n \"id\": \"bc/account/product/{{application_id}}\",\n \"productLevel\": \"Standard Plan\"\n },\n \"scope\": {\n \"type\": \"STORE\",\n \"id\": \"bc/account/scope/{{store_hash}}\"\n },\n \"description\": \"App Name\",\n \"pricingPlan\": {\n \"interval\": \"MONTH\",\n \"price\": {\n \"value\": 3.99,\n \"currencyCode\": \"USD\"\n }\n },\n \"redirectUrl\": \"myapp.com\"\n }\n ]\n }\n}" } }, "url": {