Customer

Create

Create Customer Attributes: * required * conditionally required

Parameter Data Type Description
* fullName string Name of the customer
* phone string Customer primary contact phone number
* billingAddress string Customer billing address 1
* billingAddressTwo string Customer billing address 2
* billingCity string Customer billing city
* billingState string Customer billing state
* billingZip string Customer billing zip code
* shippingAddress string Customer shipping address
* shippingAddressTwo string Customer shipping address
* shippingCity string Customer shipping city
* shippingState string Customer shipping state
* shippingZip string Customer shipping zip code
* taxExempt bool If the Customer is tax exempt.
Do not pass this if tax exempt is false only true
* exemptReasonId number If automated sales tax is enabled,
pass one of the following reasons:
1 Federal government
2 State government
3 Local government
4 Tribal government
5 Charitable organization
6 Religious organization
7 Educational organization
8 Hospital
9 Resale
* notes string Notes about the Customer

Request

curl -X "POST" "https://snapbooksapi.com/api/v1/customer" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "fullName": "Bank Mutual",
  "phone": "4052321663",
  "billingAddress": "445 S. Broadway",
  "billingAddressTwo": "Line 2",
  "billingCity": "Los Angeles",
  "billingState": "CA",
  "billingZip": "91392",
  "shippingAddress": "448 S. Broadway",
  "shippingAddressTwo": "Line 2",
  "shippingCity": "Los Angeles",
  "shippingState": "CA",
  "shippingZip": "91392",
  "taxExempt":true,
  "taxExemptionReasonId":2
}'

Response

{
  "success": true,
  "type": "Operation",
  "message": "",
  "details": [],
  "id": "61",
  "alreadyExisted": false
}

Update

Update Customer Attributes: * required * conditionally required

Parameter Data Type Description
* customerId string Customer ID SELECT * FROM Customer
* fullName string Name of the Customer
* phone string Customer primary contact Phone Number
* billingAddress string Customer billing Address 1
* billingAddressTwo string Customer billing Address 2
* billingCity string Customer billing City
* billingState string Customer billing State / Country SubDivision Code
* billingZip string Customer billing Zip / Postal Code
* shippingAddress string Customer shipping Address
* shippingAddressTwo string Customer shipping Address
* shippingCity string Customer shipping City
* shippingState string Customer shipping State / Country SubDivision Code
* shippingZip string Customer shipping Zip / Postal Code
shippingCountry string Customer shipping Country
* taxExempt bool If the Customer is tax exempt,
Do not pass this if tax exempt is false only if true
This cannot be used to turn tax exempt on and off.
* exemptReasonId number If automated sales tax is enabled and taxExempt = true
pass one of the following reasons:
1 Federal government
2 State government
3 Local government
4 Tribal government
5 Charitable organization
6 Religious organization
7 Educational organization
8 Hospital
9 Resale
* notes string Notes about the Customer

Request

curl -X "POST" "https://snapbooksapi.com/api/v1/customer" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "customerId": "34",
  "fullName": "Bank Mutual",
  "phone": "4052321663",
  "billingAddress": "5544 S. Broadway",
  "billingAddressTwo": "Line 2",
  "billingCity": "Los Angeles",
  "billingState": "CA",
  "billingZip": "91392",
  "shippingAddress": "6655 S. Broadway",
  "shippingAddressTwo": "Line 2",
  "shippingCity": "Los Angeles",
  "shippingState": "CA",
  "shippingZip": "91392"
}'

Response

{
  "success": true,
  "type": "Operation",
  "message": "",
  "details": [],
  "id": "61",
  "alreadyExisted": false
}

Create Refund Receipt

Create Refund Receipt Attributes: * required * conditionally required

Parameter Data Type Description
* invoiceNumber string The invoice originally paid to refund
* customerId string Customer Id SELECT * FROM Customer
* refundAmount string Refund amount
* paymentType string Type payment - SELECT * FROM paymentMethod
* refundReason string Reason for the refund
* paymentReference string Original check number
* paymentMemo string Note about the refund
* accountRef string The Bank Account Reference Id SELECT * From Account
* productService string Product code SELECT * FROM Item

Request

curl -X "POST" "https://snapbooksapi.com/api/v1/customer/refund-receipt" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "invoiceNumber": "5882",
  "customerId": "62",
  "refundAmount": "2000",
  "paymentType": "2",
  "refundReason": "OverPaid",
  "paymentReference": "10521700",
  "paymentMemo": "Check #: 70521700",
  "accountRef": "33",
  "productService": "5"
}'

Response

