# Consignment Order

# Fetch Consignment Order List

# 一、Description

​ Usage: Fetch Consignment Order List.

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/search/search
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
stSearch String(Query) Yes consignCo
beId long(Query) Yes Business Entity ID
formatId long(Query) No Lookup Query ID, If not specified, the default format is used.
startRow int(Query) No Resultset offset : start index
endRow int(Query) No Resultset offset : end index
quickSearchStr String(Query) No Quick search keyword

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=consignCo&beId=11";

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、Response Sample

{
  	"stSearch": "consignCo",
    "size": 4,
    "stSearchDisplay": "Consignment Order",
    "values": [
        {
            "code": "ITCO220330A",
            "tDate": "2022-03-30",
            "consignMainco.cusId.cus.code": "IT002",
            "consignMainco.cusId.cus.desc__lang": "Joey Wall",
            "cuspono": "",
            "consignMainco.curId.cur.sym": "¥",
            "consignMainco.flowTypeId.flowtype.code": "MX-BS-CONS",
            "consignMainco.flowTypeId.flowtype.desc": "Consignment Flow",
            "iRev": 1,
            "lastModifyDate": "2022-03-30 11:32:15",
            "consignMainco.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
            "id": 33,
            "st_desc": "ITCO220330A",
            "st_id": 33,
            "st_code": "ITCO220330A"
        }
  	]
}

# Load Consignment Order

# 一、Description

​ Usage: Load 【Consignment Order】Record

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/read/consignCo
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCo
id long(Query) Yes Consignment Order ID
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/consignCo";
			String param = "&menuCode=consignCo&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、Response Sample

