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

Get Item Sets

Returns item sets – fixed bundles of items sold or packed together, such as a size set (one piece each of S, M, L, XL) or a combo pack – with the items and quantities in each set. Use it to look up a set by its number, or to copy all your sets into your own system.

Two endpoints return this data:

Endpoint
Use it to

PullSetItems

Recommended. Look a set up by its number (SetCode_ID), or read all sets in batches.

GetSetItems

Look up one set by its name or user-defined code only. It reads SetCode and nothing else – and both of those lookups do not work at present (see the known issues below).

Both return the same record shape. (When the caller is the Logic WMS mobile app, GetSetItems returns a different answer meant for that app; this page describes the answer for every other API site.)

Endpoint

Name
Detail

Address

https://your-server/api/PullSetItems or https://your-server/api/GetSetItems

Method

POST

Authorization

Basic Auth

The response is explained in How Every API Call Works. These endpoints do not use the change log: GlobalModifyCode here is a set-number bookmark of their own (see below), and Doc_Codes, Doc_Num_Like and the branch fields are not read.

Request fields – PullSetItems

Field
Type
Required
Default
Meaning

SetCode

text

One of SetCode, UDSetCode, SetName, SetCode_ID or GlobalModifyCode is required

empty

The set's name or its user-defined set code (the code or barcode entered for the set in Logic ERP).

UDSetCode

text

empty

Same as SetCode. Ignored when SetCode is filled.

SetName

text

empty

The set's name or its user-defined set code.

SetCode_ID

number

0

Logic ERP's number for the set (SetCode in the response). Send a positive number.

GlobalModifyCode

number

0

Bookmark: return sets whose Logic ERP number is greater than this. See "Reading all sets".

DateFrom, DateTo

date

No

empty

Do not send them – at present a request with both filled gives an error or no sets.

Request fields – GetSetItems

Field
Type
Required
Default
Meaning

SetCode

text

Yes

–

The set's name or its user-defined set code.

Any other field sent to GetSetItems is ignored.

Rules Logic ERP applies

  • Look up by number: SetCode_ID returns that set with its items.

  • Look up by name or user-defined code (SetCode, UDSetCode, SetName): meant to return the set whose name or user-defined code is exactly the value you sent – see the two known issues below.

Known issue – looking a set up by name. When the value matches a set's name, the request currently runs for many minutes and usually times out with no answer. This applies to SetName, SetCode and UDSetCode on PullSetItems, and to SetCode on GetSetItems. Look the set up by SetCode_ID, or read all sets with the bookmark and find it by SetName on your side.

Known issue – looking a set up by user-defined code. When the value matches a set's user-defined code, the response lists that set with 100 meaningless lines that are not the set's real contents. Do not use these lines. Read the set's number (SetCode) from the response and fetch the set again by SetCode_ID.

  • Each response holds at most 100 item lines in total (not 100 sets), taken in order of the set's Logic ERP number.

  • Item quantities are whole numbers; a fractional quantity in a set is rounded.

  • There is no branch filter.

