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

Save a Stock Transfer In

Records goods received from another branch: Logic ERP saves a stock transfer in at the receiving branch – a purchase-type document made out to the account that stands for the sending branch – and adds the items to stock in new or existing lots. Use it when your warehouse or store app confirms goods that arrived from another branch and your Logic ERP does not already create the transfer in automatically. The request has the same shape as Save a Purchase Voucher; this page lists every field the transfer in reads and explains where it behaves differently.

Endpoint

Name
Detail

Address

https://your-server/api/SaveStockTransferIn

Method

POST

Authorization

Basic Auth

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

This endpoint always uses Logic ERP's purchase import engine. Unlike Save a Purchase Voucher, no setting switches it to the screen engine.

How the sending branch is identified

  • BranchCode (or BranchShortName) is the receiving branch – the branch whose stock goes up.

  • AccountCode is the account that stands for the sending branch: in Logic ERP, an account marked as a stock-transfer party and linked to a branch (Stock_Transfer_Party and Stock_Transfer_BranchCode in Get Party Master). The sending branch is the branch linked to that account; it is saved with the document. There is no request field for it.

  • Whether the document counts as a stock transfer also comes from that account: with an account that is not marked as a stock-transfer party, the document is saved as an ordinary purchase in the transfer-in series.

There is no link to the transfer out. No field identifies the sending branch's stock transfer out (its number, date or internal code), and Logic ERP does not compare this document with it: the items, quantities, lots and rates you send are saved as they are, even if they differ from what was sent. Logic ERP also does not check that the account's branch differs from BranchCode. If you need the transfer-out number on the document, send it in ChallanNo / ChallanDate or OrderNo.

If your Logic ERP passes stock transfers on to the receiving branch automatically (set up on the sending side – see Save a Stock Transfer Out), the transfer in already exists. Do not also send this request: there is no duplicate check, so the stock would be added twice.

Request fields

One transfer in per request. Field names are not case-sensitive. Codes and names are matched without regard to upper and lower case, and spaces at the start are not trimmed. Where a field works as on Save a Purchase Voucher, the meaning below is short; see that page for details.

Header

Field
Type
Required
Default
Meaning

BranchCode

number

No – but always send it (or BranchShortName)

0

Logic ERP's number of the receiving branch (Branch_Code in Get Branch Info).

BranchShortName

text

No

empty

The receiving branch's short name, used only when BranchCode is 0.

AccountCode

text

Yes

–

The account of the sending branch, by its code in Logic ERP (User_Code in Get Party Master). It must exist. Its tax region, payment terms and default discounts are used.

SupplierCode

text

No

AccountCode

A different party account, by its code; it becomes the party on the new lots. When sent, it must exist.

Bill_No

text

No

empty

The transfer reference, usually the transfer-out number. Also kept on new lots as their bill number, and used as the lot number of lines without LotNo.

InvoiceDate

date

No

today

The receipt date, yyyy-MM-dd. See Financial year and dates.

Bill_Date

date

No

InvoiceDate

Date of the reference in Bill_No; also the purchase date of new lots (or InvoiceDate, depending on the series).

PartyBillDate

date

No

InvoiceDate

The sending branch's document date.

Godown_Name

text

No

the API site's default godown

The godown the goods go into, by name. It must exist.

GRN_Prefix

text

No

the series' first GRN prefix, else GRN

Prefix of the GRN number, for example "STI". Logic ERP gives the next number of that prefix.

Series_Code

number

No

the API site's series

Logic ERP's internal code of the transfer-in (purchase) series. Used only when your API site has no default series for this endpoint; otherwise ignored.

GR_Number, GR_Date

text, date

No

empty

The transporter's GR (lorry receipt) number and date.

GRDate

date

No

–

Also the GR date; when both are sent, GRDate wins.

ChallanNo, ChallanDate

text, date

No

empty

Challan number and date – a good place for the transfer-out number and date.

OrderNo, OrderDate

text, date

No

empty

Your reference number and date. OrderNo is also kept as the request's reference in Logic ERP's API log.

PU_Remarks_1

text

No

–

See the known issue – not saved.

PU_Remarks_2, PU_Remarks_3

text

No

empty

Remarks.

AgentName

text

No

none

Agent, by name. Must exist.

CostCenter

text

No

none

Cost centre, by name. Must exist.

TransporterName

text

No

the account's transporter

Transporter, by name. Must exist.

CurrencyName, ExchangeRate

text, number

No

none, 1

Foreign currency by name (must exist) and its rate. Only an ExchangeRate above 0 is used.

CreditDays

number

No

the account's payment terms

