For the complete documentation index, see llms.txt. This page is also available as Markdown.

Save a Stock Transfer Out

Creates a stock transfer out in Logic ERP: goods sent from one of your branches to another branch (or to a franchise outlet that is set up as a branch). In Logic ERP a transfer out is a sale-type document in a stock-transfer series, made out to the party that represents the receiving branch. The goods leave the sending branch's stock; the receiving branch takes them in with a stock transfer in – automatically, if your Logic ERP setup is configured for it.

Endpoint

Name
Detail

Address

https://your-server/api/SaveStockTransferOut

Method

POST

Authorization

Basic Auth

The response envelope, branches, dates and the common messages are explained in How Every API Call Works.

Send one transfer per request. Field names are matched without regard to upper/lower case; fields not listed below are ignored. Send TenderDetails as [] or leave it out – null makes the request fail – and do not send null for LogicUserCode or AddlItemCode.

How the receiving branch and party are chosen

  • PartyUserCode is the party that stands for the receiving branch – in Logic ERP, a party marked as a stock-transfer party and linked to a branch (Stock_Transfer_Party and Stock_Transfer_BranchCode in Get Party Master).

  • The receiving branch is the branch linked to that party. Send STBranchCode to name a different receiving branch; it is used only when it is above 0 and differs from BranchCode. It is not checked against the branch list.

  • The sending branch is BranchCode (or BranchShortName); stock is taken from that branch.

  • If the receiving branch has a stock limit in Logic ERP and the transfer would take it over the limit, the transfer is refused (unless an approval for the party exists). This check runs only when the document is marked as a stock transfer (see the known issue on the transfer mark) and is not in cash mode.

Tax treatment

