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

Save a Packing Slip Allowing Items Outside the Sale Order

Creates a packing slip against a sale order, like Save a Packing Slip Against a Sale Order, but without refusing up front an item that is not on the order or a quantity above what the order still has pending. Whether such goods can then be packed depends on the packing slip configuration chosen for the API: if it allows items outside the order, they are packed without a link to the order; if not, the request is refused when the first such unit is reached.

Despite its address, this endpoint does not read or work against a delivery order: it saves a packing slip (Logic ERP keeps packing slips together with its delivery orders). It always needs a sale order, exactly like the other packing slip endpoint.

Endpoint

Name
Detail

Address

https://your-server/api/PackingSlipDeliveryOrder

Method

POST

Authorization

Basic Auth

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

How it differs from Save a Packing Slip Against a Sale Order

Everything – request fields, response, how the sale order and godown are found, how lots are picked, numbering, what happens to the order and the stock, and the messages – is the same as on Save a Packing Slip Against a Sale Order, with these differences:

  • An item that is not on the order (or has nothing pending on it) is not refused with Invalid Barcode.... Item does Not exist In Sale Order. Please check. Logic ERP picks stock for it like any other item. Then:

    • if the packing slip configuration allows items outside the sale order, the units are packed on the packing slip with no link to the order – the order's pending quantities are not touched for them (see the known issue on billing them);

    • otherwise the request is refused with No Pending Items found for Sale Order....... and nothing is saved.

  • More than the order's pending quantity of an order item is not refused with No Pending quantity found....... Each unit is still linked to an order line with something pending; once none is left, the rest is packed without a link to the order if the configuration allows items outside the order, and refused with No Pending Items found for Sale Order....... if it does not. (If the configuration allows packing more than the order's pending quantity, the extra units are linked to the item's first order line instead, as on the other endpoint.)

  • It uses the same API settings (packing slip configuration and prefix) as Save a Packing Slip Against a Sale Order, and its requests are logged under that endpoint. Your Logic ERP licence must include this endpoint separately.

When the packing slip configuration does not allow items outside the order, the two endpoints save exactly the same packing slips; only the messages for an item that is not on the order, and for packing more than is pending, differ.

Request fields

As on Save a Packing Slip Against a Sale Order: SaleOrderVouchCode or PartyOrderNo, BranchCode / BranchShortName, GodownName, PS_Prefix, Remarks, Box_No_Prefix, DisplayError, and ListItems with ItemCode and ListBoxs (PackingBoxNo, Quantity, BoxWeight, BinName, BinCode). PS_Number, GodownCode and the item-level Quantity are ignored.

Rules Logic ERP applies

The rules of Save a Packing Slip Against a Sale Order apply, plus:

  • Units packed without a link to the order are still taken from stock in GodownName and set aside on the packing slip (see the first known issue).

  • A sale order is still required: without one the request is refused with Unable to found Sale Order....

Known issue – units packed without a link to the order cannot be billed or transferred. When the packing slip is billed or transferred against it as a delivery order, only lines linked to an order line are picked up. Units packed outside the order stay set aside on the packing slip and are left out of the invoice or transfer without a message. Until this is fixed, do not rely on packing items outside the order; put them on the sale order first.

Known issue – an item outside the order in lot-and-piece or serial-number mode. When the packing slip configuration reads ItemCode as a lot code with piece number, or as a serial number, an item that is not on the order makes the request fail with technical text instead of being packed. In those modes, send only items of the order.

Known issue – an order with nothing pending is not refused. If SaleOrderVouchCode is not the number of a sale order, or the order has nothing pending, and the packing slip configuration allows items outside the order, every unit is packed without a link to an order and the packing slip is saved without a party. Check the order with Get Sale Orders before you pack against it.

Known issue – the sale order is not checked against the branch. With SaleOrderVouchCode, an order of any branch is accepted, and the packing slip is saved in – and takes stock from – the branch you send. Always send the sale order's own branch.

Known issue – an order waiting for approval, or cancelled as a whole, is accepted. A packing slip can be saved against a sale order that has not been approved yet, or that has been cancelled as a whole while its lines were not cancelled one by one. Check the order's status before you pack against it.

