Certain types of transaction definitions in Purchasing (such as Vendor Invoice) are configured to create corresponding bills in the Accounts Payable module.

When a transaction is updated in Purchasing, the related AP transaction is deleted and recreated. As a result, the AP transaction will have a new RECORDNO. Integrations needing to look up the related AP transaction can do so using the PRRECORDKEY field outlined below.


Get Purchasing Transaction Object Definition

lookup

List all the fields and relationships for the purchasing transaction object:

<lookup>
    <object>PODOCUMENT</object>
</lookup>

Parameters

Name Required Type Description
object Required string Use PODOCUMENT
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transactions

query

List the record number, document number, and document type for each purchasing transaction:

<query>
    <object>PODOCUMENT</object>
    <select>
        <field>RECORDNO</field>
        <field>DOCNO</field>
        <field>DOCPARID</field>
    </select>
</query>

Parameters

Name Required Type Description
object Required string Use PODOCUMENT
select Required sequence One or more field names and an optional aggregate function such as count or sum. Returning all fields is not supported.
filter Optional object Query filter expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL).
orderby Optional object Provide an order element with a field name and choose an ascending or descending sort order, for example:
<order>
        <field>RECORDNO</field>
        <descending/>
</order>
options Optional object Set the caseinsensitive element to true for a case-insensitive query:
    <caseinsensitive>true</caseinsensitive>
In a multi-entity company, set the showprivate element to true to query data in private entities:
   <showprivate>true</showprivate>
pagesize Optional integer Custom page size between 1 and 2000 items (Default: 100)
offset Optional integer Point at which to start indexing into records (Default: 0)
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transactions (Legacy)

readByQuery

<readByQuery>
    <object>PODOCUMENT</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
    <docparid>Purchase Order</docparid>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use PODOCUMENT
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. The following operators are supported: <, >, >=, <=, =, like, not like, in, not in, IS NOT NULL, IS NULL, AND, OR. Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli'). Joins are not supported.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

query Fields

Name Required Type Description
PRRECORDKEY Optional integer Related RECORDNO of the corresponding AP transaction created by the Purchasing transaction.
STATE Optional string State. Use S for Submitted, A for Approved, X for Partially Approved, R for Declined, I for Draft, O for Pending, D for Closed, G for In Progress, C for Converted, P for Partially Converted.
UPDATES_INV Optional string Inventory effect. Use T for Quantity and value, V for Value, or Q for Quantity.

Get Purchasing Transaction

read

<read>
    <object>PODOCUMENT</object>
    <keys>1</keys>
    <fields>*</fields>
    <docparid>Purchase Order</docparid>
</read>

Parameters

Name Required Type Description
object Required string Use PODOCUMENT
keys Required string Transaction RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

Create Purchasing Transaction (Legacy)

Release Changes
2021 Release 1 Added itemaliasid
2020 Release 4 Added taxsolutionid, relateddockey, relateddoclinekey, conversiontype
2020 Release 3 Added trx_amountretained
2020 Release 2 Added parameters for Construction application
2020 Release 1 Added retainagepercentage, costtypeid
2020 Release 1 Added allocationid
2019 Release 4 Added needbydate, donotshipbeforedate, donotshipafterdate, promiseddate, contractstartdate, contractenddate, cancelafterdate, dateconfirmed, dateshiptosupplier, taskid
2018 Release 2 Added deliverto, linelevelsimpletaxtype

create_potransaction

Creates a Purchasing transaction with a single line:

<create_potransaction>
    <transactiontype>Purchase Requisition</transactiontype>
    <datecreated>
        <year>2013</year>
        <month>6</month>
        <day>19</day>
    </datecreated>
    <vendorid>1001</vendorid>
    <referenceno>1234</referenceno>
    <vendordocno>vendordocno001</vendordocno>
    <datedue>
        <year>2013</year>
        <month>6</month>
        <day>20</day>
    </datedue>
    <payto>
        <contactname>Jameson Company</contactname>
    </payto>
    <exchratetype>Intacct Daily Rate</exchratetype>
    <customfields></customfields>
    <potransitems>
        <potransitem>
            <itemid>75300GL</itemid>
            <quantity>100</quantity>
            <unit>Each</unit>
            <price>1</price>
            <locationid>MGMT-US</locationid>
            <departmentid>IT</departmentid>
        </potransitem>
    </potransitems>
</create_potransaction>

Assuming that the transaction definition is configured as a source document for change management, creates a Purchasing transaction as a source that can accept change orders (Construction subscription):

<create_potransaction>
    <transactiontype>Source-001</transactiontype>
    <datecreated>
        <year>2020</year>
        <month>06</month>
        <day>17</day>
    </datecreated>
    <vendorid>201</vendorid>
    <datedue>
        <year>2020</year>
        <month>07</month>
        <day>05</day>
    </datedue>
    <message>Source for project 19</message>
    <returnto>
        <contactname></contactname>
    </returnto>
    <payto>
        <contactname></contactname>
    </payto>
    <state>Pending</state>
    <potransitems>
        <potransitem>
            <itemid>A001</itemid>
            <warehouseid>WareHouse10004</warehouseid>
            <quantity>10</quantity>
            <unit>Each</unit>
            <price>99.99</price>
            <locationid>1</locationid>
        </potransitem>
    </potransitems>