A transfer out is taxed exactly like a sale invoice; nothing is switched off because it is a transfer:

  • Taxes come from the tax region – Tax_Region when sent, otherwise the tax region set for the party (for the sending branch, else the party's own), otherwise the default tax region of the stock-transfer series. Set this up on the party or send Tax_Region to suit the transfer: for example a tax region without GST between branches under the same GSTIN, IGST to a branch in another state.

  • GST_State_Code is always stored when sent.

  • If the party is linked to TCS in Logic ERP, TCS is worked out as on a sale invoice.

  • Rates come from Rate when sent, otherwise from the series' price list (transfers are often priced at cost or a transfer price list).

How it differs from Save a Sale Invoice

Compared with Save a Sale Invoice:

  • The series must be a stock-transfer series (BillSeries is looked up only among them), and the party should be the receiving branch's stock-transfer party.

  • STBranchCode names the receiving branch; the receiving branch's stock limit is checked.

  • When your Logic ERP setup exports stock transfers automatically, the transfer is passed on to the receiving branch as a stock transfer in right after saving.

  • Lines of the same item at the same rate are combined, and several line fields are ignored (see the items table).

  • No retail customer, billing address or shipping address is taken.

  • With "EntrySource": "OMINI" and a series that prices from a price list, the rates you send are dropped and price-list rates are used.

Request fields

Field
Type
Required
Default
Meaning

BranchCode

number

No

0

The sending branch, by Logic ERP's branch number (Branch_Code in Get Branch Info).

BranchShortName

text

No

empty

The sending branch by its short name; used only when BranchCode is 0. With neither, Logic ERP falls back to a default branch – always send one.

PartyUserCode

text

Yes

–

Party code of the receiving branch's stock-transfer party (User_Code in Get Party Master). Must exist.

STBranchCode

number

No

the party's linked branch

The receiving branch, by branch number. Used only when above 0 and different from BranchCode.

BillSeries

text

No*

see rules

Name of a stock-transfer series of the sending branch, for example "STO". *If empty or not found, the series linked to the party, then the default series of this endpoint in your API site is used; with none the request fails.

Bill_Number

number

No

0

A fixed number in BillSeries; needs BillSeries. 0 = next number.

Bill_Date

date

No

today

Transfer date, yyyy-MM-dd; it also decides the financial year. A value that is not a date is ignored (today is used).

Ext_Bill_No

text

No

empty

Your own document number; saved as the transfer's document number and returned in Invoice_No.

OrderNo

text

No*

empty

Your transfer reference / indent number. *Required and unique per party when your API site's order number setting is on. Returned in PartyOrderNo.

OrderDate

date

No

empty

Date of that order.

Order_Id

text

No

empty

A further reference; filled from OrderNo when your API site is set to copy it.

Sale_BillNo, Sale_Bill_Date

text, date

No

empty

A reference bill number and date.

Challan_No, Challan_Date

text, date

No

empty

A reference challan number and date (for example your dispatch note).

Tax_Region

text

No

party, else series default

Tax region by its name in Logic ERP. Must exist.

GST_State_Code

text

No

empty

GST state code (place of supply) stored on the transfer.

Tax_Form_Name

text

No

empty

Tax form by name. Must exist.

EntrySource

text

No

"Default"

"OMINI" = drop the request rates when the series prices from a price list (see above). Anything else has no effect.

PaymentMode

text

No

credit

CASH or CREDIT, in capitals.

ActEntryPartyUserCode

text

No

the party

A different party code for the accounting entry. Must exist.

AgentName, TransporterName, CostCenter

text

No

defaults

Agent, transporter and cost centre by name; each must exist. The transporter defaults to the party's.

TransportMode, GRNo, GRDate

text, text, date

No

empty

Transport mode, LR / GR number and date.

WayBillNo

text

No

empty

See the known issue – do not send it.

CurrencyName, ExchangeRate

text, number

No

empty, 0

Foreign currency by name, with its rate (more than 0).

Godown_Name

text

No

empty

Only checked – it must exist – but not used to choose the godown the stock is taken from.

CreditDays

number

No

Logic ERP's default

Used when more than 0.

DeliveryAt, DeliveryAdd1, DeliveryAdd2, Cases, Weight, PVTMark, Insurance_Policy_No

text

No

empty

Delivery and packing details.

Remarks1, Remarks2, Remarks3

text

No

series default remarks

Remarks.

Declaration_No, DeclarationNo

text

No

empty

Declaration number (Declaration_No wins when both are sent).

CD_P, TD_P, SpCD_P

number

No

0

Transfer-level CD %, TD % and special CD %; used when more than 0, and for every line without its own.

Freight, Handling, SpDiscountRs, Adjustment_Rs

number

No

0

Amounts in ₹; used when more than 0.

Ext_NetSale_Value

number

No

0

If not 0, Logic ERP's net amount must equal it exactly, or nothing is saved.

LstItems

list

Yes

–

The items transferred. See below.

TenderDetails

list

No

empty

Payment lines (TenderType, Amount, CardName, CardNo, GiftVoucherNo), handled as on a sale invoice. A transfer normally has none.

DisplayError

text

No

"0"

"1" = full technical error text in Message when something fails.

Request_ID

text

No

empty

Only for API sites set to store requests for later processing. Otherwise ignored.

RCU_… fields, Billing_Address1, Billing_Address2, BillingAddress, ShippingAddress, Token_No, Doc_Type, Doc_Code, InvoiceType

–

No

–

Ignored by this endpoint.

LstItems

Field
Type
Required
Default
Meaning

LogicUserCode

text

Yes, or AddlItemCode

empty

The item code shown in Logic ERP (UserCode in Get Item Master).

AddlItemCode

text

Yes, or LogicUserCode

empty

The item's additional code / barcode. Used when LogicUserCode is empty or not found.

Quantity

number

Yes

–

Quantity sent; more than 0.

Rate

number

No

rate from the series' price list

Transfer rate per unit in ₹; used when more than 0. See the known issue on mixing lines with and without a rate.

Mrp

number

No

the lot's MRP

Used when more than 0.

Lot_No

text

No

empty

If filled, it must exist for the item, but it does not choose the lot – Logic ERP picks the stock itself.

CD_P, TD_P

number

No

transfer-level value

Line CD % and TD %; used when more than 0.

SPCD_P

number

No

transfer-level value

Line special CD %; applied only when Mrp is also sent (known issue).

Scheme_Rs, AdjustItem_Rs

number

No

0

Scheme discount and rate adjustment in ₹ for the line; used when more than 0.

ItemDescription

text

No

empty

Description printed for the line.

SchemePerUnit, LabourPerUnit, AdjustmentPerUnit, AdjustmentRs, GodownName, Production_Unit, SaleOrSR

–

No

–

Ignored by this endpoint.

Rules Logic ERP applies

Party, branch and series

  • The party is found by its code exactly as sent. A party locked for billing is refused, and so is a party over its credit limit when credit-limit checking is on.

  • BillSeries is looked up among the stock-transfer series of the sending branch. If it is empty or not found, Logic ERP silently uses the series linked to the party in Logic ERP, then the default series of this endpoint – check Invoice_No in the answer.

  • With your API site's "order number" setting on, OrderNo is required and must not already be used on a sale document (sale invoice or transfer) of the same party in the same branch and financial year. It is checked once, before saving – not again while the transfer is being saved.

Lines and stock

  • Lines of the same item at the same Rate are combined into one line with the total quantity; the lot number, description and MRP of the first such line are kept, the discounts of the last one used.

  • Logic ERP picks the lots to issue from at the sending branch. When Logic ERP is set not to allow negative stock, only lots with stock are used, and if the stock is short for any item nothing is saved and the message names the item. When negative stock is allowed, stock is not checked.

  • On a document marked as a stock transfer, schemes are applied only if the series is set to apply them on transfers.

After saving

  • If your Logic ERP setup exports stock transfers automatically, the transfer is passed to the receiving branch as a stock transfer in straight after it is saved (this needs the stock-transfer-in licence). Notes from that step are added to Message, starting with Export Virtual Txns : or Import Virtual Txns :, even when Status is true.

  • The transfer is saved in one step; on any failure nothing is saved.

  • If your API site is set to save in the background, the answer comes back at once with Status: false, an empty Message and a request_ID; look the result up by that ID with the TokenStatus endpoint. If your API site only stores requests for later processing, the answer is Request is pending for processing... – stored, not refused.

Known issue – the document is marked as a transfer only through the party. This endpoint does not itself mark the document as a stock transfer: Logic ERP takes that mark from the party's "stock-transfer party" setting (only when a sale setting in Logic ERP tells it to ignore the party's setting does the stock-transfer series decide). With a party that is not a stock-transfer party, the document is normally saved as an ordinary sale in the stock-transfer series and is then treated as a sale, not a transfer – for example the receiving branch's stock limit is not checked. Always send the receiving branch's stock-transfer party.