Known issue – box quantities are counted in whole units. Except when the packing slip configuration reads ItemCode as a lot code, each box is packed one unit at a time, so a fraction is dropped (2.5 packs 2). In every mode a quantity below 1 packs nothing. If nothing at all is packed, the request fails with technical text saying the operation was canceled. Send whole-unit quantities.

Known issue – messages from the saving step come wrapped in technical text. Reasons found while the packing slip is being written – for example Packing Slip number already exists.... or Entry not allowed in back date....... – arrive preceded and followed by technical text. Look for the reason inside Message rather than at its start.

Known issue – an apostrophe in a code or name. PartyOrderNo, GodownName, BinName, ItemCode and PS_Prefix are looked up exactly as typed. An apostrophe (') in any of them makes the request fail with a database error. Leave apostrophes out of codes and names you send.

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 and sets the packed stock aside. The example's test order may have nothing left to pack – first save a test order with Save a Sale Order and send its internal number.

Save a Packing Slip Allowing Items Outside the Sale Order

post

Creates a packing slip against a sale order, like Save a Packing Slip Against a Sale Order, but without refusing up front an item that is not on the order or a quantity above what the order still has pending. Whether such goods can then be packed depends on the packing slip configuration chosen for the API: if it allows items outside the order, they are packed without a link to the order; if not, the request is refused when the first such unit is reached.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
BranchCodeintegerOptional

Logic ERP branch codes, separated by commas, for example "2" or "2,5,7". Numbers only — there is no "all branches" value. Code 0 returns Logic ERP's placeholder branch named (NIL); do not ask for it.

SaleOrderVouchCodeintegerOptional

Logic ERP's internal number of the sale order – the LastSavedCode from Save a Sale Order, or the order's internal number in Get Sale Orders.

GodownNamestringOptional

Ignored by this endpoint.

PS_PrefixstringOptional

Prefix of the packing slip number, for example "PS". A prefix set in your API site's settings replaces it.

RemarksstringOptional

Any remarks.

Box_No_PrefixstringOptional

Prefix of the box numbers, saved on the packing slip.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
LastSavedDocNostringOptional

The packing slip's number, for example PS-119.

StatusbooleanOptional

true = the packing slip was saved. (Also true when the endpoint is switched off – see the messages.)

MessagestringOptional

Success when saved; otherwise why it failed.

LastSavedCodeintegerOptional

Logic ERP's internal number of the packing slip. Send it as Doc_Code to bill or transfer the packed goods. 0 when nothing was saved.

request_IDstringOptional

The ID of this request – quote it to support. Can be empty when the request fails at an early check.

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

{
  "BranchCode": 2,
  "SaleOrderVouchCode": 487069,
  "GodownName": "MAIN",
  "PS_Prefix": "APITESTPS",
  "Remarks": "API TEST",
  "Box_No_Prefix": "APITEST",
  "ListItems": [
    {
      "ItemCode": "APITEST0001",
      "ListBoxs": [
        {
          "PackingBoxNo": "APITEST-B02",
          "Quantity": 1
        }
      ]
    }
  ]
}
{
  "LastSavedDocNo": "text",
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

The same as on Save a Packing Slip Against a Sale Order:

Field
Type
Meaning

Status

true / false

true = the packing slip was saved. (Also true when the endpoint is switched off – see the messages.)

Message

text

Success when saved; otherwise why it failed.

LastSavedCode

number

Logic ERP's internal number of the packing slip. Send it as Doc_Code to bill or transfer the packed goods. 0 when nothing was saved.

LastSavedDocNo

text

The packing slip's number, for example PS-119.

request_ID

text

The ID of this request – quote it to support. Can be empty when the request fails at an early check.

Example response

Messages you may see

The messages of Save a Packing Slip Against a Sale Order, except that Invalid Barcode.... Item does Not exist In Sale Order. Please check. and No Pending quantity found...... do not occur here:

Message
Meaning
What to do

No Pending Items found for Sale Order.......

An item is not on the order, or more was packed than the order has pending, and the packing slip configuration does not allow items outside the order.

Pack only what the order has pending, or ask your Logic ERP team about the configuration.

Unable to found Sale Order...

No order found (see the other page).

Send SaleOrderVouchCode, or check PartyOrderNo and the branch.