Link Search Menu Expand Document

Estimate Draft

Mutation

mutation createEstimateDraft($estimateDraftDetails: EstimateDraftInput!) {
  createEstimateDraft(estimateDraftDetails: $estimateDraftDetails) {
    id
    transactionDraftStatus
  }
}

Variables

{
    "estimateDraftDetails": {
      "amount": 22.95,
      "externalMetadata": [
        {
          "name": "account_id",
          "value": "a-1234"
        },
        {
          "name": "deal_id",
          "value": "d-12345"
        }
      ],
      "transactionDate": "2020-09-16",
      "customer": {
        "id": "djQuMTo5MTMwMzUyMzI1NzU4Mjk2OjlkNjk5ZTk2MDg:123",
        "displayName": "Test Customer"
      },
      "currency": {
        "name": "USD",
        "currency": "USD",
        "exchangeRate": 1.34444
      },
      "privateMemo": "Message displayed on statement",
      "customerMemo": "Message displayed on estimate",
      "itemLines": [
        {
          "description": "2017 model, color steel",
          "amount": 22.95,
          "unitPrice": 22.95,
          "quantity": 1,
          "item": {
            "id" : "djQuMTo5MTMwMzUzNzIyMjc5NDA2OjExMmRlNzQ2OTk:4"
          },
          "serviceDate": "2020-12-09",
          "class": {
            "id": "302300000000001842721"
          }
        },
        {
          "description": "Description only line"
        }
      ],
      "expirationDate": "2020-07-20",
      "emailDeliveryInfo": {
        "to": [
          "a@to.com",
          "b@to.com"
        ],
        "cc": [
          "a@cc.com",
          "b@cc.com"
        ],
        "bcc": [
          "a@bcc.com",
          "b@bcc.com"
        ]
      },
      "referenceNumber": "Test 123",
      "shipping": {
        "shipDate": "2020-12-25",
        "shipVia": "FedEx1234",
        "shipAddress": {
          "freeFormAddressLine": "201 S 4th St\r\nSan Jose, CA 95112\r\nUS"
        },
        "shipFromAddress": {
          "freeFormAddressLine": "2700 Coast Ave., Mountain View, CA, 94043, USA"
        },
        "trackingNumber": "1234567"
      },
      "department": {
        "id": "Dept 123",
        "name": "Dept 123"
      },
      "billingAddress": {
        "freeFormAddressLine": "1075 Space Parkway\r\nMountain View, CA 94043\r\nUS"
      },
      "acceptStatus": {
        "status": "PENDING",
        "by": "Rohit1234",
        "date": "2020-12-17"
      },
      "class": {
        "id": "Misc",
        "name": "Misc"
      },
      "discount": {
        "amount": {
          "value": 10,
          "percentage": false
        },
        "applyTaxAfterDiscount": false
      }
    }
  }

Query

{
  company {
    transactionDraft(id: "<id>") {
      ... on EstimateDraft {
        id
        transactionDraftStatus
        estimateDraftDetails {
          transactionDate
          expirationDate
          amount
          customer {
            id
            displayName
          }
          currency {
            name
            currency
            exchangeRate
          }
          acceptStatus {
            status
            by
            date
          }
          privateMemo
          customerMemo
          itemLines {
            sequence
            description
            serviceDate
            amount
            item {
              id
              name
              sku
            }
            quantity
            unitPrice
            class
            { 
             id
            }
          }
          referenceNumber
          emailDeliveryInfo {
            to
            cc
            bcc
          }
          billingAddress{
            freeFormAddressLine
          }
          shipping {
            shipDate
            shipVia
            shipAddress {
              freeFormAddressLine
            }
            shipFromAddress {
              freeFormAddressLine
            }
            trackingNumber
          }
          department {
            id
            name
          }
          class {
            id
            name
          }
          discount {
            percentage
            value
          }
        }
      }
    }
  }
}



© 2021 Intuit Inc. All rights reserved. Intuit and QuickBooks are registered trademarks of Intuit Inc. Terms and conditions, features, support, pricing, and service options subject to change without notice.