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

Delete Retail Customer Group Discounts

Deletes the item-group discounts given to a retail customer (a cash discount % and a trade discount % on an item group, for a period). The customer is found by mobile number. Discounts already used on a sale bill are kept.

There is no endpoint to create or change these discounts – they are set up in Logic ERP. This endpoint only removes them.

Endpoint

Name
Detail

Address

https://your-server/api/DeleteRCUGroupDiscount

Method

POST

Authorization

Basic Auth

The response and the messages every endpoint can return are explained in How Every API Call Works. Read the known issues below before you use this endpoint: Status is always false.

Request fields

Field
Type
Required
Default
Meaning

MobileNo

text

Yes

–

The retail customer's mobile number, exactly as stored in Logic ERP (Mobile_No in Get Retail Customers), for example "9876543210".

GroupName

text

No

empty

Name of an item group. When filled, the group must exist at GroupLevel, or the request is refused. It does not limit what is deleted – see the known issues.

GroupLevel

number

With GroupName

0

The group level of GroupName – the number in Group_Name1 … Group_Name30 of Get Item Master (2 for Group_Name2).

Ignored although they exist: CompanyName, UserCode, DateFrom, DateTo, CD_P, TD_P.

Rules Logic ERP applies

  • The customer is the first retail customer found with that mobile number. If several customers share the number, only one of them is affected.

  • Every item-group discount of that customer is deleted, except discounts already used on a sale bill. Company-wise discounts and item-wise discounts of the customer are not touched.

  • If the customer has no such discount, the call still reports Discounts Deleted Successfully....

  • The deletes are done together: if one fails, none are kept.

Known issue – Status is always false. Even when the discounts were deleted, the answer has Status: false. Treat the call as successful when Message is Discounts Deleted Successfully..., and as failed otherwise.

Known issue – refusals come with an empty message. When the request is refused (mobile number empty or not found, or GroupName not found at GroupLevel), the answer is Status: false with an empty Message. An empty Message means nothing was deleted: check the mobile number, and GroupName / GroupLevel if you sent them.

Known issue – GroupName does not limit the delete. All item-group discounts of the customer are deleted, whatever GroupName you send. If you want to remove only one group's discount, do not use this endpoint – ask your Logic ERP team to remove it in Logic ERP.

Known issue – request_ID is always empty. Keep your own reference for each call.

Example request

Response

  • Status – always false (see the known issue).

  • Message – Discounts Deleted Successfully... when the delete ran; empty when the request was refused; a technical error otherwise.

  • LastSavedCode – always 0.

  • request_ID – always empty.

Example response

Messages you may see

Message
Meaning
What to do

Discounts Deleted Successfully... (with Status: false)

The customer's item-group discounts not used on a sale were deleted (or there were none).

Nothing – this is success.

Empty message (with Status: false)

The request was refused: the mobile number is empty or no retail customer has it, or GroupName was not found at GroupLevel. Nothing was deleted.

Check MobileNo, GroupName and GroupLevel.

A technical error (with Status: false)

The delete failed, for example a value containing '. Nothing was deleted. The reason may be followed by technical detail – read the first line.

Correct the request and send it again.