API Documentation

DocumentsEdit Document

Method: /documents/[id].[format]
Document Fields:
Name:Data Type:Description:
customer_idStringCustomer ID
context_idStringDetermines if it’s an estimate, invoice, or PO
total_costStringTotal cost of all items added to the document
total_taxStringTotal amount of tax (tax1) to be added to subtotal
total_tax2StringTotal amount of tax (tax2) to be added to subtotal
total_priceStringThe subtotal of all items without taxes added
issue_dateStringThe date this document was issued (in YYYY-MM-DD format)
shipping_addressStringThis is used when the shipping address is different than the mailing address
Document Item Fields:
NameData TypeDescription
item_idStringItem ID
descriptionStringUsed for overriding the items actual description
quantityStringThe number of items added to this document
taxStringTax 1 rate for this item
tax2StringTax 2 rate for this item
costStringThe cost per unit
priceStringThe price you’re selling each unit for
Permissions Required:
  • Billing Management
  • Modify Invoices and/or Modify Estimates
Syntax:
https://[subdomain].salesbinder.com/api/2.0/documents/[id].json
HTTP Request Type: PUT
Example JSON Data to Submit
{  
   "document":{  
      "context_id":5,
      "customer_id":"549490bc-d15c-433c-8e48-03d8a2d10228",
      "issue_date":"2017-02-08",
      "document_items":[  
         {  
            "quantity":2,
            "tax":8,
            "price":134,
            "weight":1,
            "item_id":"58014db1-8dd8-4133-87ca-337f6882ca98"
         }
      ]
   }
}
Example XML Data to Submit
<?xml version="1.0" encoding="UTF-8" ?>
<document>
  <context_id>5</context_id>
  <customer_id>549490bc-d15c-433c-8e48-03d8a2d10228</customer_id>
  <issue_date>2017-02-08</issue_date>
  <document_items>
    <quantity>2</quantity>
    <tax>8</tax>
    <price>134</price>
    <weight>1</weight>
    <item_id>58014db1-8dd8-4133-87ca-337f6882ca98</item_id>
  </document_items>
</document>
Success:

If you have been successful in updating a document, the response will return the updated data object along with a “message” value of “Saved” as seen below.

Updated on February 8th, 2022

Network Status:
100% Global Availability