Known issue – mixing lines with and without Rate. When at least one line has a Rate above 0, a line sent with Rate 0 cannot be matched after Logic ERP prices it, and the request fails with Stock not available for Item Code : … Search Key : … even when there is stock. Send a Rate on every line, or on none.

Known issue – line SPCD_P. A line's special CD % is applied only when the same line also has an Mrp above 0. Send Mrp with SPCD_P, or use the transfer-level SpCD_P.

Known issue – WayBillNo. A way bill is never linked to the transfer, and a way bill that is not finalised is refused with Way Bill No. :… is already Finalized..Please Check. Leave WayBillNo out.

Known issue – series linked to the party. When BillSeries is empty or not found, the series linked to the party is used even if it is an ordinary sale series, not a stock-transfer series. Always send BillSeries.

Known issue – an apostrophe in a code or name. Codes and names you send (party code, series, lot number, order number, tax region, godown, agent, transporter, cost centre, currency and so on) are looked up exactly as typed. An apostrophe (') in any of them, for example D'SOUZA, makes the request fail with a database error. Leave apostrophes out of codes and names you send.

Example request

Response

Field
Type
Meaning

Status

true / false

true = the transfer was saved.

Message

text

Why it failed. On success it is empty – or it holds notes from the automatic stock transfer in, and/or, if your API user's Logic ERP rights show the document number after saving, text such as Saved Doc No. - STO-58 followed by Doc Date - 29/10/2026 on a new line.

LastSavedCode

number

Logic ERP's internal number of the transfer out.

request_ID

text

The ID of this request – quote it to support.

Invoice_No

text

The number given, for example STO-58, or your Ext_Bill_No.

PartyOrderNo

text

The OrderNo you sent.

Order_No

text

Always empty for this endpoint.

PrintFile

text

Always empty.

Example response

Messages you may see

All with Status: false. Text in … is replaced by the value concerned. Where the reason comes from an error inside Logic ERP it may be followed by technical detail – read the first line.

Message
Meaning
What to do

Party Code Not Set in API Request for Sale Return...

PartyUserCode is empty (the wording is shared with returns).

Send the receiving branch's party code.

Unable to Retrieve Accounts...

No account has that party code.

Send an existing party code.

Bill Series : … Not found for Branch Code :… in API Parameter.., Default Bill Series Not Set for Branch Code :…

No usable series.

Send a stock-transfer series of the sending branch.

Cannot allow Bill Saving If Bill Number defined without Bill Series....

Bill_Number without BillSeries.

Send both, or neither.

Bill No. [….] against Branch Code : … already exists...Please Check..

Bill_Number is already used in that series.

Send another number, or 0.

No Item Present..

LstItems is empty or missing.

Send at least one line.

Invalid Item Qty : … for Item Code : … EAN Code : …

A quantity of 0 or less.

Send a positive quantity.

Invalid LogicUserCode / EANCode : …, LogicUserCode Or EAN Code Cannot Blank!!

Unknown item code, or a line with no code.

Check the code with Get Item Master.

Unable to found LotNo : … againts EAN/Item Code : …

Lot_No does not exist for the item.

Send an existing lot number, or leave it out.

Stock not available for Item Code : … Quantity : … Search Key : …

No stock of the item at the sending branch (or see the known issue on Rate).

Check stock and rates.

Unable to Save Bill for Item Code : … Quantity : … and Billing Qty : … due to Stock not available., Unable to Save Invoice for Item Code : … Org Quantity : … (followed by Stock In Hand : … on a new line)

Only part of the quantity is in stock.

Reduce the quantity or move stock first.

Stock Value exceeds Stock Limit set for this Branch.... Cannot Allow Saving.

The receiving branch would go over its stock limit.

Send less, or ask for the limit to be raised.

Order No. Cannot be blank...., Order No. already exists for same Customer.Please Check

The order number setting is on and OrderNo is empty or already used.

Send a new OrderNo.

Invalid Godown Name [….]. Please Check...

Godown_Name not found.

Leave it out (it is not used) or fix the name.

Unable to found Tax Region : …, Invalid Agent [….] .Please Check, Invalid Tax Form [….] .Please Check, Unable to found Cost Center [….] .Please Check, Transporter Name [ … ] not found. Please Check..., Unable to found A/E Party : …

A name or code sent does not exist in Logic ERP.

Use the value exactly as in Logic ERP.

Currency Name : … not found...Please Check..., Exchange Rate not Defined for Currency Name :…...Please Check...

Unknown currency, or no rate.

Fix the currency fields.

Way Bill No. :… not found In Branch Code : …, Way Bill No. :… is already Finalized..Please Check

See the known issue.

Leave WayBillNo out.

Sale Bill Locked against Party(Setup New Accounts)

Billing is blocked for this party.

Ask the Logic ERP user to unblock the party.

The Above Customer has crossed the Credit Limit....Cannot Continue

The party is over its credit limit.

Settle or raise the limit in Logic ERP.

Net Value cannot match with External Net Value...

Ext_NetSale_Value differs from Logic ERP's net amount.

Check rates and taxes, or send 0.

Card Name [ … ] not found. Please Check..., Credit Card Number Cannot be Blank..

A CARD tender line is wrong. The second reason comes after a line of technical text – look for it in the message rather than at its start.

Fix or drop TenderDetails.

Request is pending for processing...

Your API site stores requests for later processing.

Not an error: keep the request_ID.

If your API site uses the newer save routine

Your Logic ERP team can switch this endpoint to a newer save routine. It takes the same request, with these differences:

  • The financial year is taken from Sale_Bill_Date (today when empty); the transfer is still dated Bill_Date. Send both with the same date.

  • Lines are kept as sent (not combined), and every line field is used. Lot_No is honoured – stock is taken from that lot only; otherwise the newest lot with stock is used first, in GodownName / Godown_Name when sent.

  • The party-linked series is not used.

  • Bill_Number and Request_ID are ignored, and nothing is saved in the background.

  • Other messages: Unable to found PartyUserCode : …, Party_User_Code cannot be blank..., No Item Found!!, Unable to find Item. Logic User Code : …, Quantity cannot be blank. Logic User Code : …, Unable to find available stock/lot for Item Code : …, Entry/Modification is locked for this period...., Unable to Save Sale Bill....

Last updated