Suspend Contract

Overview

Service Unique Name SuspendContract
Request Method POST
Content Type application/x-www-form-urlencoded; charset=utf-8

Description

Suspend Contract API is used to Suspend the customer contract.

Request Header

AccessKey : logixerp

Request Body

These are form parameters:

  • customerCode: HERO
  • token: logixerp

Request Details

Parameter Data Type Required/Optional Description
SecureKey int Required It is a Unique key for accessing the API. For secure key email to support team.
customerCode String Required customer code should be same as available in logixerp.
token String Required Organization token.

Response Format

ON SUCCESS
{
"message":"Contract suspended successfully.”,
"messageType":"Success",
}

ON ERROR
{
"message": "Error_Message",
"messageType" : "Error"
}

Error Message String

Error Messages Description

Sample Code

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.LinkedHashMap;

import java.util.Map;

public class SuspendContract {

private static final String ACCESS_KEY = "logixerp";
private static final String API_URL = "https://webservice.logixerp.com/Rachna/webservice/v2/SuspendContract?secureKey=";
private static final int SECURE_KEY = SECURE KEY;
private static final String ACCESS_URL = API_URL+SECURE_KEY;

public static void main(String[] args) throws IOException {

URL url = new URL(ACCESS_URL);
Map params = new LinkedHashMap<>();
params.put("customerCode", "HERO");

params.put("token", "123");

StringBuilder postData = new StringBuilder();
for (Map.Entry param : params.entrySet()) {
if (postData.length() != 0) postData.append('&');
postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
postData.append('=');
postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));

}

byte[] postDataBytes = postData.toString().getBytes("UTF-8");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("AccessKey", ACCESS_KEY);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length));
conn.setDoOutput(true);
conn.getOutputStream().write(postDataBytes);
Reader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
StringBuilder data = new StringBuilder();
for (int c; (c = in.read()) >= 0;) {
data.append((char)c);
}
String intentData = data.toString();
System.out.println(intentData);
}

}

import requests

access_url = "https://webservice.logixerp.com/Rachna/webservice/v2/SuspendContract"

params = {'SecureKey':'secure_key'}
headers={'AccessKey':'logixerp'}
payload = {
'customerCode':'HERO',
'token':'logixerp',

}

try:
r = requests.post(access_url, params=params, headers=headers, data=payload)
print (r.text)
except requests.exceptions.RequestException as err:
print (err)
please wait...