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

Link a Supplier to an Item for a Branch

Records that a supplier supplies an item to a branch – one branch + supplier + item link per call. Use it to build the branch-wise supplier list for items in Logic ERP from your system.

Endpoint

Name
Detail

Address

https://your-server/api/SaveBranchSuppItemLinks

Method

POST

Authorization

Basic Auth

The response and the messages every endpoint can return are explained in How Every API Call Works.

Request fields

One link per request – the body is a single object, not a list.

Field
Type
Required
Default
Meaning

BranchCode

number

Yes

0

Logic ERP's branch code (Branch_Code in Get Branch Info).

SuppUserCode

text

Yes

empty

The supplier's code as shown in Logic ERP (User_Code in Get Party Master). Spaces before and after are ignored.

LogicUserCode

text

Yes

empty

The item code shown in Logic ERP (UserCode in Get Item Master). Send the item code, not a barcode – a barcode is normally not found. Spaces are not removed.

DisplayError

text

No

"0"

Has no effect.

Rules Logic ERP applies

  • The branch, the supplier and the item must already exist in Logic ERP. Nothing is created except the link.

  • Only the link itself is saved. Remarks for the link – and, where your Logic ERP has them, a supplier rate, lead days and quotation date – cannot be sent and stay empty.

  • No duplicates. If the same branch + supplier + item link already exists, nothing is saved and the call answers Status: false with Branch + Supplier + Item Linking Already Exists!!. When you re-send links, treat this message as "already done".

  • The code in SuppUserCode is matched against any account in Logic ERP, not only suppliers. Make sure you send a supplier's code: a customer's code is accepted too.

  • The item code is matched with capital and small letters not distinguished.

  • To link several items, send one request per item.

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. The link in the example already exists, so sending it again answers that the link already exists; change the supplier or item to create a new one.

Link a Supplier to an Item for a Branch

post

Records that a supplier supplies an item to a branch – one branch + supplier + item link per call. Use it to build the branch-wise supplier list for items in Logic ERP from your system.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
BranchCodeintegerOptional

Logic ERP's branch code (Branch_Code in Get Branch Info).

SuppUserCodestringOptional

The supplier's code as shown in Logic ERP (User_Code in Get Party Master). Spaces before and after are ignored.

LogicUserCodestringOptional

The item code shown in Logic ERP (UserCode in Get Item Master). Send the item code, not a barcode – a barcode is normally not found. Spaces are not removed.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
StatusbooleanOptional

See the Status rules on this page.

MessagestringOptional

Why the call failed, or a note. The reason may be followed by technical detail - read the first line.

LastSavedCodeintegerOptional

See this page.

request_IDstringOptional

Logic ERP request number of this call.

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

{
  "BranchCode": 3,
  "SuppUserCode": "APITESTS01",
  "LogicUserCode": "APITEST0001"
}
{
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

  • Status – true when the link was saved; false when it already existed or the request was refused.

  • Message – empty when saved; otherwise the reason (see below).

  • LastSavedCode – Logic ERP's internal number of the new link. 0 when nothing was saved.

  • request_ID – filled once the branch, supplier and item have been found (also when the link already existed). When the request is refused earlier it is null.

Example response

Messages you may see

Message
Meaning
What to do

Branch Code Is Missing!!

BranchCode is missing or 0.

Send the branch code.

Supplier User Code Is Missing!!

SuppUserCode is empty.

Send the supplier code.

Logic User Code Is Missing!!

LogicUserCode is empty.

Send the item code.

Invalid Branch Code!!

No branch has this code.

Check the code with Get Branch Info.

Invalid Supplier User Code!!

No account has this code.

Check the code with Get Party Master.

A message containing Invalid LogicUserCode / EANCode : … (the item code you sent, in capital letters)

No item has this code. The reason may be followed by technical detail – read the first line.

Check the item code with Get Item Master.

Branch + Supplier + Item Linking Already Exists!! (with Status: false)

The link is already in Logic ERP. Nothing changed.

Nothing to do.

A technical error (with Status: false)

Something failed while saving, for example a code containing '. Nothing was saved. The reason may be followed by technical detail – read the first line.

Correct the request and send it again.