</create_potransaction>

Assuming that the transaction definition is configured as a change order, creates a Purchasing transaction as a change order with two lines. One line is a change for an existing line (created above), and the other line is new. (Construction subscription):

<create_potransaction>
    <transactiontype>Change-001</transactiontype>
    <datecreated>
        <year>2020</year>
        <month>06</month>
        <day>30</day>
    </datecreated>
    <createdfrom></createdfrom>
    <vendorid>201</vendorid>
    <message>Change for new requirements</message>
    <returnto>
        <contactname></contactname>
    </returnto>
    <payto>
        <contactname></contactname>
    </payto>
    <state>Pending</state>
    <potransitems>
        <potransitem>
            <itemid>A001</itemid>
            <warehouseid>WareHouse10004</warehouseid>
            <quantity>15</quantity>
            <unit>Each</unit>
            <price>100.99</price>
            <locationid>1</locationid>
            <relateddockey>255</relateddockey>
            <relateddoclinekey>256</relateddoclinekey>
        </potransitem>
        <potransitem>
            <itemid>A006</itemid>
            <warehouseid>WareHouse10006</warehouseid>
            <quantity>100</quantity>
            <unit>Each</unit>
            <price>80.99</price>
            <locationid>1</locationid>
            <relateddockey>255</relateddockey>
        </potransitem>
    </potransitems>
</create_potransaction>

Parameters

Name Required Type Description
transactiontype Required string Transaction definition to use, such as a Purchase Order
datecreated Required object Transaction date
dateposted Optional object GL posting date
createdfrom Optional string Purchasing transaction document number to convert from
vendorid Required String Vendor ID
documentno Optional string Document number. Leave blank to use auto numbering if set in definition
referenceno Optional string Reference number
vendordocno Optional string Vendor document number
termname Optional string Payment term. Required if not using datedue.
datedue Optional object Due date. Required if not using termname.
message Optional string Message
shippingmethod Optional string Shipping method
returnto Required object Return to contact. Send it null to use vendor’s default.
payto Required object Pay to contact. Send it null to use vendor’s default.
deliverto Optional object Deliver to contact for tax calculation
supdocid Optional string Attachments ID
externalid Optional string External ID
basecurr Optional string Base currency code
currency Optional string Transaction currency code
exchratedate Optional object Exchange rate date
exchratetype Optional string Exchange rate type. Do not use if exchrate is set. (Leave blank to use Intacct Daily Rate)
exchrate Optional currency Exchange rate value. Do not use if exchangeratetype is set.
customfields Optional customfield[0...n] Custom fields
state Optional string Action. Use Draft, Pending or Closed. (Default depends on transaction definition configuration)
needbydate Optional object Need by date, which is the date you need the goods to arrive on your premises. (Default: Due date)
donotshipbeforedate Optional object Do not ship before date
donotshipafterdate Optional object Do not ship after date
promiseddate Optional object Promised by date, which is the date the vendor promised to deliver the goods.
contractstartdate Optional object Contract start date, which is the valid start date of a purchase order or purchase contract.
contractenddate Optional object Contract end date , which is the valid end date of a purchase order or purchase contract.
cancelafterdate Optional object Cancel after date, which is the date after which the transaction should be canceled.
scope Optional string Details about the expected scope of work to be performed or materials to be delivered. Use 4000 or fewer characters. (Construction subscription)
inclusions Optional string Details related to items that are explicitly included in the terms of this document. Use 4000 or fewer characters. (Construction subscription)
exclusions Optional string Details related to items that are explicitly excluded in the terms of this document. Use 4000 or fewer characters. (Construction subscription)
terms Optional string Additional terms or performance obligations. Use 4000 or fewer characters. (Construction subscription)
schedulestartdate Optional date Scheduled start date in the mm/dd/yyyy format (Construction subscription)
actualstartdate Optional date Actual start date in the mm/dd/yyyy format (Construction subscription)
scheduledcompletiondate Optional date Original scheduled date for completion of the work in the mm/dd/yyyy format (Construction subscription)
revisedcompletiondate Optional date Revised completion date for the work (caused by changes). Specified in the mm/dd/yyyy format. (Construction subscription)
substantialcompletiondate Optional date Date the work is considered substantially complete in the mm/dd/yyyy format. Typically used as a milestone to identify when payment obligations are due. (Construction subscription)
actualcompletiondate Optional date Date the work is actually complete in the mm/dd/yyyy format (Construction subscription)
noticetoproceed Optional date Date when a formal notice to proceed was given in the mm/dd/yyyy format (Construction subscription)
responsedue Optional date Date when a response is expected from an external party in the mm/dd/yyyy format (Construction subscription)
executedon Optional date Date the related contract document was formally executed in the mm/dd/yyyy format (Construction subscription)
scheduleimpact Optional string Details about any impacts on the current schedule. Use 100 or fewer characters. (Construction subscription)
internalrefno Optional string Specifies an internal reference ID that can be tracked separately from the formal document number (documentno) (Construction subscription)
internalinitiatedby Optional string ID of the employee who initiated the transaction. (Construction subscription)
internalverbalby Optional string ID of the employee who verbally agreed to the transaction. (Construction subscription)
internalissuedby Optional string ID of the employee who issued the transaction. (Construction subscription)
internalissuedon Optional date Internal issued-on date in the mm/dd/yyyy format (Construction subscription)
internalapprovedby Optional string ID of the employee who approved the transaction. (Construction subscription)
internalapprovedon Optional date Internal approved-on date in the mm/dd/yyyy format (Construction subscription)
internalsignedby Optional string ID of the employee who signed for the transaction. (Construction subscription)
internalsignedon Optional string Internal signed-on date in the mm/dd/yyyy format (Construction subscription)
internalsource Optional string Internal reference source when the transaction originated from another document or workflow. Can be an internal or external source. For example, a request for information (RFI) or a project change request. Use 100 or fewer characters. (Construction subscription)
internalsourcerefno Optional string Internal reference source number or ID when the transaction originated from another source. Can be an internal or external number. Use 100 or fewer characters. (Construction subscription)
externalrefno Optional string External reference number for this transaction, such as one required by a vendor or customer. (Construction subscription)
externalverbalby Optional string Name of the contact who verbally agreed to the transaction. For example, a customer or vendor contact. (Construction subscription)
externalapprovedby Optional string Name of the contact who approved the document. For example, a customer or vendor contact. (Construction subscription)
externalapprovedon Optional date Date the customer or vendor approved the transaction in the mm/dd/yyyy format (Construction subscription)
externalsignedby Optional string Name of the external contact who signed for the transaction. For example, a customer or vendor contact. (Construction subscription)
externalsignedon Optional date Date the customer or vendor signed for the transaction in the mm/dd/yyyy format (Construction subscription)
performancebondrequired Optional boolean Use true to indicate that a performance bond is required (Default: false). (Construction subscription)
performancebondreceived Optional boolean Use true to indicate that performance bond documentation was received (Default: false). (Construction subscription)
performancebondamount Optional currency Amount of the performance bond (Construction subscription)
performancesuretycompany Optional string ID of the vendor for the related surety company providing the performance bond (Construction subscription)
paymentbondrequired boolean string Use true to indicate that performance bond is required (Default: false). (Construction subscription)
paymentbondreceived Optional boolean Use true to indicate that performance bond was received (Default: false). (Construction subscription)
paymentbondamount Optional currency Amount of the payment bond (Construction subscription)
paymentsuretycompany Optional string ID of the vendor for the related surety company providing the payment bond (Construction subscription)
taxsolutionid Optional string Tax solution name, such as United Kingdom - VAT or Australia - GST. Required only if the company is configured for multiple tax jurisdictions and the transaction is occurring at the top level of the company. The available tax solution names can be found in the Sage Intacct UI in the Taxes application from the top level of a multi-entity company. (GB, AU, and ZA only)
potransitems Required potransitem[1...n] Transaction lines, must have at least 1.
subtotals Optional subtotal[0...n] Subtotal lines