{
    "data": {
        "consignmainco": [
            {
                "lastModifyUid": 11,
                "useAccess": false,
                "virDeptId": 0,
                "expiredDate": -2209017600000,
                "position_zh-CN": "SA",
                "sysJson": "",
                "viewCode": "consignCo",
                "beId": 11,
                "dDate": 1648569600000,
                "cusId": 27074,
                "useAccessBl": false,
                "id": 33,
                "doctypeId": 0,
                "locked": false,
                "position_ctw": "",
                "lastModifyDate": 1648611135000,
                "createUid": 11,
                "rev": "1",
                "lastApproveUid": 11,
                "ttlCharge": 0,
                "completed": false,
                "expiredUid": 0,
                "descOrigin": "SOLAST",
                "position_en": "SA",
                "position_zh-TW": "",
                "i18nField": "{\"position_en\": \"SA\", \"position_zh-CN\": \"SA\"}",
                "manId": 29,
                "deposit": 0,
                "ttlAmt": 495,
                "position": "SA",
                "flowTypeId": 1384,
                "status": "Y",
                "weightUnit": "kg",
                "tDate": 1648569600000,
                "code": "ITCO220330A",
                "cnDeptId": 30,
                "amt": 495,
                "iRev": 1,
                "upOrigin": "SOLAST",
                "ce01Module": "consignCo",
                "curId": 1,
                "expired": false,
                "rate": 1,
                "measUnit": "cbm",
                "printCount": 0,
                "statusModifyDate": 1648611135000,
                "createDate": 1648611135000,
                "depoRate": 0,
                "loadGpCoData": false,
                "useAccessWl": false,
                "position_ccn": "",
                "ttlDisc": 0,
                "position_haha1": "",
                "cuspono": "",
                "useAccessAutoCalc": false,
                "staffId": 642
            }
        ],
        "consigncot": [
            {
                "sourceId": 0,
                "shipMark": "",
                "dualQty": 5,
                "itemNo": "     1",
                "beId": 11,
                "dDate": 1648569600000,
                "bDesc": "Lot no. can be duplicated",
                "bDesc_zh-TW": "",
                "newLotno": 0,
                "cusDDate": -2209017600000,
                "id": 40,
                "up": 99,
                "ctn": 1,
                "qcRequired": false,
                "dDesc_haha1": "",
                "height": 30,
                "hId": 33,
                "perCtn": 20,
                "completed": false,
                "volume": 0.066,
                "dDesc": "",
                "footerKey": "     1",
                "i18nField": "{\"bDesc_zh-CN\": \"Lot no. can be duplicated\", \"dDesc_zh-CN\": \"\"}",
                "sourceType": "pro",
                "qty": 5,
                "disc": 0,
                "packingDesc": "",
                "refCode": "JW002",
                "lotNoId": 0,
                "dDesc_ctw": "",
                "innerQty": 0,
                "costAmt": 0,
                "amt": 495,
                "nw": 0.135,
                "iRev": 1,
                "dDesc_zh-CN": "",
                "packing": "",
                "packingUnitId": 8,
                "bDesc_ctw": "",
                "ce01Module": "consignCo",
                "lot": "A",
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "domAmt": 495,
                "bDesc_ccn": "",
                "unitId": 40,
                "innerUnitId": 0,
                "dDesc_ccn": "",
                "locId": 0,
                "bDesc_en": "",
                "sourceCliId": 0,
                "length": 58,
                "imgCode": "",
                "dDesc_en": "",
                "dualUnitId": 29,
                "gw": 0.135,
                "sourceLot": "",
                "proId": 26,
                "width": 38,
                "bDesc_zh-CN": "Lot no. can be duplicated"
            }
        ],
        "consignremco": [
            {
                "tradeTerm_ccn": "",
                "shipMark": "",
                "remarks_en": "",
                "tradeTerm": "",
                "premarks": "",
                "shipAd1_en": "10 Wang Street",
                "province": "",
                "packing_haha1": "",
                "tel": "",
                "shipMark_en": "",
                "recipient_haha1": "",
                "id": 32,
                "fax": "+33 05 61 82 99",
                "premarks_zh-CN": "",
                "shipAd1_zh-CN": "10 Wang Street",
                "payTerm": "",
                "heading_zh-TW": "",
                "payTerm_ccn": "",
                "remarks_ccn": "",
                "shipAd4_ccn": "",
                "i18nField": "{\"shipAd1_en\": \"10 Wang Street\", \"shipAd2_en\": \"NanSan\", \"shipAd3_en\": \"ShenZhen\", \"shipAd4_en\": \"China\", \"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"10 Wang Street\", \"shipAd2_zh-CN\": \"NanSan\", \"shipAd3_zh-CN\": \"ShenZhen\", \"shipAd4_zh-CN\": \"China\", \"premarks_zh-CN\": \"\", \"shipMark_zh-CN\": \"\", \"recipient_zh-CN\": \"\", \"tradeTerm_zh-CN\": \"\"}",
                "shipAd4_ctw": "",
                "shipAd3_zh-TW": "",
                "payTerm_ctw": "",
                "remarks_ctw": "",
                "tradeTerm_en": "",
                "city": "",
                "shipMark_ctw": "",
                "payTerm_en": "",
                "iRev": 1,
                "shipAd4_zh-TW": "",
                "shipAd2_ccn": "",
                "ce01Module": "consignCo",
                "shipAd3_en": "ShenZhen",
                "shipAd4_zh-CN": "China",
                "shipAd2_ctw": "",
                "shipAd2_haha1": "",
                "email": "1314@mac.com;",
                "packing_ctw": "",
                "heading_haha1": "",
                "heading": "",
                "premarks_en": "",
                "recipient_ctw": "",
                "tradeTerm_ctw": "",
                "telCountry": "",
                "tradeTerm_haha1": "",
                "shipAd1": "10 Wang Street",
                "shipAd2": "NanSan",
                "shipAd3": "ShenZhen",
                "premarks_zh-TW": "",
                "shipAd4": "China",
                "shipMark_haha1": "",
                "shipAd3_haha1": "",
                "smthId": 1,
                "gpsLong": 0,
                "country": "",
                "heading_en": "",
                "shipMark_zh-CN": "",
                "tradeTerm_zh-CN": "",
                "shipAd4_haha1": "",
                "packing_ccn": "",
                "dest": "",
                "recipient_ccn": "",
                "heading_ccn": "",
                "shipAd2_zh-TW": "",
                "payTerm_zh-TW": "",
                "remarks_zh-TW": "",
                "hId": 33,
                "heading_ctw": "",
                "tradeTerm_zh-TW": "",
                "shipMark_ccn": "",
                "zipcode": "",
                "premarks_haha1": "",
                "shipAd2_en": "NanSan",
                "shipAd1_haha1": "",
                "remarks_zh-CN": "",
                "packing_en": "",
                "gpsLat": 0,
                "payTerm_zh-CN": "",
                "shipMark_zh-TW": "",
                "shipAd1_ccn": "",
                "shipCodeId": 1,
                "shipAd3_ctw": "",
                "recipient_zh-CN": "",
                "packing": "",
                "heading_zh-CN": "",
                "premarks_ccn": "",
                "payTerm_haha1": "",
                "recipient_en": "",
                "packing_zh-TW": "",
                "shipAd3_zh-CN": "ShenZhen",
                "remarks_haha1": "",
                "shipAd1_ctw": "",
                "shipAd3_ccn": "",
                "recipient_zh-TW": "",
                "packing_zh-CN": "",
                "telArea": "",
                "shipAd1_zh-TW": "",
                "shipAd4_en": "China",
                "premarks_ctw": "",
                "recipient": "",
                "shipAd2_zh-CN": "NanSan",
                "remarks": ""
            }
        ]
    },
    "messages": [],
    "status": true
}

# Create Consignment Order

# 一、Description

​ Usage: create or update 【Consignment Order】

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/save/consignCo
HTTP Method PUT
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCo
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/consignCo";
		String param = "&menuCode=consignCo";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

Entity data as JSON format:

{
    "consignmainco": {
        "values": [
            {
                "beId": 11,
                "code": "ITCO220324A",
                "tDate": "2022-03-24",
                "cusId": 27074,
                "curId": 1,
                "rate": 1,
                "flowTypeId": 1384,
                "staffId": 723
            }
        ]
    },
    "consigncot": {
        "values": [
            {
                "sourceType": "pro",
                "proId": 26,
                "unitId": 40,
                "qty": 5,
                "up": 99
            }
        ]
    }
}

​ 4、Response Sample

{
	"recordId": 34,
	"messages": [],
	"status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "Required field is empty",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}

# Create Consignment Order(Auto Completion)

# 一、Description

​ 1. Usage: Create 【Consignment Order】

​ 2. This API has the following characteristics:

​ a. Support using code instead of id field

​ b. If field currency has no value specified, the Entity Currency will be used automatically

​ c. If field staff has no value specified, the default staff in the User Options will be used automatically

​ d. If field document date has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]

