schm-inbound-sap-eapi
home
schm-inbound-sap-eapi
API Description: Document upload interface
DEV Environment URL: https://schm-api-dev.shiseido.cn/schm-inbound-sap-eapi/api/v1
UAT Environment URL: https://schm-api-test.shiseido.cn/schm-inbound-sap-eapi/api/v1
PROD Environment URL: https://schm-api.shiseido.cn/schm-inbound-sap-eapi/api/v1
1.Authentication
All request headers must include the following key-value parameters as authentication information. You need to contact the administrator to obtain these details.
client_id: fa98****3452
client_secret: 108b****41f2
notice:
Authentication for production and test environments is different, in the production environment, you need to use the previously registered account. After logging in, click the corresponding application to go online, and then the client_id and client_secret used in production will appear.
2.Check connectivity:
You can run the curl command or the interface tool to call /healthCheck to check the interface connectivity. If the interface succeeds, ok is returned. The check address is as follows:
DEV Environment URL: https://schm-api-dev.shiseido.cn/schm-inbound-sap-eapi/healthCheck
UAT Environment URL: https://schm-api-test.shiseido.cn/schm-inbound-sap-eapi/healthCheck
PROD Environment URL: https://schm-api.shiseido.cn/schm-inbound-sap-eapi/healthCheck
3.API Overview:
Endpoint | Description |
---|---|
/inbound/oms | ToC sales order details uploaded |
/inbound/pos | ToB business documents are uploaded |
/inbound/purchase | ToB purchase documents upload |
/inbound/inprogress | ToC in progress sales order upload (for reconciliation) |
/inbound/revise | ToC Amount adjustment sheet upload (for reconciliation) |
/inbound/coupoChargePlatform | POS transmits the debit and credit payment method of the reconciliation platform |
/businessSubtbl/update | POS return to direct store arrival status |
The complete API endpoint is constructed by appending the endpoint path to the corresponding environment URL, for example:
https://schm-api-test.shiseido.cn/schm-inbound-sap-eapi/api/v1/inbound/oms
4.API Call Details
4.1 ToC sales order details uploaded
Endpoint: /inbound/oms
API Description: ToC sales order details uploaded
Request Method: HTTP POST
4.1.1 Request Parameters
Field Description | Field Name | Type | Length | Required | Notes |
---|---|---|---|---|---|
Company Code | COMPANYCD | VARCHAR | 3 | Yes | |
Document Application No./OMS Outbound No. | APPLYNO | VARCHAR | 35 | Yes | |
Order Type | APPLYTYPE | VARCHAR | 4 | Yes | 20: Store Sales, 21: Store Returns, 30: Free Sales Order, 31: Free Order Returns |
Order Application Date/OMS Outbound Date | APPLYYMD | VARCHAR | 10 | Yes | |
Store Code | CUSTOMERCD | VARCHAR | 10 | Yes | |
ShipTo Code | SAP_CUSTOMERCD | VARCHAR | 10 | ||
Customer Classification | SALEPATN | VARCHAR | 2 | Yes | K1: Distributor Store, K2: Consignment Store, FS: Direct Store |
Order Reason | REASONCD | VARCHAR | 3 | ||
POS Category | CustomerGroup1 | VARCHAR | 4 | Yes | "Z201: SMILE POS, Z202: PS POS, Z203: E-ORDER, Z204: CS POS, Z205: SCHD, Z206: Others, Z207: OMS, Z208: ONECX" |
Promotion Events | PromotionEvents | VARCHAR | 35 | ||
Text/OMS Platform Order No. | TXT_FormHeader | VARCHAR | 200 | ||
Text/OMS Payment Date | TXT_HeaderNote | VARCHAR | 200 | ||
Cost Center | CostCenter | VARCHAR | 10 | ||
Decision Case Number | imw_matter_number | VARCHAR | 20 | ||
Applicant Employee Code | EMPCODE | VARCHAR | 20 | ||
Applicant Employee Name | EMPNAME | VARCHAR | 20 | ||
Order Source | orderSource | VARCHAR | 500 | ||
Brand Code | brandCode | VARCHAR | 500 | ||
Sales Platform | channelCode | VARCHAR | 500 | ||
Order Type | orderType | INT | |||
Order Status | orderStatus | VARCHAR | 500 | ||
Payment Method | payType | VARCHAR | 500 | ||
Payment Status | payStatus | INT | |||
Inbound/Outbound Status | shippedStatus | INT | |||
Member Identifier | memberId | VARCHAR | 500 | ||
Shop Name | shopName | VARCHAR | 500 | ||
Source Platform Order No. | parentPayCode | VARCHAR | 500 | ||
Order Creation Time | orderTime | VARCHAR | 500 | ||
Payment Time | payTime | VARCHAR | 500 | ||
Amount Payable | amount | VARCHAR | 500 | ||
Revised Amount | reviseAmount | VARCHAR | 500 | ||
Sales Order Line Item | POSEX | VARCHAR | 6 | Yes | |
Material Determination Code | DETERMINECODE | VARCHAR | 13 | Yes | |
Factory | PLANT | VARCHAR | 8 | ||
Storage Location Code | LGORT | VARCHAR | 8 | ||
Order Quantity | APPLYQNTY | INT | Yes | ||
Sales Amount | actualMNY | number | 11 | ||
Free Goods Indicator | Freegoods | CHAR | 1 | ||
Batch Number | CHARG | VARCHAR | 10 | ||
Purpose | USECODE | CHAR | 3 | ||
Decision Case Number | DecisionNo | VARCHAR | 20 | ||
Material Code | prdCode | VARCHAR | 500 | ||
Product Name | prdName | VARCHAR | 500 | ||
Delivery Time | shippedTime | VARCHAR | 500 | ||
Timestamp (Current Time) | Timestamp | datetime | 20 | Yes | Same timestamp for a single order, e.g., 2024-07-14 16:48:30.710 |
Peripheral Identifier | SysFlg | CHAR | 1 | "Converted by Mule assigned Client ID: 1-POS, 2-SCHD, 3-E-order, 4-Shopex, 5-UCO, 6-LeQee, 7-Decision, 8-Procurement" | |
Disable Minimum Order Quantity Indicator | SDABWFLG | CHAR | 1 | "1: Disable Minimum Order Quantity, 0 or blank: Enable" | |
Summary Number | DailySummaryNo | VARCHAR | 35 | ||
Document Type | documentType | VARCHAR | 35 | 0: Default, 1: Split Order, 2: Consolidated Order | |
Platform Sales Order No. | TXT_FormDetail | VARCHAR | 35 | ||
Presale Flag | PresaleFlag | VARCHAR | 1 | 0: Regular Sale, 1: Presale, 2: Presale Pickup, 3: Group Purchase Coupon Purchase, 4: Group Purchase Coupon Pickup | |
Presale Transaction Number | PresaleTradeNo | VARCHAR | 500 | ||
BC code | BCCode | VARCHAR | 10 |
4.1.2 Request parameter example
notice: Each call passes a single piece of data, generating multiple pieces of data by item level, for example, if there are multiple item levels in the order, multiple items are generated by item level
[
{
"COMPANYCD": "785",
"APPLYNO": "QTC1024071001267002913",
"APPLYTYPE": "30",
"APPLYYMD": "20240722",
"CUSTOMERCD": "2200004135",
"SAP_CUSTOMERCD": "2200004135",
"SALEPATN": "FS",
"REASONCD": "568",
"CustomerGroup1": "Z207",
"PromotionEvents": "",
"TXT_FormHeader": "QTC1024071001267002913",
"TXT_HeaderNote": "20240722",
"CostCenter": "",
"imw_matter_number": "",
"EMPCODE": "",
"EMPNAME": "",
"orderSource": "乐其",
"brandCode": "TG",
"channelCode": "tmall",
"orderType": 3,
"orderStatus": "1",
"payType": "none",
"payStatus": 0,
"shippedStatus": 2,
"memberId": "",
"shopName": "TG天猫官方旗舰店",
"parentPayCode": "QTC1024071001267002913",
"orderTime": "2024-07-22 09:52:20",
"payTime": "",
"amount": "0",
"reviseAmount": "0",
"POSEX": "10",
"DETERMINECODE": "74381688801",
"PLANT": "785A",
"LGORT": "W001",
"APPLYQNTY": 140,
"actualMNY": 0.00,
"Freegoods": "",
"CHARG": "",
"USECODE": "",
"DecisionNo": "0000164547",
"prdCode": "74381688801",
"prdName": "THE GINZa 2108 EC 快递外箱 纸箱(官网)",
"shippedTime": "2024-07-22 09:52:20",
"TXT_FormDetail": "QTC1024071001267002913"
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "",
"SDABWFLG": "",
"DailySummaryNo": "",
"documentType": ""
},
{
"COMPANYCD": "785",
"APPLYNO": "QTC1024071001267002913",
"APPLYTYPE": "30",
"APPLYYMD": "20240722",
"CUSTOMERCD": "2200004135",
"SAP_CUSTOMERCD": "2200004135",
"SALEPATN": "FS",
"REASONCD": "568",
"CustomerGroup1": "Z207",
"PromotionEvents": "",
"TXT_FormHeader": "QTC1024071001267002913",
"TXT_HeaderNote": "20240722",
"CostCenter": "",
"imw_matter_number": "",
"EMPCODE": "",
"EMPNAME": "",
"orderSource": "乐其",
"brandCode": "TG",
"channelCode": "tmall",
"orderType": 3,
"orderStatus": "1",
"payType": "none",
"payStatus": 0,
"shippedStatus": 2,
"memberId": "",
"shopName": "TG天猫官方旗舰店",
"parentPayCode": "QTC1024071001267002913",
"orderTime": "2024-07-22 09:52:20",
"payTime": "",
"amount": "0",
"reviseAmount": "0",
"POSEX": "20",
"DETERMINECODE": "74381714801",
"PLANT": "785A",
"LGORT": "W001",
"APPLYQNTY": 53,
"actualMNY": 0.00,
"Freegoods": "",
"CHARG": "",
"USECODE": "",
"DecisionNo": "0000164547",
"prdCode": "74381714801",
"prdName": "THE GINZa 2108 EC 外箱封箱胶带 封箱带(官网)",
"shippedTime": "2024-07-22 09:52:20",
"TXT_FormDetail": "QTC1024071001267002913",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "",
"SDABWFLG": "",
"DailySummaryNo": "",
"documentType": ""
},
{
"COMPANYCD": "785",
"APPLYNO": "QTC1024071001267002913",
"APPLYTYPE": "30",
"APPLYYMD": "20240722",
"CUSTOMERCD": "2200004135",
"SAP_CUSTOMERCD": "2200004135",
"SALEPATN": "FS",
"REASONCD": "568",
"CustomerGroup1": "Z207",
"PromotionEvents": "",
"TXT_FormHeader": "QTC1024071001267002913",
"TXT_HeaderNote": "20240722",
"CostCenter": "",
"imw_matter_number": "",
"EMPCODE": "",
"EMPNAME": "",
"orderSource": "乐其",
"brandCode": "TG",
"channelCode": "tmall",
"orderType": 3,
"orderStatus": "1",
"payType": "none",
"payStatus": 0,
"shippedStatus": 2,
"memberId": "",
"shopName": "TG天猫官方旗舰店",
"parentPayCode": "QTC1024071001267002913",
"orderTime": "2024-07-22 09:52:20",
"payTime": "",
"amount": "0",
"reviseAmount": "0",
"POSEX": "30",
"DETERMINECODE": "74380655801",
"PLANT": "785A",
"LGORT": "W001",
"APPLYQNTY": 1193,
"actualMNY": 0.00,
"Freegoods": "",
"CHARG": "",
"USECODE": "",
"DecisionNo": "0000164547",
"prdCode": "74380655801",
"prdName": "THE GINZa 2104 TG BH2021 雪梨纸 包装纸(全渠道)",
"shippedTime": "2024-07-22 09:52:20",
"TXT_FormDetail": "QTC1024071001267002913",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "",
"SDABWFLG": "",
"DailySummaryNo": "",
"documentType": ""
},
{
"COMPANYCD": "785",
"APPLYNO": "QTC1024071001267002913",
"APPLYTYPE": "30",
"APPLYYMD": "20240722",
"CUSTOMERCD": "2200004135",
"SAP_CUSTOMERCD": "2200004135",
"SALEPATN": "FS",
"REASONCD": "568",
"CustomerGroup1": "Z207",
"PromotionEvents": "",
"TXT_FormHeader": "QTC1024071001267002913",
"TXT_HeaderNote": "20240722",
"CostCenter": "",
"imw_matter_number": "",
"EMPCODE": "",
"EMPNAME": "",
"orderSource": "乐其",
"brandCode": "TG",
"channelCode": "tmall",
"orderType": 3,
"orderStatus": "1",
"payType": "none",
"payStatus": 0,
"shippedStatus": 2,
"memberId": "",
"shopName": "TG天猫官方旗舰店",
"parentPayCode": "QTC1024071001267002913",
"orderTime": "2024-07-22 09:52:20",
"payTime": "",
"amount": "0",
"reviseAmount": "0",
"POSEX": "40",
"DETERMINECODE": "74380729801",
"PLANT": "785A",
"LGORT": "W001",
"APPLYQNTY": 2160,
"actualMNY": 0.00,
"Freegoods": "",
"CHARG": "",
"USECODE": "",
"DecisionNo": "0000164547",
"prdCode": "74380729801",
"prdName": "THE GINZa 2104 TG BH2021 logo贴 标签贴(全渠道)",
"shippedTime": "2024-07-22 09:52:20",
"TXT_FormDetail": "QTC1024071001267002913",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "",
"SDABWFLG": "",
"DailySummaryNo": "",
"documentType": ""
},
{
"COMPANYCD": "785",
"APPLYNO": "QTC1024071001267002913",
"APPLYTYPE": "30",
"APPLYYMD": "20240722",
"CUSTOMERCD": "2200004135",
"SAP_CUSTOMERCD": "2200004135",
"SALEPATN": "FS",
"REASONCD": "568",
"CustomerGroup1": "Z207",
"PromotionEvents": "",
"TXT_FormHeader": "QTC1024071001267002913",
"TXT_HeaderNote": "20240722",
"CostCenter": "",
"imw_matter_number": "",
"EMPCODE": "",
"EMPNAME": "",
"orderSource": "乐其",
"brandCode": "TG",
"channelCode": "tmall",
"orderType": 3,
"orderStatus": "1",
"payType": "none",
"payStatus": 0,
"shippedStatus": 2,
"memberId": "",
"shopName": "TG天猫官方旗舰店",
"parentPayCode": "QTC1024071001267002913",
"orderTime": "2024-07-22 09:52:20",
"payTime": "",
"amount": "0",
"reviseAmount": "0",
"POSEX": "50",
"DETERMINECODE": "74380790801",
"PLANT": "785A",
"LGORT": "W001",
"APPLYQNTY": 598,
"actualMNY": 0.00,
"Freegoods": "",
"CHARG": "",
"USECODE": "",
"DecisionNo": "0000164547",
"prdCode": "74380790801",
"prdName": "THE GINZa 2106 TG BH2021 拉菲草 纸丝(全渠道)",
"shippedTime": "2024-07-22 09:52:20",
"TXT_FormDetail": "QTC1024071001267002913",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "",
"SDABWFLG": "",
"DailySummaryNo": "",
"documentType": ""
},
{
"COMPANYCD": "785",
"APPLYNO": "QTC1024071001267002913",
"APPLYTYPE": "30",
"APPLYYMD": "20240722",
"CUSTOMERCD": "2200004135",
"SAP_CUSTOMERCD": "2200004135",
"SALEPATN": "FS",
"REASONCD": "568",
"CustomerGroup1": "Z207",
"PromotionEvents": "",
"TXT_FormHeader": "QTC1024071001267002913",
"TXT_HeaderNote": "20240722",
"CostCenter": "",
"imw_matter_number": "",
"EMPCODE": "",
"EMPNAME": "",
"orderSource": "乐其",
"brandCode": "TG",
"channelCode": "tmall",
"orderType": 3,
"orderStatus": "1",
"payType": "none",
"payStatus": 0,
"shippedStatus": 2,
"memberId": "",
"shopName": "TG天猫官方旗舰店",
"parentPayCode": "QTC1024071001267002913",
"orderTime": "2024-07-22 09:52:20",
"payTime": "",
"amount": "0",
"reviseAmount": "0",
"POSEX": "60",
"DETERMINECODE": "78704625101",
"PLANT": "785A",
"LGORT": "W001",
"APPLYQNTY": 10,
"actualMNY": 0.00,
"Freegoods": "",
"CHARG": "",
"USECODE": "",
"DecisionNo": "0000164547",
"prdCode": "78704625101",
"prdName": "THE GINZA 2404 御银座节日封套M 封套 (全渠道)",
"shippedTime": "2024-07-22 09:52:20",
"TXT_FormDetail": "QTC1024071001267002913",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "",
"SDABWFLG": "",
"DailySummaryNo": "",
"documentType": ""
}
]
4.1.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | String | Yes | "success" indicates success, "error" indicates failure |
Quantity | count | int | Yes | Number of uploads |
Unique Identifier ID | DocumentIDs | array | Yes | Unique identifier ID for the orders |
Failure Information | message | String | No | Returned error message when status is "error" |
4.1.4 Response Examples
success
{
"status": "success",
"count": 6,
"DocumentIDs": ["e32df223333sadfewf"]
}
fail
{
"status": "error",
"message": ""
}
4.2 ToB business documents are uploaded
Endpoint: /inbound/pos
API Description: ToB business documents are uploaded
Request Method: HTTP POST
4.2.1 Request Parameters
Field Description | Field Name | Type | Length | Required | Notes |
---|---|---|---|---|---|
Company Code | COMPANYCD | VARCHAR | 3 | Yes | |
Document Application Number/OMS Outbound Number | APPLYNO | VARCHAR | 35 | Yes | |
Order Type | APPLYTYPE | VARCHAR | 4 | Yes | 10 Replenishment to store, 11 Store return to warehouse (initiated by SAP), 12 POD confirmation, 13 Store return to warehouse (initiated by POS) and consignment/direct exchange, 20 Store sales, 21 Store returns, 30 Free sales order, 31 Free return order, 32 Free order initiated by SAP, 33 Pure free return initiated by POS, 34 Internal use (initiated by 2B peripheral), 40 Debit memo (owner), 41 Credit memo (FSS), 42 Debit memo (return amount less than exchange amount), 43 Credit memo (return amount greater than exchange amount), 50 Exchange outbound (POS exchange in), 51 Exchange inbound (POS exchange out) |
Order Application Date/OMS Outbound Date | APPLYYMD | VARCHAR | 10 | Yes | |
Store Code | CUSTOMERCD | VARCHAR | 10 | Yes | |
ShipTo Code | SAP_CUSTOMERCD | VARCHAR | 10 | ||
Customer Category | SALEPATN | VARCHAR | 2 | Yes | K1 - Distributor, K2 - Consignment store, FS - Direct store |
Order Reason | REASONCD | VARCHAR | 3 | ||
POS Category | CustomerGroup1 | VARCHAR | 4 | Yes | "Z201 SMILE POS, Z202 PS POS, Z203 E-ORDER, Z204 CS POS, Z205 SCHD, Z206 Others, Z207 OMS, Z208 ONECX" |
Promotion Events | PromotionEvents | VARCHAR | 35 | ||
Text/OMS Platform Order Number | TXT_FormHeader | VARCHAR | 200 | POS passes the payment order number | |
Text/OMS Payment Date | TXT_HeaderNote | VARCHAR | 200 | ||
Cost Center | CostCenter | VARCHAR | 10 | ||
Decision Case Number | imw_matter_number | VARCHAR | 20 | ||
Application Employee ID | EMPCODE | VARCHAR | 20 | ||
Application Employee Name | EMPNAME | VARCHAR | 20 | ||
Sales Order Line Item | POSEX | VARCHAR | 6 | Yes | |
Material Determination Number | DETERMINECODE | VARCHAR | 13 | Yes | |
Factory | PLANT | VARCHAR | 8 | ||
Storage Location Code | LGORT | VARCHAR | 8 | ||
Order Quantity | APPLYQNTY | INT | Yes | ||
Sales Amount | actualMNY | NUMBER | 11 | ||
Free Goods Indicator | Freegoods | CHAR | 1 | ||
Batch Number | CHARG | VARCHAR | 10 | ||
Usage | USECODE | CHAR | 3 | ||
Decision Case Number | DecisionNo | VARCHAR | 20 | ||
Timestamp (Current Time) | Timestamp | DATETIME | 20 | Yes | Same timestamp for the same order, e.g., 2024-07-14 16:48:30.710 |
Peripheral Indicator | SysFlg | CHAR | 1 | "Converted by Mule-assigned Client ID: 1-POS, 2-SCHD, 3-E-order, 4-Shopex, 5-UCO, 6-LeQee, 7-Decision, 8-Purchase" | |
Disable Minimum Order Quantity Indicator | SDABWFLG | CHAR | 1 | "1 - Do not enforce minimum order quantity; 0 or empty - Enforce" | |
IO Number | IONum | VARCHAR | 10 | 1234567890 |
4.2.2 Request parameter example
notice: Each call passes a single piece of data, generating multiple pieces of data by item level, for example, if there are multiple item levels in the order, multiple items are generated by item level
[
{
"COMPANYCD": "785",
"APPLYNO": "RCXXXXXXXXXXXXXXX",
"APPLYTYPE": "20",
"APPLYYMD": "20220428",
"CUSTOMERCD": "00200001",
"SAP_CUSTOMERCD": "1000200001",
"SALEPATN": "K2",
"REASONCD": "564",
"CustomerGroup1": "Z202",
"PromotionEvents": "促销",
"TXT_FormHeader": "3889942344064221567",
"TXT_HeaderNote": "20240710",
"CostCenter": "78599D11A7",
"imw_matter_number": "0000163791",
"EMPCODE": "001001",
"EMPNAME": "Zhang San",
"POSEX": "10",
"DETERMINECODE": "730852143449",
"PLANT": "Plan",
"LGORT": "W001",
"APPLYQNTY": 3,
"actualMNY": 480.00,
"Freegoods": "1",
"CHARG": "COMMON",
"USECODE": "",
"DecisionNo": "AR028786-001",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "1",
"SDABWFLG": "1",
"IONum": "1234567890"
}
]
4.2.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | String | Yes | "success" indicates success, "error" indicates failure |
Quantity | count | int | Yes | Number of uploads |
Unique Identifier ID | DocumentIDs | array | Yes | Unique identifier ID for the orders |
Failure Information | message | String | No | Returned error message when status is "error" |
4.1.4 Response Examples
success
{
"status": "success",
"count": 1,
"DocumentIDs": ["e32df223333sadfewf"]
}
fail
{
"status": "error",
"message": ""
}
4.3 ToB purchase documents upload
Endpoint: /inbound/purchase
API Description: ToB purchase documents upload
Request Method: HTTP POST
4.3.1 Request Parameters
Field Description | Field Name | Type | Length | Required | Notes |
---|---|---|---|---|---|
Company Code | CoCode | VARCHAR | 4 | Yes | |
Order Type | APPLYTYPE | VARCHAR | 4 | Yes | |
Order Type | OrderType | VARCHAR | 4 | Yes | |
Creation Date | CreateDate | VARCHAR | 8 | Yes | |
Creator | CreateBy | VARCHAR | 12 | Yes | |
SAP Vendor Number | Vendor | VARCHAR | 10 | Yes | |
Language Key | Language | VARCHAR | 1 | Yes | |
Purchasing Organization | PurOrg | VARCHAR | 4 | Yes | |
Purchasing Group | PurGrp | VARCHAR | 3 | Yes | |
Currency | Currency | VARCHAR | 5 | Yes | |
Order Date | DOC_DATE | VARCHAR | 8 | Yes | |
Our Reference | Reference | VARCHAR | 12 | Yes | |
Purchase Order Detail Number | ItemNo | VARCHAR | 5 | Yes | |
Short Text | ShortText | VARCHAR | 40 | ||
SAP Item Code | ItemCode | VARCHAR | 18 | Yes | |
Plant | Plant | VARCHAR | 4 | Yes | |
Storage Location | STGE_LOC | VARCHAR | 4 | Yes | |
Purchase Order Number | NPSPONo | VARCHAR | 10 | Yes | |
Material Group | MaterialGroup | VARCHAR | 9 | Yes | |
Quantity | Quantity | INT | 13 | Yes | |
Order Unit | PO_UNIT | VARCHAR | 3 | Yes | |
Tax Code | TAX_CODE | VARCHAR | 2 | Yes | |
Account Assignment Category | ACCTASSCAT | VARCHAR | 1 | ||
Free Goods Indicator | Free | VARCHAR | 1 | ||
Control Key | ControlKey | VARCHAR | 4 | ||
Return Indicator | Return | VARCHAR | 1 | ||
Requester | Requester | VARCHAR | 12 | Yes | |
Internal Order | Internalorder | VARCHAR | 18 | ||
General Ledger Account | GL_ACCOUNT | VARCHAR | 10 | ||
Unit Price | Netprice | VARCHAR | 11 | Yes | |
Price Unit | PRICE_UNIT | VARCHAR | 5 | Yes | |
Delivery Date | DeliveryDate | DATS | 8 | Yes | |
Budget Unit Price | POINTS | NUMBER | Yes | ||
Timestamp (Current Time) | Timestamp | DATETIME | 20 | Yes | 2024-07-14 16:48:30.710 |
4.3.2 Request parameter example
notice: Each call passes a single piece of data, generating multiple pieces of data by item level, for example, if there are multiple item levels in the order, multiple items are generated by item level
[
{
"CoCode": "785",
"APPLYTYPE": "14",
"OrderType": "Z4NB",
"CreateDate": "20240618",
"CreateBy": "30018426",
"Vendor": "2100003028",
"Language": "1",
"PurOrg": "2001",
"PurGrp": "220",
"Currency": "CNY",
"DOC_DATE": "20240619",
"Reference": "INTRAMART",
"ItemNo": "00010",
"ShortText": "",
"ItemCode": "78704995101",
"Plant": "785V",
"STGE_LOC": "H001",
"NPSPONo": "PO2406163",
"MaterialGroup": "",
"Quantity": 150,
"PO_UNIT": "EA",
"TAX_CODE": "J1",
"ACCTASSCAT": "",
"Free": "",
"ControlKey": "",
"Return": "",
"Requester": "30018426",
"Internalorder": "",
"GL_ACCOUNT": "",
"Netprice": "4.28",
"PRICE_UNIT": "1",
"DeliveryDate": "20240708",
"POINTS": 4.47,
"Timestamp": "2024-07-14 16:48:30.710"
}
]
4.3.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | String | Yes | "success" indicates success, "error" indicates failure |
Quantity | count | int | Yes | Number of uploads |
Unique Identifier ID | DocumentIDs | array | Yes | Unique identifier ID for the orders |
Failure Information | message | String | No | Returned error message when status is "error" |
4.1.4 Response Examples
success
{
"status": "success",
"count": 1,
"DocumentIDs": ["e32df223333sadfewf"]
}
fail
{
"status": "error",
"message": ""
}
4.4 ToC in progress sales order upload (for reconciliation)
Endpoint: /inbound/inprogress
API Description: ToC in progress sales order upload (for reconciliation)
Request Method: HTTP POST
4.4.1 Request Parameters
Field Description | Field Name | Type | Length | Required | Notes |
---|---|---|---|---|---|
Order Source | orderSource | VARCHAR | 500 | Yes | POS |
Brand Code | brandCode | VARCHAR | 500 | Yes | Brand codes accepted: CPB, EFM, IPSA, NARS, TG, SDK, SHI, PCV, LM, BAUM |
Sales Platform | channelCode | VARCHAR | 500 | Yes | web: Official Website wx_ma: WeChat Mini Program wx_video: WeChat Video Channel tmall: Tmall tiktok: Douyin xhs: Xiaohongshu |
Platform Sales Order Number (Merchant Order Number) | TXT_FormHeader | VARCHAR | 200 | Yes | Platform sales order number (merchant order number) |
Order Creation Time | orderTime | VARCHAR | 500 | Yes | |
Order Payment Time | TXT_HeaderNote | VARCHAR | 200 | ||
Payment Amount | payAmount | VARCHAR | 500 | Yes | |
Refund Amount | refundAmount | VARCHAR | 500 | Yes | |
Freight | freight | VARCHAR | 500 | ||
Transaction Status | transactionStatus | INT | Yes | Base: 1. Transaction Completed 2. Transaction Closed 3. Unpaid (Order Created) 4. Paid (Paid but Not Shipped) 9. Unknown Tmall: 10. Transaction Completed (Success) 11. Transaction Closed (Payment Made and User Refund Success) 12. No Alipay Transaction Created 13. Waiting for Buyer Payment 14. Seller Partially Shipped 15. Waiting for Seller Shipment (Buyer Paid) 16. Waiting for Buyer Confirmation (Seller Shipped) 17. Buyer Signed (COD Only) 18. Transaction Closed Before Payment 21. Deposit Unpaid, Balance Unpaid 22. Deposit Paid, Balance Unpaid 23. Both Deposit and Balance Paid 24. Presale Deposit Forfeited Douyin: 40. Transaction Completed (Received) 41. Transaction Closed (Cancelled) 42. Order Created 43. Paid 44. Preparing Goods 45. Partial Shipment 46. Shipped (All Shipped) | |
Push Status | pushStatus | INT | Yes | 1. Pushed, meaning the document has been pushed to S4. 2. Not Pushed, meaning the document is scheduled but not yet pushed to S4. 3. No Push, meaning no need to push the document to S4. | |
Timestamp (Current Time) | Timestamp | VARCHAR | 20 | Yes | Same timestamp for the same order: 2024-07-14 16:48:30.710 |
System Flag | SysFlg | CHAR | 1 | Yes | 1-POS 2-SCHD 3-E-order 4-Shopex 5-UCO 6-LeQee 7-Decision 8-Purchase |
4.4.2 Request parameter example
notice: Support multiple orders, each order is an item.
[{
"orderSource": "UCO",
"brandCode": "CPB",
"channelCode": "tmall",
"TXT_FormHeader": "3889942344064221567",
"orderTime": "2024-07-10 10:42:44",
"TXT_HeaderNote": "3425027475214591645",
"payAmount": "350.00",
"refundAmount": "0",
"freight": "0.00",
"transactionStatus": 15,
"pushStatus": 2,
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "7"
},
{
"orderSource": "UCO",
"brandCode": "CPB",
"channelCode": "tmall",
"TXT_FormHeader": "3889942344064221567",
"orderTime": "2024-07-10 10:42:44",
"TXT_HeaderNote": "3425027475214591645",
"payAmount": "350.00",
"refundAmount": "0",
"freight": "0.00",
"transactionStatus": 15,
"pushStatus": 2,
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "7"
},
{
"orderSource": "UCO",
"brandCode": "CPB",
"channelCode": "tmall",
"TXT_FormHeader": "3889942344064221567",
"orderTime": "2024-07-10 10:42:44",
"TXT_HeaderNote": "3425027475214591645",
"payAmount": "350.00",
"refundAmount": "0",
"freight": "0.00",
"transactionStatus": 15,
"pushStatus": 2,
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "7"
}]
4.4.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | String | Yes | "success" indicates success, "error" indicates failure |
Quantity | count | int | Yes | Number of uploads |
Unique Identifier ID | DocumentIDs | array | Yes | Unique identifier ID for the orders |
Failure Information | message | String | No | Returned error message when status is "error" |
4.4.4 Response Examples
success
{
"status": "success",
"count": 3,
"DocumentIDs": ["e32df223333sadfewf"]
}
fail
{
"status": "error",
"message": ""
}
4.5 ToC Amount adjustment sheet upload (for reconciliation)
Endpoint: /inbound/revise
API Description: ToC Amount adjustment sheet upload (for reconciliation)
Request Method: HTTP POST
4.5.1 Request Parameters
Field Description | Field Name | Type | Length | Required | Notes | |
---|---|---|---|---|---|---|
Order Source | orderSource | VARCHAR | 500 | Yes | POS | |
Brand Code | brandCode | VARCHAR | 500 | Yes | Accepted brand codes: CPB, EFM, IPSA, NARS, TG, SDK, SHI, PCV, LM, BAUM | |
Sales Platform | channelCode | VARCHAR | 500 | Yes | web: Official Website wx_ma: WeChat Mini Program wx_video: WeChat Video Channel tmall: Tmall tiktok: Douyin xhs: Xiaohongshu | |
Revision ID | revise | ID | VARCHAR | 100 | ||
Document Number | APPLYNO | CHAR | 35 | Yes | POS Order Number, OMS Outbound Order Number | |
Business Type | APPLYTYPE | CHAR | 3 | Yes | 10: Replenishment to Store 11: Return to Company 20: Store Sale 21: Store Return 30: Free Sale Order 31: Free Return Order | |
Order Type | orderType | INT | Yes | Fixed value: 11 | ||
Store Code | CUSTOMERCD | CHAR | 10 | Yes | Peripheral Store Code | |
SAP ShipTo Code | SAP_CUSTOMERCD | CHAR | 10 | Yes | Store Code | |
Platform Order Number | TXT_FormHeader | VARCHAR | 200 | Yes | POS Payment Order Number | |
Revision Amount | reviseAmount | VARCHAR | 500 | Yes | ||
Revision Time | reviseTime | VARCHAR | 100 | Yes | Revision time in the format: yyyy-MM-dd hh:mm:ss | |
Order Reason (Head) | REASONCD | CHAR | 3 | Yes | 1: Material Revision 2: Order Revision Explanation: 1. If revising material amount, the order must include the material. 2. If revising order total amount, freight should be used for material revision. | |
Material Code | prdCode | VARCHAR | 500 | Yes | Material Code | |
Material Determination Code | DETERMINECODE | CHAR | 13 | Yes | Material Determination Code | |
Product Name | prdName | VARCHAR | 500 | Yes | Product Name | |
Material Revision Amount | reviseAmount_ITEM | VARCHAR | 500 | Yes | Material revision amount, specifying positive or negative value depending on the actual situation | |
Timestamp (Current Time) | Timestamp | DATETIME | 20 | Yes | Same timestamp for the same order: 2024-07-14 16:48:30.710 | |
System Flag | SysFlg | CHAR | 1 | Yes | 1-POS 2-SCHD 3-E-order 4-Shopex 5-UCO 6-LeQee 7-Decision 8-Purchase |
4.5.2 Request parameter example
notice: Support multiple orders, generate multiple data by item level, such as order with multiple item level, then generate multiple items by item level.
[{
"orderSource": "UCO",
"brandCode": "CPB",
"channelCode": "tmall",
"ID": "1806847913",
"APPLYNO": "1908083850",
"APPLYTYPE": "20",
"orderType": 11,
"CUSTOMERCD": "31400000",
"SAP_CUSTOMERCD": "2200003902",
"TXT_FormHeader": "3889942344064221567",
"reviseAmount": "-50.00",
"reviseTime": "2024-04-05 09:47:13",
"REASONCD": "2",
"prdCode": "300000290",
"DETERMINECODE": "300000290",
"prdName": "NARS 官网运费",
"reviseAmount_ITEM": "-50",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "7"
},
{
"orderSource": "UCO",
"brandCode": "CPB",
"channelCode": "tmall",
"ID": "1806847913",
"APPLYNO": "1908083850",
"APPLYTYPE": "20",
"orderType": 11,
"CUSTOMERCD": "31400000",
"SAP_CUSTOMERCD": "2200003902",
"TXT_FormHeader": "3889942344064221567",
"reviseAmount": "-50.00",
"reviseTime": "2024-04-05 09:47:13",
"REASONCD": "2",
"prdCode": "300000290",
"DETERMINECODE": "300000290",
"prdName": "NARS 官网运费",
"reviseAmount_ITEM": "-50",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "7"
},
{
"orderSource": "UCO",
"brandCode": "CPB",
"channelCode": "tmall",
"ID": "1806847913",
"APPLYNO": "1908083850",
"APPLYTYPE": "20",
"orderType": 11,
"CUSTOMERCD": "31400000",
"SAP_CUSTOMERCD": "2200003902",
"TXT_FormHeader": "3889942344064221567",
"reviseAmount": "-50.00",
"reviseTime": "2024-04-05 09:47:13",
"REASONCD": "2",
"prdCode": "300000290",
"DETERMINECODE": "300000290",
"prdName": "NARS 官网运费",
"reviseAmount_ITEM": "-50",
"Timestamp": "2024-07-14 16:48:30.710",
"SysFlg": "7"
}]
4.5.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | String | Yes | "success" indicates success, "error" indicates failure |
Quantity | count | int | Yes | Number of uploads |
Unique Identifier ID | DocumentIDs | array | Yes | Unique identifier ID for the orders |
Failure Information | message | String | No | Returned error message when status is "error" |
4.5.4 Response Examples
success
{
"status": "success",
"count": 3,
"DocumentIDs": ["e32df223333sadfewf"]
}
fail
{
"status": "error",
"message": ""
}
4.6 POS transmits the debit and credit payment method of the reconciliation platform
Endpoint: /inbound/coupoChargePlatform
API Description: POS transmits the debit and credit payment method of the reconciliation platform
Request Method: HTTP POST
4.6.1 Request Parameters
Field Description | Field Name | Type | Length | Required | Notes | |
---|---|---|---|---|---|---|
Store Code | shopCode | VARCHAR | 10 | |||
Store Name | shopName | VARCHAR | 500 | |||
POS Machine Number | posNo | VARCHAR | 500 | Fixed value: 1 | ||
Terminal Machine Number | deviceNo | VARCHAR | 500 | Fixed value: 1 | ||
Transaction Number | tradeNo | VARCHAR | 500 | |||
Receipt Number | invoiceNumber | VARCHAR | 500 | Yes | ||
POS Unique Order Number | posTradeNo | VARCHAR | 500 | Yes | ||
Sales Type | saleType | VARCHAR | 500 | Yes | ||
Occurrence Time (Payment Send Time) | tradeTime | DATETIME | 500 | Yes | ||
Business Date (Daily Closing Time) | businessDate | DATE | 500 | Yes | ||
Payment Method Code | payTypeCode | VARCHAR | 500 | Yes | 1: Deduction Coupon (No longer used) 15: CITIC Credit Card (No longer used) 16: CITIC Alipay (No longer used) 17: CITIC WeChat (No longer used) 18: CITIC QR Code (No longer used) 51: Cash 52: QR Code Payment (POS Cashier QR Code) 53: Xiaomao Card 58: Scan Payment 59: QR Code Payment (Yisheng Payment Cashier QR Code, no longer used) 60: Electronic Currency (No longer used) 61: Mobile POS (POS Machine Scanning Customer QR Code) 63: New Heaven Activity Coupon 64: Other (Only the red-marked types are allowed in POS) | |
Payment Method Name | payTypeNm | VARCHAR | 500 | Yes | ||
Card Type | cardType | VARCHAR | 500 | |||
Amount | amount | DOUBLE | 500 | Yes | ||
Internal Payment Order Number | posPayNo | VARCHAR | 500 | Yes | ||
Merchant Order Number | merchantOrderNo | VARCHAR | 500 | Yes | ||
Platform Transaction Number | platformTradeNo | VARCHAR | 500 | Yes | ||
System Flag | SysFlg | CHAR | 1 | 1-POS 2-SCHD 3-E-order 4-Shopex 5-UCO 6-LeQee 7-Decision 8-Purchase | ||
Timestamp (Current Time) | Timestamp | DATETIME | Yes | Same timestamp for the same order |
4.6.2 Request parameter example
notice: Each call passes a single piece of data, generating multiple pieces of data by item level, for example, if there are multiple item levels in the order, multiple items are generated by item level.
[
{
"shopCode": "SC001",
"shopName": "旗舰店",
"posNo": "1",
"deviceNo": "1",
"tradeNo": "TRADE123456",
"invoiceNumber": "INV123456",
"posTradeNo": "POSTRADE123456",
"saleType": "普通销售",
"tradeTime": "2024-11-26T10:30:00",
"businessDate": "2024-11-26",
"payTypeCode": "51",
"payTypeNm": "现金",
"cardType": "普通会员卡",
"amount": 150.75,
"posPayNo": "PAY123456",
"merchantOrderNo": "MORD123456",
"platformTradeNo": "PLTTRADE123456",
"SysFlg": "1",
"Timestamp": "2024-11-26T10:30:00"
},
{
"shopCode": "SC001",
"shopName": "旗舰店",
"posNo": "1",
"deviceNo": "1",
"tradeNo": "TRADE123456",
"invoiceNumber": "INV123456",
"posTradeNo": "POSTRADE123456",
"saleType": "普通销售",
"tradeTime": "2024-11-26T10:30:00",
"businessDate": "2024-11-26",
"payTypeCode": "51",
"payTypeNm": "现金",
"cardType": "普通会员卡",
"amount": 150.75,
"posPayNo": "PAY123456",
"merchantOrderNo": "MORD123456",
"platformTradeNo": "PLTTRADE123456",
"SysFlg": "1",
"Timestamp": "2024-11-26T10:30:00"
},
{
"shopCode": "SC001",
"shopName": "旗舰店",
"posNo": "1",
"deviceNo": "1",
"tradeNo": "TRADE123456",
"invoiceNumber": "INV123456",
"posTradeNo": "POSTRADE123456",
"saleType": "普通销售",
"tradeTime": "2024-11-26T10:30:00",
"businessDate": "2024-11-26",
"payTypeCode": "51",
"payTypeNm": "现金",
"cardType": "普通会员卡",
"amount": 150.75,
"posPayNo": "PAY123456",
"merchantOrderNo": "MORD123456",
"platformTradeNo": "PLTTRADE123456",
"SysFlg": "1",
"Timestamp": "2024-11-26T10:30:00"
}
]
4.6.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | String | Yes | "success" indicates success, "error" indicates failure |
Quantity | count | int | Yes | Number of uploads |
Unique Identifier ID | DocumentIDs | array | Yes | Unique identifier ID for the orders |
Failure Information | message | String | No | Returned error message when status is "error" |
4.6.4 Response Examples
success
{
"status": "success",
"count": 3,
"DocumentIDs": ["e32df223333sadfewf"]
}
fail
{
"status": "error",
"message": ""
}
4.7 POS return to direct store arrival status
Endpoint: /businessSubtbl/update
API Description: POS return to direct store arrival status
Request Method: HTTP PUT
4.7.1 Request Parameters
notice: Parameter is used as the query condition(queryParams)。
Field Description | Field Name | Type | Length | Required | Notes |
---|---|---|---|---|---|
Document Number | APPLYNO | CHAR | 35 | ||
Business Type | BusinessType | CHAR | 3 | ||
Store Code | CUSTOMERCD | CHAR | 10 | ||
Status Flag | STATUS | CHAR | 1 | ||
Interface Running Flag | IFFlg | CHAR | 1 |
notice: Parameters in the body (the updated value needs to be passed in).
Field Description | Field Name | Type | Length | Required | Notes |
---|---|---|---|---|---|
Status Flag | STATUS | CHAR | 1 | Yes | |
Interface Running Flag | IFFlg | CHAR | 1 | Yes | |
Updated By | UPDATEMAN | CHAR | 20 | Yes | |
Update Time | UPDATETIME | DATETIME | Yes | Example: 2024-11-29 17:50:22.000 |
4.7.2 Request parameter example
Request example:
/api/v1/businessSubtbl/update?APPLYNO=1800028452&BusinessType=2&CUSTOMERCD=1&STATUS=2&IFFlg=1
body parameter:
{
"STATUS": "3",
"IFFlg": "1",
"UPDATEMAN": "EAI-TEST",
"UPDATETIME": "2024-11-29 17:50:22.000"
}
4.7.3 Response Parameters
Field Description | Field Name | Type | Required | Notes |
---|---|---|---|---|
Return Status | status | STRING | Yes | "success" indicates success, "error" indicates failure |
Main Table Updated Rows | businessMainRows | INT | Yes | |
Subtable Updated Rows | businessSubRows | INT | Yes | |
Failure Message | message | STRING | No | If status is "error", an error message is returned |
4.7.4 Response Examples
success
{
"status": "success",
"businessMainRows": 2,
"businessSubRows": 2
}
fail
{
"status": "error",
"message": ""
}