For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Update Retail Customer

Changes the details of a retail customer who already exists in Logic ERP: name, e-mail address, address, birth date, GST details, customer groups and a few other fields. The customer is found by membership number or, if you do not send one, by mobile number. Only the fields you fill are changed. To register a new customer, use Create Retail Customer.

Endpoint

Name
Detail

Address

https://your-server/api/UpdateRetailCustomer

Method

POST

Authorization

Basic Auth

The response and the common messages are explained in How Every API Call Works. You can read the customer back with Get Retail Customers.

Request fields

The request has the same fields as Create Retail Customer, but most of them work differently here. Field names are not case-sensitive.

Fields that find the customer

Field
Type
Required
Default
Meaning

Membership_Number

number

One of Membership_Number / Mobile_No

0

The membership number within the series, for example 1052 for RCU1052. When above 0, the customer is found by series and number, and Mobile_No is not used to find them.

MemberShip_Series

text

With Membership_Number

empty

The membership series, for example "RCU". Spaces around it are ignored, and capitals do not matter.

Mobile_No

text

One of Membership_Number / Mobile_No

empty

Used to find the customer when Membership_Number is 0 or left out. Spaces before and after are ignored; otherwise it must match the stored mobile number exactly.

Fields that are changed when filled

An empty or missing value leaves the stored value as it is.

Field
Type
Meaning

First_Name, Middle_Name, Last_Name

text

Customer's name.

EMail_ID

text

E-mail address.

Birth_Date

date

Date of birth, yyyy-MM-dd. Changed only when it is a valid date.

House_No

text

House or shop number. See the rules.

Location_Name, City_Name, State_Name, Country_Name

text

Area, city, state and country. See the rules.

Pin_Code

text

PIN code.

Address_2, Address_3

text

Address lines – see the known issue about Address_1.

Spouse_Name

text

Spouse's name.

Shoes_Size

text

Shoe size.

Remarks

text

Remarks.

Discount_Card_No

text

Discount card number, kept as text.

Gst_Number

text

GSTIN.

Gst_State_Code

text

GST state code. Ignored when the customer has a GST number – see the rules.

Group_Name_1 … Group_Name_5

text

Retail customer group at levels 1 to 5, by name. A group that does not exist is created. Send "(NIL)" to remove the customer from the group at that level.

Kid_1_Name, Kid_2_Name

text

Child's name.

DisplayError

text

"1" = when the request fails, Message holds the full technical detail. Use only while testing.

Fields that are ignored here: Mobile_No (it cannot be changed), MemberShip_Series and Membership_Number (they cannot be changed), Title, Gender, Marital_Status, Age, Anniversary_Date, Spouse_Birthdate, Kid_1_DOB, Kid_2_DOB, Branch_Code and Branch_Name. To change these, edit the customer in Logic ERP.

Known issue – Address_1 is not saved, and the other address lines move up. Address_1 is dropped. Address_2 changes the customer's first address line and Address_3 the second – the lines Get Retail Customers returns as Address_1 and Address_2. Until this is fixed, send the first line in Address_2 and the second in Address_3.

Rules Logic ERP applies

  • Finding the customer.

    • With Membership_Number above 0: the customer with that series and number. If none, Unable to found Customer against Membership Number : … – the membership number and series you sent follow.

    • Otherwise: a customer whose mobile number is Mobile_No. One mobile number can belong to more than one customer; in that case the one with the lowest RCU_Code is updated. Use the membership number whenever you have it.

    • A customer found this way who has no membership number is refused with Customer has no Membership Number. Please update this customer in Logic ERP.

  • Mobile number and membership number never change. There is no way to change a customer's mobile number through the API.

  • House number. If another customer in the same area and city already has the new house number, the change is dropped silently and the old house number is kept.

  • Main address line. Logic ERP rebuilds the customer's main address line from house number, area, city, state and country, using the names you sent where you sent them.

  • GST. When the customer has a GST number (sent now or already stored), the GST state code is set from its first two characters, and the customer's linked customer account in Logic ERP is created or updated.

  • Loyalty points. If your loyalty setup gives points for enrolling and this customer has not yet received them, they are added now. Depending on the setup, points for giving certain details may also be added if the customer has not received them yet.

  • Central customer database. If your Logic ERP shares retail customers through a central customer database, the change is saved there too, and Mobile_No or EMail_ID may be required by that setup.

  • The update is all-or-nothing, except that new customer groups are kept even if the update then fails. Branches and financial years do not apply.

  • Changing the city, state, country or area. A new City_Name, State_Name, Country_Name or Location_Name moves the customer to it; a name that does not exist yet is created, as on Create Retail Customer.

