Get Stock Transfers In
Returns your stock transfers in (goods received from another branch or company of your group, entered as a purchase marked as a stock transfer) from Logic ERP, each with its header and item lines. Use it to copy new and changed transfers into your own system — normally by asking only for those added or changed since your last call — or to fetch particular transfers by their internal number.
The response has exactly the same layout as Get Purchase Vouchers; this page lists only what is different for stock transfers in.
Endpoint
Address
https://your-server/api/GetStockTransferIn
Method
POST
Authorization
Basic Auth
The response and the common request fields are explained in How Every API Call Works.
Request fields
GlobalModifyCode
number
No
0
Your bookmark in the change log, as described in How Every API Call Works.
DateFrom, DateTo
date
No
empty
With GlobalModifyCode 0: a period of changes (the date a transfer was saved or edited). Send both as null when you are not asking for a period. Also decides the financial year searched, as on Get Purchase Vouchers. Write them as yyyy-MM-dd.
Doc_Codes
text
No
empty
Logic ERP's internal numbers (Vouch_Code), separated by commas, for example "39,71". Returns exactly these transfers; the bookmark and period are ignored. Numbers and commas only.
Branch_Codes_From
text
No
empty
Codes of the receiving branches, separated by commas, for example "2,7". Numbers and commas only.
Doc_Num_Like
text
No
empty
Only transfers whose internal number starts with this text: PU followed by the date as yyyyMMdd – the same start as purchase vouchers. Used with the bookmark or a period.
Field names are matched without regard to upper or lower case. Other fields in the request (including Branch_Codes_To) are ignored.
Rules Logic ERP applies
The rules of Get Purchase Vouchers apply, with these differences:
Only stock transfers in – purchases marked as a stock transfer – are returned. Ordinary purchase vouchers and purchase returns are not.
Shared change log. Purchase vouchers, purchase returns and stock transfers in share one change log of up to 150 lines per batch. A batch can hold no transfers: you then get
"No Record Found."withStatus: trueand a higherLastGlobalModifyCode– store it and call again. You have caught up when the message is"No Stock Transfer In found..."andLastGlobalModifyCodeis the value you sent. Keep this endpoint's bookmark separate from the bookmark you use for Get Purchase Vouchers.Transfers have no gate pass here:
GPN_NumberandGPN_Dateare always empty, and the lines are never repeated.Qty_Scanned,Qty_RejectedandQty_Excessare filled from the physical verification of the transfer, as on Get Purchase Vouchers.Transfers use their own API site settings: the branches, series (GRN prefixes) and field choice your Logic ERP team set for stock transfers in.
Known issue – change-log lines of an earlier financial year. As on Get Purchase Vouchers, a change-log line of a transfer (or voucher, or return) of an earlier financial year is read against the current year (with a bookmark, and also in a first sync from
0and in a period request). The transfer of the earlier year is not returned, and an unrelated current-year transfer with the sameVouch_Codemay be returned instead. Check thatVouch_Dateis in the financial year you expect before you store a record byVouch_Code.
Example request
Next batch after your stored bookmark:
Two transfers by their internal numbers:
Test it
Send a request to the Logic ERP sandbox (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change the request if you like, and press Test it. The example asks for the first batch of the change log. Do not send "GlobalModifyCode": -1 here – it changes what the sandbox has marked as already sent.
Returns your stock transfers in (goods received from another branch or company of your group, entered as a purchase marked as a stock transfer) from Logic ERP, each with its header and item lines. Use it to copy new and changed transfers into your own system — normally by asking only for those added or changed since your last call — or to fetch particular transfers by their internal number.
The user name and password of your API site.
Your bookmark in the change log, as described in How Every API Call Works.
With GlobalModifyCode 0: a period of changes (the date a transfer was saved or edited). Send both as null when you are not asking for a period. Also decides the financial year searched, as on Get Purchase Vouchers. Write them as yyyy-MM-dd.
With GlobalModifyCode 0: a period of changes (the date a transfer was saved or edited). Send both as null when you are not asking for a period. Also decides the financial year searched, as on Get Purchase Vouchers. Write them as yyyy-MM-dd.
Logic ERP's internal numbers (Vouch_Code), separated by commas, for example "39,71". Returns exactly these transfers; the bookmark and period are ignored. Numbers and commas only.
Codes of the receiving branches, separated by commas, for example "2,7". Numbers and commas only.
Only transfers whose internal number starts with this text: PU followed by the date as yyyyMMdd – the same start as purchase vouchers. Used with the bookmark or a period.
Always HTTP 200. Check Status, Message and GetData.
See the Status rules on this page and on How Every API Call Works.
Why the call failed, or a note. The reason may be followed by technical detail - read the first line.
The change-log bookmark (see How Every API Call Works).
Size of the answer, for example "2 KB".
No login was sent.
POST /api/GetStockTransferIn HTTP/1.1
Host: demo.logicerp.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"GlobalModifyCode": 0,
"DateFrom": null,
"DateTo": null
}{
"GetData": [
{
"Vouch_Code": 1,
"Vouch_No": "text",
"Vouch_Date": "text",
"Account_Code": "text",
"Account_Name": "text",
"Agent_Name": "text",
"Quantity": 1,
"Gross_Amount": 1,
"Net_Amount": 1,
"Total_Tax": "text",
"Branch_Name": "text",
"Branch_Code": 1,
"Currency_Name": "text",
"Bill_No": "text",
"Bill_Date": "text",
"GRN_Prefix": "text",
"GRN_Number": 1,
"Tax_Region_Name": "text",
"Goods_In_Transit": 1,
"Action_Code": "text",
"Doc_Type_Desc": "text",
"Doc_Type": "text",
"Gr_Number": "text",
"Gr_Date": "text",
"Order_No": "text",
"Order_Date": "text",
"Header_Remarks_1": "text",
"Header_Remarks_2": "text",
"Header_Remarks_3": "text",
"Transport_Mode": "text",
"Transport_Name": "text",
"Trans_ID": "text",
"Trans_Services": "text",
"Weight": "text",
"Cases": "text",
"GPN_Number": "text",
"GPN_Date": "text",
"ListItems": [
{
"Pur_Txn_Code": 1,
"Lot_Code": 1,
"Lot_Number": "text",
"AddlItemCode": "text",
"ItemCode": "text",
"PackName": "text",
"CF_1": 1,
"CF_2": 1,
"CF_3": 1,
"Item_Sale_Rate": 1,
"Item_Sp_Rate_1": 1,
"Item_Sp_Rate_2": 1,
"Item_Sp_Rate_3": 1,
"Item_Sp_Rate_4": 1,
"Item_Sp_Rate_5": 1,
"Item_Pur_Rate": 1,
"Item_MRP": 1,
"HSN_Code": "text",
"Quantity": 1,
"Lot_MRP": 1,
"Rate": 1,
"Tax_Amt_1": 1,
"Tax_Amt_3": 1,
"Pur_MRP": 1,
"Pur_Gross_Amt": 1,
"Pur_Net_Amt": 1,
"Pur_Round_Amt": 1,
"Pur_Net_Rate": 1,
"Gross_Pur_Amt": 1,
"CD": 1,
"TD": 1,
"SP_CD": 1,
"Scheme_Unit": 1,
"Scheme_Rs": 1,
"Freight": 1,
"Adjust_Item": 1,
"Handling": 1,
"Postage": 1,
"ExciseUnit": 1,
"ExcisePercentage": 1,
"CD_Per": 1,
"TD_Per": 1,
"SP_CD_Per": 1,
"Tax_P_1": 1,
"Tax_P_2": 1,
"Tax_P_3": 1,
"Qty_Scanned": 1,
"Qty_Rejected": 1,
"Qty_Excess": 1,
"ItemName": "text",
"ItemHDName": "text",
"ColorName": "text",
"ItemDesc_1": "text",
"CompanyName": "text",
"HSN_Serial_No": "text",
"HSN_Description": "text",
"HSN_UOM": "text",
"Packing": "text",
"Item_Group_Name_1": "text",
"LotPcsInfo": [
{}
]
}
]
}
],
"Status": true,
"Message": "text",
"LastGlobalModifyCode": 1,
"resultSize": "text"
}Response fields
Every field is the same as in the response of Get Purchase Vouchers (GetData items and ListItems). For a stock transfer in:
Doc_Type
PU – the same as a purchase voucher.
Doc_Type_Desc
Purchase.
Branch_Code, Branch_Name
The branch that received the goods.
Account_Code, Account_Name
The account the transfer was entered against.
Bill_No, Bill_Date
The bill number and date typed on the transfer.
GRN_Prefix, GRN_Number
The transfer's series prefix and number in the receiving branch.
GPN_Number, GPN_Date
Always empty.
Example response
Messages you may see
No Stock Transfer In found... (with Status: true)
Nothing has been added to the change log after your bookmark.
You are up to date. Call again later with the same bookmark.
No Record Found. (with Status: true)
No stock transfer in matched: the batch held only purchase vouchers, returns or transfers outside your filters, nothing in the period was a transfer, or the numbers you sent are not transfers of that financial year.
With a bookmark: store the new LastGlobalModifyCode and call again. Otherwise: check what you sent.
A database error (with Status: false), for example a message containing Invalid column name 'abc'.
Doc_Codes or Branch_Codes_From contained something other than numbers and commas. The reason may be followed by technical detail – read the first line.
Send numbers separated by commas.
The date messages listed in How Every API Call Works (with Status: true)
A period request with a missing or invalid date.
Send both dates as yyyy-MM-dd, or both as null.
Last updated