​ e. If field business process has no value specified, according to the default value set in [Business Process Setup (Trade)]

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/erp/bsFlow/save/consignCo
HTTP Method POST
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/consignCo";

		HttpPost post = new HttpPost(url);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

Sample data

{
    "beCode": "IT",
    "cusCode": "IT002",
    "consigncot": [
        {
            "proCode": "ITPRO002",
            "unitCode": "PCS",
            "qty": 1,
            "up": 99,
            "amt": 99
        }
    ]
}

​ 4、Response Sample

{
  "tranId": 35,
  "tranCode": "CO2203240004",
  "message": "",
  "status": true
}

# Delete Consignment Order

# 一、Description

​ Usage: Delete Consignment Order

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/delete/consignCo
HTTP Method DELETE
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCo
id long(Query) Yes Consignment Order ID
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/consignCo";
		String param = "&menuCode=consignCo&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、Response Sample

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "Record has been deleted",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# Load EBI data:Consignment Order List

# 一、Description

​ Usage: Run EBI[Consignment Order List],return EBI data

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/ebiWidget/loadReport
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
formatId long(Query) Yes Format ID fetched from another API
beId long(Query) No Business Entity ID,If not specified, query all authorized Business Entity data.
offset int(Query) No Resultset offset : start index
rows int(Query) No Resultset offset : end index

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、Response Sample

{
    "size": 5,
    "rows": [
        {
            "CO_A_ttlAmt": "0.00",
            "CO_A_deposit": "0.00",
            "M18ReservedCol_dataIndex": 1,
            "CO_A_id": "8",
            "CUS_A_desc__lang": "智輝食品貿易有限公司",
            "CO_A_ttlDisc": "0.00",
            "CO_A_tDate": "2017.06.27",
            "CUS_A_id": "27220",
            "CO_A_ttlCharge": "0.00",
            "CO_A_amt": "0.00",
            "CO_A_code": "CO-20176027-0003",
            "CO_A_dDate": "2017.06.27",
            "CUS_A_code": "CN003"
        }
    ]
}

ebi1

# Load EBI data:Consignment Order Report

# 一、Description

​ Usage: Run EBI[Consignment Order Report],return EBI data

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/ebiWidget/loadReport
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
formatId long(Query) Yes Format ID fetched from another API
beId long(Query) No Business Entity ID,If not specified, query all authorized Business Entity data.
offset int(Query) No Resultset offset : start index
rows int(Query) No Resultset offset : end index

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、Response Sample

{
    "size": 5,
    "rows": [
        {
            "F_A_amt": "0.00",
            "M_A_code": "CO-20176027-0003",
            "M18ReservedCol_dataIndex": 1,
            "M_A_tDate": "2017.06.27",
            "CUS_A_id": "27220",
            "F_A_lot": "A",
            "PRO_A_id": "26",
            "F_A_qty": "1.0000",
            "M_A_id": "8",
            "F_A_disc": "0.00",
            "PRO_A_code": "ITPRO002",
            "CUS_A_code": "CN003",
            "F_A_up": "0.0000"
        }
    ]
}

ebi2

# Consignment Delivery

# Fetch Consignment Delivery List

# 一、Description

​ Usage: Fetch Consignment Delivery List.

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/search/search
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
stSearch String(Query) Yes consignCdn
beId long(Query) Yes Business Entity ID
formatId long(Query) No Lookup Query ID, If not specified, the default format is used.
startRow int(Query) No Resultset offset : start index
endRow int(Query) No Resultset offset : end index
quickSearchStr String(Query) No Quick search keyword

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=consignCdn&beId=11";

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、Response Sample

{
  	"stSearch": "consignCdn",
    "size": 4,
    "stSearchDisplay": "Consignment Delivery",
    "values": [
        {
            "code": "ITCDN220331A",
            "tDate": "2022-03-31",
            "consignMaincdn.cusId.cus.code": "IT002",
            "consignMaincdn.cusId.cus.desc__lang": "Joey Wall",
            "consignMaincdn.curId.cur.sym": "¥",
            "consignMaincdn.flowTypeId.flowtype.code": "MX-BS-CONS",
            "consignMaincdn.flowTypeId.flowtype.desc": "Consignment Flow",
            "iRev": 1,
            "lastModifyDate": "2022-03-31 11:53:44",
            "consignMaincdn.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
            "id": 37,
            "st_desc": "ITCDN220331A",
            "st_id": 37,
            "st_code": "ITCDN220331A"
        }
  	]
}

# Load Consignment Delivery

# 一、Description

​ Usage: Load 【Consignment Delivery】Record

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/read/consignCdn
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCdn
id long(Query) Yes Consignment Delivery ID
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/consignCdn";
			String param = "&menuCode=consignCdn&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、Response Sample