datecreated

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

dateposted

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

datedue

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

returnto

Name Required Type Description
contactname Required string Return to contact name

payto

Name Required Type Description
contactname Required string Pay to contact name

exchratedate

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

customfield

Name Required Type Description
customfieldname Optional string Custom field ID
customfieldvalue Optional varies Custom field value. For a multi-pick-list custom field, implode multiple field values with #~#.

needbydate donotshipbeforedate donotshipafterdate promiseddate contractstartdate contractenddate cancelafterdate

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

potransitem

Name Required Type Description
itemid Required string Item ID
itemaliasid Optional string Alias name for the item as set up in an item cross reference created for the vendor on this transaction.
itemdesc Optional string Item description
taxable Optional boolean Taxable. Use false for No, true for Yes. Customer must be set up for taxable.
warehouseid Optional string Warehouse ID
quantity Required number Quantity
unit Optional string Unit of measure to base quantity off
linelevelsimpletaxtype Optional string Simple tax rate to apply at the line level. Available only if Enable subtotals and Enable line level Simple Tax are enabled for the transaction definition.
price Optional currency Price
sourcelinekey Optional integer Source line to convert this line from. Use the RECORDNO of the line from the createdfrom transaction document.
overridetaxamount Optional currency Override tax amount
deliverto Optional object Deliver to contact for tax calculation
tax Optional currency Tax amount
locationid Optional string Location ID
departmentid Optional string Department ID
memo Optional string Memo
itemdetails Optional itemdetail[0...n] Array of item details
form1099 Optional boolean Form 1099. Use false for No, true for Yes. Vendor must be set up for 1099s.
form1099type Optional string Form 1099 type
form1099box Optional string Form 1099 box
customfields Optional customfield[0...n] Custom fields
projectid Optional string Project ID
taskid Optional string Task ID. Only available when the parent projectid is also specified.
costtypeid Optional string Cost type ID for Construction projects. Only available when projectid and taskid are specified.
customerid Optional string Customer ID
vendorid Optional string Vendor ID
employeeid Optional string Employee ID
classid Optional string Class ID
contractid Optional string Contract ID
billable Optional boolean Billable. Use false for No, true for Yes. (Default: false)
needbydate Optional object Need by date, which is the date you need the goods to arrive on your premises. (Default value: Due date)
donotshipbeforedate Optional object Do not ship before date
donotshipafterdate Optional object Do not ship after date
promiseddate Optional object Promised by date, which is the date the vendor promised to deliver the goods.
dateconfirmed Optional object Date confirmed, which is the date the vendor confirms that they can provide the item being ordered.
cancelafterdate Optional object Cancel after date, which is the date after which the transaction should be canceled.
dateshiptosupplier Optional object Date shipped to supplier, which is the date that goods were returned to the supplier.
allocationid Optional string Transaction allocation ID. Applicable only for non-inventory items such as services. The quantity value must be set to 1.
retainagepercentage Optional numeric Percentage of the total amount to retain on a transaction that is part of a Construction project. When you supply this value, the value for trx_amountretained is automatically calculated. (Construction subscription)
trx_amountretained Optional currency Amount to retain if you want to override the retainagepercentage. When you supply this value, the value for retainagepercentage is automatically calculated. (Construction subscription)
relateddockey Optional integer Record number of the source transaction when creating a change order. See the FAQ about change orders for information about using the API to compare original values of a source document to revised values. (Construction subscription)
relateddoclinekey Optional integer Record number of a source transaction line to modify when creating a change order. If you omit this parameter but supply relateddockey, a new line will be created on the source transaction. (Construction subscription)
conversiontype Optional string Conversion type to use when converting the transaction to the next step in the workflow (for example, purchase order to vendor invoice). Use Price if you want the conversion to be based on the price (for non-inventory items only), or Quantity if the conversion should be based on the quantity and unit. If using Price, set Quantity to 1 and provide a unit that is a base unit (unit factor is 1). (Default: Quantity) (Construction subscription)

