POST api/SIMS/ImportTransactions?companyKey={companyKey}

Posts sales transactions into SIMS gateway, single line or multi-line transactions can be specified

Request Information

URI Parameters

NameDescriptionTypeAdditional information
companyKey

The company name if the service is connected to multiple SIMS companies (Optional)

string

Default value is

Body Parameters

The SIMS transaction(s) object

Collection of SimsTransaction
NameDescriptionTypeAdditional information
SystemReference

The unique system reference used to keep track of the transaction in the interfacing system. If the transactions contains multiple lines, this should be specified the same for each one of those lines to group them together under one sales transaction.

string

Required

Max length: 8

TransactionDate

The transaction date.

date

Required

TransactionReference

The Transaction Reference is made up of two parts; the first 6 characters specify a unique number for the transaction, while the last two characters specify the website ID (by default this ID is usually "WB"). (e.g. 000001WB)

string

Required

Max length: 8

TransactionType

There are three transaction types you can use: CS – Cash Sales, CR – Cash Returns and IN - Invoice

string

Required

Max length: 2

ClientAccountCode

The client code for the transaction. This client has to exist in the SIMS client database.

string

Required

Max length: 6

CustomerCode

The customer code for this transaction, if applicable. This customer code must already exist in the SIMS database.

string

Max length: 10

PostDate

The date and time when the transaction was posted.

date

Required

Pos_Id

The Pos_Id is a prefix to the system generating the transaction. The formula (Pos_Id + SystemReference) is used to validate the uniqueness of the transaction.

string

Required

Max length: 2

StockCode

The code of the stock card being sold/returned. This stock code must already exist in the SIMS database.

string

Required

Max length: 15

StockDescription

The stock card description. The default stock card description is used if this is not specified.

string

Max length: 40

BatchReference

The batch reference in case the stock card has a batch mode. (serial number, expiry date, etc)

string

Max length: 20

PackSize

The item's pack size. The default is 1.

decimal number

Required

Quantity

The item quantity sold/returned.

decimal number

Required

UnitValue

The unit price per individual item in this transaction line. This is exclusive of VAT and is not discounted.

decimal number

Required

VatAmount

The total VAT amount for this transaction line. This field is mandatory if you specify a VAT code or a VAT rate which is greater than zero.

decimal number

Required

DiscountValue

The total discount for this transaction line.

decimal number

N/A

LocationCode

The location code from where the item(s) in this transaction line were sold/returned. This location code must already exist in the SIMS database.

string

Required

Max length: 8

VatCode

The VAT code used for this transaction line. The VAT code must already exist in the SIMS database.

string

Required

Max length: 2

SaleAnalysis

The sales analysis code for this transaction line.

string

Max length: 4

HeaderAnalysis

This analysis code is used to categorise the transaction for reporting purposes.

string

Max length: 8

HeaderAnalysis1

This analysis code is used to categorise the transaction for reporting purposes.

string

Max length: 8

HeaderAnalysis2

This analysis code is used to categorise the transaction for reporting purposes.

string

Max length: 8

User_Id

The user ID of this transaction. This is usually "WEB" when posted from other websites..

string

Required

Max length: 3

OriginalSellingPrice

This field can be used to store the original selling price of the item in case this was changed during the sale / return.

decimal number

N/A

OriginalSellingPriceReference

The original selling price number (1 - 6) in case the selling price was changed during the sale / return.

string

Max length: 1

Remarks

Any remarks made on the item

string

N/A

SalesmanCode

The code of the salesman who posted this transaction. If specified, this must already exist in the SIMS database.

string

Max length: 4

PaymentType

The PaymentType used for when the system is linked to an Accounts system, and payment details are mandatory for every transaction.

string

Max length: 10


Request Formats

application/json, text/json

Sample:
[
  {
    "SystemReference": "sample string 1",
    "TransactionDate": "2024-10-06T02:30:57.8251708",
    "TransactionReference": "sample string 3",
    "TransactionType": "sample string 4",
    "ClientAccountCode": "sample string 5",
    "CustomerCode": "sample string 6",
    "PostDate": "2024-10-06T02:30:57.8251708",
    "Pos_Id": "sample string 8",
    "StockCode": "sample string 9",
    "StockDescription": "sample string 10",
    "BatchReference": "sample string 11",
    "PackSize": 12.0,
    "Quantity": 13.0,
    "UnitValue": 14.0,
    "VatAmount": 15.0,
    "DiscountValue": 16.0,
    "LocationCode": "sample string 17",
    "VatCode": "sample string 18",
    "SaleAnalysis": "sample string 19",
    "HeaderAnalysis": "sample string 20",
    "HeaderAnalysis1": "sample string 21",
    "HeaderAnalysis2": "sample string 22",
    "User_Id": "sample string 23",
    "OriginalSellingPrice": 24.0,
    "OriginalSellingPriceReference": "sample string 25",
    "Remarks": "sample string 26",
    "SalesmanCode": "sample string 27",
    "PaymentType": "sample string 30"
  },
  {
    "SystemReference": "sample string 1",
    "TransactionDate": "2024-10-06T02:30:57.8251708",
    "TransactionReference": "sample string 3",
    "TransactionType": "sample string 4",
    "ClientAccountCode": "sample string 5",
    "CustomerCode": "sample string 6",
    "PostDate": "2024-10-06T02:30:57.8251708",
    "Pos_Id": "sample string 8",
    "StockCode": "sample string 9",
    "StockDescription": "sample string 10",
    "BatchReference": "sample string 11",
    "PackSize": 12.0,
    "Quantity": 13.0,
    "UnitValue": 14.0,
    "VatAmount": 15.0,
    "DiscountValue": 16.0,
    "LocationCode": "sample string 17",
    "VatCode": "sample string 18",
    "SaleAnalysis": "sample string 19",
    "HeaderAnalysis": "sample string 20",
    "HeaderAnalysis1": "sample string 21",
    "HeaderAnalysis2": "sample string 22",
    "User_Id": "sample string 23",
    "OriginalSellingPrice": 24.0,
    "OriginalSellingPriceReference": "sample string 25",
    "Remarks": "sample string 26",
    "SalesmanCode": "sample string 27",
    "PaymentType": "sample string 30"
  }
]

Response Information

Resource Description

The operation's result

ImportSimsTransactionResult
NameDescriptionTypeAdditional information
Status

The status of the transaction after the attempt to post it to SIMS

ImportStatus

N/A

ErrorMessage

The message returned in case of an error.

string

N/A

Response Formats

application/json, text/json

Sample:
{
  "Status": 0,
  "ErrorMessage": ""
}