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

Imports a list of purchases

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 purchases to import

Purchases
NameDescriptionTypeAdditional information
SysRef

The Sysref used to keep track of the transaction. Limited to 8 characters.

string

N/A

TranType

The type of transaction (RD or RS)

string

N/A

TranNum

The tranaction number. Limited to 8 characters.

string

N/A

ExtRef

The external reference. Limited to 10 characters.

string

N/A

SuppCode

The support code. Limited to 6 characters.

string

N/A

StkCode

The stock code. Limited to 15 characters.

string

N/A

StkDesc

The description of the stock item. Limited to 40 characters.

string

N/A

BatchRef

Batch reference. Limited to 28 characters.

string

N/A

LocCode

The location code. Limited to 8 characters.

string

N/A

Quantity

The quantity of the item.

integer

N/A

FreeQuantity

(Optional) The free quantity of the item

integer

N/A

UnitCost

The unit cost of the item.

decimal number

N/A

LineDisc

(Optional) The line disc of the item.

decimal number

N/A

VatCode

The VAT code of the item. Limited to 2 characters.

string

N/A

VatAmount

The VAT rate.

decimal number

N/A

UserId

The User ID. Limited to 3 characters.

string

N/A

PostDate

The POST Date/Time of the transaction

date

N/A

TranDate

The Transaction Date/Time of the transaction

date

N/A


Request Formats

application/json, text/json

Sample:
{
  "SysRef": "sample string 1",
  "TranType": "sample string 2",
  "TranNum": "sample string 3",
  "ExtRef": "sample string 4",
  "SuppCode": "sample string 5",
  "StkCode": "sample string 6",
  "StkDesc": "sample string 7",
  "BatchRef": "sample string 8",
  "LocCode": "sample string 9",
  "Quantity": 10,
  "FreeQuantity": 11,
  "UnitCost": 12.0,
  "LineDisc": 13.0,
  "VatCode": "sample string 14",
  "VatAmount": 15.0,
  "UserId": "sample string 16",
  "PostDate": "2024-11-23T17:55:10.7424662",
  "TranDate": "2024-11-23T17:55:10.7424662"
}

Response Information

Resource Description

The operation's result. Returns empty if successful, error message if not.

PurchasesResult
NameDescriptionTypeAdditional information
ErrorMessage

string

N/A

Response Formats

application/json, text/json

Sample:
{
  "ErrorMessage": "sample string 1"
}