itemdetail

Name Required Type Description
quantity Optional number Quantity
serialno Optional string Serial number. Only used if not using lotno.
lotno Optional string Lot number. Only used if not using serialno.
aisle Optional string Aisle
row Optional string Row
bin Optional string Bin
itemexpiration Optional object Item expiration

itemexpiration

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

needbydate donotshipbeforedate donotshipafterdate promiseddate dateconfirmed cancelafterdate dateshiptosupplier

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

subtotal

Name Required Type Description
description Required string Description
total Required currency Total
absval Optional number Absolute value
percentval Optional number Percent value
locationid Optional string Location ID
departmentid Optional string Department ID
projectid Optional string Project ID
taskid Optional string Task ID. Only available when the parent projectid is also specified.
costtypeid Optional string Cost type ID. Only available when projectid and taskid are specified. (Construction subscription)
customerid Optional string Customer ID
vendorid Optional string Vendor ID
employeeid Optional string Employee ID
classid Optional string Class ID
itemid Optional string Item ID
contractid Optional string Contract ID
customfields Optional customfield[0...n] Custom fields

Update Purchasing Transaction (Legacy)

Release Changes
2021 Release 1 Added itemaliasid
2020 Release 4 Added relateddockey, relateddoclinekey, conversiontype
2020 Release 3 Added trx_amountretained
2020 Release 2 Added parameters for Construction application
2020 Release 1 Added retainagepercentage, costtypeid
2020 Release 1 Added allocationid
2019 Release 4 Added needbydate, donotshipbeforedate, donotshipafterdate, promiseddate, contractstartdate, contractenddate, cancelafterdate, dateconfirmed, dateshiptosupplier, taskid
2018 Release 2 Added deliverto, linelevelsimpletaxtype

Before using this function to modify existing lines, make sure you know the correct line numbers. For this object, the generic read function uses a zero-based index for entries returned in the response. However, the object-specific update function uses a one-based index for entries you supply in the request.

After using read to get the line number of the entry you want to modify, add one to that number to specify the correct line in your update operation. See Working with transaction lines and legacy functions for more information.

Warning: Before doing any large scale update operations, perform a test to make sure you are modifying the correct lines.

update_potransaction

Update the transaction to add a memo:

<update_potransaction key="Purchase Order-PO0213">
    <updatepotransitems>
        <updatepotransitem line_num="1">
            <memo>High priority</memo>
        </updatepotransitem>
    </updatepotransitems>
</update_potransaction>

Update the transaction to include an item alias that was set up in an item cross reference:

<update_potransaction key="Purchase Order-PO0213">
    <updatepotransitems>
        <updatepotransitem line_num="1">
            <itemaliasid>PBC001</itemaliasid>
        </updatepotransitem>
    </updatepotransitems>
</update_potransaction>

Parameters