{
    "data": {
        "consigncdnt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "shipMark": "",
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "lotnoNumAttr18": 0,
                "lotnoLookupAttr20": 0,
                "asbCurId": 1,
                "lotnoNumAttr13": 0,
                "asbLotNoId": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "lotnoLookupAttr16": 0,
                "alocId": 18,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "asbSourceType": "",
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "",
                "lotnoLookupAttr19": 0,
                "newLotno": 0,
                "lotnoLot": "A",
                "id": 43,
                "ctn": 1,
                "asbLotno": "",
                "asbNewLotno": 0,
                "dDesc_haha1": "",
                "height": 30,
                "perCtn": 20,
                "asbId": 0,
                "lotnoNumAttr20": 0,
                "completed": false,
                "lotnoLookupAttr12": 0,
                "lotnoLookupAttr13": 0,
                "asbQty": 0,
                "lotnoLookupAttr10": 0,
                "lotnoLookupAttr11": 0,
                "i18nField": "{\"bDesc_zh-CN\": \"Lot no. can be duplicated\", \"dDesc_zh-CN\": \"\"}",
                "sourceType": "aso",
                "packingDesc": "",
                "innerQty": 0,
                "costAmt": 0,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "consignCdn",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 40,
                "lotnoDateAttr9": -2209017600000,
                "locId": 15,
                "bDesc_en": "",
                "sourceCliId": 0,
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "asbRate": 1,
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "width": 38,
                "lotnoTextAttr8": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "Lot no. can be duplicated",
                "sourceId": 56,
                "asbCode": "",
                "dualQty": 1,
                "coId": 33,
                "itemNo": "     1",
                "beId": 11,
                "bDesc": "Lot no. can be duplicated",
                "up": 99,
                "asbFlowTypeId": 0,
                "hId": 37,
                "lotnoNumAttr1": 0,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "lotnoNumAttr4": 0,
                "volume": 0.066,
                "lotnoExpDate": 253402271999000,
                "dDesc": "",
                "footerKey": "     1",
                "qty": 1,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "disc": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "refCode": "JW002",
                "lotNoId": 639,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "lotnoTextAttr13": "",
                "amt": 99,
                "nw": 0.135,
                "dDesc_zh-CN": "",
                "packing": "",
                "lotnoTextAttr19": "",
                "packingUnitId": 8,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "domAmt": 99,
                "innerUnitId": 0,
                "dDesc_ccn": "",
                "lotnoTextAttr10": "",
                "coLot": "A",
                "length": 58,
                "dDesc_en": "",
                "dualUnitId": 29,
                "gw": 0.135,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "ITGRN1701000-0001",
                "lotnoLookupAttr9": 0,
                "proId": 26,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "consignmaincdn": [
            {
                "lastModifyUid": 11,
                "useAccess": false,
                "virDeptId": 0,
                "expiredDate": -2209017600000,
                "position_zh-CN": "SA",
                "sysJson": "",
                "viewCode": "consignCdn",
                "beId": 11,
                "alocId": 0,
                "cusId": 27074,
                "useAccessBl": false,
                "id": 37,
                "doctypeId": 0,
                "locked": false,
                "position_ctw": "",
                "lastModifyDate": 1648698824000,
                "createUid": 11,
                "rev": "1",
                "lastApproveUid": 11,
                "ttlCharge": 0,
                "completed": false,
                "expiredUid": 0,
                "descOrigin": "SOLAST",
                "position_en": "",
                "position_zh-TW": "",
                "i18nField": "{\"position_zh-CN\": \"SA\"}",
                "manId": 29,
                "ttlAmt": 99,
                "position": "SA",
                "flowTypeId": 1384,
                "status": "Y",
                "weightUnit": "kg",
                "tDate": 1648656000000,
                "code": "ITCDN220331A",
                "cnDeptId": 29,
                "amt": 99,
                "iRev": 1,
                "upOrigin": "SOLAST",
                "ce01Module": "consignCdn",
                "curId": 1,
                "expired": false,
                "rate": 1,
                "measUnit": "cbm",
                "printCount": 0,
                "statusModifyDate": 1648698824000,
                "locId": 0,
                "createDate": 1648698824000,
                "loadGpCoData": false,
                "useAccessWl": false,
                "position_ccn": "",
                "ttlDisc": 0,
                "position_haha1": "",
                "useAccessAutoCalc": false,
                "staffId": 723
            }
        ],
        "consignremcdn": [
            {
                "tradeTerm_ccn": "",
                "country": "",
                "shipMark": "",
                "heading_en": "",
                "shipMark_zh-CN": "",
                "tradeTerm_zh-CN": "",
                "shipAd4_haha1": "",
                "remarks_en": "",
                "packing_ccn": "",
                "recipient_ccn": "",
                "tradeTerm": "",
                "shipAd2_zh-TW": "",
                "heading_ccn": "",
                "shipAd1_en": "10 Wang Street",
                "payTerm_zh-TW": "",
                "province": "",
                "packing_haha1": "",
                "tel": "",
                "recipient_haha1": "",
                "shipMark_en": "",
                "id": 33,
                "fax": "+33 05 61 82 99",
                "remarks_zh-TW": "",
                "shipAd1_zh-CN": "10 Wang Street",
                "hId": 37,
                "payTerm": "",
                "heading_zh-TW": "",
                "payTerm_ccn": "",
                "remarks_ccn": "",
                "heading_ctw": "",
                "tradeTerm_zh-TW": "",
                "shipMark_ccn": "",
                "shipAd4_ccn": "",
                "zipcode": "",
                "shipAd2_en": "NanSan",
                "shipAd1_haha1": "",
                "i18nField": "{\"shipAd1_en\": \"10 Wang Street\", \"shipAd2_en\": \"NanSan\", \"shipAd3_en\": \"ShenZhen\", \"shipAd4_en\": \"China\", \"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"10 Wang Street\", \"shipAd2_zh-CN\": \"NanSan\", \"shipAd3_zh-CN\": \"ShenZhen\", \"shipAd4_zh-CN\": \"China\", \"shipMark_zh-CN\": \"\", \"recipient_zh-CN\": \"\", \"tradeTerm_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "shipAd4_ctw": "",
                "packing_en": "",
                "gpsLat": 0,
                "shipAd3_zh-TW": "",
                "payTerm_zh-CN": "",
                "payTerm_ctw": "",
                "shipMark_zh-TW": "",
                "remarks_ctw": "",
                "shipAd1_ccn": "",
                "tradeTerm_en": "",
                "shipCodeId": 1,
                "city": "",
                "shipMark_ctw": "",
                "shipAd3_ctw": "",
                "recipient_zh-CN": "",
                "payTerm_en": "",
                "iRev": 1,
                "shipAd4_zh-TW": "",
                "packing": "",
                "shipAd2_ccn": "",
                "heading_zh-CN": "",
                "ce01Module": "consignCdn",
                "payTerm_haha1": "",
                "shipAd3_en": "ShenZhen",
                "recipient_en": "",
                "packing_zh-TW": "",
                "shipAd3_zh-CN": "ShenZhen",
                "shipAd4_zh-CN": "China",
                "shipAd2_ctw": "",
                "shipAd2_haha1": "",
                "shipAd1_ctw": "",
                "remarks_haha1": "",
                "email": "1314@mac.com;",
                "shipAd3_ccn": "",
                "recipient_zh-TW": "",
                "packing_ctw": "",
                "heading_haha1": "",
                "heading": "",
                "recipient_ctw": "",
                "tradeTerm_ctw": "",
                "packing_zh-CN": "",
                "telCountry": "",
                "tradeTerm_haha1": "",
                "shipAd1": "10 Wang Street",
                "shipAd2": "NanSan",
                "shipAd3": "ShenZhen",
                "shipAd4": "China",
                "telArea": "",
                "shipAd1_zh-TW": "",
                "shipAd4_en": "China",
                "recipient": "",
                "shipAd2_zh-CN": "NanSan",
                "shipAd3_haha1": "",
                "shipMark_haha1": "",
                "remarks": "",
                "gpsLong": 0
            }
        ]
    },
    "messages": [],
    "status": true
}