Only a value above 0 is used.

CD_P, TD_P, SP_CD

number

No

the account's defaults

Cash discount %, trade discount % and special CD %. Only values above 0 are used.

Freight, Adjustment_Rs, SpDiscountRs, AdjustUnit, SchemeRs

number

No

0

Freight, adjustment, special discount, adjustment per unit and scheme amount in ₹. Only values above 0 are used.

Cases, Weight, TransportMode, VehicleNo, DeliveryAt, DeliveryAdd1, DeliveryAdd2, PVTMark, Insurance_Policy_No, Declaration_No

No

empty

Kept on the document, as on Save a Purchase Voucher.

GPN_No, GPN_Date

text, date

No

empty

Gate pass number and date. GPN_Date must be a valid date when GPN_No is sent.

Doc_Type

text

No

"PU"

Leave it out. Only with "PU" or "PR" does the document take the reverse charge mark from its tax region; any other value leaves it off. It does not change the document type.

LstItems

list

Yes

–

The items received – see below. Send at least one line, never null.

DisplayError

text

No

"0"

"1" = when the request fails, Message holds the full technical detail. Use only while testing.

Ignored fields. DNO_Code, Challan_Code, PO_Code, EntrySource, Request_ID and Sup_Code are accepted but not used – in particular none of them links the document to a transfer out. GRN_Number, shown in older examples, does not exist – the GRN number is always the next number of the prefix.

LstItems – one entry per line

Field
Type
Required
Default
Meaning

LogicUser_Code

text

Yes (or AddlItemCode)

empty

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

AddlItemCode

text

Yes (or LogicUser_Code)

empty

The item's barcode / EAN, used when LogicUser_Code is empty or not found. With LogicUser_Code empty, the item's extra barcodes are also accepted.

ScannedQty

number

Yes

–

Quantity received, above 0.

LotNo

text

No

Bill_No (first 24 characters)

The lot number the stock goes into. Send the sending branch's lot number to keep the same lot number at both branches.

BasicRate

number

No

0

Rate per unit. The line amount is BasicRate × quantity.

PurRate, SaleRate, Lot_Mrp

number

No

0

Purchase rate, sale rate and MRP per unit for the lot.

SP_Rate_1 … SP_Rate_5

number

No

0

Special rates per unit for the lot.

Expiry_Date, MFG_Date

date

No

none

Expiry and manufacturing date, used when they are valid dates.

Production_Unit

text

No

empty