Name Required Type Description
key Required string Document ID to update
datecreated Optional object Transaction date
dateposted Optional object GL posting date
referenceno Optional string Reference number
vendordocno Optional string Vendor document number
termname Optional string Payment term
datedue Optional object Due date
message Optional string Message
shippingmethod Optional string Shipping method
returnto Optional object Return to contact
payto Optional object Pay to contact
deliverto Optional object Deliver to contact for tax calculation
supdocid Optional string Attachments ID
externalid Optional string External ID
basecurr Optional string Base currency code
currency Optional string Transaction currency code
exchratedate Optional object Exchange rate date.
exchratetype Optional string Exchange rate type. Do not use if exchrate is set. (Leave blank to use Intacct Daily Rate)
exchrate Optional currency Exchange rate value. Do not use if exchangeratetype is set.
customfields Optional customfield[0...n] Custom fields
state Optional string Action. Use Draft, Pending or Closed. (Default depends on transaction definition configuration)
needbydate Optional object Need by date, which is the date you need the goods to arrive on your premises. (Default value: Due date)
donotshipbeforedate Optional object Do not ship before date
donotshipafterdate Optional object Do not ship after date
promiseddate Optional object Promised by date, which is the date the vendor promised to deliver the goods.
contractstartdate Optional object Contract start date, which is the valid start date of a purchase order or purchase contract.
contractenddate Optional object Contract end date , which is the valid end date of a purchase order or purchase contract.
cancelafterdate Optional object Cancel after date, which is the date after which the transaction should be canceled.
scope Optional string Details about the expected scope of work to be performed or materials to be delivered. Use 4000 or fewer characters. (Construction subscription)
inclusions Optional string Details related to items that are explicitly included in the terms of this document. Use 4000 or fewer characters. (Construction subscription)
exclusions Optional string Details related to items that are explicitly excluded in the terms of this document. Use 4000 or fewer characters. (Construction subscription)
terms Optional string Additional terms or performance obligations. Use 4000 or fewer characters. (Construction subscription)
schedulestartdate Optional date Scheduled start date in the mm/dd/yyyy format (Construction subscription)
actualstartdate Optional date Actual start date in the mm/dd/yyyy format (Construction subscription)
scheduledcompletiondate Optional date Original scheduled date for completion of the work in the mm/dd/yyyy format (Construction subscription)
revisedcompletiondate Optional date Revised completion date for the work (caused by changes). Specified in the mm/dd/yyyy format. (Construction subscription)
substantialcompletiondate Optional date Date the work is considered substantially complete in the mm/dd/yyyy format. Typically used as a milestone to identify when payment obligations are due. (Construction subscription)
actualcompletiondate Optional date Date the work is actually complete in the mm/dd/yyyy format (Construction subscription)
noticetoproceed Optional date Date when a formal notice to proceed was given in the mm/dd/yyyy format (Construction subscription)
responsedue Optional date Date when a response is due from an external party in the mm/dd/yyyy format (Construction subscription)
executedon Optional date Date the related contract document was formally executed in the mm/dd/yyyy format (Construction subscription)
scheduleimpact Optional string Details about any impacts on the current schedule. Use 100 or fewer characters. (Construction subscription)
internalrefno Optional string Specifies an internal reference ID that can be tracked separately from the formal document number (documentno) (Construction subscription)
internalinitiatedby Optional string ID of the employee who initiated the transaction. (Construction subscription)
internalverbalby Optional string ID of the employee who verbally agreed to the transaction. (Construction subscription)
internalissuedby Optional string ID of the employee who issued the transaction. (Construction subscription)
internalissuedon Optional date Internal issued-on date in the mm/dd/yyyy format (Construction subscription)
internalapprovedby Optional string ID of the employee who approved the transaction. (Construction subscription)
internalapprovedon Optional date Internal approved-on date in the mm/dd/yyyy format (Construction subscription)
internalsignedby Optional string ID of the employee who signed for the transaction. (Construction subscription)
internalsignedon Optional string Internal signed-on date in the mm/dd/yyyy format (Construction subscription)
internalsource Optional string Internal reference source when the transaction originated from another document or workflow. Can be an internal or external source. For example, a request for information (RFI) or a project change request. Use 100 or fewer characters. (Construction subscription)
internalsourcerefno Optional string Internal reference source number or ID when the transaction originated from another source. Can be an internal or external number. Use 100 or fewer characters. (Construction subscription)
externalrefno Optional string External ref-erence number for this transaction, such as one required by a vendor or customer. (Construction subscription)
externalverbalby Optional string Name of the contact who verbally agreed to the transaction. For example, a customer or vendor contact. (Construction subscription)
externalapprovedby Optional string Name of the contact who approved the document. For example, a customer or vendor contact. (Construction subscription)
externalapprovedon Optional date Date the customer or vendor approved the transaction in the mm/dd/yyyy format (Construction subscription)
externalsignedby Optional string Name of the external contact who signed for the transaction. For example, a customer or vendor contact. (Construction subscription)
externalsignedon Optional date Date the customer or vendor signed for the transaction in the mm/dd/yyyy format (Construction subscription)
performancebondrequired Optional boolean Use true to indicate that a performance bond is required (Default: false). (Construction subscription)
performancebondreceived Optional boolean Use true to indicate that performance bond documentation was received (Default: false). (Construction subscription)
performancebondamount Optional currency Amount of the performance bond (Construction subscription)
performancesuretycompany Optional string ID of the vendor for the related surety company providing the performance bond (Construction subscription)
paymentbondrequired boolean string Use true to indicate that performance bond is required (Default: false). (Construction subscription)
paymentbondreceived Optional boolean Use true to indicate that performance bond was received (Default: false). (Construction subscription)
paymentbondamount Optional currency Amount of the payment bond (Construction subscription)
paymentsuretycompany Optional string ID of the vendor for the related surety company providing the payment bond (Construction subscription)
updatepotransitems optional (updatepotransitem | potransitem)[0...n] To update an existing line use updatepotransitem otherwise to create a new line use potransitem. You can mix types in the array.
updatesubtotals Optional updatesubtotal[0...n] Subtotal lines