# Create Consignment Delivery

# 一、Description

​ Usage: create or update 【Consignment Delivery】

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/save/consignCdn
HTTP Method PUT
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCdn
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/consignCdn";
		String param = "&menuCode=consignCdn";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity data as JSON format:

{
    "consignmaincdn": {
        "values": [
            {
                "beId": 11,
                "code": "ITCDN220325A",
                "tDate": "2022-03-25",
                "cusId": 27074,
                "curId": 1,
                "rate": 1,
                "flowTypeId": 1384,
                "staffId": 723
            }
        ]
    },
    "consigncdnt": {
        "values": [
            {
                "sourceType": "aso",
                "sourceId": 56,
                "sourceLot": "A",
                "proId": 26,
                "unitId": 40,
                "locId": 15,
                "alocId": 18,
                "qty": 1,
                "up": 10,
                "amt": 10
            }
        ]
    }
}

​ 4、Response Sample

{
	"recordId": 38,
	"messages": [],
	"status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "Required field is empty",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}

# Create Consignment Delivery(Auto Completion)

# 一、Description

​ 1. Usage: Create 【Consignment Delivery】

​ 2. This API has the following characteristics:

​ a. Support using code instead of id field

​ b. If field currency has no value specified, the Entity Currency will be used automatically

​ c. If field staff has no value specified, the default staff in the User Options will be used automatically

​ d. If field document date has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]

​ e. If field business process has no value specified, according to the default value set in [Business Process Setup (Trade)]

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/erp/bsFlow/save/consignCdn
HTTP Method POST
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/consignCdn";

		HttpPost post = new HttpPost(url);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

Sample data

{
    "beCode": "IT",
    "cusCode": "IT002",
    "consigncdnt": [
        {
            "proCode": "ITPRO002",
            "unitCode": "PCS",
            "qty": 1,
            "locCode": "ACLL",
            "alocCode": "CONSIGNIN",
            "up": 10,
            "amt": 10
        }
    ]
}

​ 4、Response Sample

{
  "tranId": 39,
  "tranCode": "CDN0220003",
  "message": "",
  "status": true
}

# Delete Consignment Delivery

# 一、Description

​ Usage: Delete Consignment Delivery

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/delete/consignCdn
HTTP Method DELETE
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCdn
id long(Query) Yes Consignment Delivery ID
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/consignCdn";
		String param = "&menuCode=consignCdn&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、Response Sample

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "Record has been deleted",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# Load EBI data:Consignment Delivery List

# 一、Description

​ Usage: Run EBI[Consignment Delivery List],return EBI data

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/ebiWidget/loadReport
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
formatId long(Query) Yes Format ID fetched from another API
beId long(Query) No Business Entity ID,If not specified, query all authorized Business Entity data.
offset int(Query) No Resultset offset : start index
rows int(Query) No Resultset offset : end index

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、Response Sample

{
    "size": 15,
    "rows": [
        {
            "M_A_code": "MXCDN170321-01",
            "M_A_ttlDisc": "0.00",
            "M_A_amt": "123,500.00",
            "M18ReservedCol_dataIndex": 1,
            "CUS_A_desc__lang": "Consignment Customer",
            "M_A_tDate": "2017.03.21",
            "CUS_A_id": "27095",
            "LOC_A_id": "126",
            "ALOC_A_id": "127",
            "M_A_ttlAmt": "123,500.00",
            "LOC_A_code": "MLOC",
            "M_A_id": "9",
            "ALOC_A_code": "MCONS",
            "CUS_A_code": "CC",
            "M_A_ttlCharge": "0.00"
        }
    ]
}

