15.2. Vendor Invoice Line
Interface
It allows you:
to insert new lines (one by one) into an existing Vendor Invoice
to update lines (one by one)
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have an open Vendor Invoice (document status: Draft, In Progress)
to have products active with all the mandatory fields
the products selected on Vendor Invoice must have prices defined in the Price List selected on the Vendor Invoice
Columns that can be used as filters:
DocumentNo (InvoiceNo)
Line
Product
Mandatory Parameters when inserting order lines:
InvoiceNo
Actions can be done:
insert
update
API Methods:
Create:
URL: https://api.socratecloud.com/webapi/rest/invoiceVendor/line/create/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
Data format:
{
"Product": "001",
"Charge": null,
"Description": "some description",
"QtyEntered": 4,
"UOM": "Each",
"ListPrice": 180,
"Discount": 38.89,
"PriceEntered": 110,
"Tax": "19%",
"Printed": true,
"TrxOrganizationValue": "VNZ",
"ProjectValue": "HC003",
"ProjectPhase": "A",
"ProjectTask": "subf_1",
"ActivityValue": "1000000",
"CampaignValue": "1000000",
"AssetValue": null,
"User1": null,
"Employee": "ANGAJAT DEMO 1",
"ResourceValue": "R1",
"OrderLine_ID": "12345",
"InOutLine_ID": "54321"
}
Update:
URL: https://api.socratecloud.com/webapi/rest/invoiceVendor/line/update/{version}?accessToken={access_token}&DocumentNo={document_no}&Line={line_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
Data format:
{
"Product": "001",
"Charge": null,
"Description": "another description",
"QtyEntered": 1,
"UOM": "Each",
"ListPrice": 150,
"Discount": null,
"PriceEntered": 110,
"Tax": "19%",
"Printed": true,
"TrxOrganizationValue": "SALES",
"ProjectValue": "HC005",
"ProjectPhase": "B",
"ProjectTask": "subf_4",
"ActivityValue": "1000000",
"CampaignValue": "1000000",
"AssetValue": "1000029",
"User1": null,
"Employee": "ANGAJAT DEMO 2",
"ResourceValue": "R5"
}