datecreated

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

dateposted

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

datedue

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

returnto

Name Required Type Description
contactname Required string Return to contact name

payto

Name Required Type Description
contactname Required string Pay to contact name

exchratedate

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

customfield

Name Required Type Description
customfieldname Optional string Custom field ID
customfieldvalue Optional varies Custom field value. For a multi-pick-list custom field, implode multiple field values with #~#.

needbydate donotshipbeforedate donotshipafterdate promiseddate contractstartdate contractenddate cancelafterdate

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

updatepotransitem

Name Required Type Description
line_num Required integer Line number to update
itemid Optional string Item ID
itemaliasid Optional string Alias name for the item as set up in an item cross reference created for the vendor on this transaction.
itemdesc Optional string Item description
taxable Optional boolean Taxable. Use false for No, true for Yes. Customer must be set up for taxable.
warehouseid Optional string Warehouse ID
quantity Optional number Quantity
unit Optional string Unit of measure to base quantity off
linelevelsimpletaxtype Optional string Simple tax rate to apply at the line level. Available only if Enable subtotals and Enable line level Simple Tax are enabled for the transaction definition.
price Optional currency Price
deliverto Optional object Deliver to contact for tax calculation
locationid Optional string Location ID
departmentid Optional string Department ID
memo Optional string Memo
itemdetails Optional itemdetail[0...n] Array of item details
form1099 Optional boolean Form 1099. Use false for No, true for Yes. Vendor must be set up for 1099s.
form1099type Optional string Form 1099 type
form1099box Optional string Form 1099 box
customfields Optional customfield[0...n] Custom fields
projectid Optional string Project ID
taskid Optional string Task ID. Only available when the parent projectid is also specified.
costtypeid Optional string Cost type ID. Only available when projectid and taskid are specified. (Construction subscription)
customerid Optional string Customer ID
vendorid Optional string Vendor ID
employeeid Optional string Employee ID
classid Optional string Class ID
contractid Optional string Contract ID
billable Optional boolean Billable. Use false for No, true for Yes. (Default: false)
needbydate Optional object Need by date, which is the date you need the goods to arrive on your premises. (Default value: Due date)
donotshipbeforedate Optional object Do not ship before date.
donotshipafterdate Optional object Do ot ship after date
promiseddate Optional object Promised by date, which is the date the vendor promised to deliver the goods.
dateconfirmed Optional object Date confirmed, which is the date the vendor confirms that they can provide the item being ordered.
cancelafterdate Optional object Cancel after date, which is the date after which the transaction should be canceled.
dateshiptosupplier Optional object Date shipped to supplier, which is the date that goods were returned to the supplier.
allocationid Optional string Transaction allocation ID. Applicable only for non-inventory items such as services. The quantity value must be set to 1.
relateddockey Optional integer Record number of the source transaction when creating a change order. See the FAQ about change orders for information about using the API to compare original values of a source document to revised values. (Construction subscription)
relateddoclinekey Optional integer Record number of a source transaction line to modify when creating a change order. If you omit this parameter but supply relateddockey, a new line will be created on the source transaction. (Construction subscription)
retainagepercentage Optional numeric Percentage of the total amount to retain on a transaction that is part of a Construction project. When you supply this value, the value for trx_amountretained is automatically calculated.
trx_amountretained Optional currency Amount to retain if you want to override the retainagepercentage. When you supply this value, the value for retainagepercentage is automatically calculated.
conversiontype Optional string Conversion type to use when converting the transaction to the next step in the workflow (for example, purchase order to vendor invoice). Use Price if you want the conversion to be based on the price (for non-inventory items only), or Quantity if the conversion should be based on the quantity and unit. If using Price, set Quantity to 1 and provide a unit that is a base unit (unit factor is 1). (Construction subscription)

potransitem