ebi1

# Load EBI data:Consignment Delivery Report

# 一、Description

​ Usage: Run EBI[Consignment Delivery Report],return EBI data

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/ebiWidget/loadReport
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
formatId long(Query) Yes Format ID fetched from another API
beId long(Query) No Business Entity ID,If not specified, query all authorized Business Entity data.
offset int(Query) No Resultset offset : start index
rows int(Query) No Resultset offset : end index

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、Response Sample

{
    "size": 4,
    "rows": [
        {
            "M_A_code": "ITCDN20200528A",
            "M18ReservedCol_dataIndex": 1,
            "FOOTERLOC_A_id": "15",
            "CUS_A_desc__lang": "Joey Wall",
            "FOOTERALOC_A_code": "CONSIGNIN",
            "CUS_A_id": "27074",
            "FOOTERLOC_A_code": "ACLL",
            "PRO_A_id": "18",
            "F_A_qty": "0.2000",
            "LOTNO_A_lotno": "AN0120160919-ITPROB",
            "M_A_id": "31",
            "FOOTERALOC_A_id": "18",
            "F_A_unitId_code": "个",
            "PRO_A_code": "ITPRO001",
            "CUS_A_code": "IT002"
        }
    ]
}

ebi2

# Consignment Return

# Fetch Consignment Return List

# 一、Description

​ Usage: Fetch Consignment Return List.

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/search/search
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
stSearch String(Query) Yes consignCsr
beId long(Query) Yes Business Entity ID
formatId long(Query) No Lookup Query ID, If not specified, the default format is used.
startRow int(Query) No Resultset offset : start index
endRow int(Query) No Resultset offset : end index
quickSearchStr String(Query) No Quick search keyword

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=consignCsr&beId=11";

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、Response Sample

{
  	"stSearch": "consignCsr",
    "size": 4,
    "stSearchDisplay": "Consignment Return",
    "values": [
        {
            "code": "ITCSR220228A",
            "tDate": "2022-02-28",
            "consignMaincsr.cusId.cus.code": "IT002",
            "consignMaincsr.cusId.cus.desc__lang": "Joey Wall",
            "consignMaincsr.curId.cur.sym": "¥",
            "consignMaincsr.flowTypeId.flowtype.code": "IT-BS-001",
            "consignMaincsr.flowTypeId.flowtype.desc": "SO -> PO -> GRN",
            "iRev": 1,
            "lastModifyDate": "2022-02-28 12:06:52",
            "consignMaincsr.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
            "id": 19,
            "st_desc": "ITCSR220228A",
            "st_id": 19,
            "st_code": "ITCSR220228A"
        }
  	]
}

# Load Consignment Return

# 一、Description

​ Usage: Load 【Consignment Return】Record

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/read/consignCsr
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCsr
id long(Query) Yes Consignment Return ID
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/consignCsr";
			String param = "&menuCode=consignCsr&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、Response Sample

