Get Stock Transfers Out
Returns your stock transfers out from Logic ERP — the documents that send stock from one of your branches to another branch or to a stock-transfer party — each with its header and item lines. Use it to copy new and changed transfers into your own system, for example so the receiving branch or a warehouse system knows what is on the way.
The response has exactly the same layout as Get Sale Invoices; this page lists only what is different for stock transfers.
Endpoint
Address
https://your-server/api/GetStockTransferOut
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: 0 = from the start (or a period, with DateFrom/DateTo), a number = only changes after it, -1 = Logic ERP keeps the bookmark for you.
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 Sale Invoices. Write them as yyyy-MM-dd.
Doc_Codes
text
No
empty
Logic ERP's internal transfer numbers (Vouch_Code), separated by commas, for example "3301,3305". Returns exactly these transfers; the bookmark and period are ignored. Numbers and commas only.
Branch_Codes_From
text
No
empty
Codes of the sending branches, separated by commas, for example "2". Numbers and commas only.
Branch_Codes_To
text
No
empty
Codes of the receiving branches (ST_Branch_Code), separated by commas, for example "7,11". Only transfers to these branches are returned. Numbers and commas only.
Doc_Num_Like
text
No
empty
Only transfers whose internal voucher number starts with this text: SL followed by the transfer prefix, for example "SLSTO". Used with the bookmark or a period.
PartyUserCode, ApprovalFilter
text
No
empty, "0"
Narrow the result as on Get Sale Invoices (PartyUserCode = code of the stock-transfer party).
SaleBillNo, SaleOrderNo, PartyOrderNo, Mobile_No, Challan_No
text
No
empty
Accepted, but they are not lookups here – they behave as described on Get Sale Returns. Leave them out.
Field names are matched without regard to upper or lower case. Other fields in the request are ignored.
Rules Logic ERP applies
The rules of Get Sale Invoices apply, with these differences:
Only stock transfers out are returned: documents saved in the sale invoice screens and marked as a stock transfer. Ordinary sale invoices and sale returns are never returned here.
Shared change log. Sale invoices, sale returns and stock transfers out share one change log of up to 150 lines per batch, so most batches hold few transfers or none. With none you get
"No Record Found."withStatus: trueand a higherLastGlobalModifyCode– store it and call again. You have caught up when the message is"No Pending Stock Transfer Out found..."andLastGlobalModifyCodeis the value you sent. Keep a separate bookmark for this endpoint.DateFromandDateTonever filter on the transfer date here; they are only a period of changes, or – withDoc_Codes– choose the financial year.This endpoint has its own API site settings: your Logic ERP team can limit it to certain branches and series, choose its fields and switch on scheme campaign names, separately from Get Sale Invoices.
Known issue – change-log lines of an earlier financial year. As on Get Sale Invoices, a change-log line of an invoice, return or transfer 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 thatBill_Dateis in the financial year you expect before you store a record byVouch_Code.
Known issue –
Action_Codeis almost alwaysN. Do not use it to decide between insert and update.
The other known issues on Get Sale Invoices (earlier-year transfers fetched with Doc_Codes, Customer_Name, Discount_Coupon_Amt) apply here too.
Example request
Next batch after your stored bookmark, only transfers to branch 7:
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 out from Logic ERP — the documents that send stock from one of your branches to another branch or to a stock-transfer party — each with its header and item lines. Use it to copy new and changed transfers into your own system, for example so the receiving branch or a warehouse system knows what is on the way.
The user name and password of your API site.
Your bookmark in the change log, as described in How Every API Call Works: 0 = from the start (or a period, with DateFrom/DateTo), a number = only changes after it, -1 = Logic ERP keeps the bookmark for you.
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 Sale Invoices. 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 Sale Invoices. Write them as yyyy-MM-dd.
Logic ERP's internal transfer numbers (Vouch_Code), separated by commas, for example "3301,3305". Returns exactly these transfers; the bookmark and period are ignored. Numbers and commas only.
Codes of the sending branches, separated by commas, for example "2". Numbers and commas only.
Codes of the receiving branches (ST_Branch_Code), separated by commas, for example "7,11". Only transfers to these branches are returned. Numbers and commas only.
Only transfers whose internal voucher number starts with this text: SL followed by the transfer prefix, for example "SLSTO". Used with the bookmark or a period.
Narrow the result as on Get Sale Invoices (PartyUserCode = code of the stock-transfer party).
Narrow the result as on Get Sale Invoices (PartyUserCode = code of the stock-transfer party).
Accepted, but they are not lookups here – they behave as described on Get Sale Returns. Leave them out.
Accepted, but they are not lookups here – they behave as described on Get Sale Returns. Leave them out.
Accepted, but they are not lookups here – they behave as described on Get Sale Returns. Leave them out.
Accepted, but they are not lookups here – they behave as described on Get Sale Returns. Leave them out.
Accepted, but they are not lookups here – they behave as described on Get Sale Returns. Leave them out.
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/GetStockTransferOut 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,
"Bill_No": "text",
"New_Bill_No": "text",
"Bill_Date": "text",
"Bill_Time": "text",
"Account_Code": "text",
"Account_Entry_Customer": "text",
"Account_Entry_User_Code": "text",
"Account_Name": "text",
"Customer_Code": "text",
"Customer_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",
"Tax_Region_Name": "text",
"Action_Code": "text",
"Type": "text",
"Branch_Short_Name": "text",
"Doc_Prefix": "text",
"Doc_Number": 1,
"RCU_Membership_Series": "text",
"RCU_Membership_Number": 1,
"Retail_Cust_Name": "text",
"Retail_Cust_Mobile_No": "text",
"Retail_Cust_Email_ID": "text",
"SO_Order_No": "text",
"SO_Order_Date": "text",
"SO_Party_Order_No": "text",
"SO_Party_Order_Date": "text",
"Credit_Note_Bill_Amount": 1,
"Gr_Number": "text",
"Gr_Date": "text",
"Order_No": "text",
"Order_Date": "text",
"Remarks1": "text",
"Cases": "text",
"Transport_Mode": "text",
"DNParty_Name": "text",
"CNParty_Name": "text",
"DISPParty_Name": "text",
"HANDParty_Name": "text",
"POSTParty_Name": "text",
"DN_Desc": "text",
"CN_Desc": "text",
"Display_Desc": "text",
"Challan_Date": "text",
"Challan_no": "text",
"DD_Chq": "text",
"DD_Chq_No": "text",
"DD_Chq_Amt": 1,
"GR_Number_2": "text",
"GR_Date_2": "text",
"Issue_Time": "text",
"Removal_Time": "text",
"Trans_Name": "text",
"Remarks2": "text",
"Remarks3": "text",
"Credit_Note_Amount": 1,
"ST_Branch_Code": 1,
"RCU_Create_Date": "text",
"RCU_State": "text",
"RCU_Country": "text",
"RCU_CountryCode": "text",
"Credit_Amount": 1,
"Cash_Amount": 1,
"Gift_Voucher_Amount": 1,
"Discount_Coupon_No": "text",
"Discount_Coupon_Amt": 1,
"Bill_Cancelled": true,
"GST_EInvoice_IRN_No": "text",
"GST_EInvoice_QR_Image": "text",
"GST_EInvoice_Acknowledgement_No": "text",
"GST_EInvoice_Acknowledgement_Date": "text",
"GST_EWay_Bill_No": "text",
"GST_EWay_Bill_Date": "text",
"InvoicePDFLink": "text",
"TCS_Act_Name": "text",
"TCS_Percent": 1,
"TCS_Amount": 1,
"CC_Plus_CE_Name": "text",
"Cost_Center_Name": "text",
"Cost_Element_Name": "text",
"Credit_Card_Amount": 1,
"Discount_Amount": 1,
"ItemCount": 1,
"Patient_Name": "text",
"Patient_Mobile_No": "text",
"Shipping_Addres": {
"Code": 1,
"Cust_Code": 1,
"Contact_Person_Name": "text",
"Phone_Number": "text",
"Address_1": "text",
"Address_2": "text",
"Driving_Directions": "text",
"City_Name": "text",
"Code_Type": "text",
"Country_Name": "text",
"Email_Id": "text",
"Location_Code": 1,
"Mobile_No": "text",
"Pin_Code": "text",
"State_Name": "text",
"Company_Name": "text",
"Latitude": "text",
"Longitude": "text",
"Address_ID": "text",
"Complete_Address": "text",
"External_Address_Id": "text",
"Location_Name": "text",
"State_Code": 1,
"Country_Code": 1,
"DisplayAddress": "text",
"DeleteAddress": true,
"SameAsShippingAddress": true,
"Gst_No": "text"
},
"Billing_Address": {
"Code": 1,
"Cust_Code": 1,
"Contact_Person_Name": "text",
"Phone_Number": "text",
"Address_1": "text",
"Address_2": "text",
"Driving_Directions": "text",
"City_Name": "text",
"Code_Type": "text",
"Country_Name": "text",
"Email_Id": "text",
"Location_Code": 1,
"Mobile_No": "text",
"Pin_Code": "text",
"State_Name": "text",
"Company_Name": "text",
"Latitude": "text",
"Longitude": "text",
"Address_ID": "text",
"Complete_Address": "text",
"External_Address_Id": "text",
"Location_Name": "text",
"State_Code": 1,
"Country_Code": 1,
"DisplayAddress": "text",
"DeleteAddress": true,
"SameAsShippingAddress": true,
"Gst_No": "text"
},
"ListCreditCard": [
{}
],
"LstItems": [
{
"SL_Txn_Code": 1,
"Lot_Code": 1,
"Lot_Number": "text",
"AddlItemCode": "text",
"LogicUser_Code": "text",
"PackName": "text",
"ItemName": "text",
"ItemHDName": "text",
"ItemDescription_1": "text",
"ColorName": "text",
"CompanyName": "text",
"CF_1": 1,
"CF_2": 1,
"CF_3": 1,
"Weight": 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,
"MRP_SaleBill": 1,
"Gross_Amt": 1,
"Net_Amt": 1,
"Round_Amt": 1,
"Net_Rate": 1,
"Sale_Amt": 1,
"CD": 1,
"TD": 1,
"SP_CD": 1,
"Scheme_Unit": 1,
"Scheme_Rs": 1,
"CD_Per": 1,
"TD_Per": 1,
"SP_CD_Per": 1,
"Sale_Or_SR": "text",
"Lot_Sale_Rate": 1,
"Lot_Pur_Rate": 1,
"Lot_Basic_Rate": 1,
"Lot_SP_Rate1": 1,
"Lot_SP_Rate2": 1,
"Lot_SP_Rate3": 1,
"Lot_SP_Rate4": 1,
"Lot_SP_Rate5": 1,
"SO_Item_Order_ID": "text",
"Tax_Amt_2": 1,
"Tax3WithoutSur": 1,
"Surcharge": 1,
"ExciseUnit": 1,
"AdjustPerUnit": 1,
"AdjustItem": 1,
"Freight": 1,
"AdjustmentRupees": 1,
"SPDiscount": 1,
"DebitNote": 1,
"CreditNote": 1,
"Display": 1,
"Handling": 1,
"Postage": 1,
"ExcisePercentage": 1,
"Labour": 1,
"RRate": 1,
"Tax_1": 1,
"Tax_2": 1,
"Tax_3": 1,
"Agent_Name": "text",
"Agent_ShortName": "text",
"Item_Group_Name_1": "text",
"Lot_Sup_Code": "text",
"Lot_Sup_Name": "text",
"Lot_Bill_No": "text",
"Lot_Purchase_Date": "text",
"Lot_Expiry_Date": "text",
"Lot_Mfg_Date": "text",
"Scheme_Campaign_Group_Name": "text",
"Scheme_Campaign_Name": "text",
"Godown_Name": "text",
"HSN_Serial_No": "text",
"HSN_Description": "text",
"HSN_UOM": "text",
"Packing": "text",
"Invoice_Prescription_Days": "text",
"ListOtherAgents": [
{}
]
}
]
}
],
"Status": true,
"Message": "text",
"LastGlobalModifyCode": 1,
"resultSize": "text"
}Response fields
Every field is the same as in the response of Get Sale Invoices (GetData items, Shipping_Addres, Billing_Address, ListCreditCard, LstItems, ListOtherAgents). For a stock transfer:
Type
SL.
Bill_No, Doc_Prefix, Doc_Number, New_Bill_No
The transfer's prefix and number, for example STO-1 and 2627/2/STO-1.
Branch_Code, Branch_Name, Branch_Short_Name
The sending branch.
ST_Branch_Code
Code of the receiving branch; 0 when the transfer is not linked to a branch of yours.
Account_Code, Account_Name, Customer_Code
The stock-transfer party the goods are sent to.
Credit_Amount
Normally the whole Net_Amount (a transfer is not paid in cash).
Tax_Region_Name
The tax region used for the transfer, for example GST STOCK TRANSFER -OUTSTATION.
LstItems[].Sale_Or_SR
SL.
Example response
Messages you may see
No Pending Stock Transfer Out 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 matched: the batch held only invoices, 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.
Invalid code list: '…' (with Status: false; the text you sent in place of …)
Branch_Codes_From or Branch_Codes_To contains something other than numbers and commas.
Send branch codes as numbers separated by commas.
Index was outside the bounds of the array., Conversion from string "…" to type 'Integer' is not valid. or Object reference not set to an instance of an object. (with Status: false)
Challan_No without -, SaleOrderNo with a non-number after -, or PartyOrderNo with "SaleOrderNo": null.
Leave these fields out on this endpoint.
A database error (with Status: false), for example Invalid column name 'abc'.
Doc_Codes contained something other than numbers and commas. The reason may be followed by technical detail – read the first line.
Send Doc_Codes as numbers separated by commas.
Last updated