Name Required Type Description
itemid Required string Item ID
itemaliasid Optional string Alias name for the item as set up in an item cross reference created for the vendor on this transaction.
itemdesc Optional string Item description
taxable Optional boolean Taxable. Use false for No, true for Yes. Customer must be set up for taxable.
warehouseid Optional string Warehouse ID
quantity Required number Quantity
unit Optional string Unit of measure to base quantity off
linelevelsimpletaxtype Optional string Simple tax rate to apply at the line level. Available only if Enable subtotals and Enable line level Simple Tax are enabled for the transaction definition.
price Optional currency Price
sourcelinekey Optional integer Source line to convert this line from. Use the RECORDNO of the line from the createdfrom transaction document.
overridetaxamount Optional currency Override tax amount
deliverto Optional object Deliver to contact for tax calculation
tax Optional currency Tax amount
locationid Optional string Location ID
departmentid Optional string Department ID
memo Optional string Memo
itemdetails Optional itemdetail[0...n] Array of item details
form1099 Optional boolean Form 1099. Use false for No, true for Yes. Vendor must be set up for 1099s.
form1099type Optional string Form 1099 type
form1099box Optional string Form 1099 box
customfields Optional customfield[0...n] Custom fields
projectid Optional string Project ID
taskid Optional string Task ID. Only available when the parent projectid is also specified.
costtypeid Optional string Cost type ID. Only available when projectid and taskid are specified. (Construction subscription)
customerid Optional string Customer ID
vendorid Optional string Vendor ID
employeeid Optional string Employee ID
classid Optional string Class ID
contractid Optional string Contract ID
billable Optional boolean Billable. Use false for No, true for Yes. (Default: false)
needbydate Optional object Need by date, which is the date you need the goods to arrive on your premises. (Default value: Due date)
donotshipbeforedate Optional object Do not ship before date.
donotshipafterdate Optional object Do ot ship after date
promiseddate Optional object Promised by date, which is the date the vendor promised to deliver the goods.
dateconfirmed Optional object Date confirmed, which is the date the vendor confirms that they can provide the item being ordered.
cancelafterdate Optional object Cancel after date, which is the date after which the transaction should be canceled.
dateshiptosupplier Optional object Date shipped to supplier, which is the date that goods were returned to the supplier.
allocationid Optional string Transaction allocation ID. Applicable only for non-inventory items such as services. The quantity value must be set to 1.
retainagepercentage Optional numeric Percentage of the total amount to retain on a transaction that is part of a Construction project. When you supply this value, the value for trx_amountretained is automatically calculated.
trx_amountretained Optional currency Amount to retain if you want to override the retainagepercentage. When you supply this value, the value for retainagepercentage is automatically calculated.
relateddockey Optional integer Record number of the source transaction when creating a change order. See the FAQ about change orders for information about using the API to compare original values of a source document to revised values. (Construction subscription)
relateddoclinekey Optional integer Record number of a source transaction line to modify when creating a change order. If you omit this parameter but supply relateddockey, a new line will be created on the source transaction. (Construction subscription)
conversiontype Optional string Conversion type to use when converting the transaction to the next step in the workflow (for example, purchase order to vendor invoice). Use Price if you want the conversion to be based on the price (for non-inventory items only), or Quantity if the conversion should be based on the quantity and unit. If using Price, set Quantity to 1 and provide a unit that is a base unit (unit factor is 1). (Default: Quantity) (Construction subscription)

itemdetail

Name Required Type Description
quantity Optional number Quantity
serialno Optional string Serial number. Only used if not using lotno.
lotno Optional string Lot number. Only used if not using serialno.
aisle Optional string Aisle
row Optional string Row
bin Optional string Bin
itemexpiration Optional object Item expiration

itemexpiration

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

needbydate donotshipbeforedate donotshipafterdate promiseddate dateconfirmed cancelafterdate dateshiptosupplier

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

updatesubtotal

Name Required Type Description
description Required string Description
total Required currency Total
absval Optional number Absolute value
percentval Optional number Percent value
locationid Optional string Location ID
departmentid Optional string Department ID
projectid Optional string Project ID
taskid Optional string Task ID. Only available when the parent projectid is also specified.
costtypeid Optional string Cost type ID. Only available when projectid and taskid are specified. (Construction subscription)
customerid Optional string Customer ID
vendorid Optional string Vendor ID
employeeid Optional string Employee ID
classid Optional string Class ID
itemid Optional string Item ID
contractid Optional string Contract ID
customfields Optional customfield[0...n] Custom fields

Partial Update Purchasing Transaction (Legacy)

This function is used to partially update a purchasing transaction, usually adjusting its GL posting date.

partialupdate_potransaction

<partialupdate_potransaction key="Vendor Invoice-VI1234">
    <dateposted>
        <year>2017</year>
        <month>3</month>
        <day>1</day>
    </dateposted>
</partialupdate_potransaction>

Parameters

Name Required Type Description
key Required string Document ID of transaction to update
dateposted Optional object GL posting date

dateposted

Name Required Type Description
year Required string Year yyyy
month Required string Month mm
day Required string Day dd

Delete Purchasing Transaction

delete

<delete>
    <object>PODOCUMENT</object>
    <keys>112</keys>
</delete>

Parameters

Name Required Type Description
object Required string Use PODOCUMENT
keys Required string Transaction RECORDNO to delete

Delete Purchasing Transaction (Legacy)

delete_potransaction

<delete_potransaction key="Purchase Order-PO0213"></delete_potransaction>

Parameters

Name Required Type Description
key Required string Transaction DOCID to delete

Get Purchasing Transaction Line Object Definition

lookup

List all the fields and relationships for the purchasing transaction line object:

<lookup>
    <object>PODOCUMENTENTRY</object>
</lookup>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTENTRY
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transaction Lines

query

List the record number, document header number, and item ID for each purchasing transaction line:

<query>
    <object>PODOCUMENTENTRY</object>
    <select>
        <field>RECORDNO</field>
        <field>DOCHDRNO</field>
        <field>ITEMID</field>
    </select>
</query>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTENTRY
select Required sequence One or more field names and an optional aggregate function such as count or sum. Returning all fields is not supported.
filter Optional object Query filter expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL).
orderby Optional object Provide an order element with a field name and choose an ascending or descending sort order, for example:
<order>
        <field>RECORDNO</field>
        <descending/>
</order>
options Optional object Set the caseinsensitive element to true for a case-insensitive query:
    <caseinsensitive>true</caseinsensitive>
In a multi-entity company, set the showprivate element to true to query data in private entities:
   <showprivate>true</showprivate>
pagesize Optional integer Custom page size between 1 and 2000 items (Default: 100)
offset Optional integer Point at which to start indexing into records (Default: 0)
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transaction Lines (Legacy)

readByQuery

<readByQuery>
    <object>PODOCUMENTENTRY</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
    <docparid>Purchase Order</docparid>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTENTRY
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. The following operators are supported: <, >, >=, <=, =, like, not like, in, not in, IS NOT NULL, IS NULL, AND, OR. Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli'). Joins are not supported.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

Get Purchasing Transaction Line

read

<read>
    <object>PODOCUMENTENTRY</object>
    <keys>1</keys>
    <fields>*</fields>
    <docparid>Purchase Order</docparid>
</read>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTENTRY
keys Required string Transaction line RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

Get Purchasing Transaction Subtotal Object Definition

lookup

List all the fields and relationships for the Purchasing transaction subtotal object:

<lookup>
    <object>PODOCUMENTSUBTOTALS</object>
</lookup>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTSUBTOTALS
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transaction Subtotals

query

List the record number, description, and total for each Purchasing transaction subtotal:

<query>
    <object>PODOCUMENTSUBTOTALS</object>
    <select>
        <field>RECORDNO</field>
        <field>DESCRIPTION</field>
        <field>TOTAL</field>
    </select>
</query>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTSUBTOTALS
select Required sequence One or more field names and an optional aggregate function such as count or sum. Returning all fields is not supported.
filter Optional object Query filter expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL).
orderby Optional object Provide an order element with a field name and choose an ascending or descending sort order, for example:
<order>
        <field>RECORDNO</field>
        <descending/>
</order>
options Optional object Set the caseinsensitive element to true for a case-insensitive query:
    <caseinsensitive>true</caseinsensitive>
In a multi-entity company, set the showprivate element to true to query data in private entities:
   <showprivate>true</showprivate>
pagesize Optional integer Custom page size between 1 and 2000 items (Default: 100)
offset Optional integer Point at which to start indexing into records (Default: 0)
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transaction Subtotals (Legacy)

readByQuery

<readByQuery>
    <object>PODOCUMENTSUBTOTALS</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
    <docparid>Purchase Order</docparid>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTSUBTOTALS
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. The following operators are supported: <, >, >=, <=, =, like, not like, in, not in, IS NOT NULL, IS NULL, AND, OR. Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli'). Joins are not supported.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

Get Purchasing Transaction Subtotal

read

<read>
    <object>PODOCUMENTSUBTOTALS</object>
    <keys>1</keys>
    <fields>*</fields>
    <docparid>Purchase Order</docparid>
</read>

Parameters

Name Required Type Description
object Required string Use PODOCUMENTSUBTOTALS
keys Required string Transaction subtotal RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
docparid Optional string Used to indicate the document type (Ex: Purchase Order). You must use this to take advantage of any custom fields on the specified document type.

List Purchasing Transactions To Approve

Lists purchasing transactions that you are authorized to approve or decline.

getTransactionsToApprove

<getTransactionsToApprove>
    <module>purchasing</module>
</getTransactionsToApprove>

Parameters

Name Required Type Description
module Required string Use purchasing

Approve Purchasing Transactions

approve

<approve>
    <PODOCUMENT>
        <DOCID>Purchase Order-PO0213</DOCID>
        <COMMENT>Final approval for the quarter</COMMENT>
    </PODOCUMENT>
</approve>

Parameters

Name Required Type Description
PODOCUMENT Required string Object to approve

PODOCUMENT

Name Required Type Description
DOCID Required string Transaction DOCID to approve.
COMMENT Optional string Comments

Decline Purchasing Transactions

decline

<decline>
    <PODOCUMENT>
        <DOCID>Purchase Order-PO0213</DOCID>
        <COMMENT>Need to wait on this</COMMENT>
    </PODOCUMENT>
</decline>

Parameters

Name Required Type Description
PODOCUMENT Required string Object to decline

PODOCUMENT

Name Required Type Description
DOCID Required string Transaction DOCID to decline.
COMMENT Optional string Comments

Get Purchasing Transaction Approval History

Provides the approval history for a purchasing transaction.

getApprovalHistory

<getApprovalHistory>
    <module>purchasing</module>
    <docid>Purchase Order-PO0213</docid>
</getApprovalHistory>

Parameters

Name Required Type Description
module Required string Use purchasing
docid Required string docid for the transaction

Provide feedback