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

Save a Purchase Indent

Creates a new purchase indent in Logic ERP – an internal request to buy goods, which purchase orders can later be made against. The request is exactly the same as for Save a Purchase Order and goes through the same checks and calculations; the differences are listed under How it differs from a purchase order below. You send the supplier, the indent prefix and the items with their quantities and rates; Logic ERP gives the indent a number, works out taxes and totals with the purchase-indent series chosen for your API site, and saves it as pending.

Endpoint

Name
Detail

Address

https://your-server/api/SavePurchaseIndent

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

Field names are not case-sensitive. Names and codes are matched as you send them – spaces in front of them are not removed (only Tax_Region is trimmed). Capital and small letters do not matter.

Field
Type
Required
Default
Meaning

Branch_Code

number

Yes, in practice

-1

The branch the indent is saved in (Branch_Code in Get Branch Info). See the known issue below.

Party_User_code

text

Yes

empty

The supplier, by the party code shown in Logic ERP (User_Code in Get Party Master). A supplier or customer account is accepted. An indent cannot be saved without one.

Order_Prefix

text

Yes

empty

The prefix of the indent number, for example PI. The indent number is the prefix, a hyphen and a number – for example PI-43. See the known issue on numbering.

Order_Date

date

No

today

The indent date, yyyy-MM-dd. It also decides the financial year.

Valid_Till_Date

date

No

the indent date

The date the indent is valid till. A value that cannot be read as a date is ignored.

Delivery_Date

date

No

none

The date the goods are needed. See the known issue on Quotation_Date.

Supplier_Order_No

text

No*

empty

The supplier's reference. *Required when the indent series has Do not allow duplicate Supp. Order No. for Same Supplier ticked – see the known issue below.

Quotation_No

text

No

empty

The supplier's quotation number.

Quotation_Date

date

No

none

Not saved as the quotation date – see the known issue below.

Remarks

text

No

empty

Remarks of the indent.

Tax_Region

text

No

the supplier's tax region

A tax region by name, exactly as in Logic ERP. See the known issues below.

Agent_Name

text

No

none

An agent / broker by name, exactly as in Logic ERP. (NIL) means no agent.

Company_Name

text

No

none

A company (brand) by name, exactly as in Logic ERP's company master. (NIL) means none.

Transport_Name

text

No

none

A transporter by name, exactly as in Logic ERP. (NIL) means none.

DepartmentName

text

No

none

The department asking for the goods, by name exactly as in Logic ERP.

Transfer_Party_UserCode

text

No

none

A transfer party, by party code.

Delivery_At, Delivery_Add_1, Delivery_Add_2, Delivery_Add_3

text

No

empty

The delivery place and three address lines.

Total_Other_Val_1 to Total_Other_Val_5

number

No

0

Amounts for "other value" 1 to 5, in ₹. Used only when the indent series' calculation includes that other value. 0 lets the series' default apply.

ListItems

list

Yes

empty list

The items asked for – 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 indent line

Field
Type
Required
Default
Meaning

LogicUser_Code

text

One of the two

empty

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

AddlItemCode

text

One of the two

empty

The additional item code / barcode (AddlItemCode in Get Item Master). Used when LogicUser_Code is empty. A code from the item's list of extra barcodes is accepted too. Send only one of the two codes – see the known issue below.

Order_Qty

number

Yes

0

Quantity asked for. Must be above 0.

Rate

number

No – but always send it

0

Expected rate per unit, in ₹. See the known issue below.

SPCD_P

number

No

0

Discount percentage for the line. Used when the series' calculation has an item-wise discount.

Tax_Amount

number

No

0

Despite its name, the tax percentage of the line. See the known issue below.

Remarks

text

No

empty

Remarks of the line.

Lot_Number

text

No

empty

Saved on the indent line. Replaced by the indent number when the series has Move PO Number to Lot Number ticked.

Ignored fields. Branch_Short_Name (see the known issue below), Total_Other_Val_6, Total_Other_Val_7, and in ListItems: Lot_QR_Code, Lot_Extra_1, Addl_Lot_Number, ItemDetCode. Any other field you send is ignored.

