InvDocument
Holds information about invoicing documents, including header-level data for tracking and processing.
Table Specific Information
The INSERT, DELETE, and UPDATE operations are only supported when UseLegacy=True.
Insert
The following example illustrates how to insert into the InvDocument table:
INSERT INTO InvDocument (Docparid, Whencreated, Documentno, Itemaggregate) VALUES ('Adjustment Decrease Value', '07/05/2024', '23234', '<ictransitem><itemid>908</itemid><warehouseid>WH1</warehouseid><quantity>2.00</quantity><unit>Each</unit></ictransitem>');
Delete
Only Recordno is accepted for delete operations. The following example illustrates how to delete a row in InvDocument whose Recordno equals 22604:
DELETE FROM InvDocument WHERE Recordno = '22604';
Update
For draft transactions, the Sage Intacct API accepts either Recordno or Docid. The following example illustrates how to update InvDocument:
UPDATE InvDocument SET message='updated message', itemaggregate=" + updateictransitem + " WHERE Docid='Beginning Balance-BBIN0001';
Columns
| Name | Type | ReadOnly | Description |
| Recordno [KEY] | String | False |
Unique identifier for the inventory document. |
| Docno | String | False |
Document number associated with the inventory record. |
| Docid | String | False |
Unique ID for the inventory document. |
| Createdfrom | String | False |
Source from which this document was created. |
| State | String | False |
Current state or status of the document. |
| Closed | Boolean | False |
Indicates whether the document is closed or active. |
| Whencreated | Datetime | False |
Timestamp when the document was created. |
| Whenmodified | Datetime | False |
Timestamp when the document was last modified. |
| Whendue | Datetime | False |
Due date for the inventory document. |
| Status | String | False |
Current status of the inventory document. |
| Ponumber | String | False |
Purchase order number linked to the inventory document. |
| Vendordocno | String | False |
Vendor document number associated with the inventory record. |
| Docparid | String | False |
Identifier of the parent document for the inventory record. |
| Docparkey | String | False |
Key of the parent document associated with the inventory record. |
| Docparclass | String | False |
Classification of the parent document. |
| Term_name | String | False |
Name of the payment terms for the document. |
| Note | String | False |
Additional notes or comments for the document. |
| Warehouse_locationid | String | False |
Warehouse location identifier associated with the document. |
| Shipvia | String | False |
Shipping method or carrier for the document. |
| User | String | False |
User associated with the inventory document. |
| Createduser | String | False |
User who created the document. |
| Userid | String | False |
Unique identifier for the user associated with the document. |
| Createduserid | String | False |
Unique identifier for the user who created the document. |
| Contact_contactname | String | False |
Name of the contact associated with the document. |
| Contact_prefix | String | False |
Prefix for the contact's name. |
| Contact_firstname | String | False |
First name of the contact. |
| Contact_initial | String | False |
Middle initial of the contact. |
| Contact_lastname | String | False |
Last name of the contact. |
| Contact_companyname | String | False |
Company name associated with the contact. |
| Contact_printas | String | False |
Formatted name of the contact for printing. |
| Contact_phone1 | String | False |
Primary phone number of the contact. |
| Contact_phone2 | String | False |
Secondary phone number of the contact. |
| Contact_cellphone | String | False |
Cell phone number of the contact. |
| Contact_pager | String | False |
Pager number of the contact, if applicable. |
| Contact_fax | String | False |
Fax number of the contact. |
| Contact_email1 | String | False |
Primary email address of the contact. |
| Contact_email2 | String | False |
Secondary email address of the contact. |
| Contact_url1 | String | False |
Primary website or URL linked to the contact. |
| Contact_url2 | String | False |
Secondary website or URL linked to the contact. |
| Contact_visible | Boolean | False |
Indicates whether the contact is visible in the system. |
| Contact_mailaddress_address1 | String | False |
First line of the contact's mailing address. |
| Contact_mailaddress_address2 | String | False |
Second line of the contact's mailing address, if applicable. |
| Contact_mailaddress_city | String | False |
City in the contact's mailing address. |
| Contact_mailaddress_state | String | False |
State or region in the contact's mailing address. |
| Contact_mailaddress_zip | String | False |
Postal code for the contact's mailing address. |
| Contact_mailaddress_country | String | False |
Country in the contact's mailing address. |
| Contact_mailaddress_countrycode | String | False |
Country code in the contact's mailing address. |
| Shiptokey | String | False |
Unique key identifying the shipping address for the document. |
| Shipto_contactname | String | False |
Name of the contact at the shipping address. |
| Shipto_prefix | String | False |
Prefix for the contact at the shipping address. |
| Shipto_firstname | String | False |
First name of the contact at the shipping address. |
| Shipto_initial | String | False |
Middle initial of the contact at the shipping address. |
| Shipto_lastname | String | False |
Last name of the contact at the shipping address. |
| Shipto_companyname | String | False |
Company name associated with the shipping address. |
| Shipto_printas | String | False |
Formatted name of the shipping contact for printing. |
| Shipto_phone1 | String | False |
Primary phone number of the contact at the shipping address. |
| Shipto_phone2 | String | False |
Secondary phone number of the contact at the shipping address. |
| Shipto_cellphone | String | False |
Cell phone number of the contact at the shipping address. |
| Shipto_pager | String | False |
Pager number of the contact at the shipping address. |
| Shipto_fax | String | False |
Fax number of the contact at the shipping address. |
| Shipto_email1 | String | False |
Primary email address of the contact at the shipping address. |
| Shipto_email2 | String | False |
Secondary email address of the contact at the shipping address. |
| Shipto_url1 | String | False |
Primary website or URL associated with the shipping address. |
| Shipto_url2 | String | False |
Secondary website or URL associated with the shipping address. |
| Shipto_visible | Boolean | False |
Indicates if the shipping address is visible in the system. |
| Shipto_mailaddress_address1 | String | False |
First line of the shipping address. |
| Shipto_mailaddress_address2 | String | False |
Second line of the shipping address, if applicable. |
| Shipto_mailaddress_city | String | False |
City of the shipping address. |
| Shipto_mailaddress_state | String | False |
State or region of the shipping address. |
| Shipto_mailaddress_zip | String | False |
Postal code of the shipping address. |
| Shipto_mailaddress_country | String | False |
Country of the shipping address. |
| Shipto_mailaddress_countrycode | String | False |
Country code of the shipping address. |
| Billtokey | String | False |
Unique key identifying the billing address for the document. |
| Billto_contactname | String | False |
Name of the contact at the billing address. |
| Billto_prefix | String | False |
Prefix for the contact at the billing address. |
| Billto_firstname | String | False |
First name of the contact at the billing address. |
| Billto_initial | String | False |
Middle initial of the contact at the billing address. |
| Billto_lastname | String | False |
Last name of the contact at the billing address. |
| Billto_companyname | String | False |
Company name associated with the billing address. |
| Billto_printas | String | False |
Formatted name of the billing contact for printing. |
| Billto_phone1 | String | False |
Primary phone number of the contact at the billing address. |
| Billto_phone2 | String | False |
Secondary phone number of the contact at the billing address. |
| Billto_cellphone | String | False |
Cell phone number of the contact at the billing address. |
| Billto_pager | String | False |
Pager number of the contact at the billing address. |
| Billto_fax | String | False |
Fax number of the contact at the billing address. |
| Billto_email1 | String | False |
Primary email address of the contact at the billing address. |
| Billto_email2 | String | False |
Secondary email address of the contact at the billing address. |
| Billto_url1 | String | False |
Primary website or URL associated with the billing address. |
| Billto_url2 | String | False |
Secondary website or URL associated with the billing address. |
| Billto_visible | Boolean | False |
Indicates if the billing address is visible in the system. |
| Billto_mailaddress_address1 | String | False |
First line of the billing address. |
| Billto_mailaddress_address2 | String | False |
Second line of the billing address, if applicable. |
| Billto_mailaddress_city | String | False |
City of the billing address. |
| Billto_mailaddress_state | String | False |
State or region of the billing address. |
| Billto_mailaddress_zip | String | False |
Postal code of the billing address. |
| Billto_mailaddress_country | String | False |
Country of the billing address. |
| Billto_mailaddress_countrycode | String | False |
Country code of the billing address. |
| Message | String | False |
Message or additional information related to the document. |
| Prrecordkey | String | False |
Key of the prior record associated with the inventory document. |
| Invbatchkey | String | False |
Key for the batch associated with the inventory document. |
| Prinvbatchkey | String | False |
Key for the prior inventory batch associated with the document. |
| Printed | String | False |
Indicates whether the document has been printed. |
| Backorder | String | False |
Indicates whether the document contains any backordered items. |
| Subtotal | Double | False |
Subtotal amount for the document before tax and additional charges. |
| Total | Double | False |
Total amount of the inventory document including taxes and charges. |
| Entglgroup | Int64 | False |
General ledger group associated with the inventory document. |
| Currency | String | False |
Currency used in the document. |
| Exchratedate | Datetime | False |
Date the exchange rate was applied to the document. |
| Exchratetypes_name | String | False |
Name of the exchange rate type used for the document. |
| Exchrate | Double | False |
Exchange rate applied to the document. |
| Schopkey | String | False |
Unique identifier for the shop associated with the document. |
| Salescontract | String | False |
Sales contract associated with the document. |
| Usedascontract | String | False |
Indicates if the document is used as a contract. |
| Trx_subtotal | Double | False |
Subtotal of the transaction amount before taxes and charges. |
| Trx_total | Double | False |
Total transaction amount including taxes and charges. |
| Exch_rate_type_id | String | False |
ID for the exchange rate type used in the document. |
| Reneweddoc | String | False |
Indicates whether the document is a renewed version of a previous document. |
| Basecurr | String | False |
Base currency used for calculating amounts in the document. |
| Systemgenerated | String | False |
Indicates whether the document was system-generated. |
| Invoicerunkey | Int64 | False |
Unique key identifying the invoice run associated with the document. |
| Docpar_in_out | String | False |
Indicates whether the document is incoming or outgoing. |
| Megaentitykey | Int64 | False |
Key identifying the mega entity associated with the document. |
| Megaentityid | String | False |
ID for the mega entity associated with the document. |
| Megaentityname | String | False |
Name of the mega entity associated with the document. |
| Record_url | String | False |
URL for accessing the record associated with the document. |