{
    "data": {
        "consignremcsr": [
            {
                "country": "CN",
                "heading_en": "<p>heading</p>",
                "shipAd4_haha1": "",
                "remarks_en": "<p>remarks</p>",
                "recipient_ccn": "",
                "shipAd2_zh-TW": "",
                "heading_ccn": "",
                "shipAd1_en": "10 Wang Street",
                "province": "Zhe Jiang",
                "tel": "5862472",
                "recipient_haha1": "",
                "id": 19,
                "fax": "+33 05 61 82 99",
                "remarks_zh-TW": "",
                "shipAd1_zh-CN": "",
                "hId": 19,
                "heading_zh-TW": "",
                "remarks_ccn": "",
                "heading_ctw": "",
                "shipAd4_ccn": "",
                "zipcode": "21463",
                "shipAd2_en": "NanSan",
                "shipAd1_haha1": "",
                "i18nField": "{\"heading_en\": \"<p>heading</p>\", \"remarks_en\": \"<p>remarks</p>\", \"shipAd1_en\": \"10 Wang Street\", \"shipAd2_en\": \"NanSan\", \"shipAd3_en\": \"ShenZhen\", \"shipAd4_en\": \"China\", \"heading_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"\", \"shipAd2_zh-CN\": \"\", \"shipAd3_zh-CN\": \"\", \"shipAd4_zh-CN\": \"\", \"recipient_zh-CN\": \"Kiki Hui\"}",
                "remarks_zh-CN": "",
                "shipAd4_ctw": "",
                "gpsLat": 22.48197,
                "shipAd3_zh-TW": "",
                "remarks_ctw": "",
                "shipAd1_ccn": "",
                "shipCodeId": 1,
                "city": "Jia Xing",
                "shipAd3_ctw": "",
                "recipient_zh-CN": "Kiki Hui",
                "iRev": 1,
                "shipAd4_zh-TW": "",
                "shipAd2_ccn": "",
                "heading_zh-CN": "",
                "ce01Module": "consignCsr",
                "shipAd3_en": "ShenZhen",
                "recipient_en": "",
                "shipAd3_zh-CN": "",
                "shipAd4_zh-CN": "",
                "shipAd2_ctw": "",
                "shipAd2_haha1": "",
                "shipAd1_ctw": "",
                "remarks_haha1": "",
                "email": "1314@mac.com;",
                "shipAd3_ccn": "",
                "recipient_zh-TW": "",
                "heading_haha1": "",
                "heading": "",
                "recipient_ctw": "",
                "telCountry": "86",
                "shipAd1": "",
                "shipAd2": "",
                "shipAd3": "",
                "shipAd4": "",
                "telArea": "035",
                "shipAd1_zh-TW": "",
                "shipAd4_en": "China",
                "recipient": "Kiki Hui",
                "shipAd2_zh-CN": "",
                "shipAd3_haha1": "",
                "remarks": "",
                "gpsLong": 113.95353
            }
        ],
        "consigncsrt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "shipMark": "",
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "lotnoNumAttr18": 0,
                "lotnoLookupAttr20": 0,
                "lotnoNumAttr13": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "lotnoLookupAttr16": 0,
                "alocId": 15,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "Ivan Testing Product(繁体)",
                "lotnoLookupAttr19": 0,
                "newLotno": 0,
                "lotnoLot": "A",
                "id": 27,
                "dDesc_haha1": "",
                "lotnoNumAttr20": 0,
                "completed": false,
                "lotnoLookupAttr12": 0,
                "lotnoLookupAttr13": 0,
                "lotnoLookupAttr10": 0,
                "lotnoLookupAttr11": 0,
                "i18nField": "{\"bDesc_en\": \"Ivan Testing Product\", \"dDesc_en\": \"<p>Ivan Testing Product(繁体)<br></p>\", \"bDesc_zh-CN\": \"Ivan Testing Product(简体)\", \"bDesc_zh-TW\": \"Ivan Testing Product(繁体)\", \"dDesc_zh-CN\": \"<p>Ivan Testing Product(简体)<br></p>\", \"dDesc_zh-TW\": \"<p>Ivan Testing Product(繁体)<br></p>\"}",
                "sourceType": "consignCdn",
                "costAmt": 0,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "consignCsr",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 24,
                "lotnoDateAttr9": -2209017600000,
                "locId": 18,
                "bDesc_en": "Ivan Testing Product",
                "sourceCliId": 27074,
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "lotnoTextAttr8": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "Ivan Testing Product(简体)",
                "sourceId": 31,
                "dualQty": 0,
                "coId": 0,
                "itemNo": "     1",
                "beId": 11,
                "bDesc": "Ivan Testing Product(简体)",
                "up": 18.88,
                "hId": 19,
                "lotnoNumAttr1": 0,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "reDeliveryId": 0,
                "lotnoNumAttr4": 0,
                "lotnoExpDate": 253402271999000,
                "dDesc": "<p>Ivan Testing Product(简体)<br></p>",
                "footerKey": "     1",
                "qty": 0.2,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "disc": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "refCode": "JW001",
                "lotNoId": 270,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "reDeliveryType": "",
                "lotnoTextAttr13": "",
                "amt": 3.78,
                "dDesc_zh-CN": "<p>Ivan Testing Product(简体)<br></p>",
                "lotnoTextAttr19": "",
                "bDesc_haha1": "",
                "reDeliveryLot": "",
                "dDesc_zh-TW": "<p>Ivan Testing Product(繁体)<br></p>",
                "domAmt": 3.78,
                "dDesc_ccn": "",
                "lotnoTextAttr10": "",
                "coLot": "",
                "reDelivery": false,
                "dDesc_en": "<p>Ivan Testing Product(繁体)<br></p>",
                "dualUnitId": 6,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "AN0120160919-ITPROB",
                "lotnoLookupAttr9": 0,
                "proId": 18,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "consignmaincsr": [
            {
                "lastModifyUid": 11,
                "useAccess": false,
                "virDeptId": 0,
                "expiredDate": -2209017600000,
                "position_zh-CN": "SA",
                "sysJson": "",
                "viewCode": "consignCsr",
                "beId": 11,
                "alocId": 15,
                "cusId": 27074,
                "useAccessBl": false,
                "id": 19,
                "doctypeId": 0,
                "locked": false,
                "position_ctw": "",
                "lastModifyDate": 1646021212000,
                "createUid": 11,
                "rev": "1",
                "lastApproveUid": 11,
                "ttlCharge": 0,
                "completed": false,
                "expiredUid": 0,
                "descOrigin": "PRO",
                "position_en": "",
                "position_zh-TW": "",
                "i18nField": "{\"position_zh-CN\": \"SA\"}",
                "manId": 29,
                "ttlAmt": 3.78,
                "position": "SA",
                "flowTypeId": 1354,
                "status": "Y",
                "weightUnit": "kg",
                "tDate": 1645977600000,
                "code": "ITCSR220228A",
                "cnDeptId": 30,
                "amt": 3.78,
                "iRev": 1,
                "upOrigin": "PRO",
                "ce01Module": "consignCsr",
                "curId": 1,
                "expired": false,
                "rate": 1,
                "measUnit": "cbm",
                "printCount": 0,
                "statusModifyDate": 1646021212000,
                "locId": 18,
                "createDate": 1646021212000,
                "loadGpCoData": false,
                "useAccessWl": false,
                "position_ccn": "",
                "ttlDisc": 0,
                "position_haha1": "",
                "useAccessAutoCalc": false,
                "staffId": 642
            }
        ]
    },
    "messages": [],
    "status": true
}