How it differs from a purchase order

  • What is saved. A purchase indent, kept apart from purchase orders: it has its own list, its own numbers and its own approval.

  • Series. The indent series chosen as Default Configuration in your API site's settings for LOGIC API PUSH - PURCHASE INDENT (a separate setting from the one for purchase orders). If none is chosen, the message still says Purchase Order: Default Purchase Order Configuration Not Selected!!.

  • Number. The number is counted among the branch's indents with the same prefix – see the known issue on numbering.

  • Lots. No lots are created, whatever the series says, so Lot_QR_Code, Lot_Extra_1 and Addl_Lot_Number are ignored.

  • Back-dated check. "Earlier than the latest document" is checked against the branch's latest indent.

  • Approval. When indents need approval in your Logic ERP set-up, the indent is saved as waiting for approval.

  • Licence. Your Logic ERP licence must include the purchase-indent API.

Everything else – the supplier, item and name checks, rates, taxes, other values, date checks, the switch-off behaviour (Status: true with the In-Active sentence) and the absence of a duplicate check – works exactly as described in the Rules of Save a Purchase Order.

Rules Logic ERP applies

  • Items. Each ListItems entry becomes one indent line. Every item code must exist; one unknown code stops the whole request. When the API setting Ignore Invalid Item for Request Json is ticked, entries whose LogicUser_Code is exactly -1 are dropped first.

  • Rates and taxes. Rate is used as sent. Without Tax_Region, the supplier's tax region is used. When the series finds item-wise GST itself, Tax_Amount is replaced; otherwise it is used as the line's tax percentage.

  • Duplicates. There is no duplicate check on the request. Sending the same request twice creates two indents – check Status before you resend.

  • All or nothing. The indent and all its lines are saved together. If anything fails, nothing is saved.

Known issue – always send Branch_Code. Branch_Short_Name is not read. When Branch_Code is left out, the indent is saved under a placeholder branch instead of a real one and the request does not fail. Send the branch code.

Known issue – indent numbering. The indent gets number 1 when no indent of the branch has the prefix with number 1; only otherwise does it get the highest number + 1. If indent 1 of a prefix was deleted, the next indent takes number 1 again. Check LastSavedDocNo for the number given.

Known issue – the supplier order number check looks at purchase orders. When the indent series has Do not allow duplicate Supp. Order No. for Same Supplier ticked, Supplier_Order_No is checked against the supplier's purchase orders, not its indents. A number already used on a purchase order is refused; a number already used on another indent is accepted.

Known issue – a missing Rate is not the purchase rate. When Rate is 0 or left out, the line gets the supplier's rate for the item (the transfer party's, when you send Transfer_Party_UserCode) if the series has Pick Supplier + Item Wise Rates ticked and such a rate exists; otherwise it gets the item's sale rate. Always send the rate.

Known issue – Tax_Amount is a percentage. The value is used as the line's tax rate, not as a tax amount. Send the tax percentage, or 0 when the series finds the taxes itself.

Known issue – Quotation_Date overwrites the delivery date. A valid Quotation_Date is saved as the indent's delivery date, replacing Delivery_Date, and the indent is saved without a quotation date. Leave Quotation_Date out when you send Delivery_Date.

Known issue – an unknown Tax_Region is not refused. When the name you send is not found, the indent is saved with no tax region. Send the name exactly as in Logic ERP, or leave it out.

Known issue – the default tax region. Without Tax_Region, the indent takes the tax region linked to the supplier for sales in this branch, not the one linked for purchases. When they differ, send the purchase one in Tax_Region.

Known issue – both item codes sent. When an entry has both LogicUser_Code and AddlItemCode and the LogicUser_Code is wrong, the line is left out of the indent without a message. Send only one code per entry.

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, so use test values like the example. Each send creates one more test indent of the sandbox's test item APITEST0001; change Supplier_Order_No each time.

Save a Purchase Indent

post