{
  "success": true,
  "type": "Operation",
  "message": "",
  "details": [],
  "Id": "148",
  "refundReceipt": {
    "RemainingCredit": null,
    "RefundReceiptEx": null,
    "AutoDocNumber": null,
    "CustomerRef": "61",
    "CustomerMemo": "Check #: 10521700",
    "BillAddr": {
      "Id": "100",
      "Line1": "S. Broadway",
      "Line2": null,
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": "Los Angeles",
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": "CA",
      "PostalCode": "91392",
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "ShipAddr": null,
    "FreeFormAddress": null,
    "ShipFromAddr": {
      "Id": "103",
      "Line1": "123 Sierra Way",
      "Line2": "San Pablo, CA  87999",
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": null,
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": null,
      "PostalCode": null,
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "RemitToRef": null,
    "ClassRef": null,
    "SalesTermRef": null,
    "DueDate": null,
    "SalesRepRef": null,
    "PONumber": null,
    "FOB": null,
    "ShipMethodRef": null,
    "ShipDate": null,
    "TrackingNum": null,
    "GlobalTaxCalculation": null,
    "TotalAmt": "2000.00",
    "HomeTotalAmt": null,
    "ApplyTaxAfterDiscount": "false",
    "TemplateRef": null,
    "PrintStatus": "NeedToPrint",
    "EmailStatus": null,
    "BillEmail": null,
    "BillEmailCc": null,
    "BillEmailBcc": null,
    "ARAccountRef": null,
    "Balance": "0",
    "HomeBalance": null,
    "FinanceCharge": null,
    "PaymentMethodRef": "2",
    "PaymentRefNum": "To Print",
    "PaymentType": null,
    "CheckPayment": null,
    "CreditCardPayment": null,
    "DepositToAccountRef": "35",
    "DeliveryInfo": null,
    "DiscountRate": null,
    "DiscountAmt": null,
    "GovtTxnRefIdentifier": null,
    "TaxExemptionRef": null,
    "DocNumber": "5882",
    "TxnDate": "2019-11-13",
    "DepartmentRef": null,
    "CurrencyRef": "USD",
    "ExchangeRate": null,
    "PrivateNote": null,
    "TxnStatus": null,
    "LinkedTxn": null,
    "Line": [
      {
        "Id": "1",
        "LineNum": "1",
        "Description": "OverPaid",
        "Amount": "2000.00",
        "LinkedTxn": null,
        "DetailType": "SalesItemLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": {
          "ServiceDate": null,
          "TaxInclusiveAmt": null,
          "DiscountRate": null,
          "DiscountAmt": null,
          "SalesItemLineDetailEx": null,
          "ItemRef": "5",
          "ClassRef": null,
          "UnitPrice": "2000",
          "RatePercent": null,
          "PriceLevelRef": null,
          "MarkupInfo": null,
          "Qty": "1",
          "UOMRef": null,
          "ItemAccountRef": "79",
          "InventorySiteRef": null,
          "TaxCodeRef": "NON",
          "TaxClassificationRef": null
        },
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": null,
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      },
      {
        "Id": null,
        "LineNum": null,
        "Description": null,
        "Amount": "2000.00",
        "LinkedTxn": null,
        "DetailType": "SubTotalLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": null,
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": "",
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      }
    ],
    "TxnTaxDetail": {
      "DefaultTaxCodeRef": null,
      "TxnTaxCodeRef": null,
      "TotalTax": "0",
      "TaxLine": null
    },
    "TxnSource": null,
    "TaxFormType": null,
    "TaxFormNum": null,
    "TransactionLocationType": null,
    "Id": "148",
    "SyncToken": "0",
    "MetaData": {
      "CreatedByRef": null,
      "CreateTime": "2019-11-13T15:12:16-08:00",
      "LastModifiedByRef": null,
      "LastUpdatedTime": "2019-11-13T15:12:16-08:00",
      "LastChangedInQB": null,
      "Synchronized": null
    },
    "CustomField": {
      "DefinitionId": "1",
      "Name": "Crew #",
      "Type": "StringType",
      "StringValue": null,
      "BooleanValue": null,
      "DateValue": null,
      "NumberValue": null
    },
    "AttachableRef": null,
    "domain": null,
    "status": null,
    "sparse": null
  }
}

Error Response

{
  "success": false,
  "type": "Operation",
  "message": "Unable to find CompSource Mutual",
  "details": []
}

Create Credit Memo

Create Credit Memo Attributes: * required * conditionally required

Parameter Data Type Description
* invoiceNumber string The invoice originally paid to credit
* classRef string Class Id SELECT * FROM Class
* customerId string Customer ID SELECT * FROM Customer
* memo string Note about the credit memo
* description string Description on the credit memo
* creditAmount string Amount of the credit
* itemRef string Item reference Id example: "Bad Debt" SELECT * FROM Item
* taxCodeRef string NON or TAX -- TAX will calculate tax NON will not

Request

curl -X "POST" "https://snapbooksapi.com/api/v1/customer/credit-memo" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "invoiceNumber": "5884",
  "classRef": "000101015101",
  "customerId": "62",
  "memo": "Check #: 10521700",
  "description": "Check #: 10521700",
  "creditAmt": "2000.51",
  "itemRef": "16",
  "taxCodeRef": "NON"
}'

Response

{
  "success": true,
  "type": "Operation",
  "message": "",
  "details": [],
  "id": "150",
  "creditMemo": {
    "RemainingCredit": "2000.51",
    "CreditMemoEx": null,
    "AutoDocNumber": null,
    "CustomerRef": "61",
    "CustomerMemo": "Check #: 10521700",
    "BillAddr": {
      "Id": "100",
      "Line1": "S. Broadway",
      "Line2": null,
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": "Los Angeles",
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": "CA",
      "PostalCode": "91392",
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "ShipAddr": null,
    "FreeFormAddress": null,
    "ShipFromAddr": {
      "Id": "104",
      "Line1": "123 Sierra Way",
      "Line2": "San Pablo, CA  87999",
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": null,
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": null,
      "PostalCode": null,
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "RemitToRef": null,
    "ClassRef": null,
    "SalesTermRef": null,
    "DueDate": null,
    "SalesRepRef": null,
    "PONumber": null,
    "FOB": null,
    "ShipMethodRef": null,
    "ShipDate": null,
    "TrackingNum": null,
    "GlobalTaxCalculation": null,
    "TotalAmt": "2000.00",
    "HomeTotalAmt": null,
    "ApplyTaxAfterDiscount": "false",
    "TemplateRef": null,
    "PrintStatus": "NeedToPrint",
    "EmailStatus": "NotSet",
    "BillEmail": null,
    "BillEmailCc": null,
    "BillEmailBcc": null,
    "ARAccountRef": null,
    "Balance": "2000.00",
    "HomeBalance": null,
    "FinanceCharge": null,
    "PaymentMethodRef": null,
    "PaymentRefNum": null,
    "PaymentType": null,
    "CheckPayment": null,
    "CreditCardPayment": null,
    "DepositToAccountRef": null,
    "DeliveryInfo": null,
    "DiscountRate": null,
    "DiscountAmt": null,
    "GovtTxnRefIdentifier": null,
    "TaxExemptionRef": null,
    "DocNumber": "5884",
    "TxnDate": "2019-11-14",
    "DepartmentRef": null,
    "CurrencyRef": "USD",
    "ExchangeRate": null,
    "PrivateNote": null,
    "TxnStatus": null,
    "LinkedTxn": null,
    "Line": [
      {
        "Id": "1",
        "LineNum": "1",
        "Description": "Check #: 10521700",
        "Amount": "2000.00",
        "LinkedTxn": null,
        "DetailType": "SalesItemLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": {
          "ServiceDate": null,
          "TaxInclusiveAmt": null,
          "DiscountRate": null,
          "DiscountAmt": null,
          "SalesItemLineDetailEx": null,
          "ItemRef": "1",
          "ClassRef": null,
          "UnitPrice": "2000",
          "RatePercent": null,
          "PriceLevelRef": null,
          "MarkupInfo": null,
          "Qty": "1",
          "UOMRef": null,
          "ItemAccountRef": "1",
          "InventorySiteRef": null,
          "TaxCodeRef": "NON",
          "TaxClassificationRef": null
        },
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": null,
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      },
      {
        "Id": null,
        "LineNum": null,
        "Description": null,
        "Amount": "2000.00",
        "LinkedTxn": null,
        "DetailType": "SubTotalLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": null,
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": "",
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      }
    ],
    "TxnTaxDetail": {
      "DefaultTaxCodeRef": null,
      "TxnTaxCodeRef": null,
      "TotalTax": "0",
      "TaxLine": null
    },
    "TxnSource": null,
    "TaxFormType": null,
    "TaxFormNum": null,
    "TransactionLocationType": null,
    "Id": "150",
    "SyncToken": "0",
    "MetaData": {
      "CreatedByRef": null,
      "CreateTime": "2019-11-14T12:03:01-08:00",
      "LastModifiedByRef": null,
      "LastUpdatedTime": "2019-11-14T12:03:01-08:00",
      "LastChangedInQB": null,
      "Synchronized": null
    },
    "CustomField": {
      "DefinitionId": "1",
      "Name": "Crew #",
      "Type": "StringType",
      "StringValue": null,
      "BooleanValue": null,
      "DateValue": null,
      "NumberValue": null
    },
    "AttachableRef": null,
    "domain": null,
    "status": null,
    "sparse": null
  }
}