The lot's production unit. When your API site's "append production unit to lot number" setting is on for this endpoint, the lot number becomes `LotNo

Godown_Code

number

No

Godown_Name

Logic ERP's internal code of the godown for this line, when it differs from the header godown. It must exist.

ItemDescription

text

No

empty

A description kept with the line.

LotCode, Lot_Bill_No and Org_Production_Unit are accepted but not used – a new lot always takes Bill_No from the header as its bill number.

Rules Logic ERP applies

  • Branches. See How the sending branch is identified. A request with neither BranchCode nor BranchShortName is not refused up front, so always send one of them.

  • Financial year and dates. The document is saved in the financial year of the day the request arrives, not of InvoiceDate. An InvoiceDate before the start of that year is moved to the first day of the year without a message (see the known issue); one after its end is refused.

  • Series. The document is saved in the default series set for this endpoint in your API site (one of the purchase or stock-transfer-in series). With no default there, Series_Code is used; with neither, the request fails.

  • What must already exist. The account (and SupplierCode), every item, and every name you send (godown, agent, cost centre, transporter, currency). Lots are created as needed (see Stock).

  • Stock. The quantities are added to stock at the receiving branch, in the godown of the line (Godown_Code), else Godown_Name, else the API site's default godown for this endpoint; with none of them, no godown is chosen (Logic ERP's "(NIL)" godown). The lot is the one numbered LotNo – an existing lot of the item is topped up or a new one created, following the purchase series' lot rules, exactly as on Save a Purchase Voucher. Nothing is checked against the sending branch's stock.

  • Goods in transit. When your API site marks transfers in as goods in transit, the document is saved as in transit and the stock is not added on saving.

  • Rates and tax. You do not send tax amounts. Logic ERP works out GST and other taxes on each line from the item's tax setup and the document's tax region, which comes only from the account: the tax region linked to the account for this branch, else the account's own tax region; when you send a different SupplierCode and that account has a tax region linked for this branch, that one is used. An account with neither is refused with Default Tax Region not Set.Please Check..... Set the tax region on the sending branch's account to suit your transfers – for example a region without GST between branches under one GSTIN, IGST from a branch in another state.

  • Lot rates. PurRate, SaleRate, Lot_Mrp and the special rates are handed to the lot; whether an existing lot's rates are replaced depends on the purchase series. Check the lot in Logic ERP rather than relying on the rates sent.

  • Duplicates. Logic ERP does not check whether you sent the same transfer before, and the API site's duplicate-supplier-bill check is not applied to this endpoint (see the known issue). Sending a request twice adds the stock twice.

  • All or nothing. The document and all its lines are saved together. If any line fails, nothing is saved.

  • Do not use an apostrophe (') in codes, names, lot numbers or bill numbers – the request fails.

How it differs from Save a Purchase Voucher

Save a Purchase Voucher
Save a Stock Transfer In

Account

A supplier

The account of the sending branch

Marked as a stock transfer

As the purchase series says

As the account says

LotNo

Required (import engine)

Optional – Bill_No is used as the lot number

Engine

Import engine or screen engine (API setting)

Always the import engine

Duplicate supplier bill check

Applied when set for the API site

Not applied

Post-dated and locked-period checks for purchases

Applied

Not applied (see the known issue)

Goods in transit

API site setting for purchases

API site setting for transfers in

Known issue – the date can be moved into the current financial year. The document is always saved in the financial year of the day the request arrives. An InvoiceDate from an earlier financial year is not refused: the document is saved dated the first day of the current year. Until this is fixed, enter transfers for an earlier year on the screen, and check the date on transfers sent just after the year changes.

Known issue – purchase date checks and the duplicate bill check are skipped. For this endpoint Logic ERP does not apply the "no post-dated purchases" setting or lock periods set for purchases (only lock periods set for all documents, and the day-close lock, apply), and it ignores the API site's duplicate-supplier-bill setting. A future InvoiceDate up to the end of the financial year is accepted, and a resent request is saved again. Until this is fixed, send only today's or earlier dates, and keep track of the transfers you have sent (for example by Bill_No) so you never resend one.

Known issue – accounts with no stock-transfer branch recorded fail. Some accounts – usually system or default accounts created with the company – have no stock-transfer branch recorded at all (not even "none"). A transfer in made out to such an account fails with a technical error. Until this is fixed, use the account set up for the sending branch, or ask your Logic ERP team to set that account's stock-transfer branch to none.

Known issue – PU_Remarks_1 is not saved. The first remark is dropped, so the transfer's first remark stays empty. Send remarks in PU_Remarks_2 and PU_Remarks_3.

Example request

Twelve kurtas received at branch 5 from the Ludhiana warehouse, whose account in Logic ERP is BR-LDH, against its transfer out STO-58:

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. This really saves in the sandbox, so use test values like the example. The example receives one pair of the test item APITEST0001 into the sandbox's branch 2; each send creates one more test transfer in.

Save a Stock Transfer In

post

Records goods received from another branch: Logic ERP saves a stock transfer in at the receiving branch – a purchase-type document made out to the account that stands for the sending branch – and adds the items to stock in new or existing lots. Use it when your warehouse or store app confirms goods that arrived from another branch and your Logic ERP does not already create the transfer in automatically. The request has the same shape as Save a Purchase Voucher; this page lists every field the transfer in reads and explains where it behaves differently.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
BranchCodeintegerOptional

Logic ERP's number of the receiving branch (Branch_Code in Get Branch Info).

AccountCodestringOptional

The account of the sending branch, by its code in Logic ERP (User_Code in Get Party Master). It must exist. Its tax region, payment terms and default discounts are used.

Bill_NostringOptional

The transfer reference, usually the transfer-out number. Also kept on new lots as their bill number, and used as the lot number of lines without LotNo.

Bill_DatestringOptional

Date of the reference in Bill_No; also the purchase date of new lots (or InvoiceDate, depending on the series).

PartyBillDatestringOptional

The sending branch's document date.

InvoiceDatestringOptional

The receipt date, yyyy-MM-dd. See Financial year and dates.

Godown_NamestringOptional

The godown the goods go into, by name. It must exist.

ChallanNostringOptional

Challan number and date – a good place for the transfer-out number and date.

ChallanDatestringOptional

Challan number and date – a good place for the transfer-out number and date.

OrderNostringOptional

Your reference number and date. OrderNo is also kept as the request's reference in Logic ERP's API log.

PU_Remarks_2stringOptional

Remarks.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
LastSavedDocNostringOptional

The document's GRN number as prefix and number, for example STI-212. null when not saved.

StatusbooleanOptional

true when the document was saved.

MessagestringOptional

Empty when saved; the reason when not saved.

LastSavedCodeintegerOptional

Logic ERP's internal number of the document; 0 when not saved.

request_IDstringOptional

The ID of this request – quote it to support.

post/SaveStockTransferIn
POST /api/SaveStockTransferIn HTTP/1.1
Host: demo.logicerp.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 468

{
  "BranchCode": 2,
  "AccountCode": "123",
  "Bill_No": "APITEST-STI-001",
  "Bill_Date": "2026-10-30",
  "PartyBillDate": "2026-10-30",
  "InvoiceDate": "2026-10-30",
  "Godown_Name": "MAIN",
  "ChallanNo": "APITEST-STI-001",
  "ChallanDate": "2026-10-30",
  "OrderNo": "APITEST-STI-001",
  "PU_Remarks_2": "API TEST",
  "LstItems": [
    {
      "LogicUser_Code": "APITEST0001",
      "AddlItemCode": "",
      "ScannedQty": 1,
      "LotNo": "APITESTLOT4",
      "BasicRate": 100,
      "PurRate": 100,
      "SaleRate": 3099,
      "Lot_Mrp": 3199,
      "ItemDescription": "API TEST"
    }
  ]
}
{
  "LastSavedDocNo": "text",
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

Field
Type
Meaning

Status

true / false

true when the document was saved.

Message

text

Empty when saved; the reason when not saved.

LastSavedCode

number

Logic ERP's internal number of the document; 0 when not saved.

LastSavedDocNo

text

The document's GRN number as prefix and number, for example STI-212. null when not saved.

request_ID

text

The ID of this request – quote it to support.

Example response

Messages you may see

Messages marked technical text arrive wrapped in technical detail: look for the quoted reason inside Message (the first line starts with technical words). The others are the whole Message, unless you send "DisplayError": "1".

Message
Meaning
What to do

Default Configuration Not Defined in API Template

No series: your API site has no default series for this endpoint and no Series_Code was sent.

Ask your Logic ERP team to set the default series.

Request cannot be processed. API Template is marked as In-Active in the configuration.

This endpoint is switched off for your API site. Nothing is saved, but Status is true and LastSavedCode is 0 – look for this sentence.

Ask your Logic ERP team.

Account Code Not Defined...

AccountCode is empty.

Send the sending branch's account code.

Invalid Account User Code...

No account has that AccountCode.

Check it with Get Party Master.

Invalid Supplier Code Defined...

SupplierCode was sent but not found.

Check it, or leave it out.

Invalid Invoice Date Defined..., Invalid Bill Date..., Invalid Party Bill Date...

A date could not be read.

Send dates as yyyy-MM-dd.

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

Godown_Name was not found.

Send the godown name as in Logic ERP.

Entry/Modification is locked for this period....

InvoiceDate is in a period locked for all documents, or on or before the last day close.

Ask your Logic ERP team.

Logic User Code/Additional Item Code Not Defined for Item No : …

Line number … has neither LogicUser_Code nor AddlItemCode.

Send the item code or barcode.

Invalid LogicUserCode / EANCode : …

The item was not found; … is the barcode you sent, else the item code, in capitals.

Check the code with Get Item Master.

Quantity Not Defined For : '' Item No : …

Line number … has a quantity of 0 or less.

Send a positive ScannedQty.

Invoice Date Date not within financial year.Please Check....

InvoiceDate is after the end of the current financial year.

Check the date.

Default Tax Region not Set.Please Check....

The account has no tax region for this branch and none of its own.

Set the tax region on the sending branch's account in Logic ERP.

Invalid Agent […] .Please Check

AgentName was not found.

Send the agent name as in Logic ERP.

Technical text containing Error Finding Godown... followed by a number

A line's Godown_Code does not exist.

Send an existing godown code, or leave it out.

Technical text containing Unable to found Cost Center […] .Please Check, Transporter Name [ … ] not found. Please Check..., Currency Name [ … ] not found. Please Check... or Invalid GPN_Date .Please Check

A name was not found, or GPN_No was sent without a valid GPN_Date.

Send names exactly as in Logic ERP; send GPN_Date as yyyy-MM-dd.

Technical text containing Unable to Find Items for Import...

LstItems is empty.

Send at least one line.

Technical text containing Purchase / Tax Details not found for all Items. Check Row No.: … or Please set Default Tax Type before import this document.......

The item's tax for this tax region, or the series' default tax type, is not set up.

Ask your Logic ERP team.

Any other technical error

Saving failed inside Logic ERP (for example a lot rule of the purchase series); nothing was saved.

Retry once; if it repeats, send the request_ID to support.

Last updated