### Run SFB Toolkit Setup Source: https://developer.appdirect.com/user-guides/extensions/tutorial Run the guided setup for the AppDirect SFB Toolkit. Press Enter to accept default configurations. ```bash sfb-toolkit setup ``` -------------------------------- ### Creating a Recurring Flat Rate Subscription with Set Up Fees Source: https://developer.appdirect.com/user-guides/billing-and-subscription/rest-api/create-subscriptions/additional-examples This example demonstrates how to create a subscription for a recurring flat rate edition that includes setup fees. It shows the request payload in both JSON and XML formats. ```APIDOC ## POST /subscriptions ### Description Creates a subscription for a recurring flat rate edition with setup fees. ### Method POST ### Endpoint /subscriptions ### Request Body - **order** (object) - Required - Contains order details. - **paymentPlanId** (string) - Required - The ID of the payment plan. ### Request Example #### JSON ```json { "order": { "paymentPlanId": "592" } } ``` #### XML ```xml 592 ``` ### Response #### Success Response (200) (Response details not provided in the source text) ``` -------------------------------- ### Install Storefront Toolkit Source: https://developer.appdirect.com/storefront/storefront-installation Use this command to install the latest version of the Storefront Toolkit globally via npm. Ensure Node.js and npm are installed first. ```bash npm install -g @appdirect/sfb-toolkit@latest ``` -------------------------------- ### Create a Discount with Common Properties Source: https://developer.appdirect.com/user-guides/billing-and-subscription/rest-api/manage-discounts/create-discounts This example shows how to create a discount including additional common properties like start and expiration dates. ```APIDOC ## POST /api/channel/v1/discounts ### Description Creates a new discount with common properties like start and expiration dates. ### Method POST ### Endpoint /api/channel/v1/discounts ### Request Body - **code** (string) - Required - The unique code for the discount. - **type** (string) - Required - The type of discount. Can be `FIXED_PRICE` or `PERCENTAGE`. - **percentage** (string) - Required if type is `PERCENTAGE` - The percentage value for the discount. - **description** (string) - Optional - A description of the discount. - **autoApply** (string) - Optional - Whether the discount should be applied automatically. Values can be `true` or `false`. - **startDate** (string) - Optional - The date when the discount becomes active (YYYY-MM-DD). - **expirationDate** (string) - Optional - The date when the discount expires (YYYY-MM-DD). ### Request Example ```json { "code": "ILOVEAPPDIRECT", "description": "A discount for those who love AppDirect", "type": "PERCENTAGE", "percentage": "50", "autoApply": "false", "startDate": "2015-05-06", "expirationDate": "2015-10-11" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created discount. - **code** (string) - The discount code. - **redemptions** (string) - The number of times the discount has been redeemed. - **startDate** (string) - The start date of the discount. - **expirationDate** (string) - The expiration date of the discount. - **type** (string) - The type of discount. - **percentage** (string) - The percentage value (if applicable). - **description** (string) - The discount description. - **autoApply** (string) - Indicates if the discount is auto-applied. - **retainable** (string) - Indicates if the discount is retainable. - **redemptionRestriction** (string) - The restriction on discount redemption. - **vendorSharePercentage** (string) - The percentage of the discount shared with the vendor. - **partnerSharePercentage** (string) - The percentage of the discount shared with the partner. - **basePartnerSharePercentage** (string) - The base percentage of the discount shared with the partner. - **unit** (string) - The unit for the discount (e.g., USER). - **minUnits** (string) - The minimum number of units for the discount. - **maxUnits** (string) - The maximum number of units for the discount. #### Response Example ```json { "id": "2", "code": "ILOVEAPPDIRECT", "redemptions": "0", "startDate": "2015-05-06T00:00:00-06:00", "expirationDate": "2015-10-11T00:00:00-06:00", "type": "PERCENTAGE", "percentage": "50.0", "description": "A discount for those who love AppDirect", "autoApply": "false", "retainable": "false", "redemptionRestriction": "NONE", "vendorSharePercentage": "0", "partnerSharePercentage": "100", "basePartnerSharePercentage": "0", "unit": "USER", "minUnits": "0", "maxUnits": "0" } ``` ``` -------------------------------- ### Example Product Configurator URL Source: https://developer.appdirect.com/storefront/how-tos/storefront-checkout An example of a product configurator URL, demonstrating how to access the configuration page for a specific application. ```url /en-US/apps/577/g-suite/configure ``` -------------------------------- ### Example GraphQL Explorer URL Source: https://developer.appdirect.com/user-guides/graphql-dev-tools/graphql-explorer An example of the GraphQL Explorer URL with a placeholder marketplace host. This shows the expected format for accessing the tool. ```bash https://marketplace.example.com/graphql-explorer ``` -------------------------------- ### Create Discount with Common Properties Source: https://developer.appdirect.com/user-guides/billing-and-subscription/rest-api/manage-discounts/create-discounts This example demonstrates creating a discount with additional common properties like start and expiration dates. Ensure you use the 'price' property for 'FIXED_PRICE' types and 'percentage' for 'PERCENTAGE' types. ```curl curl -X post \ https://example.byappdirect.com/api/channel/v1/discounts \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "code": "ILOVEAPPDIRECT", "description": "A discount for those who love AppDirect", "type": "PERCENTAGE", "percentage": "50", "autoApply": "false", "startDate": "2015-05-06", "expirationDate": "2015-10-11" }' ``` ```json { "id": "2", "code": "ILOVEAPPDIRECT", "redemptions": "0", "startDate": "2015-05-06T00:00:00-06:00", "expirationDate": "2015-10-11T00:00:00-06:00", "type": "PERCENTAGE", "percentage": "50.0", "description": "A discount for those who love AppDirect", "autoApply": "false", "retainable": "false", "redemptionRestriction": "NONE", "vendorSharePercentage": "0", "partnerSharePercentage": "100", "basePartnerSharePercentage": "0", "unit": "USER", "minUnits": "0", "maxUnits": "0" } ``` -------------------------------- ### Example of Importing a Theme Source: https://developer.appdirect.com/storefront/how-tos/import-theme This example demonstrates how to use the import command with actual values for the theme zip file, marketplace path, and the new theme name. ```bash sfb-toolkit import mytheme.zip mymarketplace.com mynewtheme ``` -------------------------------- ### Create Product Mutation Example Source: https://developer.appdirect.com/graphql-docs/createproduct.doc.html This is an example mutation query to create a product. Use Ctrl + Space for autocompleting fields in the interactive tool. ```graphql mutation createProduct($product: CreateProductInput!) { product { create(product: $product) { product { id name } userErrors { message field } } } } ``` -------------------------------- ### Start UI Toolkit for Local Extension Development Source: https://developer.appdirect.com/user-guides/extensions/how-tos/local-development Run this command in your extension's directory to start the UI Toolkit and enable local testing. Changes will auto-update in the browser. ```bash npm run start ``` -------------------------------- ### Start the Storefront Toolkit Source: https://developer.appdirect.com/storefront/getting-started Run this command in your terminal to start the AppDirect Storefront Toolkit development server. Ensure you are in your theme's workspace directory. ```bash sfb-toolkit start ``` -------------------------------- ### Create Pricing Plan API - Interactive Example Source: https://developer.appdirect.com/graphql-docs/createpricingplan.doc.html An example mutation query for creating a pricing plan. Use the embedded tool to edit and test the query. ```APIDOC ## Create Pricing Plan API - Interactive Example ### Description This is an example mutation query for creating a pricing plan. You can use the interactive tool to modify and execute this query. ### Hint Use **Ctrl + Space** for autocompleting fields. ``` -------------------------------- ### Example Query: List Marketplace Products Source: https://developer.appdirect.com/user-guides/api-usage/graphql/queries Demonstrates a practical example of a GraphQL query to retrieve a list of all marketplace products, including their name, ID, vendor ID, and type. ```APIDOC ## Example Query: List Marketplace Products ### Description This query retrieves a list of all marketplace products, specifying the scalar fields 'name', 'id', 'vendorId', and 'type' for each product. ### Query ```graphql query{ products{ nodes{ name id vendorId type } } } ``` ### Response Example ```json { "data": { "products": { "nodes": [ { "name": "MySampleProduct", "id": "8a61cf55-1f2f-489c-8afb-052a5e2f9f91", "vendorId": "ce0a5582-2601-4080-b969-99f949492982", "type": "WEB_APP" }, { "name": "MyOtherProduct", "id": "8d7200d3-975d-4cc4-9c09-1e8d8a16f066", "vendorId": "ce0a5582-2601-4080-b969-99f949492982", "type": "WEB_APP" }, ... ] } } } ``` ``` -------------------------------- ### Set Up Workspace Folder Source: https://developer.appdirect.com/user-guides/extensions/how-tos/installation Use this command to initialize a new workspace for your extensions and themes. You will be prompted to agree to the license, select a base theme, name your theme, and provide your marketplace URL. ```bash sfb-toolkit setup ``` -------------------------------- ### Product Publication Status Response Source: https://developer.appdirect.com/user-guides/product-information/graphql-api/publish Example response showing the status of a product publication process, including start and completion times, status, and any errors. ```json { "data": { "productPublicationProcess": { "completedOn": "2023-09-12T10:00:00Z", "errors": null, "id": "ce0a5582-2601-4080-b969-99f949492982", "productId": "06ea7f9d-4a1b-4a00-810f-089ac43972e2", "startedOn": "2023-09-12T09:00:00Z", "status": "PUBLISHED", "triggeredOn": "2023-09-12T09:00:00Z" } } } ``` -------------------------------- ### Set Up Theme Workspace Source: https://developer.appdirect.com/storefront/storefront-installation This command initializes a new theme workspace. You will be prompted to agree to terms, select a base theme, name your theme, and provide your marketplace URL. ```bash sfb-toolkit setup themeFolderName ``` ```bash agree ``` -------------------------------- ### Get User Groups Response (200 OK) Source: https://developer.appdirect.com/ai-rest Example response for retrieving a list of groups associated with the current user. Each group object contains basic details. ```json [ { "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "orgId": "string", "ownerUserId": "string", "name": "string", "availability": "EVERYONE" } ] ``` -------------------------------- ### Get Organization Usage by AI Response (200 OK) Source: https://developer.appdirect.com/ai-rest Example response for organization usage metrics broken down by AI. Includes total usage and per-AI token consumption. ```json { "orgUsage": { "orgId": "string", "dataTokensUsed": 0, "dataUsageTokenLimit": 0, "apiTokensUsed": 0, "apiUsageTokenLimit": 0 }, "aiUsages": [ { "aiId": "string", "aiDataTokensUsed": 0, "aiApiTokensUsed": 0 } ] } ``` -------------------------------- ### Get Publication Process Status Source: https://developer.appdirect.com/user-guides/product-information/graphql-api/publish Queries the status of an ongoing or completed product publication process using its unique ID. It provides details such as start time, completion time, status, and any errors encountered. ```APIDOC ## Get Publication Process Status ### Description Queries the status of an ongoing or completed product publication process using its unique ID. It provides details such as start time, completion time, status, and any errors encountered. ### Method Query ### Endpoint N/A (GraphQL Query) ### Parameters #### Query Parameters - **id** (String) - Required - The ID of the product publication process to query. ### Request Example ```graphql query { productPublicationProcess(id: "ce0a5582-2601-4080-b969-99f949492982") { completedOn errors { ... on DuplicatePublicationTriggeredError { __typename message } ... on EditionIdMismatchError { __typename message } } id productId startedOn status triggeredOn } } ``` ### Response #### Success Response - **data.productPublicationProcess** (Object) - Contains the status details of the publication process. - **completedOn** (String) - The timestamp when the publication process was completed. - **errors** (Array of Objects) - A list of errors encountered during publication, if any. - **id** (String) - The unique identifier for the publication process. - **productId** (String) - The ID of the product that was published. - **startedOn** (String) - The timestamp when the publication process was started. - **status** (String) - The current status of the publication process (e.g., PUBLISHED). - **triggeredOn** (String) - The timestamp when the publication process was triggered. #### Response Example ```json { "data": { "productPublicationProcess": { "completedOn": "2023-09-12T10:00:00Z", "errors": null, "id": "ce0a5582-2601-4080-b969-99f949492982", "productId": "06ea7f9d-4a1b-4a00-810f-089ac43972e2", "startedOn": "2023-09-12T09:00:00Z", "status": "PUBLISHED", "triggeredOn": "2023-09-12T09:00:00Z" } } } ``` ``` -------------------------------- ### Install Custom Components with sfb-toolkit Source: https://developer.appdirect.com/storefront/how-tos/components/storefront-custom-components Execute this command to set up your theme for custom component integration. Refer to the toolkit documentation for a detailed explanation. ```bash sfb-toolkit components ``` -------------------------------- ### Docusaurus Data Attributes Setup Source: https://developer.appdirect.com/ This JavaScript code iterates through URL search parameters starting with 'docusaurus-data-' and sets corresponding data attributes on the document's root element. This allows for dynamic configuration via URL. ```javascript function(){try{ const c=new URLSearchParams(window.location.search).entries(); for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){ var a=t.replace("docusaurus-data-","data-"); document.documentElement.setAttribute(a,e) } }catch(t){}} ``` -------------------------------- ### Display All Storefront Toolkit Commands Source: https://developer.appdirect.com/storefront/developer-tools/toolkit Use the --help option to display a comprehensive list of all available Storefront Toolkit commands and their usage. ```bash sfb-toolkit --help ``` -------------------------------- ### Initiate Authorization Request Source: https://developer.appdirect.com/user-guides/api-usage/api-auth/grant-type/authorize-web-app Send this GET request to the marketplace's authorization endpoint to start the OAuth 2.0 Authorization Code flow. Ensure all parameters are correctly set, including client ID, scopes, and redirect URI. ```HTTP https://marketplace.example.com/oauth2/authorize?response_type=code&client_id=appdirect-49&scope=ROLE_USER%20ROLE_BILLING_ADMIN&state=bf0jksdldqj&redirect_uri=https%3A%2F%2Fwww.example.com%2Foauth2%2Freturn ``` -------------------------------- ### Install Node-sass Globally Source: https://developer.appdirect.com/storefront/storefront-installation Installs the node-sass package as a global dependency. This is required for both macOS and Windows installations. ```bash npm -g install node-sass ``` -------------------------------- ### Install nvm for Node.js Version Management Source: https://developer.appdirect.com/storefront/storefront-installation Use this command to install the Node Version Manager (nvm) on your system. This is recommended for managing Node.js installations. ```bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash ``` -------------------------------- ### Integrate FAQ and Product Lists into Home Page Source: https://developer.appdirect.com/storefront/how-tos/data/storefront-data-customized This example demonstrates how to include FAQ data and product lists on your Home page. It utilizes the `homeFaq` macro and `slider` macro for displaying content. ```html {% block data %} {% endblock %} {% block content %}
{{ hero() }}
{{ slider("Featured Apps", productLists.featuredapps, i18n) }}
{{ slider("Popular Apps", productLists.popularapps, i18n) }}
{{ homeFaq(ui.faqs.items[0], ui.faqs.l10n) }}
{{ sliderScript() }} {% endblock %} ``` -------------------------------- ### Successful Response Example Source: https://developer.appdirect.com/user-guides/user-companies/rest/deletecompanyaccountmemberships This is an example of a successful response after executing the deleteAccountMembership mutation. ```json { "data": { "deleteAccountMembership": { "success": true } } } ``` -------------------------------- ### Create Extension with SFB Toolkit Source: https://developer.appdirect.com/user-guides/extensions/how-tos/create-extension Use this command to create a new extension project locally after registering it in the marketplace. Replace placeholders with your extension's specific details. ```bash sfb-toolkit create-extension ``` -------------------------------- ### Example en-us.yml Translation Source: https://developer.appdirect.com/storefront/how-tos/localization This is an example of a simple key-value translation pair within a YAML locale file. ```yaml home: welcome: Welcome my friend ``` -------------------------------- ### Update Setup Form Placeholder Parameter Source: https://developer.appdirect.com/graphql-docs/addproductvariantoption.doc.html Updates a placeholder parameter in a setup form for a product integration. ```APIDOC ## Update Setup Form Placeholder Parameter ### Description Updates a placeholder parameter in a setup form for a product integration. ### Method PUT ### Endpoint `/productIntegrations/{productIntegrationId}/setupForm/placeholderParameters/{parameterName}` ### Parameters #### Request Body - **parameter** (UpdateSetupFormPlaceholderParameterInput) - Required - The updated placeholder parameter details. ### Request Example ```json { "parameter": { "value": "updatedPlaceholderValue" } } ``` ### Response #### Success Response (200) - **parameter** (AddSetupFormPlaceholderParameterInput) - The details of the updated placeholder parameter. #### Response Example ```json { "parameter": { "name": "placeholderName", "value": "updatedPlaceholderValue" } } ``` ``` -------------------------------- ### Create Pricing Plan Response Source: https://developer.appdirect.com/user-guides/product-information/graphql-api/create-pricing-plans Example response after successfully creating a pricing plan. ```json { "data": { "createPricingPlan": { "pricingPlan": { "id": "85710e29-b4f6-44d4-a376-070df21a429a" } } } } ``` -------------------------------- ### Add Setup Form Placeholder Parameter Source: https://developer.appdirect.com/graphql-docs/addproductvariantoption.doc.html Adds a placeholder parameter to a setup form for a product integration. ```APIDOC ## Add Setup Form Placeholder Parameter ### Description Adds a placeholder parameter to a setup form for a product integration. ### Method POST ### Endpoint `/productIntegrations/{productIntegrationId}/setupForm/placeholderParameters` ### Parameters #### Request Body - **parameter** (AddSetupFormPlaceholderParameterInput) - Required - The placeholder parameter details. ### Request Example ```json { "parameter": { "name": "placeholderName", "value": "placeholderValue" } } ``` ### Response #### Success Response (200) - **parameter** (AddSetupFormPlaceholderParameterInput) - The details of the added placeholder parameter. #### Response Example ```json { "parameter": { "name": "placeholderName", "value": "placeholderValue" } } ``` ``` -------------------------------- ### Creating a subscription to Microsoft products Source: https://developer.appdirect.com/user-guides/billing-and-subscription/rest-api/create-subscriptions/additional-examples This example demonstrates the successful creation of a subscription for Microsoft products, showing the response payload with details of the created subscription and its associated order. ```APIDOC ## POST /subscriptions ### Description Creates a new subscription for a user and company. ### Method POST ### Endpoint /subscriptions ### Request Body ```json { "maxUsers": "string", "order": { "currency": "string", "frequency": "string", "type": "string", "totalPrice": "string", "user": { "-id": "string", "-href": "string" }, "company": { "-id": "string", "-href": "string" }, "paymentPlanId": "string" } } ``` ### Request Example ```json { "maxUsers": "1", "order": { "currency": "USD", "frequency": "MONTHLY", "type": "NEW", "totalPrice": "10.63", "user": { "-id": "3d4d2342-b7c4-4865-85bd-842f269adae6", "-href": "http://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6" }, "company": { "-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78", "-href": "http://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78" }, "paymentPlanId": "749" } } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier for the subscription. - **creationDate** (string) - The date and time when the subscription was created. - **status** (string) - The current status of the subscription. - **maxUsers** (string) - The maximum number of users allowed for this subscription. - **order** (object) - Details about the order associated with the subscription. - **id** (string) - The unique identifier for the order. - **startDate** (string) - The start date of the order. - **nextBillingDate** (string) - The next billing date for the order. - **status** (string) - The status of the order. - **frequency** (string) - The billing frequency of the order. - **currency** (string) - The currency used for the order. - **type** (string) - The type of the order. - **totalPrice** (string) - The total price of the order. - **user** (object) - Information about the user associated with the order. - **-id** (string) - The user's ID. - **-href** (string) - The URL to the user's resource. - **company** (object) - Information about the company associated with the order. - **-id** (string) - The company's ID. - **-href** (string) - The URL to the company's resource. - **paymentPlan** (object) - Details about the payment plan. - **-href** (string) - The URL to the payment plan resource. - **id** (string) - The payment plan ID. - **uuid** (string) - The payment plan UUID. - **frequency** (string) - The payment plan frequency. - **contract** (object) - Contract details. - **blockContractDowngrades** (string) - Indicates if contract downgrades are blocked. - **blockContractUpgrades** (string) - Indicates if contract upgrades are blocked. - **blockSwitchToShorterContract** (string) - Indicates if switching to a shorter contract is blocked. - **allowCustomUsage** (string) - Indicates if custom usage is allowed. - **keepBillDateOnUsageChange** (string) - Indicates if the bill date is kept on usage change. - **separatePrepaid** (string) - Indicates if prepaid is separated. - **isPrimaryPrice** (string) - Indicates if this is the primary price. - **costs** (object) - Cost details. - **cost** (array) - An array of cost items. - **unit** (string) - The unit of cost. - **minUnits** (string) - The minimum number of units. - **meteredUsage** (string) - Indicates if usage is metered. - **pricePerIncrement** (string) - Indicates if pricing is per increment. - **blockContractDecrease** (string) - Indicates if contract decrease is blocked. - **blockContractIncrease** (string) - Indicates if contract increase is blocked. - **blockOriginalContractDecrease** (string) - Indicates if original contract decrease is blocked. - **amount** (object) - The amount for the cost. - **CAD** (string) - The amount in CAD. - **CHF** (string) - The amount in CHF. - **USD** (string) - The amount in USD. - **paymentPlanId** (string) - The ID of the payment plan. - **activated** (string) - Indicates if the order is activated. - **orderLines** (object) - Details about the order lines. - **orderLine** (array) - An array of order line items. - **description** (string) - Description of the order line item. - **id** (string) - The ID of the order line item. - **price** (string) - The price of the order line item. - **quantity** (string) - The quantity of the order line item. - **totalPrice** (string) - The total price of the order line item. - **type** (string) - The type of the order line item. - **unit** (string) - The unit of the order line item. - **percentage** (string) - The percentage for tax order lines. - **user** (object) - Information about the user associated with the order. - **-id** (string) - The user's ID. - **-href** (string) - The URL to the user's resource. - **company** (object) - Information about the company associated with the order. - **-id** (string) - The company's ID. - **-href** (string) - The URL to the company's resource. - **product** (object) - Information about the product. - **-id** (string) - The product's ID. - **-href** (string) - The URL to the product's resource. - **edition** (object) - Information about the edition. - **-id** (string) - The edition's ID. - **-href** (string) - The URL to the edition's resource. #### Response Example ```json { "id": "1be642f4-64cd-4357-b0f0-14b476c47dfa", "creationDate": "2015-08-11T15:39:39-06:00", "status": "INITIALIZED", "maxUsers": "1", "order": { "id": "1584", "startDate": "2015-08-11T00:00:00-06:00", "nextBillingDate": "2015-09-11T00:00:00-06:00", "status": "PENDING_REMOTE_CREATION", "frequency": "MONTHLY", "currency": "USD", "type": "NEW", "totalPrice": "10.6300000000", "user": { "-id": "3d4d2342-b7c4-4865-85bd-842f269adae6", "-href": "http://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6" }, "company": { "-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78", "-href": "http://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78" }, "paymentPlan": { "-href": "http://www.appdirect.com/api/marketplace/v1/products/93/editions/612/paymentPlans/749", "id": "749", "uuid": "eb483983-ce47-41a7-b304-e5b6bb89d818", "frequency": "MONTHLY", "contract": { "blockContractDowngrades": "false", "blockContractUpgrades": "false", "blockSwitchToShorterContract": "false" }, "allowCustomUsage": "false", "keepBillDateOnUsageChange": "false", "separatePrepaid": "false", "isPrimaryPrice": "false", "costs": { "cost": [ { "unit": "USER", "minUnits": "0.0000000000", "meteredUsage": "false", "pricePerIncrement": "false", "blockContractDecrease": "false", "blockContractIncrease": "false", "blockOriginalContractDecrease": "false", "amount": { "CAD": "10.0000000000", "CHF": "10.0000000000", "USD": "10.0000000000" } }, { "unit": "NOT_APPLICABLE", "minUnits": "0.0000000000", "meteredUsage": "false", "pricePerIncrement": "false", "blockContractDecrease": "false", "blockContractIncrease": "false", "blockOriginalContractDecrease": "false", "amount": { "CAD": "10.0000000000", "CHF": "10.0000000000", "USD": "10.0000000000" } } ] } }, "paymentPlanId": "749", "activated": "false", "orderLines": { "orderLine": [ { "description": "Office 365 Web Apps - Plan 1 - Monthly Fee", "id": "2428", "price": "10.0000000000", "quantity": "1.0000000000", "totalPrice": "10.0000000000", "type": "ITEM", "unit": "NOT_APPLICABLE" }, { "description": "Sales Tax", "id": "2429", "percentage": "6.3000000000", "quantity": "1.0000000000", "totalPrice": "0.6300000000", "type": "TAX" } ] }, "user": { "-id": "3d4d2342-b7c4-4865-85bd-842f269adae6", "-href": "http://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6" }, "company": { "-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78", "-href": "http://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78" }, "product": { "-id": "93", "-href": "http://www.appdirect.com/api/marketplace/v1/products/93" }, "edition": { "-id": "612", "-href": "http://www.appdirect.com/api/marketplace/v1/products/93/editions/612" } } ``` ``` -------------------------------- ### List GitHub App Installations Source: https://developer.appdirect.com/ai-rest Retrieves a list of GitHub app installations for the authenticated user. Requires ApiKeyAuth. ```json { "data": [ { "id": 0, "installationId": "string", "targetId": "string", "targetType": "string", "targetLabel": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ] } ``` -------------------------------- ### User Session Webhook Payload Example Source: https://developer.appdirect.com/webhooks/working-with-webhooks/payload/user-session This is an example of the JSON payload received when a user session is added or removed. ```json { "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "timestamp": 1742054400000, "resource": { "type": "USER_SESSION", "uuid": "4ef60b96-6180-4d82-8080-6f59ff51e2d3", "url": "https://mycompany.byappdirect.com/api/account/v1/users/4ef60b96-6180-4d82-8080-6f59ff51e2d3", "content": { "userEmailAddress": "johndoe@example.com", "userUuid": "4ef60b96-6180-4d82-8080-6f59ff51e2d3", "partner": "ACME", "ipAddress": "192.168.1.100", "createdOn": "2026-03-15T14:30:00Z" } }, "resourceAction": "ADDED" } ``` -------------------------------- ### Sample Arguments for Domain Product Source: https://developer.appdirect.com/user-guides/checkout/graphql/additemstocart Illustrates the input arguments required for adding a domain product to the cart, including the domain name. ```json { "input":{ "items": [ { "pricingPlanId":"ae1acd7c-e161-4dc1-8b35-1865138874c", "domain":"meter.io" } ], "userId": "95cce1ea-37fb-431d-9f5a-7df387b7e8e4", "accountId": "9faf88c2-9e58-4f5b-a009-5dc9094fe2a0" } } ```