For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Receipt Stock

Brings stock in to a godown of a branch by saving a receipt in Logic ERP's Receipt Register – for example goods returned from outside, found during a count or received without a purchase. You send the godown, the items, their lot numbers and quantities; Logic ERP creates a new lot for each item and lot number and adds the quantity to that godown. No party account is posted – ReceivedFrom is a free-text note of where the goods came from.

To take stock out, use Issue Stock. To move stock between two godowns of the same branch, use Godown Transfer. To read saved receipts back, use Get Receipt Inventory.

Endpoint

Name
Detail

Address

https://your-server/api/SaveReceiptStock

Method

POST

Authorization

Basic Auth

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

Request fields

The request has the same shape as Issue Stock, but a receipt needs different fields: ReceivedFrom and GodownName instead of IssueTo, and a lot number on every item. Field names are not case-sensitive.

Field
Type
Required
Default
Meaning

Branch_Code

number

No – but always send it

0

The branch receiving the stock, by Logic ERP's branch number (Branch_Code in Get Branch Info). With 0, Logic ERP falls back to a default branch. There is no short-name field on this endpoint.

Doc_Prefix

text

Yes

–

Prefix of the receipt number, up to 8 characters, for example RC. The receipt gets the next number for this prefix in the branch. A prefix containing an apostrophe (') is refused.

ReceivedFrom

text

Yes

–

Where the goods came from, up to 30 characters, for example REPAIR CENTRE. Free text – it is not looked up.

GodownName

text

Yes

–

The godown the stock goes into, by its name in Logic ERP (spaces around it are removed). All lines go into this godown.

Doc_Date

date

No

today

The receipt date, yyyy-MM-dd. It also decides the financial year the receipt is saved in and is the purchase date of the new lots. A value that is not a date is treated as today, without a message.

Remarks

text

No

empty

Remarks of the receipt.

ListItems

list

Yes

empty list

The items, lots and quantities received – see below.

DisplayError

text

No

"0"

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

ListItems – one entry per item and lot

Field
Type
Required
Default
Meaning

ItemCode

text

Yes

–

The item code shown in Logic ERP (UserCode in Get Item Master). An entry with an empty ItemCode is skipped without a message, and so is an entry with ItemCode -1 when Ignore Invalid Item for Request Json is ticked in your API site's settings for this endpoint.

EANCode

text

No

empty

The additional item code / barcode (AddlItemCode in Get Item Master). Tried only when ItemCode is not found as an item code.

Quantity

number

Yes

0

Quantity received. An entry with 0 or less is skipped without a message.

LotNo

text

Yes

–

Lot number of the new lot, up to 25 characters.

Rate

number

No

0

Rate of the receipt line. When above 0 it is also the basic and purchase rate of the new lot; otherwise the lot takes the item's basic and purchase rate.

Mrp

number

No

0

MRP of the new lot. With 0 the lot takes the item's MRP.

Manufacturing_Date

date

No

none

Manufacturing date of the new lot, yyyy-MM-dd. A value that is not a date is ignored.

Expiry_Date

date

No

none

Expiry date of the new lot, yyyy-MM-dd. A value that is not a date is ignored.

LotProductionUnit

text

No

empty

Production unit of the new lot, up to 20 characters.

LotBinName

text

No

empty

A storage bin for the line, by its name in Logic ERP.

Ignored fields. IssueTo (it is for issues), Reference_Bill_No and Reference_Bill_Date.

Rules Logic ERP applies

  • What is received. One receipt in the Receipt Register, in the branch you send, dated Doc_Date, with one line per entry in ListItems. The quantity is added to the stock of the godown in GodownName, in the financial year of Doc_Date.

  • New lots. Each line gets a new lot with your LotNo, even when a lot with that number already exists for the item from an earlier document. Two entries in the same request with the same item and lot number (and production unit) share one lot; the rates, MRP and dates of the second entry are then not used for the lot. The new lot takes your rate and MRP (or the item's when you send 0), the item's special rates, Doc_Date as purchase date, and your dates and production unit. Its sale rate is left at 0 (see the known issue below).

  • Entries are checked first, then lots are created. Every entry is checked (item, lot number, bin) before any lot is created, so a request refused for one of its entries leaves nothing behind. The new lots are then saved one by one, before the receipt itself: when creating a lot or saving the receipt then fails, the lots already created stay in Logic ERP without stock; a repeat of the request with the same prefix normally reuses them.

  • Number. The receipt gets the next number for Doc_Prefix in the branch, counted over all receipts with that prefix (not per financial year). The document number is the prefix padded with spaces to 4 characters, followed by the number – for example RC 45, or REC 13 for a three-letter prefix; a prefix of 4 characters or more is followed directly by the number.

  • Configuration. The receipt is saved with the Receipt Register configuration chosen as Default Configuration for receipts in your API site's settings. There is no request field for it.

  • Date checks. The receipt is refused when Doc_Date is on or before the lock date in the access rights of the Logic ERP user linked to your API site, or on or before the branch's last physical stock date when that lock is set.

  • Time. The receipt is saved with the time it was received by Logic ERP.

  • Duplicates. There is no duplicate check: every request that succeeds saves a new receipt and new lots. Check Status before you resend.

  • All or nothing. The receipt and all its lines and stock changes are saved together (apart from the new lots, as above). If anything fails, no receipt is saved.

  • Switching off. Your support team can switch this endpoint off for your API site as a whole, not per branch. Then nothing is saved and the answer has Status: true with the In-Active sentence in Message (as explained in How Every API Call Works).

  • Your Logic ERP licence must include the API for the Receipt Register.

Known issue – new lots get sale rate 0. The lots created by a receipt do not take the item's sale rate. Set the sale rate of these lots in Logic ERP before they are sold, or bill them at a rate you enter.

Known issue – the reference bill number and date are not saved. Reference_Bill_No and Reference_Bill_Date are accepted but not used. Put the reference in Remarks instead.

Known issue – a barcode must go in EANCode, with ItemCode filled. An entry without ItemCode is skipped, and a barcode sent in ItemCode is usually refused as an invalid code. Send the item code in ItemCode; use EANCode only as a fallback.

Known issue – lots left behind by a failed receipt. The new lots are saved before the receipt, so a receipt that fails after its entries have been checked – for example on the date checks – leaves its lots in Logic ERP without stock. Resend the same request with the same Doc_Prefix soon after the failure – it then reuses those lots. If a request times out, first look for the receipt with Get Receipt Inventory: a successful repeat saves a second receipt.

Example request

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: each send receives stock of the test item APITEST0001 and creates a new lot, so change LotNo each time (for example APITESTLOT7) and keep the "API TEST" values.

Receipt Stock

post

Brings stock in to a godown of a branch by saving a receipt in Logic ERP's Receipt Register – for example goods returned from outside, found during a count or received without a purchase. You send the godown, the items, their lot numbers and quantities; Logic ERP creates a new lot for each item and lot number and adds the quantity to that godown. No party account is posted – ReceivedFrom is a free-text note of where the goods came from.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
Branch_CodeintegerOptional

The branch receiving the stock, by Logic ERP's branch number (Branch_Code in Get Branch Info). With 0, Logic ERP falls back to a default branch. There is no short-name field on this endpoint.

Doc_PrefixstringOptional

Prefix of the receipt number, up to 8 characters, for example RC. The receipt gets the next number for this prefix in the branch. A prefix containing an apostrophe (') is refused.

ReceivedFromstringOptional

Where the goods came from, up to 30 characters, for example REPAIR CENTRE. Free text – it is not looked up.

GodownNamestringOptional

The godown the stock goes into, by its name in Logic ERP (spaces around it are removed). All lines go into this godown.

Doc_DatestringOptional

The receipt date, yyyy-MM-dd. It also decides the financial year the receipt is saved in and is the purchase date of the new lots. A value that is not a date is treated as today, without a message.

RemarksstringOptional

Remarks of the receipt.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
LastSavedDocNostringOptional

The receipt number, for example RC 45. Empty (null) when not saved.

StatusbooleanOptional

true when the receipt was saved.

MessagestringOptional

Success when saved; the reason when not saved.

LastSavedCodeintegerOptional

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

request_IDstringOptional

Always empty on this endpoint.

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

{
  "Branch_Code": 2,
  "Doc_Prefix": "APITEST",
  "ReceivedFrom": "API TEST",
  "GodownName": "MAIN",
  "Doc_Date": "2026-11-10",
  "Remarks": "API TEST",
  "ListItems": [
    {
      "ItemCode": "APITEST0001",
      "EANCode": "",
      "LotNo": "APITESTLOT6",
      "Quantity": 2,
      "Rate": 100,
      "Mrp": 0
    }
  ]
}
{
  "LastSavedDocNo": "text",
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

Field
Type
Meaning

Status

true / false

true when the receipt was saved.

Message

text

Success when saved; the reason when not saved.

LastSavedCode

number

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

LastSavedDocNo

text

The receipt number, for example RC 45. Empty (null) when not saved.

request_ID

text

Always empty on this endpoint.

Example response

Messages you may see

Messages from checks made while the receipt is being saved (marked *) are followed by technical detail in brackets – read the first part.

Message
Meaning
What to do

Configuration not defined in Setup API Template...Please Check

No Receipt Register configuration is chosen for receipts in your API site's settings.

Ask your Logic ERP team to choose the Default Configuration.

Issue Prefix not defined...Please Check

Doc_Prefix is empty (the message says "Issue" for receipts too).

Send a prefix.

Doc_Prefix cannot contain an apostrophe (')...Please Check

Doc_Prefix contains a '.

Send a prefix without an apostrophe.

Received From not Specified...Please Check

ReceivedFrom is empty.

Send where the goods came from.

Godown Name not Specified for Receipt...Please Check

GodownName is empty.

Send the godown name.

Invalid Godown Name...Please Check

No godown has that name.

Send the name exactly as in Logic ERP.

Invalid LogicUserCode / EANCode : …

The item was not found by ItemCode, nor by EANCode when sent. The code shown is your EANCode when sent, otherwise your ItemCode, in capitals.

Send the item code exactly as in Logic ERP.

Lot No. not defined againts ItemCode...( … ). Please Check

An entry has no LotNo.

Send a lot number for every item.

Invalid Bin Name : …

No bin has the name in LotBinName.

Send the bin name exactly as in Logic ERP, or leave it empty.

Item Details not Present...Please Check

No entry in ListItems has an item code and a quantity above 0.

Send at least one item with a quantity.

Unable to Retrive Configuration...Please Check

The Receipt Register configuration chosen for your API site no longer exists.

Ask your Logic ERP team to choose it again.

No financial year covers the date dd/MM/yyyy.

No financial year in Logic ERP covers Doc_Date.

Send a date inside an open financial year.

Modification rights not available for this date..... *

Doc_Date is on or before the lock date of the API site's Logic ERP user.

Send a later date or ask your Logic ERP team.

This document date is before/equal to Last Physical Stock Entry Date:… *

A physical stock entry dated on or after Doc_Date locks the branch.

Send a later date.

The operation was canceled.

Saving was stopped inside Logic ERP; no receipt was saved.

Retry once; if it repeats, contact support.

The reason a new lot could not be saved (one message, without technical detail)

Creating a new lot failed – for example a LotNo longer than 25 characters or a LotProductionUnit longer than 20. No receipt was saved; lots created for earlier entries stay.

Correct the lot values and resend.

Another technical error *

Saving failed inside Logic ERP – for example a value longer than its limit; no receipt was saved.

Check the lengths in the table above; retry once; if it repeats, contact support.

Last updated