4.1 Customer Invoices Master

Interface

It allows you:

Prerequisites:

In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:

Columns that can be used as filters:

Actions can be done:

Customer Invoice fields (Master and Details)

An Invoice in SocrateCloud has the following structure:

Note: We recommend attending the following steps:

API Methods:

Create:

URL: https://api.socratecloud.com/webapi/rest/invoice/create/{version}?accessToken={access_token}

Method: POST

Return: document no for success or error message (start with "ERROR: ")

Data format:

{

    "Organization": "DEMO SRL",

    "OrderNo": null,

    "OrderReference": null,

    "Description": "some description",

    "DocType": "AR Invoice",

    "DateInvoiced": "2023-05-01 00:00:00+0000",

    "FixedDate": false,

    "BillBPartner": "CT1",

    "BillBPartnerName": "CLIENT TEST 1",

    "BillLocation": "Sediu_contabilitate",

    "BillContact": "contact CT1",

    "Currency": "RON",

    "SalesRep": "ANGAJAT DEMO 1",

    "BillBPartnerSR": "AD1",

    "BillBankAccount": "RO43INGB0000000000009988",

    "PriceList": "Vanzare RON",

    "DateRegistered": null,

    "PaymentTerm": "15 days",

    "MeanOfConveyance": null,

    "MeanOfConveyanceName": null,

    "MOCSalesRepName": null,

    "MOCSalesRepDescription": null,

    "TrxOrganization_ID": 1005354,

    "TrxOrganizationValue": "SERVICE",

    "TrxOrganization": "SERVICE",

    "Project_ID": 1022150,

    "ProjectValue": "BC001",

    "Project": "BC001",

    "ProjectPhase_ID": 1014515,

    "ProjectPhase": "A",

    "ProjectTask_ID": 1004859,

    "ProjectTask": "sub_I",

    "Activity_ID": 1000475,

    "ActivityValue": "Testare",

    "Activity": "Testare",

    "Campaign_ID": 1000685,

    "CampaignValue": "1000001",

    "Campaign": "Campanie testare DEV",

    "Asset_ID": 1005114,

    "AssetValue": "1000005",

    "Asset": "LIVRABIL DEMO",

    "User1_ID": null,

    "User1": null,

    "Employee_ID": 1043712,

    "Employee": "ANGAJAT DEMO 1",

    "IsSelfService": false,

    "PaymentMethod": "On Credit",

    "DocumentStatus": "Drafted",

    "DocumentAction": "Complete",

    "PaymentMode": "OP",

    "ReceiptNo": 1,

    "AMEF": 1,

    "TrackingNo": null

}


Update:

URL: https://api.socratecloud.com/webapi/rest/invoice/update/{version}?accessToken={access_token}&DocumentNo={document_no}

Method: POST

Return: document no for success or error message (start with "ERROR: ")

Data format:

{

    "Organization": "DEMO SRL",           // NOT UPDATABLE !!! (business logic reason)

    "OrderNo": null,

    "OrderReference": null,

    "Description": "some description",

    "DocType": "AR Invoice",

    "DateInvoiced": "2023-05-01 00:00:00+0000",

    "FixedDate": false,

    "BillBPartner": "CT1",               // NOT UPDATABLE !!! (business logic reason)

    "BillBPartnerName": "CLIENT TEST 1",

    "BillLocation": "Sediu_contabilitate",

    "BillContact": "contact CT1",

    "Currency": "RON",

    "SalesRep": "ANGAJAT DEMO 1",

    "BillBPartnerSR": "AD1",

    "BillBankAccount": "RO43INGB0000000000009988",

    "PriceList": "Vanzare RON",           // NOT UPDATABLE !!! (business logic reason)

    "DateRegistered": null,

    "PaymentTerm": "15 days",

    "MeanOfConveyance": null,

    "MeanOfConveyanceName": null,

    "MOCSalesRepName": null,

    "MOCSalesRepDescription": null,

    "TrxOrganization_ID": 1005354,

    "TrxOrganizationValue": "SERVICE",

    "TrxOrganization": "SERVICE",

    "Project_ID": 1022150,

    "ProjectValue": "BC001",

    "Project": "BC001",

    "ProjectPhase_ID": 1014515,

    "ProjectPhase": "A",

    "ProjectTask_ID": 1004859,

    "ProjectTask": "sub_I",

    "Activity_ID": 1000475,

    "ActivityValue": "Testare",

    "Activity": "Testare",

    "Campaign_ID": 1000685,

    "CampaignValue": "1000001",

    "Campaign": "Campanie testare DEV",

    "Asset_ID": 1005114,

    "AssetValue": "1000005",

    "Asset": "LIVRABIL DEMO",

    "User1_ID": null,

    "User1": null,

    "Employee_ID": 1043712,

    "Employee": "ANGAJAT DEMO 1",

    "IsSelfService": false,

    "PaymentMethod": "On Credit",

    "DocumentAction": "<None>",

    "PaymentMode": "OP",

    "ReceiptNo": 1,

    "AMEF": 1,

    "TrackingNo": null

}

Note: If you don't transmit a field, then the value of that field will be deleted!! (except of not updatable fields)

Delete:

URL: https://api.socratecloud.com/webapi/rest/invoice/delete/{version}?accessToken={access_token}&DocumentNo={document_no}

Method: POST

Return: 'Deleted' for success or error message (start with "ERROR: ")

Process:

URL: https://api.socratecloud.com/webapi/rest/invoice/process/{version}?accessToken={access_token}&DocumentNo={document_no}&DocumentAction={document_action}

Method: POST

Optional parameters:

Return: Document status for success or error message (start with "ERROR: ")

Print Fiscal Receipt:

URL: https://api.socratecloud.com/webapi/rest/invoice/print_fiscal_receipt/{version}?accessToken={access_token}&DocumentNo={document_no}

Method: POST

Optional parameters:

Return: Document no for success or error message (start with "ERROR: ")