POST api/StkTrans

Upload a Stock Transaction. Supported transactions: SAL: invoice, SRE: Credit note, ISS: Issues, IRE: Issues return, PUR: Purchase, Purchase Order: POP, Purchase Return: PRE, TEN: Tender, ORD: Order,Jobcard WAY: Waybill, TRF: Transfer, ADJ: Adjustment, REQ: Requisition, Invoices support commitions. The toStore field is used only in TRF, REQ

Request Information

URI Parameters

None.

Body Parameters

stkTrans
NameDescriptionTypeAdditional information
msgControl

Contains information about the response

MsgControl

None.

Company

The company name

string

Required

String length: inclusive between 0 and 6

DocNo

The document number. If null we add the next available one and we return it in MsgControl.Message

string

String length: inclusive between 0 and 15

AccountCode

The account code

string

Required

String length: inclusive between 0 and 15

AccountName

The account name

string

String length: inclusive between 0 and 50

DocType

The document type. SAL: invoices, PUR: purchase, ORD: order, ISS: issues ...

string

Required

String length: inclusive between 0 and 3

DocDate

The document date (without time)

date

Required

DueDate

The document due date. For orders, waybills is the delivery date. For tenders is the last valid date

date

None.

Store

The current store

string

Required

String length: inclusive between 0 and 5

ToStore

The destination store (only for transfer)

string

String length: inclusive between 0 and 5

Salesperson

The sales person

string

Required

String length: inclusive between 0 and 5

PaymentType

The payment type: VS = Visa, CH = Cash, CR = Credit, CQ = Cheque

string

Required

String length: inclusive between 0 and 2

currency

The currency code

string

Required

currencyRate

The currency rate

decimal number

Required

H1

Header1 code

string

String length: inclusive between 0 and 30

H2

Header2 code

string

String length: inclusive between 0 and 30

H3

Header3 code

string

String length: inclusive between 0 and 30

H4

Header4 code

string

String length: inclusive between 0 and 30

H5

Header5 code

string

String length: inclusive between 0 and 30

Details

Details about the document

string

String length: inclusive between 0 and 100

OtherReference

The other reference

string

String length: inclusive between 0 and 15

Address

The address (for orders)

string

String length: inclusive between 0 and 200

Telephone

The telephone number

string

String length: inclusive between 0 and 100

Text1

Text field for additional information

string

String length: inclusive between 0 and 100

Text2

Text field for additional information

string

String length: inclusive between 0 and 100

Text3

Text field for additional information

string

String length: inclusive between 0 and 100

Text4

Text field for additional information

string

String length: inclusive between 0 and 100

Text5

Text field for additional information

string

String length: inclusive between 0 and 100

Text6

Text field for additional information

string

String length: inclusive between 0 and 100

Text7

Text field for additional information

string

String length: inclusive between 0 and 100

VatInLines

Is vat included in our prices? I = Included , E = Excluded

string

String length: inclusive between 0 and 1

DocDiscount

The document discount

decimal number

None.

Number1

Numeric field for additional information

decimal number

None.

Number2

Numeric field for additional information

decimal number

None.

Date1

Datetime field for additional information

date

None.

OrderNo

The order number

string

None.

WaybillNo

The waybill number

string

None.

TenderNo

The tender number

string

None.

ReverseCharge

Is reverse charge ? True = Yes, False = No (only for purchases 'PUR')

boolean

None.

email

The email (for orders)

string

String length: inclusive between 0 and 200

user

The user who created the document

string

String length: inclusive between 0 and 10

ClearingAgent

The clearing agent (only for costings 'COG')

string

String length: inclusive between 0 and 15

ClearingDate

The clearing date. (only for costings 'COG')

date

None.

stkTranLines

List of stock transaction lines

Collection of stkTranLine

None.

Request Formats

application/json, text/json