# Create Consignment Return

# 一、Description

​ Usage: create or update 【Consignment Return】

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/save/consignCsr
HTTP Method PUT
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCsr
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/consignCsr";
		String param = "&menuCode=consignCsr";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity data as JSON format:

 {
    "consignmaincsr": {
        "values": [
            {
                "beId": 11,
                "code": "ITCSR220325A",
                "tDate": "2022-03-25",
                "cusId": 27074,
                "curId": 1,
                "rate": 1,
                "flowTypeId": 1384,
                "staffId": 723
            }
        ]
    },
    "consigncsrt": {
        "values": [
            {
                "sourceType": "consignCdn",
                "sourceId": 31,
                "sourceLot": "A",
                "proId": 26,
                "locId": 18,
                "alocId": 15,
                "lotNoId": 270,
                "unitId": 40,
                "qty": 1
            }
        ]
    }
}

​ 4、Response Sample

{
	"recordId": 21,
	"messages": [],
	"status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "Required field is empty",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}

# Create Consignment Return (Auto Completion)

# 一、Description

​ 1. Usage: Create 【Consignment Return】

​ 2. This API has the following characteristics:

​ ​ a. Support using code instead of id field

​ ​ b. If field currency has no value specified, the Entity Currency will be used automatically

​ ​ c. If field staff has no value specified, the default staff in the User Options will be used automatically

​ ​ d. If field document date has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]

​ ​ e. If field business process has no value specified, according to the default value set in [Business Process Setup (Trade)]

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/erp/bsFlow/save/consignCsr
HTTP Method POST
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/consignCsr";

		HttpPost post = new HttpPost(url);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

Sample data

{
    "beCode": "IT",
    "cusCode": "IT002",
    "consigncsrt": [
        {
            "sourceType": "consignCdn",
            "sourceCode": "ITCDN20200528A",
            "sourceLot": "A",
            "proCode": "ITPRO002",
            "unitCode": "PCS",
            "alocCode": "ACLL",
            "locCode": "CONSIGNIN",
            "lotno": "AN0120160919-ITPROB",
            "qty": 1
        }
    ]
}

​ 4、Response Sample

{
  "tranId": 22,
  "tranCode": "CSR220001",
  "message": "",
  "status": true
}

# Delete Consignment Return

# 一、Description

​ Usage: Delete Consignment Return

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/root/api/delete/consignCsr
HTTP Method DELETE
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
menuCode String(Query) Yes consignCsr
id long(Query) Yes Consignment Return ID
param String(Query) No Extra Pamameters: in JSON format

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/consignCsr";
		String param = "&menuCode=consignCsr&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、Response Sample

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "Record has been deleted",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# Load EBI data:Consignment Return List

# 一、Description

​ Usage: Run EBI[Consignment Return List],return EBI data

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/ebiWidget/loadReport
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
formatId long(Query) Yes Format ID fetched from another API
beId long(Query) No Business Entity ID,If not specified, query all authorized Business Entity data.
offset int(Query) No Resultset offset : start index
rows int(Query) No Resultset offset : end index

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、Response Sample

{
    "size": 7,
    "rows": [
        {
            "M_A_code": "CSR-20170321-0001",
            "M_A_amt": "61,750.00",
            "STAFF_A_desc__lang": "Polly Chan",
            "M18ReservedCol_dataIndex": 1,
            "M_A_tDate": "2017.03.21",
            "CUS_A_id": "27095",
            "LOC_A_id": "127",
            "ALOC_A_id": "126",
            "M_A_ttlAmt": "61,750.00",
            "LOC_A_code": "MCONS",
            "M_A_id": "8",
            "ALOC_A_code": "MLOC",
            "CUS_A_code": "CC"
        }
    ]
}

ebi1

# Load EBI data:Consignment Return Report

# 一、Description

​ Usage: Run EBI[Consignment Return Report],return EBI data

# 二、API Detail

​ 1、Request URL

URL http://[server]/jsf/rfws/ebiWidget/loadReport
HTTP Method GET
Encode UTF-8

​ 2、URL Parameters

Parameter Type Required Remarks
authorization String(Header) Yes Access Token obtained via Oauth2
client_id String(Header) Yes Client ID from [OAuth Applications], generated by the M18
formatId long(Query) Yes Format ID fetched from another API
beId long(Query) No Business Entity ID,If not specified, query all authorized Business Entity data.
offset int(Query) No Resultset offset : start index
rows int(Query) No Resultset offset : end index

​ 3、Request Sample

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、Response Sample

{
    "size": 10,
    "rows": [
        {
            "M_A_code": "CSR-20180726-0001",
            "M18ReservedCol_dataIndex": 1,
            "FOOTERLOC_A_id": "122",
            "FOOTERALOC_A_code": "ACLL",
            "M_A_tDate": "2018.07.26",
            "CUS_A_id": "1",
            "FOOTERLOC_A_code": "961",
            "PRO_A_id": "1",
            "F_A_qty": "1.0000",
            "M_A_id": "15",
            "F_A_unitId_code": "个",
            "FOOTERALOC_A_id": "15",
            "LOTCOST_A_lotno": "N/A",
            "PRO_A_code": "SM-BOM-PROA",
            "CUS_A_code": "C0001A"
        }
    ]
}

ebi2