/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

PropertyTypeLengthMandatoryDescriptionComments
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
String64
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.

accountAmountFloat

Actual Amount for Actual Account and Voyage the Month Set by Document Date.
Note:
ONLY in use for accrual and accrual reversals.

accountAmountYtdFloat

Year-to-Date Actual Amount for the Actual Account and Voyage.
Note: ONLY in use for accrual and accrual reversals.


documentNoString32
Document Number
documentTextString512
Document Text/Description
dueDateDate

NOT IN USE, find dueDate in document.paymentTerms.dueDate
vat/Vat

Value Added Tax (VAT)
company/Company

Invoice and Payment/Receipt:

  • Outgoing invoice:
    • document.company:
      • The company in Dataloy VMS issuing invoice.
      • On referring payment - receiving payment.
    • document.businessPartner:
      • The business partner receiving the invoice.
  • Incoming invoice:
    • document.businessPartner:
      • Issues invoice.
    • document.company:
      • Receives invoice.
      • On the referring payment - pays the invoice.

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:

  • Outgoing invoice:
    • document.company:
      • The company in Dataloy VMS issuing invoice.
      • On referring payment - receiving payment.
    • document.businessPartner:
      • The business partner receiving the invoice.
  • Incoming invoice:
    • document.businessPartner:
      • Issues invoice.
    • document.company:
      • Receives invoice.
      • On the referring payment - pays the invoice.

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.
To set: refDocument use Document Number or Key.

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 reportMust be requested in "fields" header to update value
invoiceText
String512

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)