Reading all sets

  1. Send "GlobalModifyCode": 1 (a request with nothing filled is refused; Logic ERP's set numbers start above 1).

  2. Store LastGlobalModifyCode from the response – it is the number of the last set returned.

  3. Send that number as GlobalModifyCode to get the next sets.

  4. When there are no more sets, the response has Status: false, a message starting Unable to found Sets and LastGlobalModifyCode: 0. Stop there and keep your stored bookmark – do not store the 0.

Known issue – the 100-line boundary. Because the limit counts item lines, the last set in a response can be cut off part-way. The next call starts after that set, so its remaining items are not returned. To be sure you have every item of a set, fetch it again by SetCode_ID.

Sets are not returned again when they are edited later – the bookmark only moves forward through set numbers.

Example request

One set by its number:

The next batch of sets after the stored bookmark 1536:

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. Look a set up by SetCode_ID here – a lookup by name or code does not finish (see the known issues on this page). Do not send "GlobalModifyCode": -1 here – it changes what the sandbox has marked as already sent.

Get Item Sets

post

Returns item sets – fixed bundles of items sold or packed together, such as a size set (one piece each of S, M, L, XL) or a combo pack – with the items and quantities in each set. Use it to look up a set by its number, or to copy all your sets into your own system.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
SetCode_IDintegerOptional

Logic ERP's number for the set (SetCode in the response). Send a positive number.

SetCodestringOptional

The set's name or its user-defined set code (the code or barcode entered for the set in Logic ERP).

SetNamestringOptional

The set's name or its user-defined set code.

UDSetCodestringOptional

Same as SetCode. Ignored when SetCode is filled.

GlobalModifyCodeintegerOptional

Bookmark: return sets whose Logic ERP number is greater than this. See "Reading all sets".

DateFromstringOptional

Do not send them – at present a request with both filled gives an error or no sets.

DateTostringOptional

Do not send them – at present a request with both filled gives an error or no sets.

Responses
200

Always HTTP 200. Check Status, Message and GetData.

application/json
StatusbooleanOptional

See the Status rules on this page and on How Every API Call Works.

MessagestringOptional

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

LastGlobalModifyCodeintegerOptional

The change-log bookmark (see How Every API Call Works).

resultSizestringOptional

Size of the answer, for example "2 KB".

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

{
  "SetCode_ID": 802,
  "SetCode": "",
  "SetName": "",
  "UDSetCode": "",
  "GlobalModifyCode": 0
}
{
  "GetData": [
    {
      "SetCode": 1,
      "SetName": "text",
      "UDSetCode": "text",
      "ListItems": [
        {
          "LogicUser_Code": "text",
          "AddItemCode": "text",
          "Item_Name": "text",
          "ItemDetCode": "text",
          "Group_Name": "text",
          "Color_Name": "text",
          "Pack_Name": "text",
          "Qty": 1
        }
      ]
    }
  ],
  "Status": true,
  "Message": "text",
  "LastGlobalModifyCode": 1,
  "resultSize": "text"
}

Response fields

Each record in GetData is one set:

Field
Type
Meaning

SetCode

number

Logic ERP's number for the set. Use it in SetCode_ID.

SetName

text

Name of the set.

UDSetCode

text

The user-defined set code. A single space (" ") when none was entered.

ListItems

list

The items in the set – see below.

ListItems – one line per item in the set:

Field
Type
Meaning

LogicUser_Code

text

Item code, as UserCode in Get Item Master.

AddItemCode

text

Item barcode / EAN, as AddlItemCode in Get Item Master.

Item_Name

text

Item name including its colour, as shown in Logic ERP.

ItemDetCode

text

Logic ERP's number for the item and size, as ItemDetailCode in Get Item Master (written as text here).

Group_Name

text

Item group at the first group level.

Color_Name

text

Colour.

Pack_Name

text

Size / pack.

Qty

number

How many of this item the set contains.

Example response

Messages you may see

Message
Meaning
What to do

Success (with Status: true)

Sets were found.

–

Invalid Set Code/Name... (with Status: false)

Nothing to look for: no SetCode, UDSetCode, SetName, SetCode_ID or GlobalModifyCode was sent (for GetSetItems: SetCode was empty).

Fill SetCode_ID or GlobalModifyCode.

Unable to found Sets (with Status: false)

No set matches – or, when reading with the bookmark, there are no more sets. Also returned when DateFrom and DateTo were sent, on some servers.

Check the number; when reading with the bookmark, stop and keep your stored bookmark.

No answer before your timeout

The value you sent matched a set's name – see the known issue above.

Look the set up by SetCode_ID.

Another text with Status: false

The request could not be processed – for example DateFrom and DateTo were sent, or a value containing a '.

Correct the request. If it continues, send the text to your Logic ERP support team.

The reason may be followed by technical detail – read the first line. Unable to found Sets is followed directly by that detail, with no line break.