> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.rye.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Amazon Business Connection

To confirm that everything is set up correctly, please follow the steps below.

1. Ensure that your group is in Active mode in Amazon (if you are in Test mode, the order will not show up in Amazon)
2. Using the [`createCart`](/api-reference/createcart) mutation, create a cart with an Amazon product.
   * Replace the values in the double curly braces (`{{}}`) below with your own values.

<CodeGroup>
  ```json Query arguments theme={null}
  {
  "input": {
      "items": {
          "amazonCartItemsInput": [{
              "quantity": 1,
              "productId": "B001G60EK8"
          }],
      },
      "buyerIdentity": {
          "firstName": "{{firstName}}",
          "lastName": "{{lastName}}",
          "email": "{{email}}",
          "phone": "{{phone}}",
          "address1": "{{address1}}",
          "address2": "{{address2}}",
          "city": "{{city}}",
          "provinceCode": "{{provinceCode}}",
          "countryCode": "US",
          "postalCode": "{{postalCode}}"
      }
  }
  }
  ```

  ```json Response theme={null}
  {
      "data": {
          "createCart": {
              "cart": {
                  "id": "{{cart_id}}",
                  "cost": {
                      "isEstimated": false,
                      "margin": {
                          "value": 0,
                          "displayValue": "$0.00"
                      },
                      "subtotal": {
                          "value": 2900,
                          "displayValue": "$29.00"
                      },
                      "tax": {
                          "value": 160,
                          "displayValue": "$1.60"
                      },
                      "shipping": {
                          "value": 0,
                          "displayValue": "$0.00"
                      },
                      "total": {
                          "value": 3060,
                          "displayValue": "$30.60"
                      }
                  },
                  "buyerIdentity": {
                      "firstName": "{{firstName}}",
                      "lastName": "{{lastName}}",
                      "address1": "{{address1}}",
                      "address2": "{{address2}}",
                      "city": "{{city}}",
                      "provinceCode": "{{provinceCode}}",
                      "countryCode": "US",
                      "postalCode": "{{postalCode}}",
                      "email": "{{email}}",
                      "phone": "{{phone}}"
                  },
                  "stores": [
                      {
                          "errors": [],
                          "isSubmitted": false,
                          "store": "amazon",
                          "cartLines": [
                              {
                                  "quantity": 1,
                                  "product": {
                                      "id": "B001G60EK8",
                                      "isAvailable": true,
                                      "price": {
                                          "displayValue": "$29.00",
                                          "value": 2900
                                      },
                                      "amazonBusinessPrice": null
                                  }
                              }
                          ],
                          "offer": {
                              "productDeliveryEstimateRanges": [
                                  {
                                      "productId": "B001G60EK8",
                                      "earliest": "2025-03-20T07:00:00Z",
                                      "latest": "2025-03-21T06:59:59Z"
                                  }
                              ],
                              "errors": [],
                              "subtotal": {
                                  "value": 2900,
                                  "displayValue": "$29.00",
                                  "currency": "USD"
                              },
                              "margin": {
                                  "value": 0,
                                  "displayValue": "$0.00",
                                  "currency": "USD"
                              },
                              "notAvailableIds": [],
                              "shippingMethods": [
                                  {
                                      "id": "0-Default shipping method",
                                      "label": "Default shipping method",
                                      "price": {
                                          "value": 0,
                                          "displayValue": "$0.00",
                                          "currency": "USD"
                                      },
                                      "taxes": {
                                          "value": 160,
                                          "displayValue": "$1.60",
                                          "currency": "USD"
                                      },
                                      "total": {
                                          "value": 3060,
                                          "displayValue": "$30.60",
                                          "currency": "USD"
                                      }
                                  }
                              ]
                          }
                      }
                  ]
              },
              "errors": []
          }
      }
  }
  ```
</CodeGroup>

3. Use the [`submitCart`](/api-reference/submitcart) mutation to submit the cart
   * Replace `cart_id` with the cart id from the previous steps
   * Confirm that free shipping was applied if you have an Amazon Business Prime membership on your account.

<CodeGroup>
  ```json Query arguments theme={null}
  {
      "input": {
          "id": "{{cart_id}}"
      }
  }
  ```

  ```json Response theme={null}
  {
      "data": {
          "submitCart": {
              "cart": {
                  "id": "{{cart_id}}",
                  "stores": [
                      {
                          "isSubmitted": true,
                          "status": "COMPLETED",
                          "orderId": "{{order_id}}",
                          "store": {
                              "store": "amazon",
                              "errors": [],
                              "cartLines": [
                                  {
                                      "quantity": 1,
                                      "product": {
                                          "id": "B001G60EK8"
                                      }
                                  }
                              ]
                          },
                          "errors": []
                      }
                  ]
              },
              "errors": []
          }
      },
      "extensions": {
          "cost": {
              "queryCost": 28,
              "queryCostLimit": 1000
          }
      }
  }
  ```
</CodeGroup>

4. Confirm the order appears in your Amazon Business account.
5. Cancel the order if you don’t need the product.