{
    "key": 3098739,
    "self": "http://localhost:8080/ws/rest/Document/3098739",
    "glAccount": null,
    "documentLines": [
        {
            "key": 3098741,
            "self": "http://localhost:8080/ws/rest/DocumentLine/3098741",
            "glAccount": null,
            "isAccountsPayable": true,
            "createdDate": "2014-06-10T11:25:54",
            "modifiedDate": null,
            "realmId": null,
            "handlingCost": null,
            "businessUnit": null,
            "voyage": {
                "referenceNo": 2912,
                "vessel": {
                        "vesselName": "Achtergracht",
                        "self": "http://localhost:8080/ws/rest/Vessel/1089683",
                        "key": 1089683
                },
                "ballastPort": {
                        "portName": "XINGANG",
                        "unLoCode": "CNXGG",
                            "country": {
                                "countryCode": "CN",
                                "countryName": "CHINA, PEOPLES REP",
                                "key": 410044,
                                "self": "http://localhost:8080/ws/rest/Country/410044"
                            },
                        "isCanal": false,
                        "self": "http://localhost:8080/ws/rest/Port/105090",
                        "key": 105090
                },
                "portCalls": [
                    {
                        "key": 1462868,
                        "self": "http://localhost:8080/ws/rest/PortCall/1462868"
                    },
                    {
                        "key": 1348989,
                        "self": "http://localhost:8080/ws/rest/PortCall/1348989"
                    }
                ],
                "cargos": [
                        {
                            "self": "http://localhost:8080/ws/rest/Cargo/1503741",
                            "key": 1503741
                        },
                        {
                            "self": "http://localhost:8080/ws/rest/Cargo/1500214",
                            "key": 1500214
                        }
                ],
                "ballastBonus": 0,
                "ballastBonusCommission": 0,
                "ballastBonusNet": 0,
                "ballastBonusRevenue": 0,
                "canalCost": 0,
                "comments": null,
                "commission": 39104.2347525,
                "commissionAddress": 0,
                "commissionOwnersCost": 0,
                "cveTcIn": 0,
                "createdDate": "2013-03-18T09:50:11",
                "ilohcTcIn": 0,
                "ilohcTcOut": 0,
                "isTc": false,
                "milesBallast": 1386,
                "milesLoaded": 6176,
                "netFreight": 772838.0446225,
                "percentExtraAtSea": 0,
                "portCost": 122853.35731414868,
                "restrictingCubic": 0,
                "robFixed": 0,
                "runningCost": 0,
                "runningCostPerDay": 0,
                "speedBallast": 12,
                "speedLoaded": 12,
                "tabTitle": null,
                "tcHireCommission": 0,
                "tcHireNet": 0,
                "tcRate": 0,
                "tcResult": 209505.66633669366,
                "tcResultDay": 4273.506048938861,
                "tdw": 12239,
                "utilisationComments": null,
                "variousCost": 47016.136885416665,
                "variousRevenue": 163825.369375,
                "voyageResult": 209505.66633669366,
                "tcIn": null,
                "tcs": [],
                "voyageCurrency": {
                        "currencyCode": "EUR",
                        "currencyName": "Euro",
                        "key": 400008,
                        "self": "http://localhost:8080/ws/rest/Currency/400008"
                },
                "cveTcOut": 0,
                "daysBallast": 5.479166666666667,
                "daysCanal": 0,
                "daysCleaning": 0,
                "daysDischarging": 5.14375,
                "daysExtraAtSea": 0,
                "daysExtraInPort": 27.270833333333332,
                "daysHeating": 0,
                "daysIdle": 0,
                "daysLoaded": 21.16875,
                "daysLoading": 7.128472222222222,
                "daysOffhire": 17.166666666666668,
                "daysOffhireCharterer": 0,
                "daysOffhireOwner": 0,
                "daysTotal": 66.19097222222223,
                "daysTotalAtSea": 26.647916666666667,
                "daysTotalInPort": 39.543055555555554,
                "daysWaiting": 0,
                "demurrage": 0,
                "despatch": 0,
                "dlConsumption": 0,
                "dlCost": 0,
                "dlPrice": 0,
                "doAtSea": 0,
                "doConsumption": 39.35702777777777,
                "doCost": 33097.29250972222,
                "doInPort": 0.8,
                "doInPortWorking": 1.5,
                "doPrice": 1100,
                "estimatedVoyageStartDate": "2013-03-02T13:30:00",
                "flConsumption": 0,
                "flCost": 0,
                "flPrice": 0,
                "foBallast": 15,
                "foCleaning": 0,
                "foConsumption": 381.32,
                "foCost": 209521.13292,
                "foHeating": 0,
                "foInPort": 0,
                "foInPortWorking": 0,
                "foLoaded": 16.5,
                "foPrice": 718.7217035560684,
                "foPumping": 0,
                "freight": 648116.91,
                "freightCost": 0,
                "grossFreight": 811942.279375,
                "handlingCost": 150844.45865651878,
                "self": "http://localhost:8080/ws/rest/Voyage/1462847",
                "key": 1462847
            },
            "quantity": 0,
            "bunkerHedgeLine": null,
            "exchangeRate": 0,
            "documentLineText": "text here",
            "freightRate": null,
            "exchangeRateDate": null,
            "portCall": null,
            "businessPartner": {
                "businessPartnerName": "Barr, Kim and James",
                "businessPartnerSort": "Barr,  James",
                "businessPartnerCode": "P200240",
                "bankAccount": null,
                "businessPartnerType": null,
                "self": "http://localhost:8080/ws/rest/BusinessPartner/1240229",
                "key": 1240229
            },
            "sourceCurrencyAmount": 1500,
            "unitPrice": 0,
            "billOfLading": null,
            "documentCurrency": {
                "currencyCode": "USD",
                "currencyName": "U.S. Dollar",
                "key": 400132,
                "self": "http://localhost:8080/ws/rest/Currency/400132"
            },
            "handlingCostCode": null,
            "offhire": null,
            "companyCurrencyAmount": 1500,
            "documentAmount": 1500,
            "sourceCurrency": {
                "currencyCode": "USD",
                "currencyName": "U.S. Dollar",
                "key": 400132,
                "self": "http://localhost:8080/ws/rest/Currency/400132"
            },
            "various": null,
            "vatRate": null
        }
    ],
    "codeProperty": "documentNo",
    "estimateAmount": 0,
    "estimateAmountTotal": 0,
    "estimateAmountYtd": 0,
    "externalDocumentNo": null,
    "documentPaymentTerms": [],
    "documentType": {
            "key": 1000042,
            "self": "http://localhost:8080/ws/rest/DocumentType/1000042",
            "documentType": "PMI",
            "documentTypeDesc": "Receipt"
    },
    "issuingCompany": null,
    "voyageSnapshot": null,
    "accountAmount": 0,
    "accountAmountYtd": 0,
    "documentNo": "3098739",
    "documentText": null,
    "dueDate": null,
    "vat": null,
    "createdDate": "2014-06-10T11:25:54",
    "modifiedDate": null,
    "company": {
            "key": 1063570,
            "self": "http://localhost:8080/ws/rest/Company/1063570",
            "companyCode": "9000",
            "companyName": "Spliethoff's Bevrachtingskantoor B.V.",
            "companyCurrency": {
                "currencyCode": "EUR",
                "currencyName": "Euro",
                "key": 400008,
                "self": "http://localhost:8080/ws/rest/Currency/400008"
            }
    },
    "exchangeRate": 0,
    "documentDate": "2014-05-22T00:00:00",
    "bankAccount": null,
    "exchangeRateDate": null,
    "businessPartner": {
            "businessPartnerName": "Barr, Kim and James",
            "businessPartnerSort": "Barr,  James",
            "businessPartnerCode": "P200240",
            "bankAccount": null,
            "businessPartnerType": null,
            "self": "http://localhost:8080/ws/rest/BusinessPartner/1240229",
            "key": 1240229
    },
    "sourceCurrencyAmount": 1500,
    "account": null,
    "documentCurrency": {
            "currencyCode": "USD",
            "currencyName": "U.S. Dollar",
            "key": 400132,
            "self": "http://localhost:8080/ws/rest/Currency/400132"
    },
    "invoicingStatus": {
            "key": 1000095,
            "self": "http://localhost:8080/ws/rest/StatusType/1000095",
            "statusTypeCode": "POS",
            "statusTypeDesc": "Posted"
    },
    "companyCurrencyAmount": 1500,
    "documentAmount": 1500,
    "refDocument": null,
    "remarks": []
}

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"
        }
    ]
}

Top
Back

Related Content

 Expand to see related content


Unknown macro: {dynamiccontentbylabel}