It allows you:
to insert new sales orders (master&details in one json file)
to view sales orders (master&details in one json file) - ordered descending by created date and document date
to print
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 Warehouse active
to have a Customer active with all the mandatory fields
to have a price list active
Columns that can be used as filters:
LastModified (UTC time format ISO 8601: yyyy-MM-dd HH:mm:ss Z from C_order). The sign used for comparison is ”>” (exclusive). Use this filter to get all the orders 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
DocumentNo
OrderReference
BPartner
IsOpenOrder - use to list only open orders (= not fully shipped or not fully invoiced yet)
HasPartialPayments: true/false
DateOrdered - Range
IsSelfService
DocumentStatus
PriceList
CreatedBy
AssetValue
AssetSN
Employee
Project
ProjectPhase
Actions can be done:
list
create
Sales Order fields (Master&Details)
A Sales Order in SocrateCloud has the following structure:
Master document (see Sales Order Master) which contains data about header document:
No. document
Order data
Customer
Sales Reprezentative etc.
Document details (see Sales Order Details) which contains the products that are ordered with informations about:
Product
Quantity
Selling price
VAT
To update only master data, or a specific order line see Sales Order Master, Order Details chapters.
URL: https://api.socratecloud.com/webapi/rest/order/full/list/{version}?accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "TEST ALINA SRL",
"Created": "2025-05-14 13:30:56+0000",
"CreatedBy": "TESTALINA_Admin",
"Updated": "2025-05-14 13:30:56+0000",
"UpdatedBy": "TESTALINA_Admin",
"DocumentNo": "CCR1000171",
"OrderReference": null,
"ExternalInvoiceNo": null,
"ExternalInOutNo": null,
"Description": null,
"DocType": "Credit Order",
"DateOrdered": "2025-05-14 00:00:00+0000",
"DatePromised": "2025-05-14 00:00:00+0000",
"BPartner": "C1",
"BPartnerName": "CLIENT TEST 1",
"BPartnerLocation": "Sediu CT",
"BPartnerLocation_ID": null,
"BillBPartner": "C1",
"BillBPartnerName": "CLIENT TEST 1",
"BillLocation": "Sediu CT",
"BillBPartnerTaxID": "RO 38487451",
"BillBPartnerIsIndividual": false,
"BillBPartnerIsTaxIDValid": true,
"BillLocation_ID": null,
"BPartnerContact": "test 2 contact factura 2",
"BPartnerContactEmail": "Alina.Mocanu@bitsoftware.ro",
"BPartnerContactPhone": null,
"BPartnerContactPhone2": null,
"BillContact": "contact test 22",
"BillContactEmail": "Irina.gaspar@bitsoftware.ro",
"BillContactPhone": "076133683",
"BillContactPhone2": null,
"Warehouse": "DEPOZIT BV",
"Warehouse_ID": null,
"DeliveryViaRule": "Shipper",
"Shipper": null,
"DeliveryTerms": null,
"Currency": "RON",
"SalesRep": "BARBU ION",
"PaymentTerm": "30 zile",
"TrxOrganization": null,
"Activity": null,
"User1_ID": null,
"User1": null,
"TotalLines": 100,
"GrandTotal": 119,
"PaidAmt": 0,
"OpenAmt": 119,
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
"PaymentMethod": "On Credit",
"PriceList": "Vanzare RON",
"IsSelfService": false,
"BillSendLocation": "Sediu CT",
"PaymentMode": "OP",
"ReceiptNo": 1,
"AssetValue": null,
"AssetSN": null,
"Employee": "BARBU ION",
"Project": null,
"ProjectPhase": null,
"Status_ID": null,
"Status": null,
"Lead_ID": null,
"LeadDocumentNo": null,
"BPartnerSR": null,
"BPartnerSRName": null,
"DeliveryRule": "Availability",
"InvoiceRule": "After Delivery",
"lines": [
{
"Organization": "TEST ALINA SRL",
"Created": "2025-05-14 13:31:03+0000",
"CreatedBy": "TESTALINA_Admin",
"Updated": "2025-05-14 13:31:35+0000",
"UpdatedBy": "TESTALINA_Admin",
"Active": true,
"Line": 10,
"ID": 1937047,
"Product": "001",
"ProductName": "ARTICOL 001",
"Description": null,
"QtyEntered": 1,
"UOM_ID": 100,
"UOM": "Each",
"ListPrice": 100,
"Discount": 0,
"PriceEntered": 100,
"LineNetAmt": 100,
"IsTaxIncluded": false,
"Tax": "19%",
"TrxOrganization": null,
"Activity": null,
"AssetValue": null,
"AssetSN": null,
"Employee": null,
"Project": null,
"ProjectPhase": null,
"ProjectTask": null,
"BOMPrice": null,
"SecondaryQty": null,
"DropShip": false,
"Status_ID": null,
"Status": null,
"Campaign_ID": null,
"CampaignValue": null,
"Campaign": null,
"User1_ID": null,
"User1": null,
"RelatedProductSGR": null,
"RelatedLineSGR": 0,
"LineHelp": "Test API 2"
}
],
"comments": []
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/order/full/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
If through this 'full/create' method, there are also lines that contain SGR Guarantees, then:
these lines containing Guarantees must be linked to the lines containing Basic Articles. In order to link the line with the SGR Guarantee to the line with the Basic Article (goods), on the line with the Guarantee, the value "RelatedProductSGR" must be specified (this is the 'Basic Article Code for SGR') and optionally the value "RelatedLineSGR" (this is the 'Line Number Basic Article for SGR').
in this case, for lines containing Basic Articles, will no longer automatically generate from Socrate Cloud: lines containing SGR Guarantees.
If through this 'full/create' method, the Sales Order belong to a WMS warehouse, then you must add param LocationWarehouse_ID:
ex: /order/full/create/4?LocationWarehouse_ID=1066967&accessToken=...
Note: We recommend to attend the following steps:
1. If new customer create customer using BPartner create method
2. Create Order
Data format:
{
"Organization": "Demo SRL",
"DocumentNo": "60300",
"OrderReference": null,
"ExternalInvoiceNo": null,
"ExternalInOutNo": null,
"Description": "some_description",
"DocType": "Standard Order",
"DateOrdered": "2014-01-28 00:00:00",
"DatePromised": "2014-01-28 00:00:00",
"BPartner": "Client 01",
"BPartnerLocation": "STRADA",
"BPartnerLocation_ID": 1000603,
"BillBPartner": "Client 01",
"BillLocation": "STRADA",
"BillLocation_ID": 1006087,
"BPartnerContact": null,
"BPartnerContactEmail": null,
"BPartnerContactPhone": null,
"BPartnerContactPhone2": null,
"BillContact": null,
"BillContactEmail": null,
"BillContactPhone": null,
"BillContactPhone2": null,
"Warehouse": "Standard",
"Warehouse_ID": 1000298,
"DeliveryViaRule": "Shipper",
"Shipper": null,
"DeliveryTerms": null,
"SalesRep": "Ionut Ursuleanu",
"PaymentTerm": "30 days",
"TrxOrganization": null,
"Activity": "Programare",
"DocumentAction": "<None>",
"PaymentMethod": "On Credit",
"PriceList": "Standard EUR",
"IsSelfService": true,
"BillSendLocation": null,
"PaymentMode": null,
"ReceiptNo": 1,
"AssetValue": "9195",
"AssetSN": null,
"Employee": "Loredan",
"Project" : null,
"ProjectPhase": null,
"Status_ID": 1000080,
"Status": "Creată",
"Lead_ID": 1000018,
"LeadDocumentNo": "1000400",
"BPartnerSR": "Agent Value",
"BPartnerSRName": "Agent Name",
"lines": [
{
"Organization": "Demo SRL",
"Active": true,
"Line": 10,
"Product": "some_product",
"Description": null,
"QtyEntered": 1,
"UOM_ID": 100,
"UOM": "Each",
"ListPrice": null,
"Discount": null,
"PriceEntered": null,
"Tax": "24% ",
"TrxOrganization": "Demo SRL",
"Activity": "Programare",
"AssetValue": "9195",
"AssetSN": null,
"Employee": "Loredan",
"Project" : null,
"ProjectPhase": null,
"ProjectTask": null,
"BOMPrice": null,
"SecondaryQty": null,
"DropShip": false,
"Status_ID": 1000081,
"Status": "Creat",
"Campaign_ID": 1234567,
"CampaignValue": "Test Campanie1",
"Campaign": "Test Campanie1",
"RelatedProductSGR": null,
"RelatedLineSGR": null,
"LineHelp": "Test API 2"
},
{
"Organization": "Demo SRL",
"Active": true,
"Line": 20,
"Product": "SGR Guarantee",
"Description": null,
"QtyEntered": 1,
"UOM": "Each",
"ListPrice": 0.5,
"Discount": null,
"PriceEntered": 0.5,
"Tax": "Neimpozabil ",
"TrxOrganization": null,
"Activity": null,
"AssetValue": null,
"AssetSN": null,
"Employee": null,
"Project" : null,
"ProjectPhase": null,
"ProjectTask": null,
"BOMPrice": null,
"SecondaryQty": null,
"DropShip": false,
"Status_ID": 1000081,
"Status": "Creat",
"Campaign_ID": null,
"CampaignValue": null,
"Campaign": null,
"RelatedProductSGR": "some_product",
"RelatedLineSGR": 10,
"LineHelp": "Test API 2"
}
],
"comments": [
{
"Comments": "test1"
}
]
}
Parameters:
DocumentNo -mandatory ( Sales Order document number )
PrintFormatName - optional - to use when you want the sales order to be printed on a specific format.
URL: https://api.socratecloud.comwebapi/rest/order/print/{version}?accessToken={access_token}&DocumentNo={document_no}&PrintFormatName={print_format_name)
Method: GET
Return: PDF file