Creates a new purchase indent in Logic ERP – an internal request to buy goods, which purchase orders can later be made against. The request is exactly the same as for Save a Purchase Order and goes through the same checks and calculations; the differences are listed under How it differs from a purchase order below. You send the supplier, the indent prefix and the items with their quantities and rates; Logic ERP gives the indent a number, works out taxes and totals with the purchase-indent series chosen for your API site, and saves it as pending.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
Branch_CodeintegerOptional

The branch the indent is saved in (Branch_Code in Get Branch Info). See the known issue below.

Party_User_codestringOptional

The supplier, by the party code shown in Logic ERP (User_Code in Get Party Master). A supplier or customer account is accepted. An indent cannot be saved without one.

Order_PrefixstringOptional

The prefix of the indent number, for example PI. The indent number is the prefix, a hyphen and a number – for example PI-43. See the known issue on numbering.

Order_DatestringOptional

The indent date, yyyy-MM-dd. It also decides the financial year.

Supplier_Order_NostringOptional

The supplier's reference. *Required when the indent series has Do not allow duplicate Supp. Order No. for Same Supplier ticked – see the known issue below.

RemarksstringOptional

Remarks of the indent.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
LastSavedDocNostringOptional

The indent number – prefix, a hyphen and the number, for example PI-43. Empty (null) when not saved.

Order_Nostring · nullableOptional

Always null.

ErrorCodestringOptional

Always empty.

StatusbooleanOptional

true when the indent was saved.

MessagestringOptional

Empty when saved; the reason when not saved.

LastSavedCodeintegerOptional

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

request_IDstringOptional

The ID of this request – quote it to support.

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

{
  "Branch_Code": 2,
  "Party_User_code": "556",
  "Order_Prefix": "APITESTPI",
  "Order_Date": "2026-10-30",
  "Supplier_Order_No": "APITEST-PI-001",
  "Remarks": "API TEST",
  "ListItems": [
    {
      "LogicUser_Code": "APITEST0001",
      "Order_Qty": 1,
      "Rate": 100,
      "SPCD_P": 0,
      "Tax_Amount": 5,
      "Remarks": "API TEST"
    }
  ]
}
{
  "LastSavedDocNo": "text",
  "Order_No": "text",
  "ErrorCode": "text",
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

Field
Type
Meaning

Status

true / false

true when the indent was saved.

Message

text

Empty when saved; the reason when not saved.

LastSavedCode

number

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

LastSavedDocNo

text

The indent number – prefix, a hyphen and the number, for example PI-43. Empty (null) when not saved.

Order_No

text

Always null.

ErrorCode

text

Always empty.

request_ID

text

The ID of this request – quote it to support.

Example response

Messages you may see

The messages are the same as for Save a Purchase Order (they say order even for an indent). The ones you will meet most:

Message
Meaning
What to do

Default Purchase Order Configuration Not Selected!!

No indent series is chosen for LOGIC API PUSH - PURCHASE INDENT in your API site's settings.

Ask your Logic ERP team to choose the Default Configuration.

Invalid Party User Code...

Party_User_code is missing or is not a supplier or customer account.

Send the supplier's party code.

Invalid LogicUserCode / EANCode : …

An item code was not found.

Send the code exactly as in Logic ERP.

Quantity cannot be blank. Logic User Code : …

Order_Qty is 0 or less.

Send a quantity above 0.

Entry not allowed in back date.......

The date is earlier than the branch's latest indent (or than today), and back-dated entries are not allowed.

Send a later Order_Date, or ask your Logic ERP team about the rights.

Invalid Order Prefix Entered...

Order_Prefix is empty.

Send a prefix.

No Item Found!!

ListItems is empty.

Send at least one item.

Unable to found Department Name : …

The department was not found.

Send it exactly as in Logic ERP, or leave it out.

Supplier Order No. Cannot be blank.Please Check

The indent series needs a supplier reference.

Send Supplier_Order_No.

Supplier Order No. already exists for same Supplier.Please Check

See the known issue above.

Send another reference, or leave it out if the series allows.

Last updated