diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f4e7a3..ed4ba69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- Add GraphQL API documentation + ## [0.1.4] - 2020-09-15 ## [0.1.3] - 2020-08-05 diff --git a/docs/tax-protocol-graphql-api.md b/docs/tax-protocol-graphql-api.md new file mode 100644 index 0000000..7b59868 --- /dev/null +++ b/docs/tax-protocol-graphql-api.md @@ -0,0 +1,396 @@ +# Tax Protocol GraphQL API + +This API enables setting and retrieving the Tax Configuration, which is part of the [OrderForm configuration](https://developers.vtex.com/docs/guides/get-an-account-orderform-configuration), for the Tax Service. + +## Schema Overview + +## Query + +```mermaid +classDiagram + direction LR + class TaxConfiguration { + allowExecutionAfterErrors Boolean + authorizationHeader String + integratedAuthentication Boolean + url String + } + + class Query { + getTaxConfiguration TaxConfiguration + } + + Query --> TaxConfiguration : getTaxConfiguration + + click Query href "#query" + click TaxConfiguration href "#taxconfiguration" +``` + +
Field | +Argument | +Type | +Description | +
---|---|---|---|
+ getTaxConfiguration + | +TaxConfiguration | +Endpoint responsible to fetch information regarding the Tax Configuration of an account. Its resolver makes a GET request to Checkout (Get orderForm configuration) and retrieves the Tax Configuration from the OrderForm Configuration. |
+
Field | +Argument | +Type | +Description | +
---|---|---|---|
+ setTaxConfiguration + | ++ OrderFormConfiguration + | +Endpoint responsible for activating and deactivating the tax service on the OrderForm configuration. It does a POST HTTP request (Update orderForm configuration) to set the Tax Configuration on the OrderForm Configuration. In order to do so, it uses a Checkout client. | +|
operation | +String | +Argument to define whether the tax service will be activated or deactivated. Possible values: "activate" , "deactivate" . |
+
Field | +Argument | +Type | +Description | +
---|---|---|---|
+ paymentConfiguration + | ++ PaymentConfiguration + | +Payment configuration information. | +|
+ taxConfiguration + | ++ TaxConfiguration + | +External tax service configuration information. | +|
+ + minimumQuantityAccumulatedForItems + | ++ Int + | +Minimum SKU quantity by cart. This field is mandatory and must be sent in all requests. | +|
+ decimalDigitsPrecision + | ++ Int + | +Number of price digits. | +|
+ minimumValueAccumulated + | ++ Int + | +Minimum cart value. | +|
+ apps + | +[App] | +List of App objects, where each object has an app configuration information. See an example with the apps list in the Get orderForm configuration response body. |
+ |
+ allowMultipleDeliveries + | ++ Boolean + | +Allows the selection of items from several delivery channels in the same purchase. | +|
+ allowManualPrice + | ++ Boolean + | +Allows the editing of SKU prices directly in the cart. | +|
+ maxIntOfWhiteLabelSellers + | ++ Int + | +Allows the input of a limit of white label sellers involved on the cart. | +|
+ maskFirstPurchaseData + | ++ Boolean + | +Allows, on a first purchase, masking client's data. It could be useful when a shared cart is used and the client doesn't want to share its data. | +|
+ recaptchaValidation + | ++ Boolean + | +Configures reCAPTCHA validation status for the account. | +
Field | +Argument | +Type | +Description | +
---|---|---|---|
+ fields + | +[String] | +List of fields available to the app. | +|
+ id + | +String | +App ID. | +|
+ major + | ++ Int + | +App major version. | +
Field | +Argument | +Type | +Description | +
---|---|---|---|
+ + requiresAuthenticationForPreAuthorizedPaymentOption + | ++ Boolean + | +Determines whether pre-authorized payments require authentication. This field is mandatory and must be sent in all requests. | +|
+ allowInstallmentsMerge + | ++ Boolean + | +By default (when false ), on a multi-seller purchase is on the run, a simple intersection with installments options configured by every seller will be available. When true , this option allows a more complex but flexible installment option, since it considers max installments of every seller configuration, even if those don't match. Installment values may not be equal in this case. |
+ |
+ blockPaymentSession + | ++ Boolean + | +Indicates whether shoppers can add credit cards in your store's My Account section. | +|
+ + paymentSystemToCheckFirstInstallment + | ++ Boolean + | +If you want to apply a first installment discount to a particular payment system, set this field to that payment system's ID. Learn more: Configuring a discount for orders prepaid in full. | +
Field | +Type | +Description | +
---|---|---|
+ allowExecutionAfterErrors + | ++ Boolean + | +Allows continuing with the purchase even on a tax system problem occurrence. | +
+ authorizationHeader + | ++ String + | +String that the Checkout will use in the Authorization header of calls to the external tax calculation API. This field can be used to define the access credentials for this API. Example: "99b9935b048dfd86893d0bf9gas628849" . |
+
+ integratedAuthentication + | ++ Boolean + | +When true , tax system uses VTEX auth. When false , use authorizationHeader instead. |
+
+ url + | ++ String + | +String of external API endpoint of the tax provider that the Checkout will query to receive the calculated taxes. Example: "https://sandbox-rest.avatax.com/api/v2/transactions/create" . |
+