Known issue – a new city keeps the old area. When you send a new City_Name without Location_Name, the customer keeps its old area. Send Location_Name together with a new city.

Example request

Change the e-mail address and add the customer to a level-2 group, finding the customer by membership number:

The same customer found by mobile number:

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 example updates the sandbox's test customer with membership APT 1.

Update Retail Customer

post

Changes the details of a retail customer who already exists in Logic ERP: name, e-mail address, address, birth date, GST details, customer groups and a few other fields. The customer is found by membership number or, if you do not send one, by mobile number. Only the fields you fill are changed. To register a new customer, use Create Retail Customer.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
MemberShip_SeriesstringOptional

The membership series, for example "RCU". Spaces around it are ignored, and capitals do not matter.

Membership_NumberintegerOptional

The membership number within the series, for example 1052 for RCU1052. When above 0, the customer is found by series and number, and Mobile_No is not used to find them.

EMail_IDstringOptional

E-mail address.

Address_3stringOptional

Address lines – see the known issue about Address_1.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
StatusbooleanOptional

true when the customer was updated.

MessagestringOptional

Empty when the customer was updated; otherwise the reason.

LastSavedCodeintegerOptional

Logic ERP's internal number of the customer that was updated – RCU_Code in Get Retail Customers. Check it when you found the customer by mobile number. 0 when the request failed.

request_IDstringOptional

Filled once saving has started; empty when the request was refused before that (no membership or mobile number, customer not found).

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

{
  "MemberShip_Series": "APT",
  "Membership_Number": 1,
  "EMail_ID": "apitest1.updated@example.com",
  "Address_3": "Second line - test"
}
{
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

Field
Meaning for this endpoint

Status

true when the customer was updated.

Message

Empty when the customer was updated; otherwise the reason.

LastSavedCode

Logic ERP's internal number of the customer that was updated – RCU_Code in Get Retail Customers. Check it when you found the customer by mobile number. 0 when the request failed.

request_ID

Filled once saving has started; empty when the request was refused before that (no membership or mobile number, customer not found).

Example response

Messages you may see

All with Status: false.

Message
Meaning
What to do

Membership Number / Mobile No. Cannnot be blank.Please Check...

Neither Membership_Number (above 0) nor Mobile_No was sent.

Send one of them.

Unable to found Customer against Membership Number : …Membership Series :…

No customer has that series and number. The number and series you sent appear in place of ….

Check both, or find the customer by mobile number.

Unable to found Customer against Mobile No. : …

No customer has that mobile number.

Check the number; do not add a country code unless it is stored that way. Use Create Retail Customer for a new customer.

Customer has no Membership Number. Please update this customer in Logic ERP.

The customer found by mobile number has no membership number, so it cannot be updated through the API.

Give the customer a membership number in Logic ERP.

Unable to save Retail Customer. Please Check...

Logic ERP did not save the change. Nothing was changed (new customer groups are kept).

Check the request, or ask your Logic ERP support team.

Mobile Number cannot be blank... or EMail id cannot be blank...

Your Logic ERP uses a central customer database that identifies customers by mobile number or e-mail address, and that field is empty.

Fill the field named.

A message starting Cannot Open Remote Database

Logic ERP could not reach the central customer database.

Try again later; if it continues, ask your Logic ERP support team.

A message starting Error creating customer : ERROR Position : …

Saving failed, for example because a text is longer than the field allows. The reason may be followed by technical detail – read the first lines.

Check the lengths given on the Create Retail Customer page.

A message starting Error creating customer : ERROR Position : … followed by Account creation against retail customer -> User Code Already Exists or Account creation against retail customer -> Account Name Already Exits

The customer has a GST number, and the customer account Logic ERP creates or updates clashes with the account of another customer.

Ask your Logic ERP team to check the existing account.

A database error

The mobile number, membership series, a group name or the house number contains a '.

Send them without quotes.

Last updated