Sample:
{
  "msgControl": {
    "result": 0,
    "Message": "Corresponding success and error message",
    "MethodName": "api/StkTrans POST",
    "AppName": "EsoftWebApi",
    "EsoftUser": "ESOFT",
    "User": "Username",
    "Password": "Password",
    "SystemDate": "2025-01-06T22:32:15.1720865+02:00",
    "GenList": [],
    "GenMsg1": "",
    "GenMsg2": "",
    "GenMsg3": ""
  },
  "Company": "DEMO",
  "DocNo": "SAL147852",
  "AccountCode": "321025",
  "AccountName": null,
  "DocType": "SAL",
  "DocDate": "2019-12-25T00:00:00",
  "DueDate": null,
  "Store": "100",
  "ToStore": null,
  "Salesperson": "100",
  "PaymentType": "CH",
  "currency": "EUR",
  "currencyRate": 1.0,
  "H1": "",
  "H2": "",
  "H3": "",
  "H4": "",
  "H5": "",
  "Details": "Demo details",
  "OtherReference": "",
  "Address": "",
  "Telephone": "",
  "Text1": "",
  "Text2": "",
  "Text3": "",
  "Text4": "",
  "Text5": "",
  "Text6": "",
  "Text7": "",
  "VatInLines": "I",
  "DocDiscount": 0.0,
  "Number1": 0.0,
  "Number2": 2.0,
  "Date1": "2025-01-06T22:32:15.1720865+02:00",
  "OrderNo": "",
  "WaybillNo": "",
  "TenderNo": "",
  "ReverseCharge": true,
  "email": null,
  "user": null,
  "ClearingAgent": null,
  "ClearingDate": null,
  "stkTranLines": [
    {
      "ItemCode": "1001125",
      "Qty": 1,
      "PriceCode": "U",
      "PricelistCode": null,
      "PriceBeforeDisc": 11.9,
      "AmountDiscount": 0.0,
      "PercentageDiscount": 0.0,
      "PercentageDiscountAmount": 0.0,
      "Amount": 11.9,
      "Details": "",
      "VatCode": "3",
      "VatRate": 19,
      "VatAmount": 1.9,
      "Text1": "user defined",
      "Text2": "user defined",
      "Number1": 0,
      "Number2": 1,
      "Money1": 2.0,
      "Money2": 0.0,
      "ReverseChargeItem": true,
      "TariffLine": null
    },
    {
      "ItemCode": "1001129",
      "Qty": 10,
      "PriceCode": "P",
      "PricelistCode": "001",
      "PriceBeforeDisc": 11.9,
      "AmountDiscount": 0.0,
      "PercentageDiscount": 0.0,
      "PercentageDiscountAmount": 0.0,
      "Amount": 119.0,
      "Details": "",
      "VatCode": "3",
      "VatRate": 19,
      "VatAmount": 19.0,
      "Text1": null,
      "Text2": null,
      "Number1": 0,
      "Number2": null,
      "Money1": null,
      "Money2": null,
      "ReverseChargeItem": true,
      "TariffLine": null
    }
  ]
}

Response Information

Resource Description

MsgControl
NameDescriptionTypeAdditional information
result

Response flag: 1 = success else something went wrong: see Message

integer

Required

Message

Corresponding success and error message

string

Required

MethodName

The name of the API

string

None.

AppName

The name of the current API method

string

None.

EsoftUser

The username of the logged in Esoft user. Can be empty

string

None.

User

Username

string

None.

Password

Password

string

None.

SystemDate

Current date

date

None.

GenList

List of additional message for calls with multiple object

Collection of Collection of string

None.

GenMsg1

Additional message

string

None.

GenMsg2

Additional message

string

None.

GenMsg3

Additional message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "result": 0,
  "Message": "Corresponding success and error message",
  "MethodName": "api/<Method>",
  "AppName": "EsoftWebApi",
  "EsoftUser": "ESOFT",
  "User": "Username",
  "Password": "Password",
  "SystemDate": "2025-01-06T22:32:15.1720865+02:00",
  "GenList": [],
  "GenMsg1": "",
  "GenMsg2": "",
  "GenMsg3": ""
}