schm-inbound-sap-eapi

(0 reviews)

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:

EndpointDescription
/inbound/omsToC sales order details uploaded
/inbound/posToB business documents are uploaded
/inbound/purchaseToB purchase documents upload
/inbound/inprogressToC in progress sales order upload (for reconciliation)
/inbound/reviseToC Amount adjustment sheet upload (for reconciliation)
/inbound/coupoChargePlatformPOS transmits the debit and credit payment method of the reconciliation platform
/businessSubtbl/updatePOS 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 DescriptionField NameTypeLengthRequiredNotes
Company CodeCOMPANYCDVARCHAR3Yes
Document Application No./OMS Outbound No.APPLYNOVARCHAR35Yes
Order TypeAPPLYTYPEVARCHAR4Yes20: Store Sales, 21: Store Returns, 30: Free Sales Order, 31: Free Order Returns
Order Application Date/OMS Outbound DateAPPLYYMDVARCHAR10Yes
Store CodeCUSTOMERCDVARCHAR10Yes
ShipTo CodeSAP_CUSTOMERCDVARCHAR10
Customer ClassificationSALEPATNVARCHAR2YesK1: Distributor Store, K2: Consignment Store, FS: Direct Store
Order ReasonREASONCDVARCHAR3
POS CategoryCustomerGroup1VARCHAR4Yes"Z201: SMILE POS, Z202: PS POS, Z203: E-ORDER, Z204: CS POS, Z205: SCHD, Z206: Others, Z207: OMS, Z208: ONECX"
Promotion EventsPromotionEventsVARCHAR35
Text/OMS Platform Order No.TXT_FormHeaderVARCHAR200
Text/OMS Payment DateTXT_HeaderNoteVARCHAR200
Cost CenterCostCenterVARCHAR10
Decision Case Numberimw_matter_numberVARCHAR20
Applicant Employee CodeEMPCODEVARCHAR20
Applicant Employee NameEMPNAMEVARCHAR20
Order SourceorderSourceVARCHAR500
Brand CodebrandCodeVARCHAR500
Sales PlatformchannelCodeVARCHAR500
Order TypeorderTypeINT
Order StatusorderStatusVARCHAR500
Payment MethodpayTypeVARCHAR500
Payment StatuspayStatusINT
Inbound/Outbound StatusshippedStatusINT
Member IdentifiermemberIdVARCHAR500
Shop NameshopNameVARCHAR500
Source Platform Order No.parentPayCodeVARCHAR500
Order Creation TimeorderTimeVARCHAR500
Payment TimepayTimeVARCHAR500
Amount PayableamountVARCHAR500
Revised AmountreviseAmountVARCHAR500
Sales Order Line ItemPOSEXVARCHAR6Yes
Material Determination CodeDETERMINECODEVARCHAR13Yes
FactoryPLANTVARCHAR8
Storage Location CodeLGORTVARCHAR8
Order QuantityAPPLYQNTYINTYes
Sales AmountactualMNYnumber11
Free Goods IndicatorFreegoodsCHAR1
Batch NumberCHARGVARCHAR10
PurposeUSECODECHAR3
Decision Case NumberDecisionNoVARCHAR20
Material CodeprdCodeVARCHAR500
Product NameprdNameVARCHAR500
Delivery TimeshippedTimeVARCHAR500
Timestamp (Current Time)Timestampdatetime20YesSame timestamp for a single order, e.g., 2024-07-14 16:48:30.710
Peripheral IdentifierSysFlgCHAR1"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 IndicatorSDABWFLGCHAR1"1: Disable Minimum Order Quantity, 0 or blank: Enable"
Summary NumberDailySummaryNoVARCHAR35
Document TypedocumentTypeVARCHAR350: Default, 1: Split Order, 2: Consolidated Order
Platform Sales Order No.TXT_FormDetailVARCHAR35
Presale FlagPresaleFlagVARCHAR10: Regular Sale, 1: Presale, 2: Presale Pickup, 3: Group Purchase Coupon Purchase, 4: Group Purchase Coupon Pickup
Presale Transaction NumberPresaleTradeNoVARCHAR500
BC codeBCCodeVARCHAR10

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 DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure
QuantitycountintYesNumber of uploads
Unique Identifier IDDocumentIDsarrayYesUnique identifier ID for the orders
Failure InformationmessageStringNoReturned 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 DescriptionField NameTypeLengthRequiredNotes
Company CodeCOMPANYCDVARCHAR3Yes
Document Application Number/OMS Outbound NumberAPPLYNOVARCHAR35Yes
Order TypeAPPLYTYPEVARCHAR4Yes10 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 DateAPPLYYMDVARCHAR10Yes
Store CodeCUSTOMERCDVARCHAR10Yes
ShipTo CodeSAP_CUSTOMERCDVARCHAR10
Customer CategorySALEPATNVARCHAR2YesK1 - Distributor, K2 - Consignment store, FS - Direct store
Order ReasonREASONCDVARCHAR3
POS CategoryCustomerGroup1VARCHAR4Yes"Z201 SMILE POS, Z202 PS POS, Z203 E-ORDER, Z204 CS POS, Z205 SCHD, Z206 Others, Z207 OMS, Z208 ONECX"
Promotion EventsPromotionEventsVARCHAR35
Text/OMS Platform Order NumberTXT_FormHeaderVARCHAR200POS passes the payment order number
Text/OMS Payment DateTXT_HeaderNoteVARCHAR200
Cost CenterCostCenterVARCHAR10
Decision Case Numberimw_matter_numberVARCHAR20
Application Employee IDEMPCODEVARCHAR20
Application Employee NameEMPNAMEVARCHAR20
Sales Order Line ItemPOSEXVARCHAR6Yes
Material Determination NumberDETERMINECODEVARCHAR13Yes
FactoryPLANTVARCHAR8
Storage Location CodeLGORTVARCHAR8
Order QuantityAPPLYQNTYINTYes
Sales AmountactualMNYNUMBER11
Free Goods IndicatorFreegoodsCHAR1
Batch NumberCHARGVARCHAR10
UsageUSECODECHAR3
Decision Case NumberDecisionNoVARCHAR20
Timestamp (Current Time)TimestampDATETIME20YesSame timestamp for the same order, e.g., 2024-07-14 16:48:30.710
Peripheral IndicatorSysFlgCHAR1"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 IndicatorSDABWFLGCHAR1"1 - Do not enforce minimum order quantity; 0 or empty - Enforce"
IO NumberIONumVARCHAR101234567890

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 DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure
QuantitycountintYesNumber of uploads
Unique Identifier IDDocumentIDsarrayYesUnique identifier ID for the orders
Failure InformationmessageStringNoReturned 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 DescriptionField NameTypeLengthRequiredNotes
Company CodeCoCodeVARCHAR4Yes
Order TypeAPPLYTYPEVARCHAR4Yes
Order TypeOrderTypeVARCHAR4Yes
Creation DateCreateDateVARCHAR8Yes
CreatorCreateByVARCHAR12Yes
SAP Vendor NumberVendorVARCHAR10Yes
Language KeyLanguageVARCHAR1Yes
Purchasing OrganizationPurOrgVARCHAR4Yes
Purchasing GroupPurGrpVARCHAR3Yes
CurrencyCurrencyVARCHAR5Yes
Order DateDOC_DATEVARCHAR8Yes
Our ReferenceReferenceVARCHAR12Yes
Purchase Order Detail NumberItemNoVARCHAR5Yes
Short TextShortTextVARCHAR40
SAP Item CodeItemCodeVARCHAR18Yes
PlantPlantVARCHAR4Yes
Storage LocationSTGE_LOCVARCHAR4Yes
Purchase Order NumberNPSPONoVARCHAR10Yes
Material GroupMaterialGroupVARCHAR9Yes
QuantityQuantityINT13Yes
Order UnitPO_UNITVARCHAR3Yes
Tax CodeTAX_CODEVARCHAR2Yes
Account Assignment CategoryACCTASSCATVARCHAR1
Free Goods IndicatorFreeVARCHAR1
Control KeyControlKeyVARCHAR4
Return IndicatorReturnVARCHAR1
RequesterRequesterVARCHAR12Yes
Internal OrderInternalorderVARCHAR18
General Ledger AccountGL_ACCOUNTVARCHAR10
Unit PriceNetpriceVARCHAR11Yes
Price UnitPRICE_UNITVARCHAR5Yes
Delivery DateDeliveryDateDATS8Yes
Budget Unit PricePOINTSNUMBERYes
Timestamp (Current Time)TimestampDATETIME20Yes2024-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 DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure
QuantitycountintYesNumber of uploads
Unique Identifier IDDocumentIDsarrayYesUnique identifier ID for the orders
Failure InformationmessageStringNoReturned 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 DescriptionField NameTypeLengthRequiredNotes
Order SourceorderSourceVARCHAR500YesPOS
Brand CodebrandCodeVARCHAR500YesBrand codes accepted: CPB, EFM, IPSA, NARS, TG, SDK, SHI, PCV, LM, BAUM
Sales PlatformchannelCodeVARCHAR500Yesweb: 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_FormHeaderVARCHAR200YesPlatform sales order number (merchant order number)
Order Creation TimeorderTimeVARCHAR500Yes
Order Payment TimeTXT_HeaderNoteVARCHAR200
Payment AmountpayAmountVARCHAR500Yes
Refund AmountrefundAmountVARCHAR500Yes
FreightfreightVARCHAR500
Transaction StatustransactionStatusINTYesBase:
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 StatuspushStatusINTYes1. 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)TimestampVARCHAR20YesSame timestamp for the same order: 2024-07-14 16:48:30.710
System FlagSysFlgCHAR1Yes1-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 DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure
QuantitycountintYesNumber of uploads
Unique Identifier IDDocumentIDsarrayYesUnique identifier ID for the orders
Failure InformationmessageStringNoReturned 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 DescriptionField NameTypeLengthRequiredNotes
Order SourceorderSourceVARCHAR500YesPOS
Brand CodebrandCodeVARCHAR500YesAccepted brand codes:
CPB, EFM, IPSA, NARS, TG, SDK, SHI, PCV, LM, BAUM
Sales PlatformchannelCodeVARCHAR500Yesweb: Official Website
wx_ma: WeChat Mini Program
wx_video: WeChat Video Channel
tmall: Tmall
tiktok: Douyin
xhs: Xiaohongshu
Revision IDreviseIDVARCHAR100
Document NumberAPPLYNOCHAR35YesPOS Order Number, OMS Outbound Order Number
Business TypeAPPLYTYPECHAR3Yes10: Replenishment to Store
11: Return to Company
20: Store Sale
21: Store Return
30: Free Sale Order
31: Free Return Order
Order TypeorderTypeINTYesFixed value: 11
Store CodeCUSTOMERCDCHAR10YesPeripheral Store Code
SAP ShipTo CodeSAP_CUSTOMERCDCHAR10YesStore Code
Platform Order NumberTXT_FormHeaderVARCHAR200YesPOS Payment Order Number
Revision AmountreviseAmountVARCHAR500Yes
Revision TimereviseTimeVARCHAR100YesRevision time in the format: yyyy-MM-dd hh:mm:ss
Order Reason (Head)REASONCDCHAR3Yes1: 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 CodeprdCodeVARCHAR500YesMaterial Code
Material Determination CodeDETERMINECODECHAR13YesMaterial Determination Code
Product NameprdNameVARCHAR500YesProduct Name
Material Revision AmountreviseAmount_ITEMVARCHAR500YesMaterial revision amount, specifying positive or negative value depending on the actual situation
Timestamp (Current Time)TimestampDATETIME20YesSame timestamp for the same order: 2024-07-14 16:48:30.710
System FlagSysFlgCHAR1Yes1-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 DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure
QuantitycountintYesNumber of uploads
Unique Identifier IDDocumentIDsarrayYesUnique identifier ID for the orders
Failure InformationmessageStringNoReturned 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 DescriptionField NameTypeLengthRequiredNotes
Store CodeshopCodeVARCHAR10
Store NameshopNameVARCHAR500
POS Machine NumberposNoVARCHAR500Fixed value: 1
Terminal Machine NumberdeviceNoVARCHAR500Fixed value: 1
Transaction NumbertradeNoVARCHAR500
Receipt NumberinvoiceNumberVARCHAR500Yes
POS Unique Order NumberposTradeNoVARCHAR500Yes
Sales TypesaleTypeVARCHAR500Yes
Occurrence Time (Payment Send Time)tradeTimeDATETIME500Yes
Business Date (Daily Closing Time)businessDateDATE500Yes
Payment Method CodepayTypeCodeVARCHAR500Yes1: 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 NamepayTypeNmVARCHAR500Yes
Card TypecardTypeVARCHAR500
AmountamountDOUBLE500Yes
Internal Payment Order NumberposPayNoVARCHAR500Yes
Merchant Order NumbermerchantOrderNoVARCHAR500Yes
Platform Transaction NumberplatformTradeNoVARCHAR500Yes
System FlagSysFlgCHAR11-POS
2-SCHD
3-E-order
4-Shopex
5-UCO
6-LeQee
7-Decision
8-Purchase
Timestamp (Current Time)TimestampDATETIMEYesSame 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 DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure
QuantitycountintYesNumber of uploads
Unique Identifier IDDocumentIDsarrayYesUnique identifier ID for the orders
Failure InformationmessageStringNoReturned 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 DescriptionField NameTypeLengthRequiredNotes
Document NumberAPPLYNOCHAR35
Business TypeBusinessTypeCHAR3
Store CodeCUSTOMERCDCHAR10
Status FlagSTATUSCHAR1
Interface Running FlagIFFlgCHAR1

notice: Parameters in the body (the updated value needs to be passed in).

Field DescriptionField NameTypeLengthRequiredNotes
Status FlagSTATUSCHAR1Yes
Interface Running FlagIFFlgCHAR1Yes
Updated ByUPDATEMANCHAR20Yes
Update TimeUPDATETIMEDATETIMEYesExample: 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 DescriptionField NameTypeRequiredNotes
Return StatusstatusSTRINGYes"success" indicates success, "error" indicates failure
Main Table Updated RowsbusinessMainRowsINTYes
Subtable Updated RowsbusinessSubRowsINTYes
Failure MessagemessageSTRINGNoIf status is "error", an error message is returned

4.7.4 Response Examples

success
{
    "status": "success",
    "businessMainRows": 2,
    "businessSubRows": 2
}
fail
{
    "status": "error",
    "message": ""
}

Reviews