/Document
Short Description
Chapter Contents:
Long Description
Supported Methods
GET /Document
Get a list of Document objects. Filter to avoid huge amounts of data (see Filtering for search parameters).
GET /Document/{key}
Get a single Document object.
POST /Document
Insert a new Document:
- Fields that must be unique: documentNo
PUT /Document/{key}
Update an existing Document. Unchanged properties need not be updated.
Properties
| Property | Type | Length | Mandatory | Description | Comments |
|---|---|---|---|---|---|
glAccount | String | General Ledger Account. Documentation of GL Account. | |||
documentLines | Array of /DocumentLine | Document Lines of the Document | |||
codeProperty | String | ||||
estimateAmount | Float | Estimated Amount for the Actual Account and Voyage the Month Set by Document Date. Note: ONLY in use for accrual and accrual reversals. | |||
estimateAmountTotal | Float | Total Estimated Amount for Actual Account and Voyage. Note: ONLY in use for accrual and accrual reversals. | |||
estimateAmountYtd | Float | Year-to-Date Actual Amount for Actual Account and Voyage. Note: ONLY in use for accrual and accrual reversals. | |||
externalDocumentNo | String | 64 | External Document Number | ||
| documentPaymentTerms | /DocumentPaymentTerm | Array of one or two DocumentPaymentTerm objects, to be able to split the invoice. Due date is existing in DocumentPaymentTerm. | |||
| documentType | /DocumentType | Document Type | |||
| issuingCompany | /Company | Issuing Company | |||
| voyageSnapshot | /VoyageSnapshot | Voyage Snapshots Created While Generating Accruals. Note: ONLY in use for accrual and accrual reversals. | |||
| accountAmount | Float | Actual Amount for Actual Account and Voyage the Month Set by Document Date. Note: ONLY in use for accrual and accrual reversals. | |||
| accountAmountYtd | Float | Year-to-Date Actual Amount for the Actual Account and Voyage. | |||
| documentNo | String | 32 | Document Number | ||
| documentText | String | 512 | Document Text/Description | ||
| dueDate | Date | NOT IN USE, find dueDate in document.paymentTerms.dueDate | |||
| vat | /Vat | Value Added Tax (VAT) | |||
| company | /Company | Invoice and Payment/Receipt:
| |||
exchangeRate | Float | Exchange Rate Between documentAmount and sourceCurrencyAmount | |||
documentDate | Date | Document Date | |||
bankAccount | /BankAccount | Bank Account | |||
exchangeRateDate | Date | Exchange Rate Date | |||
businessPartner | /BusinessPartner | Invoice and Payment/Receipt:
| |||
sourceCurrencyAmount | Float |
Note: Do NOT use document.sourceCurrencyAmount for documents with documentLines in different currencies. | |||
account | /Account | ||||
documentCurrency | /Currency | Document Currency | |||
invoicingStatus | /StatusType | Document Status (see: Document Status List) | |||
companyCurrencyAmount | Float | For all /DocumentTypes: Amount in company currency for the document. Company. | |||
documentAmount | Float |
| |||
refDocument | /Document | Refers to Document for Reversals, Payments and Receipts. Payment/Receipts: To set refDocument for payment receipts: set documentLine.voyage equal to the documentLine.voyage of the referring invoice. | |||
modifiedDate | Date | Invoice View | |||
recordStatus | Integer | Invoice View | |||
invoice | String | Base64 encoded invoice report | Must be requested in "fields" header to update value | ||
invoiceText | String | 512 | Available from version 6.12 |
Example GET Return Body
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior version has date format: yyyy-dd-MM hh:mi:ss)
Update Example
PUT http://localhost:8080/ws/rest/Document/2729534
Note: This example would update the document with id 2729534 to status Posted.
Request Body:
{
"invoicingStatus": "POS"
}
New Payment Example
POST http://localhost:8080/ws/rest/Document/
Request body:
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior version has date format: yyyy-dd-MM hh:mi:ss)
{
"documentAmount": 1500.0,
"companyCurrencyAmount": 1500.0,
"sourceCurrencyAmount": 1500.0,
"documentDate": "2014-05-22T00:00:00",
"documentType": "PMI",
"invoicingStatus": "POS",
"company": 9000,
"documentCurrency": "USD",
"businessPartner": "P200240",
"documentLines":
[
{
"documentAmount": 1500.0,
"documentCurrency": "USD",
"companyCurrencyAmount": 1500.0,
"sourceCurrencyAmount": 1500.0,
"sourceCurrency": "USD",
"voyage": "921303",
"documentLineText": "text here",
"isAccountsPayable": "true",
"invoicingStatus": "POS",
"businessPartner": "P200240"
}
]
}
New Actuals Example
POST http://localhost:8080/ws/rest/Document/
Request body:
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior version has date format: yyyy-dd-MM hh:mi:ss)
{
"documentAmount": 1500.0,
"companyCurrencyAmount": 1500.0,
"sourceCurrencyAmount": 1500.0,
"documentDate": "2013-04-01T00:00:00",
"documentType": "ACC",
"invoicingStatus": "POS",
"company": 9000,
"documentCurrency": "USD",
"documentLines":
[
{
"documentAmount": 1500.0,
"documentCurrency": "USD",
"companyCurrencyAmount": 1500.0,
"sourceCurrencyAmount": 1500.0,
"sourceCurrency": "USD",
"invoicingStatus": "POS",
"voyage": "921303",
"glAccount": "4200"
}
]
}