It allows you:
to view vendor invoices
to create a new vendor invoice
to update an existing vendor invoice
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have an Organization active
to have an Role active
Columns that can be used as filters:
LastModified (UTC time format ISO 8601: yyyy-MM-dd HH:mm:ss Z from C_Invoice). The sign used for comparison is ”>” (exclusive). Use this filter to get all the invoices modified after the date/time value sent in this parameter.
eg: LastModified=2014-06-13 12:40:00 +0300 if you are in Romania or LastModified=2014-06-13%2012:40:00%20%2b0300
Organization
OrderNo
OrderReference
DocumentNo
BPartner (=Vendor)
IsPaid
DateInvoiced
Created
Updated
Actions can be done:
list
create
update
Vendor Invoice fields (Master and Details)
An Invoice in SocrateCloud has the following structure:
Master document which contains data about header document:
No. document
Invoice date
Vendor
Representative
OrderNo (only used in create methods)
User1_ID
User1 (Name)
PriceList (Name)
PaymentTerm (Name)
FixedDate
DueDate
etc.
Document details which contains the products that are invoiced with informations about:
Product
Quantity
Price
VAT
User1_ID
User1 (Name)
OrderLine_ID (only used in create methods)
InOutLine_ID (only used in create methods)
etc.
Field Name
Organization
Created
CreatedBy
Updated
UpdatedBy
DocumentNo
DocType
OrderNo
OrderReference
Description
DateInvoiced
BPartner
BPartnerName
Location
Contact
Currency
SalesRep
PaymentMethod
PaymentMode
BankAccount
TotalLines
GrandTotal
DocumentStatus
DocumentAction
Line
Product
ProductName
Charge
Description
QtyEntered
UOM
ListPrice
Discount
PriceEntered
LineNetAmt
LineTotalAmt
TaxAmt
Tax
Created
Createdby
Printed
TrxOrganization
Employee
Project
ProjectPhase
ProjectTask
Activity
Campaign
The unit selling price.
If NULL it will be completed automatically by SocrateCloud according to the current price list version or will be calculated as ListPrice * %Discount.
Line amount (Quantity*UnitPrice) no tax included
Line amount, tax included
Line VAT amount
VAT rate percentage
The time when the record was created
The user that inserted the record
The Printed checkbox indicates if this document or line will included when printing. Default will be 'Y'.
Select an accounting entity by Name, implemented as Cost Center. To be completed only if you want to specify an exception.
Select an accounting entity by name, implemented as Employee Cost Center. To be completed only if you want to specify an exception.
Consult API 'Employee' to access the full list
Select a valid project, by name, related to BPartner selected. The project represent the valid SLA (Service level agreement). To be completed only if you want to specify an exception.
For the Projects List see API Method 'Projects'
Project Phase Name of Project above . To be completed only if you want to specify an exception.
Project Phase Task of ProjectPhase above. To be completed only if you want to specify an exception.
Select an accounting entity by Name, implemented as Activity Cost Center. To be completed only if you want to specify an exception.
Select an accounting entity by name, implemented as Camaign Cost Center. To be completed only if you want to specify an exception.
Line discount applied (percentage) to the List Price.
The article maine unit of measure.
Recommended selling price.
Product Value
Product Name
Charge Name
Line description
Quantity invoiced in product basic unit of measure.
Total amount of all lines including Tax in document currency.
Indicates the status of a document at this time.
Indicates the next action to the document:
Select one of these predefined values (name):
*Null - No reservation, fully modifiable.
*Prepare - books ordered quantity, the Sales Order can be updated, under certain circumstances.
*Complete - books ordered quantity, the Sales Order is non updatable. Depending on Sales Order document type it can generate other documents (Delivery Note, Invoice).
*Void - cancel the Sales Order and reverse all documents generated from (Delivery Note, Invoice)
*Close - No action can be done on an order closed, unlocks ordered quantity not delivered.
*Re-activate - reopen an complete order,
unlocks invoice quantity not delivered and reverse all documents generated from.
Details document
Line number
'Invoice to' Bank Account = denumire cont
Total amount of all lines in document currency, excluding any applicable Taxes.
Mode of payment used in relation with courier services.
Examples: Cash on Delivery, Payment Order etc.
Description
Master document Fields
Legal entity (company) or an subsidiary
The time when the record was created
The user that inserted the record
The last time when the record was updated
The last user that updated the record
Invoice number
Invoice document type (name, e.g : Invoice, Proforma Invoice)
Order number from which the invoice was generated
Customer order number
Invoice master document description (free text)
Invoice document date
Vendor Value
Vendor Name
Vendor Address Name
Vendor contact name
Document current currency
Sales Representative Name
Method of invoice payment.
Alphanumeric (60)
(yyyy-MM-dd HH:mm:ss) - Range
Alphanumeric (60)
(yyyy-MM-dd HH:mm:ss) - Range
Alphanumeric (60)
Alphanumeric (30)
Alphanumeric (60)
Alphanumeric (30)
Alphanumeric (30)
Alphanumeric (255)
(yyyy-MM-dd) - Range
Alphanumeric (40)
Alphanumeric (60)
Alphanumeric (60)
Alphanumeric (60)
Alphanumeric
Alphanumeric (60)
Predefined List
Alphanumeric (60)
Alphanumeric (60)
Numeric
Numeric
Alphanumeric
Predefined list
Numeric
Alphanumeric (60)
Alphanumeric (60)
Alphanumeric (60)
Alphanumeric (255)
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
(yyyy-MM-dd HH:mm:ss)
Alphanumeric (60)
Y/N
Alfanumeric (60)
Alphanumeric (60)
Alphanumeric (60)
Alphanumeric (60)
Alphanumeric (60)
Alfanumeric (60)
Alphanumeric (60)
Data
type
Action
ReadWrite
ReadOnly
ReadOnly
ReadOnly
ReadOnly
ReadWrite
ReadWrite
ReadOnly
ReadWrite
ReadWrite
ReadWrite
ReadWrite
ReadOnly
ReadWrite
ReadWrite
ReadOnly
ReadWrite
ReadWrite
ReadWrite
ReadWrite
ReadOnly
ReadOnly
ReadOnly
ReadWrite
ReadOnly
ReadWrite
ReadOnly
ReadWrite
ReadWrite
ReadWrite
ReadOnly
ReadWrite
ReadWrite
ReadWrite
ReadOnly
ReadOnly
ReadOnly
ReadWrite
ReadOnly
ReadOnly
ReadWrite
ReadWrite
ReadWrite
ReadWrite
ReadWrite
ReadWrite
ReadWrite
ReadWrite
URL: https://api.socratecloud.com/webapi/rest/invoiceVendor/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "DEMO SRL",
"Created": "2023-05-01 09:52:13+0000",
"CreatedBy": "Admin",
"Updated": "2023-05-01 09:52:13+0000",
"UpdatedBy": "Admin",
"DocumentNo": "1000797",
"OrderNo": null,
"OrderReference": null,
"Description": null,
"DocType": "** New **",
"DateInvoiced": "2023-05-01 00:00:00+0000",
"BPartner": "FT1",
"BPartnerName": "FURNIZOR TEST 1",
"Location": "AFRIMESTI",
"Contact": "Contact Furnizor Test",
"Currency": "RON",
"SalesRep": "ANGAJAT DEMO 1",
"BankAccount": null,
"PaymentMethod": "On Credit",
"TotalLines": 440,
"GrandTotal": 523.6,
"TrxOrganization_ID": 1005354,
"TrxOrganizationValue": "SERVICE",
"TrxOrganization": "SERVICE",
"Project_ID": 1016474,
"ProjectValue": "HC002",
"Project": "HC002",
"ProjectPhase_ID": 1008789,
"ProjectPhase": "faza_B",
"ProjectTask_ID": 1002893,
"ProjectTask": "subfaza_4",
"Activity_ID": 1000475,
"ActivityValue": "Testare",
"Activity": "Testare",
"Campaign_ID": 1000685,
"CampaignValue": "1000001",
"Campaign": "Campanie testare DEV",
"Asset_ID": 1016210,
"AssetValue": "INV00020",
"Asset": "Auto 1000020",
"User1_ID": 0,
"User1": null,
"Employee_ID": 1043712,
"Employee": "ANGAJAT DEMO 1",
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
"PaymentMode": "OP",
"PriceList": "Test Price List",
"PaymentTerm": "23 zile",
"FixedDate": true,
"DueDate": "2023-05-24 00:00:00+0000",
"lines": [
{
"Created": "2023-05-01 09:52:24+0000",
"CreatedBy": "Admin",
"Line": 10,
"Product": "001",
"ProductName": "PRODUCT 1",
"Charge": null,
"Description": null,
"QtyEntered": 4,
"UOM": "Each",
"ListPrice": 180,
"Discount": 38.89,
"PriceEntered": 110,
"LineNetAmt": 440,
"LineTotalAmt": 523.6,
"TaxAmt": 83.6,
"Tax": "19%",
"Printed": null,
"TrxOrganization_ID": 1005353,
"TrxOrganizationValue": "VNZ",
"TrxOrganization": "VNZ",
"Project_ID": 1016475,
"ProjectValue": "HC003",
"Project": "HC003",
"ProjectPhase_ID": 1008790,
"ProjectPhase": "A",
"ProjectTask_ID": 1002895,
"ProjectTask": "subf_1",
"Activity_ID": 1000161,
"ActivityValue": "1000000",
"Activity": "Interventie TEST 1",
"Campaign_ID": 1000482,
"CampaignValue": "1000000",
"Campaign": "Campanie testare API",
"Asset_ID": 0,
"AssetValue": null,
"Asset": null,
"User1_ID": 0,
"User1": null,
"Employee_ID": 1043712,
"Employee": "ANGAJAT DEMO 1",
"Resource_ID": 1000690,
"ResourceValue": "R1",
"ResourceName": "Resursa test 1",
"OrderLine_ID": "12345",
"InOutLine_ID": "54321"
}
]
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/invoiceVendor/full/create/{version}?accessToken={access_token}
Method: POST
Return: JSON object with next format:
{
"Organization": "DEMO SRL",
"OrderNo": null,
"OrderReference": null,
"Description": null,
"DocType": "AP Invoice",
"DateInvoiced": "2023-05-01 00:00:00+0000",
"BPartner": "FT1",
"BPartnerName": "FURNIZOR TEST 1",
"Location": "AFRIMESTI",
"Contact": "Contact Furnizor Test",
"Currency": "RON",
"SalesRep": "ANGAJAT DEMO 1",
"BankAccount": null,
"PaymentMethod": "On Credit",
"TrxOrganization_ID": 1005354,
"TrxOrganizationValue": "SERVICE",
"TrxOrganization": "SERVICE",
"Project_ID": 1016474,
"ProjectValue": "HC002",
"Project": "HC002",
"ProjectPhase_ID": 1008789,
"ProjectPhase": "faza_B",
"ProjectTask_ID": 1002893,
"ProjectTask": "subfaza_4",
"Activity_ID": 1000475,
"ActivityValue": "Testare",
"Activity": "Testare",
"Campaign_ID": 1000685,
"CampaignValue": "1000001",
"Campaign": "Campanie testare DEV",
"Asset_ID": 1016210,
"AssetValue": "INV00020",
"Asset": "Auto 1000020",
"User1_ID": null,
"User1": null,
"Employee_ID": 1043712,
"Employee": "ANGAJAT DEMO 1",
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
"PaymentMode": "OP",
"PriceList": "Test Price List",
"PaymentTerm": "Test Payment Term",
"FixedDate": true,
"DueDate": "2023-05-24 00:00:00+0000",
"lines": [
{
"Line": 10,
"Product": "001",
"ProductName": "PRODUCT 1",
"Charge": null,
"Description": null,
"QtyEntered": 4,
"UOM": "Each",
"ListPrice": 180,
"Discount": 38.89,
"PriceEntered": 110,
"Tax": "19%",
"Printed": null,
"TrxOrganization_ID": 1005353,
"TrxOrganizationValue": "VNZ",
"TrxOrganization": "VNZ",
"Project_ID": 1016475,
"ProjectValue": "HC003",
"Project": "HC003",
"ProjectPhase_ID": 1008790,
"ProjectPhase": "A",
"ProjectTask_ID": 1002895,
"ProjectTask": "subf_1",
"Activity_ID": 1000161,
"ActivityValue": "1000000",
"Activity": "Interventie TEST 1",
"Campaign_ID": 1000482,
"CampaignValue": "1000000",
"Campaign": "Campanie testare API",
"Asset_ID": null,
"AssetValue": null,
"Asset": null,
"User1_ID": null,
"User1": null,
"Employee_ID": 1043712,
"Employee": "ANGAJAT DEMO 1",
"Resource_ID": 1000690,
"ResourceValue": "R1",
"ResourceName": "Resursa test 1",
"OrderLine_ID": "12345",
"InOutLine_ID": "54321"
}
]
}