schm-sap-outbound-eapi

(0 reviews)

home

schm-sap-outbound-eapi

API Description: External API for querying business documents.
DEV Environment URL: https://schm-api-dev.shiseido.cn/schm-sap-outbound-eapi/api/v1
UAT Environment URL: https://schm-api-test.shiseido.cn/schm-sap-outbound-eapi/api/v1
PROD Environment URL: https://schm-api.shiseido.cn/schm-sap-outbound-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-sap-outbound-eapi/healthCheck
UAT Environment URL: https://schm-api-test.shiseido.cn/schm-sap-outbound-eapi/healthCheck
PROD Environment URL: https://schm-api.shiseido.cn/schm-sap-outbound-eapi/healthCheck

3. API Overview:

EndpointDescription
/outBound/getBusinessMainSAP 2B Inbound/Outbound Main Table Query (New Table)
/outBound/getBusinessSubSAP 2B Inbound/Outbound Sub Table Query (New Table)
/outBound/getOrderSAP 2B Inbound Orders (Old Table)
/outBound/getRtnSaleSAP 2B Return Outbound Orders (Old Table)
/outBound/getNewBusinessSAP 2B Adjustment Orders (Old Table)
/outBound/getStockMvmtGRSAP Purchase Order Reversal Query
/outBound/getBusinessSubOMSToC Sales Order Details Query (For Reconciliation)
/outBound/getBillingDataPoolSAP Billing Document Query
/outBound/getBillingCounteractSAP Billing Counteraction Document Query
/outBound/getCoupoChargePlatformPOS Loan Payment Method Query

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-sap-outbound-eapi/api/v1/outBound/getBusinessMain

4. API Call Details

4.1 SAP 2B Inbound/Outbound Main Table Query (New Table)

Endpoint: /api/v1/outBound/getBusinessMain
Description: SAP 2B Inbound/Outbound Main Table Query (New Table)
Request Method: HTTP GET

4.1.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Entries per pagepageSizeINTOptionalRetrieve data by page, number of entries per page. Default is 50 if not provided.
Page numberpageNoINTOptionalRetrieve data by page, current page number. Pagination starts at 1. Default is 1 if not provided.
Document numberapplyNoVARCHAROptionalExample: 1504575834
Business typebusinessTypeVARCHAROptionalExample: 10
Store codecustomerCdVARCHAROptionalExample: 10200184
SAP Shipto codesapCustomerCdVARCHAROptionalExample: 2200003451
POS distinctioncustomerGroup1VARCHAROptionalExample: Z202
SAP order codesapOrderNoVARCHAROptionalExample: 4203193399
StatusstatusVARCHAROptionalExample: 3
SAP order typesapApplyTypeVARCHAROptionalExample: Z4OR
Update timeupdateTimedatetimeOptionalRetrieve data updated after (including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Request example:
/api/v1/outBound/getBusinessMain?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49


4.1.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
Response statusstatusStringYes"success" indicates success, "error" indicates failure
Current page numberpageNoINTYes
Entries per pagepageSizeINTYes
Total pagestotalPagesINTYes
Total recordstotalRecordsINTYes
DatadataarrayYesData retrieved from the query
Error messagemessageStringNoReturned when status is "error", providing details about the error
Data Structure
Field DescriptionField NameTypeRequiredNotes
Company codeCOMPANYCDcharExample: 785
Document numberAPPLYNOcharExample: 1504575834
Application dateBusinessTypecharExample: 32
Store codeCUSTOMERCDcharExample: 00100184
SAP Shipto codeSAP_CUSTOMERCDcharExample: 2200003152
Customer classificationSALEPATNcharExample: K1-Distributor, K2-Agent, FS-Direct
POS distinctionCustomerGroup1charExample values:
Z201 SMILE POS
Z202 PS POS
Z203 E-ORDER
Z204 CS POS
Z205 SCHD
Z206 OTHERS
Z207 OMS
Z208 ONECX
Application dateAPPLYYMDdatetimeExample: 2022-12-12 00:00:00.000
Confirmation dateAdMinYmddatetimeExample: 2022-12-27 13:40:15.000
Outbound dateOUTSTCYMDdatetimeExample: NULL
SAP order codeSAPORDERNOcharExample: 4202451650
SAP order typeSAPAPPLYTYPEcharExample: Z4IO
StatusSTATUScharExample values: 1-Application, 2-Confirmation, 3-Outbound, 4-Arrival Confirmation
Interface flagIFFlgcharExample: 0, for EAI use
Update timeUPDATETIMEdatetimeExample: 2023-03-14 17:11:15.337
Updated byUPDATEMANcharExample: SAP
Created byCREATEMANChar
Creation timeCREATETIMEdatetime

4.1.3 Response Examples

Success:
{
    "status": "success",
    "pageNo": 1,
    "pageSize": 2,
    "totalPages": 1,
    "totalRecords": 2,
    "data": [
        {
            "COMPANYCD": "785",
            "APPLYNO": "RC103001232024703                  ",
            "BusinessType": "10 ",
            "CUSTOMERCD": "10300123  ",
            "SAP_CUSTOMERCD": "2200003606",
            "SALEPATN": "K1",
            "CustomerGroup1": "Z202",
            "APPLYYMD": "2024-07-05T00:00:00",
            "AdMinYmd": "2024-07-21T23:37:14",
            "OUTSTCYMD": "2024-07-22T00:00:00",
            "SAPORDERNO": "4204409917                         ",
            "SAPAPPLYTYPE": "Z4OR",
            "STATUS": "3",
            "IFFlg": "0",
            "UPDATETIME": "2024-07-23T16:00:32.33",
            "UPDATEMAN": "SAP                 ",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2024-07-22T12:01:19.647"
        },
        {
            "COMPANYCD": "785",
            "APPLYNO": "RC103001232024703                  ",
            "BusinessType": "12 ",
            "CUSTOMERCD": "10300123  ",
            "SAP_CUSTOMERCD": "2200003606",
            "SALEPATN": "K1",
            "CustomerGroup1": "Z202",
            "APPLYYMD": "2024-07-05T00:00:00",
            "AdMinYmd": "2024-07-21T23:37:14",
            "OUTSTCYMD": "2024-07-22T00:00:00",
            "SAPORDERNO": "4204409917-POD                     ",
            "SAPAPPLYTYPE": "Z4OR",
            "STATUS": "3",
            "IFFlg": "0",
            "UPDATETIME": "2024-07-23T16:00:32.453",
            "UPDATEMAN": "SAP                 ",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2024-07-23T16:00:47.413"
        }
    ]
}
Error:

{
    "status": "error",
    "message": ""
}

4.2 SAP Issuance of 2B Inbound/Outbound Subtable Query (New Table)

Request Endpoint: /api/v1/outBound/getBusinessSub
Description: SAP Issuance of 2B Inbound/Outbound Subtable Query (New Table)
Request Type: HTTP GET

4.2.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Page SizepageSizeINTNoRetrieves data by pagination. Default value is 50 if not specified.
Page NumberpageNoINTNoRetrieves data by pagination, current page number. Starts from 1. Default value is 1 if not specified.
Document NumberapplyNoVARCHARNoExample: 1504575834
Application DateapplyYmddatetimeNoFilters data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
Business TypebusinessTypeVARCHARNoExample: 10
Store CodecustomerCdVARCHARNoExample: 10200184
SAP Shipto CodesapCustomerCdVARCHARNoExample: 2200003451
POS DistinctioncustomerGroup1VARCHARNoExample: Z202
SAP Order NumbersapOrderNoVARCHARNoExample: 4203193399
Customer CategorysalePatnVARCHARNoExample: 4203193399
StatusstatusVARCHARNoExample: 3
SAP Order TypesapApplyTypeVARCHARNoExample: Z4OR
Delivery Number (Inbound/Outbound)deliveryNoVARCHARNoExample: 4402988335
Material Determination NumberdetermineCodeVARCHARNoExample: 4402988335
SAP STO NumberapplyNoStoVARCHARNoExample: 4402988335
Update TimeupdateTimedatetimeNoFilters updated data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Example request:
/api/v1/outBound/getBusinessSub?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49

4.2.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
StatusstatusStringYes"success" indicates success, "error" indicates failure
Current Page NumberpageNoINTYes
Records per PagepageSizeINTYes
Total PagestotalPagesINTYes
Total RecordstotalRecordsINTYes
DatadataarrayYesRetrieved data
Error MessagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredNotes
Company CodeCOMPANYCDchar
Document NumberAPPLYNOchar"POS/SCHD/E-ORDER Document No."
Application DateAPPLYYMDdatetime
Business TypeBusinessTypechar"10 Replenishment to store
11 Return to company
20 Store sales
21 Store return
30 Free sales order
31 Free return order"
Order Reason (Head)REASONCDchar"① Only for free orders and returns; not required for others.
② Free orders are uploaded to OMS only."
Order Reason DescriptionReasonDeschar
POS DistinctionCustomerGroup1char"POS Distinction
Z201 SMILE POS
Z202 PS POS
Z203 E-ORDER
Z204 CS POS
Z205 SCHD
Z206 OTHERS
Z207 OMS
Z208 ONECX"
Sold-to Party CodeSOLDTOCODEchar
Store CodeCUSTOMERCDcharPeripheral store code
SAP Shipto CodeSAP_CUSTOMERCDchar
Customer ClassificationSALEPATNchar"K1-Distribution
K2-Consignment
FS-Direct sale"
Requested Delivery DateRequestedDatedatetime
Promotion EventsPromotionEventschar
Remarks (Link POS)headerTXTcharAdditional textual information
Remarks (Link WMS)headerNotecharDelivery information; can be passed to WMS
SAP Sales Order NumberSAPORDERNOchar
SAP Order TypeSAPAPPLYTYPEchar
Delivery Number (Inbound/Outbound)DeliveryNOchar
Delivery Type (Inbound/Outbound)DeliveryTypechar
Delivery Date (Inbound/Outbound)INOUTSTCYMDdatetime
App Order NumberAPP_OrderNocharOMS-specific
Payment DatePayDatedatetimeOMS-specific
Summary NumberDailySummaryNocharOMS post-aggregation document number
External Store CodeExCUSTOMERCDchar
Vendor CodeSAP_VENDORCODEchar
Vendor NameSAP_VENDORNAMEchar
CurrencyCURCYchar
Order Line ItemPOSEXchar
Delivery Note Line ItemCOSNRchar
Product CodePRODUCTCDcharPeripheral 8-digit product code
SAP Product CodeSAPPRODUCTCDchar
Material Determination CodeDETERMINECODEchar
Material DescriptionDESCRIBEchar
BatchCHARGchar
Expiry DateExpiryDatedatetime
Requested QuantityAPPLYRQNTYint
Free Goods IndicatorFreegoodschar
Reason for Rejection (ITEM)RejectReasonchar
Item DescriptionItemDECchar
PlantPlantchar
Storage Location CodeLGORTchar
Order Net ValueNETVALUEmoneyTotal price excluding tax for line items
Confirmed QuantityADMQNTYint
Confirmation DateAdMinYmddatetime
Retail Unit PriceRPRICEMNYmoney
Retail AmountRETAILMNYmoney
Wholesale Unit Price (Tax Included)WPRICEMNYmoney"Actual sales price for FSS/OMS sales"
Wholesale Amount (Tax Included)WHOLEMNYmoney
Unit Price (Excluding Tax)UPRICEMNYmoney
Unit Amount (Excluding Tax)UNITMNYmoney
Tax RateTaxPriceint
Tax AmountTaxAmountmoney
Return PriceReturnPricemoney
Return AmountReturnAmountmoney
Unit of Measure (UoM)MEINSchar
Inbound/Outbound QuantityINOUTSTCNumint
Sales NotesNOTEnvarcharOrder notes in delivery document
Update TimeUPDATETIMEdatetime
Updated ByUPDATEMANchar
StatusSTATUSchar"1-Application
2-Confirmation
3-Outbound
4-Arrival Confirmation"
Interface Run FlagIFFlgcharUsed by EAI
SAP STO NumberAPPLYNO_STOchar
Replenishment/Return FlagSaleRtnflgchar"S: Replenishment/POD Overdelivery
R: Return Warehouse/POD Underdelivery"
Created ByCREATEMANchar
Creation TimeCREATETIMEdatetime
Material Type IdentifierPRODTYPEchar"1: Service Material
0: Non-Service Material"
Invoice FlagBillingFlgchar1: Invoiced
Reconciliation Platform Transmission FlagCHECKPLATFLGcharUsed by EAI
UsageUSECODEchar
Decision Case NumberDecisionNovarchar
Cost CenterCostCenterchar
Special Order Quantity FlagSDABWcharFor order reason 519 (physical returns), SAP order type Z4OR, and storage location W001, this flag is set by EAI to Z002.
Sales OrganizationSAP_SALESORGANIZATIONchar
Decision Case Numberimw_matter_numbervarchar
BrandBRANDcharFor aggregation
Applicant Employee IDEMPCODEvarcharFor decisions
Applicant NameEMPNAMEvarcharFor decisions
Disable Minimum Order Quantity FlagSDABWFLGchar"1-Disable Minimum Order Quantity
0 or Empty-Enable"
IO NumberIONumvarchar

4.2.3 Example Responses

Success:

{
    "status": "success",
    "pageNo": 1,
    "pageSize": 2,
    "totalPages": 1,
    "totalRecords": 2,
    "data": [
        {
            "COMPANYCD": "785",
            "APPLYNO": "RC103001232024704                  ",
            "APPLYYMD": "2024-07-05T00:00:00",
            "BusinessType": "10 ",
            "REASONCD": null,
            "ReasonDes": null,
            "CustomerGroup1": "Z202",
            "SOLDTOCODE": "2100002874",
            "CUSTOMERCD": "10300123  ",
            "SAP_CUSTOMERCD": "2200003606",
            "SALEPATN": "K1",
            "RequestedDate": "2024-07-05T00:00:00",
            "PromotionEvents": null,
            "headerTXT": null,
            "headerNote": null,
            "SAPORDERNO": "4204409918                         ",
            "SAPAPPLYTYPE": "Z4OR",
            "DeliveryNO": "4405007820",
            "DeliveryType": "Z4LF",
            "INOUTSTCYMD": "2024-07-22T00:00:00",
            "APP_OrderNo": null,
            "PayDate": null,
            "DailySummaryNo": null,
            "ExCUSTOMERCD": null,
            "SAP_VENDORCODE": null,
            "SAP_VENDORNAME": null,
            "CURCY": "CNY",
            "POSEX": "000011",
            "COSNR": "000010",
            "PRODUCTCD": "78700787  ",
            "SAPPRODUCTCD": "78700787101  ",
            "DETERMINECODE": "78700787101  ",
            "DESCRIBE": null,
            "CHARG": "COMMON    ",
            "ExpiryDate": "2027-07-10T00:00:00",
            "APPLYRQNTY": 1,
            "Freegoods": "0",
            "RejectReason": null,
            "ItemDEC": null,
            "Plant": "7857",
            "LGORT": "W001    ",
            "NETVALUE": 849.56,
            "ADMQNTY": 1,
            "AdMinYmd": "2024-07-21T23:37:19",
            "RPRICEMNY": 1280,
            "RETAILMNY": 1280,
            "WPRICEMNY": 960,
            "WHOLEMNY": 960,
            "UPRICEMNY": 849.56,
            "UNITMNY": 849.56,
            "TaxPrice": 13,
            "TaxAmount": 110.44,
            "ReturnPrice": null,
            "ReturnAmount": null,
            "MEINS": "EA ",
            "INOUTSTCNum": 1,
            "NOTE": null,
            "UPDATETIME": "2024-07-23T16:00:32.233",
            "UPDATEMAN": "SAP                 ",
            "STATUS": "3",
            "IFFlg": "0",
            "APPLYNO_STO": null,
            "SaleRtnflg": "S",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2024-07-22T14:00:50.107",
            "PRODTYPE": null,
            "BillingFlg": null,
            "CHECKPLATFLG": null,
            "USECODE": null,
            "DecisionNo": null,
            "CostCenter": null,
            "SDABW": null,
            "SAP_SALESORGANIZATION": null,
            "imw_matter_number": null,
            "BRAND": null,
            "EMPCODE": null,
            "EMPNAME": null,
            "SDABWFLG": null,
            "IONum": null
        },
        {
            "COMPANYCD": "785",
            "APPLYNO": "MV103000782024703                  ",
            "APPLYYMD": "2024-07-19T00:00:00",
            "BusinessType": "10 ",
            "REASONCD": null,
            "ReasonDes": null,
            "CustomerGroup1": "Z202",
            "SOLDTOCODE": "2100002780",
            "CUSTOMERCD": "10300078  ",
            "SAP_CUSTOMERCD": "2200003565",
            "SALEPATN": "K2",
            "RequestedDate": null,
            "PromotionEvents": null,
            "headerTXT": null,
            "headerNote": null,
            "SAPORDERNO": "4101636263                         ",
            "SAPAPPLYTYPE": "Z4KB",
            "DeliveryNO": "4405007817",
            "DeliveryType": "Z4LF",
            "INOUTSTCYMD": "2024-07-22T00:00:00",
            "APP_OrderNo": null,
            "PayDate": null,
            "DailySummaryNo": null,
            "ExCUSTOMERCD": null,
            "SAP_VENDORCODE": null,
            "SAP_VENDORNAME": null,
            "CURCY": null,
            "POSEX": "000011",
            "COSNR": "000010",
            "PRODUCTCD": "78700786  ",
            "SAPPRODUCTCD": "78700786101  ",
            "DETERMINECODE": "78700786101  ",
            "DESCRIBE": null,
            "CHARG": "COMMON    ",
            "ExpiryDate": "2027-07-10T00:00:00",
            "APPLYRQNTY": 3,
            "Freegoods": "0",
            "RejectReason": null,
            "ItemDEC": null,
            "Plant": "7857",
            "LGORT": "W001    ",
            "NETVALUE": null,
            "ADMQNTY": 3,
            "AdMinYmd": "2024-07-22T00:00:00",
            "RPRICEMNY": 1280,
            "RETAILMNY": null,
            "WPRICEMNY": null,
            "WHOLEMNY": null,
            "UPRICEMNY": null,
            "UNITMNY": null,
            "TaxPrice": null,
            "TaxAmount": null,
            "ReturnPrice": null,
            "ReturnAmount": null,
            "MEINS": "EA ",
            "INOUTSTCNum": 3,
            "NOTE": null,
            "UPDATETIME": "2024-07-23T16:00:35.323",
            "UPDATEMAN": "SAP                 ",
            "STATUS": "3",
            "IFFlg": "0",
            "APPLYNO_STO": null,
            "SaleRtnflg": "S",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2024-07-22T14:00:50.06",
            "PRODTYPE": null,
            "BillingFlg": null,
            "CHECKPLATFLG": null,
            "USECODE": null,
            "DecisionNo": null,
            "CostCenter": null,
            "SDABW": null,
            "SAP_SALESORGANIZATION": null,
            "imw_matter_number": null,
            "BRAND": null,
            "EMPCODE": null,
            "EMPNAME": null,
            "SDABWFLG": null,
            "IONum": null
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

4.3 SAP Issuance of 2B Inbound Orders (Old Table)

Request Endpoint: /api/v1/outBound/getOrder
Description: SAP Issuance of 2B Inbound Orders (Old Table)
Request Type: HTTP GET

4.3.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Page SizepageSizeINTNoRetrieves data by pagination. Default value is 50 if not specified.
Page NumberpageNoINTNoRetrieves data by pagination, current page number. Starts from 1. Default value is 1 if not specified.
Order NumberorderNoVARCHARNoExample: 1504575834
Product CodeproductCdVARCHARNo
Store CodecustomerCdVARCHARNo
Delivery Note NumbershipNoVARCHARNo
Order DateorderYMDdatetimeNoFilters data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2024-10-08 00:00:00.000
Outbound DateoutStcYMDdatetimeNoFilters data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2024-10-08 00:00:00.000
StatusstatusVARCHARNoExample: 3
SAP Sales Order NumbersapOrderNoVARCHARNoExample: 4205057289
Update TimeupdateTimedatetimeNoFilters updated data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Example request:
/api/v1/outBound/getOrder?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49

4.3.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
StatusstatusStringYes"success" indicates success, "error" indicates failure
Current Page NumberpageNoINTYes
Records per PagepageSizeINTYes
Total PagestotalPagesINTYes
Total RecordstotalRecordsINTYes
DatadataarrayYesRetrieved data
Error MessagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredNotes
Order NumberORDERNOchar
Company CodeCompanyCdchar
Store CodeCUSTOMERCDchar
Product CodePRODUCTCDchar
Red/Black NumberREDBLKNOint
Delivery Address CodeDeliverAddCDchar
Urgent Outbound FlagStcFlgchar"0-Non-urgent
1-Urgent"
Specified Production DateDirectProductYmddatetime
Product Production DateProductYmddatetime
Place CodePLACECDchar
Salesperson CodeSALEMANCDvarchar
Delivery Note NumberSHIPNOchar
Order HandlerORDDTMANchar
Order DateORDERYMDdatetime
Bulk Order QuantityMailinnoBigNumint
Order QuantityORDERQNTYint
Acknowledgment HandlerADMDTMANchar
Bulk Acknowledgment QuantityAdmMailinnoBigNumint
Acknowledged QuantityADMQNTYint
Shortage QuantityShortQntyint
Shortage AmountShortMnymoneyShortage Amount = Shortage Quantity * Wholesale Unit Price
Order ReasonOUTSTCNOchar
Outbound DateOUTSTCYMDdatetime
Wholesale AmountWHOLEMNYmoney
Retail AmountRETAILMNYmoney
StatusSTATUSchar"0-Out of Stock
1-Order Received
2-Outbound
3-Outbound Correction
5-Acknowledged
7-Outbound Terminated
8-Out of Stock Outbound
9-Outbound Completed
A-Inbound Completed
B-Mismatch on Receipt
C-Stock Secured
D-Fake Outbound
E-Matched (Fake Outbound)
F-Matched (Not Fake Outbound)
G-Canceled Order
After SAP implementation:
1-Application
2-Outbound
C-Stock Secured
A-Consignment Sales"
Wholesale Unit PriceWPRICEMNYmoney
Update TimeUPDATETIMEdatetime
Updated ByUPDATEMANchar
Unit PriceUPRICEMNYfloat
Unit AmountUNITMNYmoney
VAT AmountRISETAXMNYmoney
Consumption Tax AmountCONTAXMNYmoney
Expected Arrival DateHopeInYmddatetime
Actual Arrival DateInStcYmddatetime
Actual Inbound QuantityInStcQntyint
Acknowledgment DateAdMinYmddatetime
Scheduled Outbound DayOUTSTCDAYchar"1-7 correspond to Monday-Sunday
0-Urgent Outbound"
Fake Outbound QuantityFAKEOUTQNTYint
Fake Outbound HandlerFAKEOUTMANchar
Specified Outbound DateHopeOutYmddatetime
Outbound HandlerOUTSTCManchar
Bulk Outbound QuantityOutMailinnoBigNumint
Outbound QuantityOUTSTCNumint
Actual Arrival HandlerInStcManchar
Bulk Inbound QuantityInMailinnoBigNumint
Department CodeDEPMTCDchar
Responsible Person CodeAnswerManCodechar
Cost Payment FlagFreeFlgchar"0-Unpaid
1-Paid"
Interface FlagIFFlgchar"3-Pending SAP Import
0-Imported to SAP or not dispatched to store
1-Dispatched to store"
Retail Unit PriceRPRICEMNYmoney
Shortage DateQuehuoYmddatetime
SAP Sales Order NumberSAPORDERNOchar
Order TypeSAPAPPLYTYPEcharZ4OR: Standard Order
Sales NotesNOTEnvarchar

4.3.3 Example Responses

Success:

{
    "status": "success",
    "pageNo": 1,
    "pageSize": 2,
    "totalPages": 1,
    "totalRecords": 2,
    "data": [
        {
            "ORDERNO": "20240723                           ",
            "CompanyCd": "785",
            "CUSTOMERCD": "23100001  ",
            "PRODUCTCD": "78704071  ",
            "REDBLKNO": 0,
            "DeliverAddCD": null,
            "StcFlg": null,
            "DirectProductYmd": "2024-07-22T00:00:00",
            "ProductYmd": "2024-07-22T00:00:00",
            "PLACECD": "000",
            "SALEMANCD": "0",
            "SHIPNO": null,
            "ORDDTMAN": "SAP                 ",
            "ORDERYMD": "2024-07-22T00:00:00",
            "MailinnoBigNum": 0,
            "ORDERQNTY": 1,
            "ADMDTMAN": null,
            "AdmMailinnoBigNum": null,
            "ADMQNTY": 1,
            "ShortQnty": null,
            "ShortMny": null,
            "OUTSTCNO": null,
            "OUTSTCYMD": "2024-07-22T00:00:00",
            "WHOLEMNY": 216,
            "RETAILMNY": 400,
            "STATUS": "C",
            "WPRICEMNY": 216,
            "UPDATETIME": "2024-07-23T12:02:49.53",
            "UPDATEMAN": "SAP                 ",
            "UPRICEMNY": 0,
            "UNITMNY": 0,
            "RISETAXMNY": 0,
            "CONTAXMNY": 0,
            "HopeInYmd": "2024-07-22T00:00:00",
            "InStcYmd": "2024-07-22T00:00:00",
            "InStcQnty": 0,
            "AdMinYmd": "2024-07-22T23:04:30",
            "OUTSTCDAY": " ",
            "FAKEOUTQNTY": null,
            "FAKEOUTMAN": null,
            "HopeOutYmd": "2024-07-22T00:00:00",
            "OUTSTCMan": null,
            "OutMailinnoBigNum": null,
            "OUTSTCNum": 0,
            "InStcMan": null,
            "InMailinnoBigNum": null,
            "DEPMTCD": null,
            "AnswerManCode": null,
            "FreeFlg": "1",
            "IFFlg": "0",
            "RPRICEMNY": 400,
            "QuehuoYmd": "2024-07-22T00:00:00",
            "SAPORDERNO": "4204409937                         ",
            "SAPAPPLYTYPE": "Z4OR",
            "NOTE": null
        },
        {
            "ORDERNO": "4204409943                         ",
            "CompanyCd": "9Z2",
            "CUSTOMERCD": "23100001  ",
            "PRODUCTCD": "45631     ",
            "REDBLKNO": 0,
            "DeliverAddCD": null,
            "StcFlg": null,
            "DirectProductYmd": "2024-07-23T01:47:21",
            "ProductYmd": "2024-07-23T01:47:21",
            "PLACECD": "000",
            "SALEMANCD": "0",
            "SHIPNO": null,
            "ORDDTMAN": "SAP                 ",
            "ORDERYMD": "2024-07-23T01:47:21",
            "MailinnoBigNum": 0,
            "ORDERQNTY": 2,
            "ADMDTMAN": null,
            "AdmMailinnoBigNum": null,
            "ADMQNTY": 2,
            "ShortQnty": null,
            "ShortMny": null,
            "OUTSTCNO": null,
            "OUTSTCYMD": "2024-07-23T01:47:21",
            "WHOLEMNY": 278.64,
            "RETAILMNY": 516,
            "STATUS": "C",
            "WPRICEMNY": 139.32,
            "UPDATETIME": "2024-07-23T15:01:39.927",
            "UPDATEMAN": "SAP                 ",
            "UPRICEMNY": 0,
            "UNITMNY": 0,
            "RISETAXMNY": 0,
            "CONTAXMNY": 0,
            "HopeInYmd": "2024-07-23T01:47:21",
            "InStcYmd": "2024-07-23T01:47:21",
            "InStcQnty": 0,
            "AdMinYmd": "2024-07-23T01:47:21",
            "OUTSTCDAY": " ",
            "FAKEOUTQNTY": null,
            "FAKEOUTMAN": null,
            "HopeOutYmd": "2024-07-23T01:47:21",
            "OUTSTCMan": null,
            "OutMailinnoBigNum": null,
            "OUTSTCNum": 0,
            "InStcMan": null,
            "InMailinnoBigNum": null,
            "DEPMTCD": null,
            "AnswerManCode": null,
            "FreeFlg": "1",
            "IFFlg": "0",
            "RPRICEMNY": 258,
            "QuehuoYmd": "2024-07-23T01:47:21",
            "SAPORDERNO": "4204409943                         ",
            "SAPAPPLYTYPE": "Z4OR",
            "NOTE": null
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

4.4 SAP Issuance of 2B Return Outbound (Old Table)

Request Endpoint: /api/v1/outBound/getRtnSale
Description: SAP Issuance of 2B Return Outbound (Old Table)
Request Type: HTTP GET

4.4.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Page SizepageSizeINTNoRetrieves data by pagination. Default value is 50 if not specified.
Page NumberpageNoINTNoRetrieves data by pagination, current page number. Starts from 1. Default value is 1 if not specified.
Return NumberrtnSaleNoVARCHARNoExample: 1504575834
Product CodeproductCdVARCHARNoExample: 10
Store CodecustomerCdVARCHARNoExample: 10200184
Return DatertnSaleYMDdatetimeNoFilters data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
Processing DatehandleYMDdatetimeNoFilters data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
SAP Order NumbersapOrderNoVARCHARNoExample: 4203193399
StatusstatusVARCHARNoExample: 3
Update TimeupdateTimedatetimeNoFilters updated data after (and including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Example request:
/api/v1/outBound/getRtnSale?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49

4.4.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
StatusstatusStringYes"success" indicates success, "error" indicates failure
Current Page NumberpageNoINTYes
Records per PagepageSizeINTYes
Total PagestotalPagesINTYes
Total RecordstotalRecordsINTYes
DatadataarrayYesRetrieved data
Error MessagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredNotes
Return NumberRTNSALENOchar
Company CodeCompanyCdchar
Store CodeCUSTOMERCDchar
Product CodePRODUCTCDchar
Red/Black IndicatorREDBLKNOint
Return DateRTNSALEYMDdatetime
Place CodePLACECDchar
Product Production DateProductYmddatetime
Quality Product QuantityQULQNTYint
Defective Product QuantityNOTQULQNTYint
Wholesale Unit PriceWPRICEMNYmoney
Retail Unit PriceRPRICEMNYmoney
Wholesale AmountWHOLEMNYmoney
Restored QuantityHOMQULQNTYint
Unit AmountUNITMNYmoney
Value-Added TaxRISETAXMNYmoney
Rejected QuantityREJECTQNTYint
Processing DateHANDLEYMDdatetime
Consumption TaxCONTAXMNYmoney
Entry StaffINDTMANchar
Processing StaffHANDDTMANchar
Update TimeUPDATETIMEdatetime
Updated ByUPDATEMANchar
ApplicantAPPLYMANchar
Application QuantityAPPLYMOUNTint
Return TypeRTNKINDchar
Order ReasonREJECTEDRESONCDchar
Return Quantityreturnqntyint
Confirmed QuantityADMINQNTYint
Confirmation DateADMINYMDdatetime
Confirmation StaffADMINMANchar
Status CodeSTATUSchar"0-Terminated
1-Application
2-Confirmed
Z-Consignment Store Return (Post-SAP implementation)"
SAP Sales Order NumberSAPORDERNOchar
SAP Order TypeSAPAPPLYTYPEcharZ4RE: Standard Return Order
Sales NotesNOTEnvarchar
Interface Run StatusIFFLGchar"0-Extracted
3-Not Extracted"

4.4.3 Return Value Examples

Success:

{
    "status": "success",
        "pageNo": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalRecords": 2,
    "data": [
        {
            "RTNSALENO": "23171291                           ",
            "CompanyCd": "785",
            "CUSTOMERCD": "33300004",
            "PRODUCTCD": "16173   ",
            "REDBLKNO": 0,
            "RTNSALEYMD": "2023-03-01T00:00:00",
            "PLACECD": "000",
            "ProductYmd": "2023-03-01T00:00:00",
            "QULQNTY": 0,
            "NOTQULQNTY": 0,
            "WPRICEMNY": 181.04,
            "RPRICEMNY": 248,
            "WHOLEMNY": 350312.4,
            "HOMQULQNTY": 0,
            "UNITMNY": 0,
            "RISETAXMNY": 0,
            "REJECTQNTY": 0,
            "HANDLEYMD": "2023-03-01T00:00:00",
            "CONTAXMNY": 0,
            "INDTMAN": "NULL                ",
            "HANDDTMAN": null,
            "UPDATETIME": "2023-07-05T17:07:23.67",
            "UPDATEMAN": "SAP                 ",
            "APPLYMAN": null,
            "APPLYMOUNT": 1935,
            "RTNKIND": null,
            "REJECTEDRESONCD": "99  ",
            "RETURNQNTY": 1935,
            "ADMINQNTY": 1935,
            "ADMINYMD": "2023-03-01T00:00:00",
            "ADMINMAN": "SAP                 ",
            "STATUS": "2",
            "SAPORDERNO": "4300289445                         ",
            "SAPAPPLYTYPE": "Z4RE",
            "NOTE": null,
            "IFFLG": "0  "
        },
        {
            "RTNSALENO": "4300363400                         ",
            "CompanyCd": "785",
            "CUSTOMERCD": "20600517",
            "PRODUCTCD": "74252779",
            "REDBLKNO": 0,
            "RTNSALEYMD": "2023-11-20T00:00:00",
            "PLACECD": "000",
            "ProductYmd": "2023-11-20T00:00:00",
            "QULQNTY": 0,
            "NOTQULQNTY": 0,
            "WPRICEMNY": 502.2,
            "RPRICEMNY": 930,
            "WHOLEMNY": 5022,
            "HOMQULQNTY": 0,
            "UNITMNY": 0,
            "RISETAXMNY": 0,
            "REJECTQNTY": 0,
            "HANDLEYMD": "2023-11-20T00:00:00",
            "CONTAXMNY": 0,
            "INDTMAN": "NULL                ",
            "HANDDTMAN": null,
            "UPDATETIME": "2023-11-20T16:00:26.913",
            "UPDATEMAN": "SAP                 ",
            "APPLYMAN": null,
            "APPLYMOUNT": 10,
            "RTNKIND": null,
            "REJECTEDRESONCD": "99  ",
            "RETURNQNTY": 10,
            "ADMINQNTY": 10,
            "ADMINYMD": "2023-11-20T00:00:00",
            "ADMINMAN": "SAP                 ",
            "STATUS": "2",
            "SAPORDERNO": "4300363400                         ",
            "SAPAPPLYTYPE": "Z4RE",
            "NOTE": null,
            "IFFLG": "0  "
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

4.5 SAP 2B Adjustment Order Issuance (Old Table)

API Endpoint: /api/v1/outBound/getNewBusiness
API Description: SAP 2B Adjustment Order Issuance (Old Table)
Request Type: HTTP GET

4.5.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Page SizepageSizeINTNoRetrieves data in pages. Number of items per page. Default is 50 if not provided.
Page NumberpageNoINTNoRetrieves data in pages. Current page number. Pages start from 1. Default is 1 if not provided.
Order NumberorderNoVARCHARNoExample: RC231000012024A01
Store CodecustomerCdVARCHARNoExample: 10200184
Product CodeproductCdVARCHARNoExample: 78705518
Order DateorderYMDdatetimeNoExample: 2024-10-08 00:00:00.000. Filters data on or after this date. Supports formats yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
Outbound DateoutStcYMDdatetimeNoExample: 2024-10-08 00:00:00.000. Filters data on or after this date. Supports formats yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
StatusstatusVARCHARNoExample: 3
Update TimeupdateTimedatetimeNoExample: 2023-09-15 18:06:32.447. Filters data updated on or after this time. Supports formats yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
Sales Order NumbersapOrderNoVARCHARNoExample: 4203193399

API Request Example:
/api/v1/outBound/getNewBusiness?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49

4.5.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure.
Current Page NumberpageNoINTYes
Items per PagepageSizeINTYes
Total PagestotalPagesINTYes
Total ItemstotalRecordsINTYes
DatadataarrayYesThe retrieved data.
Error MessagemessageStringNoReturned when status is "error". Provides error details.
data
Field DescriptionField NameTypeRequiredNotes
Order NumberORDERNOchar
Company CodeCompanyCdchar
Store CodeCUSTOMERCDchar
Product CodePRODUCTCDchar
Red/Black FlagREDBLKNOintValue: 0, as of 2014-11-19
Delivery Location CodeDeliverAddCDchar
Urgent Outbound FlagStcFlgchar
Specified Production DateDirectProductYmddatetime
Product Production DateProductYmddatetime
Location CodePLACECDchar
Salesperson CodeSALEMANCDvarchar
Delivery Order NumberSHIPNOchar
Order Responsible PersonORDDTMANchar
Order DateORDERYMDdatetime
Large Package Quantity (Order)MailinnoBigNumint
Order QuantityORDERQNTYint
Approval Responsible PersonADMDTMANchar
Approval DateAdMinYmddatetime
Stock-out DateQuehuoYmddatetime
Large Package Quantity (Confirmed)AdmMailinnoBigNumint
Approved QuantityADMQNTYint
Stock-out QuantityShortQntyint
Stock-out AmountShortMnymoney
Order ReasonOUTSTCNOcharPreviously "Outbound Summary Table Number" - 2014-04-29
Fake Outbound Responsible PersonFAKEOUTMANchar
Fake Outbound QuantityFAKEOUTQNTYint
Specified Outbound DateHopeOutYmddatetime
Outbound DateOUTSTCYMDdatetime
Outbound Responsible PersonOUTSTCManchar
Large Package Quantity (Outbound)OutMailinnoBigNumint
Outbound QuantityOUTSTCNumint
Expected Arrival DateHopeInYmddatetime
Actual Arrival DateInStcYmddatetime
Actual Arrival Responsible PersonInStcManchar
Large Package Quantity (Inbound)InMailinnoBigNumint
Actual Inbound QuantityInStcQntyint
Fixed DayOUTSTCDAYchar
Department CodeDEPMTCDchar
Responsible Person CodeAnswerManCodechar
Cost Payment DivisionFreeFlgchar
Wholesale Unit PriceWPRICEMNYmoney
Wholesale AmountWHOLEMNYmoney
Unit PriceUPRICEMNYfloat
Unit AmountUNITMNYmoney
Retail AmountRETAILMNYmoney
VAT AmountRISETAXMNYmoney
Consumption Tax AmountCONTAXMNYmoney
StatusSTATUSchar2 - Completed Status
Interface FlagIFFlgchar"0 - Interface not generated;
1 - Interface generated."
Update TimeUPDATETIMEdatetime
Updated ByUPDATEMANchar
Retail Unit PriceRPRICEMNYchar
SAP Document TypeSAPAPPLYTYPEcharExample: Z4IO - Adjustment Free Usage Document
POS Division NamePOSKBNchar
Sales Order NumberSAPORDERNOchar
Sales RemarksNOTEnvarchar

4.5.3 Return Value Examples

Success:

{
    "status": "success",
        "pageNo": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalRecords": 2,
    "data": [
        {
            "ORDERNO": "4202483035       ",
            "COMPANYCD": "785",
            "CUSTOMERCD": "20700001",
            "PRODUCTCD": "13998   ",
            "REDBLKNO": 0,
            "DELIVERADDCD": null,
            "STCFLG": "0",
            "DIRECTPRODUCTYMD": "2023-01-06T00:00:00",
            "PRODUCTYMD": "2023-01-06T00:00:00",
            "PLACECD": "000",
            "SALEMANCD": "000",
            "SHIPNO": "4402991338  ",
            "ORDDTMAN": "9999                ",
            "ORDERYMD": "2023-01-06T05:26:17",
            "MAILINNOBIGNUM": 0,
            "ORDERQNTY": 1,
            "ADMDTMAN": "9999                ",
            "ADMINYMD": "2023-01-06T05:26:17",
            "QUEHUOYMD": "2023-01-06T00:00:00",
            "ADMMAILINNOBIGNUM": 0,
            "ADMQNTY": 1,
            "SHORTQNTY": 0,
            "SHORTMNY": 0,
            "OUTSTCNO": "561          ",
            "FAKEOUTMAN": null,
            "FAKEOUTQNTY": 0,
            "HOPEOUTYMD": "2023-01-06T00:00:00",
            "OUTSTCYMD": "2023-01-06T00:00:00",
            "OUTSTCMAN": null,
            "OUTMAILINNOBIGNUM": 0,
            "OUTSTCNUM": 1,
            "HOPEINYMD": "2023-01-06T00:00:00",
            "INSTCYMD": "2023-01-06T00:00:00",
            "INSTCMAN": null,
            "INMAILINNOBIGNUM": 0,
            "INSTCQNTY": 1,
            "OUTSTCDAY": " ",
            "DEPMTCD": null,
            "ANSWERMANCODE": null,
            "FREEFLG": "1",
            "WPRICEMNY": 0,
            "WHOLEMNY": 0,
            "UPRICEMNY": 0,
            "UNITMNY": 0,
            "RETAILMNY": 0,
            "RISETAXMNY": 0,
            "CONTAXMNY": 0,
            "STATUS": "2",
            "IFFLG": "0",
            "UPDATETIME": "2023-07-05T17:01:41.117",
            "UPDATEMAN": "SAP                 ",
            "RPRICEMNY": null,
            "SAPAPPLYTYPE": "Z4IO",
            "POSKBN": "Z499                ",
            "SAPORDERNO": "4202483035                         ",
            "NOTE": null
        },
        {
            "ORDERNO": "4202483035       ",
            "COMPANYCD": "785",
            "CUSTOMERCD": "20700001",
            "PRODUCTCD": "15282   ",
            "REDBLKNO": 0,
            "DELIVERADDCD": null,
            "STCFLG": "0",
            "DIRECTPRODUCTYMD": "2023-01-06T00:00:00",
            "PRODUCTYMD": "2023-01-06T00:00:00",
            "PLACECD": "000",
            "SALEMANCD": "000",
            "SHIPNO": "4402991338  ",
            "ORDDTMAN": "9999                ",
            "ORDERYMD": "2023-01-06T05:26:17",
            "MAILINNOBIGNUM": 0,
            "ORDERQNTY": 8,
            "ADMDTMAN": "9999                ",
            "ADMINYMD": "2023-01-06T05:26:17",
            "QUEHUOYMD": "2023-01-06T00:00:00",
            "ADMMAILINNOBIGNUM": 0,
            "ADMQNTY": 8,
            "SHORTQNTY": 0,
            "SHORTMNY": 0,
            "OUTSTCNO": "561          ",
            "FAKEOUTMAN": null,
            "FAKEOUTQNTY": 0,
            "HOPEOUTYMD": "2023-01-06T00:00:00",
            "OUTSTCYMD": "2023-01-06T00:00:00",
            "OUTSTCMAN": null,
            "OUTMAILINNOBIGNUM": 0,
            "OUTSTCNUM": 8,
            "HOPEINYMD": "2023-01-06T00:00:00",
            "INSTCYMD": "2023-01-06T00:00:00",
            "INSTCMAN": null,
            "INMAILINNOBIGNUM": 0,
            "INSTCQNTY": 8,
            "OUTSTCDAY": " ",
            "DEPMTCD": null,
            "ANSWERMANCODE": null,
            "FREEFLG": "1",
            "WPRICEMNY": 0,
            "WHOLEMNY": 0,
            "UPRICEMNY": 0,
            "UNITMNY": 0,
            "RETAILMNY": 0,
            "RISETAXMNY": 0,
            "CONTAXMNY": 0,
            "STATUS": "2",
            "IFFLG": "0",
            "UPDATETIME": "2023-07-05T17:01:41.117",
            "UPDATEMAN": "SAP                 ",
            "RPRICEMNY": null,
            "SAPAPPLYTYPE": "Z4IO",
            "POSKBN": "Z499                ",
            "SAPORDERNO": "4202483035                         ",
            "NOTE": null
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

4.6 SAP PO Reversal Query

API Endpoint: /api/v1/outBound/getStockMvmtGR
API Description: SAP PO Reversal Query
Request Type: HTTP GET

4.6.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Page SizepageSizeINTNoRetrieves data in pages. Number of items per page. Default is 50 if not provided.
Page NumberpageNoINTNoRetrieves data in pages. Current page number. Pages start from 1. Default is 1 if not provided.
Purchase Order NumberpoNoVARCHARNoExample: RC231000012024A01
Timestamp (Current Time)TimestampdatetimeNoExample: 2024-10-08 00:00:00.000. Filters data on or after this time. Supports formats yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.

API Request Example:
/api/v1/outBound/getStockMvmtGR?pageNo=1&pageSize=2&Timestamp=2023-06-23 12:02:49

4.6.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure.
Current Page NumberpageNoINTYes
Items per PagepageSizeINTYes
Total PagestotalPagesINTYes
Total ItemstotalRecordsINTYes
DatadataarrayYesRetrieved data.
Error MessagemessageStringNoReturned when status is "error". Provides error details.
data
Field DescriptionField NameTypeRequiredNotes
Document Unique IDDocumentIDVARCHAR
Document DateDocDateVARCHAR
Posting DatePostingDateVARCHAR
Creation DateCreateDateVARCHAR
Creation TimeCreateTimeVARCHAR
Header TextBKTXTVARCHAR
Material DocumentProDocVARCHAR
Document YearProDocYearVARCHAR
Line ItemLinenoVARCHAR
Vendor CodeVendorCodeVARCHAR
Purchase Order NumberPONoVARCHAR
Purchase Order Line ItemPOItemnoVARCHAR
Intramart PONPSPONoVARCHAR
Material CodeSAPPRODUCTCDVARCHAR
QuantityQntyint
UnitERFMEVARCHAR
PlantPlantVARCHAR
Storage LocationLGORTVARCHAR
BatchCHARGVARCHAR
Movement TypeMoveTypeVARCHAR
Timestamp (Current Time)Timestampdatetime

4.6.3 Return Value Examples

Success:

{
    "status": "success",
        "pageNo": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalRecords": 2,
    "data": [
        {
            "DocumentID": "ed60b9ea58dd475c97f90bc4429f6bd5",
            "DocDate": "20240105",
            "PostingDate": "20240105",
            "CreateDate": "20240104",
            "CreateTime": "220008",
            "BKTXT": "PO2311207",
            "ProDoc": "5003780718",
            "ProDocYear": "2024",
            "Lineno": "0001",
            "VendorCode": "2100003079",
            "PONo": "4560010994",
            "POItemno": "00010",
            "NPSPONo": "PO2311207",
            "SAPPRODUCTCD": "78702537101",
            "Qnty": 10000,
            "ERFME": "EA",
            "Plant": "785B",
            "LGORT": "W001",
            "CHARG": null,
            "MoveType": "101",
            "Timestamp": "2024-10-10T19:50:14"
        },
        {
            "DocumentID": "5a3018b4e036405b8e257d78f656fe3f",
            "DocDate": "20240105",
            "PostingDate": "20240105",
            "CreateDate": "20240104",
            "CreateTime": "220008",
            "BKTXT": "PO2311207",
            "ProDoc": "5003780718",
            "ProDocYear": "2024",
            "Lineno": "0001",
            "VendorCode": "2100003079",
            "PONo": "4560010994",
            "POItemno": "00010",
            "NPSPONo": "PO2311207",
            "SAPPRODUCTCD": "78702537101",
            "Qnty": 10000,
            "ERFME": "EA",
            "Plant": "785B",
            "LGORT": "W001",
            "CHARG": null,
            "MoveType": "101",
            "Timestamp": "2024-10-15T15:14:56"
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

4.7 ToC Sales Order Details Query (For Reconciliation)

API Endpoint: /api/v1/outBound/getBusinessSubOMS
API Description: ToC Sales Order Details Query (For Reconciliation)
Request Type: HTTP GET

4.7.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredNotes
Page SizepageSizeINTNoRetrieves data in pages. Number of items per page. Default is 50 if not provided.
Page NumberpageNoINTNoRetrieves data in pages. Current page number. Pages start from 1. Default is 1 if not provided.
Total return identifiertotalFlgBooleanNoControls whether totalPages, totalRecords parameters are returned, boolean type, true, false, default false is not returned.
Document NumberapplyNoVARCHARNoExample: RC231000012024A01
SAP Sales Order NumbersapOrderNoVARCHARNo
Summary NumberdailySummaryNoVARCHARNo
Consolidation FlagsummaryFlgVARCHARNoRefreshed by EAI:
0 - Not Consolidated
1 - Consolidated
update TimeupdateTimedatetimeNoExample: 2024-10-08 00:00:00.000. Filters data on or after this time. Supports formats yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.

API Request Example:
/api/v1/outBound/getBusinessSubOMS?pageNo=1&pageSize=2&updateTime=2023-06-23 12:02:49&totalFlg=true

4.7.2 Response Parameters

Field DescriptionField NameTypeRequiredNotes
Return StatusstatusStringYes"success" indicates success, "error" indicates failure.
Current Page NumberpageNoINTYes
Items per PagepageSizeINTYes
Total PagestotalPagesINTNoReturned according to the totalFlg identifier, if true
Total ItemstotalRecordsINTNoReturned according to the totalFlg identifier, if true
DatadataarrayYesRetrieved data.
Error MessagemessageStringNoReturned when status is "error". Provides error details.
data
Field DescriptionField NameTypeRequiredNotes
Company CodeCOMPANYCDchar
Document NumberAPPLYNOchar"POS Number
OMS Outbound Order Number"
Application DateAPPLYYMDdatetime
Business TypeBusinessTypechar"10: Replenishment to Store
11: Return to Company
20: Store Sales
21: Store Returns
30: Free Sales Order
31: Free Order Return"
Order Reason (Head)REASONCDchar"① Only for free orders and returns; otherwise, not required
② Free order upload only available in OMS"
Order Reason DescriptionReasonDeschar
POS ClassificationCustomerGroup1char"Z201: SMILE POS
Z202: PS POS
Z203: E-ORDER
Z204: CS POS
Z205: SCHD
Z206: Others
Z207: OMS
Z208: ONECX"
Sold-to PartySOLDTOCODEchar
Store CodeCUSTOMERCDcharPeripheral store code
SAP Ship-to CodeSAP_CUSTOMERCDchar
Customer ClassificationSALEPATNchar"K1: Distribution
K2: Consignment
FS: Direct Sale"
Requested Delivery DateRequestedDatedatetime
Promotion EventsPromotionEventschar
Remarks (Link POS)headerTXTcharOther textual information
Remarks (Link WMS)headerNotecharDelivery information passed to WMS
SAP Sales Order NumberSAPORDERNOchar
SAP Order TypeSAPAPPLYTYPEchar
Outbound/Inbound Delivery NumberDeliveryNOchar
Delivery TypeDeliveryTypechar
Outbound/Inbound DateINOUTSTCYMDdatetime
Mini-program Order NumberAPP_OrderNocharOMS exclusive
Payment DatePayDatedatetimeOMS exclusive
Summary NumberDailySummaryNocharConsolidated order number in OMS
External Store CodeExCUSTOMERCDchar
Vendor CodeSAP_VENDORCODEchar
Vendor NameSAP_VENDORNAMEchar
CurrencyCURCYchar
Order Line ItemPOSEXchar
Delivery Line ItemCOSNRchar
Product CodePRODUCTCDcharPeripheral 8-digit product code
SAP Product CodeSAPPRODUCTCDchar
Material Determination CodeDETERMINECODEchar
Material DescriptionDESCRIBEchar
BatchCHARGchar
Expiration DateExpiryDatedatetime
Application QuantityAPPLYRQNTYint
Free Goods IdentifierFreegoodschar
Rejection Reason (Item)RejectReasonchar
Item DescriptionItemDECchar
PlantPLANTchar
Storage Location CodeLGORTchar
Net Order ValueNETVALUEmoneyTotal price of line items excluding tax
Approval QuantityADMQNTYint
Approval DateAdMinYmddatetime
Retail Unit PriceRPRICEMNYmoney
Retail AmountRETAILMNYmoney
Wholesale Price (Including Tax)WPRICEMNYmoney"If FSS/OMS: Actual sales price"
Wholesale Amount (Including Tax)WHOLEMNYmoney
Unit Price (Excluding Tax)UPRICEMNYmoney
Unit Amount (Excluding Tax)UNITMNYmoney
Tax RateTaxPriceint
Tax AmountTaxAmountmoney
Return PriceReturnPricemoney
Return AmountReturnAmountmoney
UoM (Unit of Measurement)MEINSchar
Inbound/Outbound QuantityINOUTSTCNumint
Sales NotesNOTEnvarcharOrder remarks in outbound order
Update TimeUPDATETIMEdatetime
Updated ByUPDATEMANchar
StatusSTATUSchar"1: Application
2: Confirmation
3: Outbound
4: Arrival Confirmation"
Interface Execution FlagIFFlgchar"0: Imported to SAP or not sent to store
1: Sent to store
3: Pending SAP Import"
SAP STO NumberAPPLYNO_STOchar
Supplement/Return FlagSaleRtnFlgchar"S: Supplement/POD Overdelivery
R: Return/POD Shortage"
Created ByCREATEMANchar
Creation TimeCREATETIMEdatetime
Material Type IdentifierPRODTYPEchar"1: Service Material
0: Non-Service Material"
Billing IdentifierBillingFlgchar"1: Invoiced"
Reconciliation Platform Transmission FlagCheckPlatFlgcharUsed by EAI
PurposeUSECODEchar
Decision Case NumberDecisionNovarchar
Cost CenterCostCenterchar
Minimum Order Quantity IdentifierSDABWchar"EAI assigns value Z002 for Minimum Order Quantity"
Sales OrganizationSAP_SALESORGANIZATIONchar
Decision Case Numberimw_matter_numbervarchar
BrandBRANDchar
Actual Quota Allocation QuantityActualQNTYint
Quota Deficit FlagQuotaDeficitFlgchar
Applicant Employee CodeEMPCODEvarchar
Applicant Employee NameEMPNAMEvarchar
Minimum Order Quantity Activation FlagSDABWFLGchar"1: Do not activate minimum order quantity
0 or blank: Activate"
Document Unique IDDocumentIDvarchar
Timestamp (Current Time)Timestampdatetime
Peripheral IdentifierSysFlgchar"1: POS
2: SCHD
3: E-order
4: Shopex
5: UCO
6: LeQee
7: Decision
8: Purchase"
Points Redemption FlagPointsFlgchar"1: Points Redemption"
Consolidation FlagSummaryFlgchar"Refreshed by EAI:
0: Not Consolidated
1: Consolidated"
Order SourceorderSourcevarchar"POS"
Brand CodebrandCodevarchar"Only accepts the following codes:
CPB, EFM, IPSA, NARS, TG, SDK, SHI, PCV, LM, BAUM"
Sales PlatformchannelCodevarchar"POS (lowercase)"
Order TypeorderTypeint"0: Sales Order
1: Return Order"
Order StatusorderStatusvarchar"1: Order Completed"
Payment MethodpayTypevarchar"POS (indicates bank POS)"
Payment StatuspayStatusint"2: Paid
3: Refunded"
Inbound/Outbound StatusshippedStatusint"2: Outbound
5: Inbound"
Member IDmemberIdvarchar
Shop NameshopNamevarcharNot provided
Source Platform Order NumberparentPayCodevarcharAssociated original order number for returns
Order Creation TimeorderTimevarchar
Payment TimepayTimevarchar
Payable AmountamountvarcharPayment amount for this order
Adjustment AmountreviseAmountvarcharNot provided
Material CodeprdCodevarchar
Product NameprdNamevarchar
Shipping TimeshippedTimevarchar
Presale signPresaleFlagvarchar0: general sales, 1: pre-sale, 2: pre-sale delivery, 3: group purchase coupon purchase, 4: group purchase coupon delivery
Pre-sale order numberPresaleTradeNovarchar
BC codeBCCodevarchar

4.7.3 Return Value Examples

Success:

{
    "status": "success",
        "pageNo": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalRecords": 2,
    "data": [
        {
            "COMPANYCD": "785",
            "APPLYNO": "1909397583                         ",
            "APPLYYMD": "2024-05-21T00:00:00",
            "BusinessType": "20 ",
            "REASONCD": null,
            "ReasonDes": null,
            "CustomerGroup1": "Z207",
            "SOLDTOCODE": "2100002961",
            "CUSTOMERCD": "10400000  ",
            "SAP_CUSTOMERCD": "2200003134",
            "SALEPATN": "FS",
            "RequestedDate": null,
            "PromotionEvents": null,
            "headerTXT": null,
            "headerNote": null,
            "SAPORDERNO": "                                   ",
            "SAPAPPLYTYPE": "Z4BV",
            "DeliveryNO": null,
            "DeliveryType": null,
            "INOUTSTCYMD": null,
            "APP_OrderNo": "3897472826800671542                ",
            "PayDate": "2024-05-20T00:00:00",
            "DailySummaryNo": "S220000313420241025133128101       ",
            "ExCUSTOMERCD": null,
            "SAP_VENDORCODE": null,
            "SAP_VENDORNAME": null,
            "CURCY": null,
            "POSEX": "10    ",
            "COSNR": null,
            "PRODUCTCD": "16182     ",
            "SAPPRODUCTCD": "10116182205CN",
            "DETERMINECODE": "10116182205CN",
            "DESCRIBE": null,
            "CHARG": "COMMON    ",
            "ExpiryDate": null,
            "APPLYRQNTY": 2,
            "Freegoods": "0",
            "RejectReason": null,
            "ItemDEC": null,
            "PLANT": "785B",
            "LGORT": "W001    ",
            "NETVALUE": null,
            "ADMQNTY": null,
            "AdMinYmd": null,
            "RPRICEMNY": null,
            "RETAILMNY": null,
            "WPRICEMNY": null,
            "WHOLEMNY": 897.1,
            "UPRICEMNY": null,
            "UNITMNY": null,
            "TaxPrice": null,
            "TaxAmount": null,
            "ReturnPrice": null,
            "ReturnAmount": null,
            "MEINS": null,
            "INOUTSTCNum": null,
            "NOTE": null,
            "UPDATETIME": "2024-10-25T13:31:30.417",
            "UPDATEMAN": "EAI                 ",
            "STATUS": "1",
            "IFFlg": "0",
            "APPLYNO_STO": null,
            "SaleRtnFlg": null,
            "CREATEMAN": "EAI                 ",
            "CREATETIME": "2024-10-22T17:40:11.883",
            "PRODTYPE": "0",
            "BillingFlg": null,
            "CheckPlatFlg": "3",
            "USECODE": null,
            "DecisionNo": null,
            "CostCenter": null,
            "SDABW": null,
            "SAP_SALESORGANIZATION": "7851",
            "imw_matter_number": null,
            "BRAND": "11",
            "ActualQNTY": null,
            "QuotaDeficitFlg": "0",
            "EMPCODE": null,
            "EMPNAME": null,
            "SDABWFLG": null,
            "DocumentID": "25092e0a11184690ac2454cdcc67c780",
            "Timestamp": "2024-10-21T15:28:11",
            "SysFlg": "5",
            "PointsFlg": null,
            "SummaryFlg": "1",
            "brandCode": null,
            "channelCode": null,
            "orderType": null,
            "orderStatus": null,
            "payType": null,
            "payStatus": null,
            "shippedStatus": null,
            "memberId": null,
            "shopName": null,
            "parentPayCode": null,
            "orderTime": null,
            "payTime": null,
            "amount": null,
            "reviseAmount": null,
            "prdCode": null,
            "prdName": null,
            "shippedTime": null
        },
        {
            "COMPANYCD": "785",
            "APPLYNO": "1909397583                         ",
            "APPLYYMD": "2024-05-21T00:00:00",
            "BusinessType": "20 ",
            "REASONCD": null,
            "ReasonDes": null,
            "CustomerGroup1": "Z207",
            "SOLDTOCODE": "2100002961",
            "CUSTOMERCD": "10400000  ",
            "SAP_CUSTOMERCD": "2200003134",
            "SALEPATN": "FS",
            "RequestedDate": null,
            "PromotionEvents": null,
            "headerTXT": null,
            "headerNote": null,
            "SAPORDERNO": "                                   ",
            "SAPAPPLYTYPE": "Z4BV",
            "DeliveryNO": null,
            "DeliveryType": null,
            "INOUTSTCYMD": null,
            "APP_OrderNo": "3897472826800671542                ",
            "PayDate": "2024-05-20T00:00:00",
            "DailySummaryNo": "S220000313420241025133128101       ",
            "ExCUSTOMERCD": null,
            "SAP_VENDORCODE": null,
            "SAP_VENDORNAME": null,
            "CURCY": null,
            "POSEX": "20    ",
            "COSNR": null,
            "PRODUCTCD": "16182     ",
            "SAPPRODUCTCD": "10116182205CN",
            "DETERMINECODE": "10116182205CN",
            "DESCRIBE": null,
            "CHARG": "COMMON    ",
            "ExpiryDate": null,
            "APPLYRQNTY": 1,
            "Freegoods": "1",
            "RejectReason": null,
            "ItemDEC": null,
            "PLANT": "785B",
            "LGORT": "W001    ",
            "NETVALUE": null,
            "ADMQNTY": null,
            "AdMinYmd": null,
            "RPRICEMNY": null,
            "RETAILMNY": null,
            "WPRICEMNY": null,
            "WHOLEMNY": 0,
            "UPRICEMNY": null,
            "UNITMNY": null,
            "TaxPrice": null,
            "TaxAmount": null,
            "ReturnPrice": null,
            "ReturnAmount": null,
            "MEINS": null,
            "INOUTSTCNum": null,
            "NOTE": null,
            "UPDATETIME": "2024-10-25T13:31:30.417",
            "UPDATEMAN": "EAI                 ",
            "STATUS": "1",
            "IFFlg": "0",
            "APPLYNO_STO": null,
            "SaleRtnFlg": null,
            "CREATEMAN": "EAI                 ",
            "CREATETIME": "2024-10-22T17:40:11.92",
            "PRODTYPE": "0",
            "BillingFlg": null,
            "CheckPlatFlg": "3",
            "USECODE": null,
            "DecisionNo": null,
            "CostCenter": null,
            "SDABW": null,
            "SAP_SALESORGANIZATION": "7851",
            "imw_matter_number": null,
            "BRAND": "11",
            "ActualQNTY": null,
            "QuotaDeficitFlg": "0",
            "EMPCODE": null,
            "EMPNAME": null,
            "SDABWFLG": null,
            "DocumentID": "25092e0a11184690ac2454cdcc67c780",
            "Timestamp": "2024-10-21T15:28:11",
            "SysFlg": "5",
            "PointsFlg": null,
            "SummaryFlg": "1",
            "brandCode": null,
            "channelCode": null,
            "orderType": null,
            "orderStatus": null,
            "payType": null,
            "payStatus": null,
            "shippedStatus": null,
            "memberId": null,
            "shopName": null,
            "parentPayCode": null,
            "orderTime": null,
            "payTime": null,
            "amount": null,
            "reviseAmount": null,
            "prdCode": null,
            "prdName": null,
            "shippedTime": null
        }
    ]
}

Error:

{
    "status": "error",
    "message": ""
}

4.8 SAP Issued Billing Documents Query

Request URL: /api/v1/outBound/getBillingDataPool
Description: Query SAP issued billing documents
Request Type: HTTP GET

4.8.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredRemarks
Page data entriespageSizeINTNoFetch data by pages, entries per page. Defaults to 50 if not provided.
Page numberpageNoINTNoFetch data by pages, current page number. Starts from 1 (1 is the initial page). Defaults to page 1 if not provided.
Billing DocumentbillingNoVARCHARNoExample: 1504575834
Billing DatebillingYMDdatetimeNoFilters data from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
Sales Order (SO) NumbersapOrderNOVARCHARNoExample: 4300439027
Delivery NumberdeliveryNOVARCHARNoExample: 2200003451
PO DateapplyYMDdatetimeNoFilters data from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
PO NumberapplyNOVARCHARNoExample: RT102002152024140
Original Billing Document (for reversal)originBillingNOVARCHARNo
Counteract FlagcounteractFlgVARCHARNoExample: 0
Update TimeupdateTimedatetimeNoFilters data updated from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Request Example:
/api/v1/outBound/getBillingDataPool?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49


4.8.2 Response Parameters

Field DescriptionField NameTypeRequiredRemarks
Return statusstatusStringYes"success" indicates success, "error" indicates failure.
Current page numberpageNoINTYes
Entries per pagepageSizeINTYes
Total pagestotalPagesINTYes
Total entriestotalRecordsINTYes
DatadataarrayYesQueried data.
Error messagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredRemarks
Billing DocumentBillingNoCHARNo
Billing TypeBillingTypeCHARNo
Sales OrganizationSAP_SALESORGANIZATIONCHARNo
Distribution ChannelSAP_DISTRIBUTIONCHANNELCHARNo
Billing DateBillingYMDDATETIMENo
SAP Region CodeSAP_REGIONCHARNo
Company CodeCOMPANYCDCHARNo
Payer CodeSAP_PayerCDCHARNo
Sold-To CodeSAP_SoldToCDCHARNo
Payer NameSAP_PayerNMCHARNo
CityCITYCHARNo
LanguageSAP_LANGUAGECHARNo
Payer Address 1LOCATION1CHARNo
Payer Address 2LOCATION2CHARNo
Contact NumberContactNumberCHARNo
CurrencySAP_CURRENCYCHARNo
Line NumberPOSEXCHARNo
Billed QuantityBilledQuantityINTNo
Sales UnitSalesunitCHARNo
Net WeightNetweightnvarcharNo
Product CodeSAPPRODUCTCDCHARNo
Product DescriptionItemDescriptionCHARNo
PlantPLANTCHARNo
CountryCountryCHARNo
Net ValueNetValuemoneyNo
Tax AmountTaxAmountmoneyNo
Product BarcodePRODBARCODE1CHARNo
Tax CodeTaxCodeCHARNo
Tax RateTaxRatemoneyNo
Sales Order NumberSAPORDERNOCHARNo
Sales Order LinePOSEX_SOCHARNo
Delivery NumberDeliveryNOCHARNo
Delivery LineCOSNRCHARNo
Accounting DocumentAccountingNOCHARNo
PO DateAPPLYYMDDATETIMENo
PO NumberAPPLYNOCHARNo
Material NumberMaterialenteredCHARNo
Total Amount (incl. Tax)WHOLEMNYMONEYNo
Ship-To CodeSAPCUSTOMERCDCHARNo
Original Billing DocumentOriginBillingNOCHARNo
Update HandlerUPDATEMANCHARNo
Update TimeUPDATETIMEDATETIMENo
Creation HandlerCREATEMANCHARNo
Creation TimeCREATETIMEDATETIMENo
Interface FlagIFFlgCHARNo
Counteract FlagcounteractFlgCHARNo
Product Short CodePRODUCTCDCHARNo
Sales Statistics FlagSSSFLGCHARNo
Reconciliation Platform FlagCheckPlatFlgCHARNo

4.8.3 Return Value Examples

Success:

{
    "status": "success",
        "pageNo": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalRecords": 2,
    "data": [
        {
            "BillingNo": "4700282757",
            "BillingType": "Z4G2",
            "SAP_SALESORGANIZATION": "7851",
            "SAP_DISTRIBUTIONCHANNEL": "14",
            "BillingYMD": "2023-01-31T00:00:00",
            "SAP_REGION": "020",
            "COMPANYCD": "785 ",
            "SAP_PayerCD": "2300001557",
            "SAP_SoldToCD": "2100002963",
            "SAP_PayerNM": "TG_EC_微店                                                                      ",
            "CITY": "上海                                              ",
            "SAP_LANGUAGE": "ZH",
            "LOCATION1": null,
            "LOCATION2": null,
            "ContactNumber": null,
            "SAP_CURRENCY": null,
            "POSEX": "000010",
            "BilledQuantity": 1,
            "Salesunit": "EA ",
            "Netweight": null,
            "SAPPRODUCTCD": "300000300         ",
            "ItemDescription": "THE GINZA-商场白条                                                              ",
            "PLANT": "7857",
            "Country": null,
            "NetValue": 37080.52,
            "TaxAmount": 4820.47,
            "PRODBARCODE1": null,
            "TaxCode": "X1",
            "TaxRate": null,
            "SAPORDERNO": "4300278902",
            "POSEX_SO": "000010",
            "DeliveryNO": "4300278902",
            "COSNR": "000010",
            "AccountingNO": "4700282757",
            "APPLYYMD": null,
            "APPLYNO": null,
            "Materialentered": "300000300                               ",
            "WHOLEMNY": 41900.99,
            "SAPCUSTOMERCD": "2200003131       ",
            "OriginBillingNO": null,
            "UPDATEMAN": "UPDATEMAN           ",
            "UPDATETIME": "2023-07-05T11:24:52.703",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2023-05-01T14:00:11.31",
            "IFFlg": "0",
            "counteractFlg": "1",
            "PRODUCTCD": "300000300 ",
            "SSSFLG": "0",
            "CheckPlatFlg": "0"
        },
        {
            "BillingNo": "4700282757",
            "BillingType": "Z4G2",
            "SAP_SALESORGANIZATION": "7851",
            "SAP_DISTRIBUTIONCHANNEL": "14",
            "BillingYMD": "2023-01-31T00:00:00",
            "SAP_REGION": null,
            "COMPANYCD": "785 ",
            "SAP_PayerCD": "2300001557",
            "SAP_SoldToCD": "2100002963",
            "SAP_PayerNM": null,
            "CITY": null,
            "SAP_LANGUAGE": null,
            "LOCATION1": null,
            "LOCATION2": null,
            "ContactNumber": null,
            "SAP_CURRENCY": "CNY  ",
            "POSEX": "10    ",
            "BilledQuantity": 1,
            "Salesunit": "EA ",
            "Netweight": null,
            "SAPPRODUCTCD": "300000300         ",
            "ItemDescription": "THE GINZA-商场白条                                                              ",
            "PLANT": null,
            "Country": null,
            "NetValue": 37080.52,
            "TaxAmount": 4820.47,
            "PRODBARCODE1": null,
            "TaxCode": null,
            "TaxRate": null,
            "SAPORDERNO": "4300278902",
            "POSEX_SO": "10    ",
            "DeliveryNO": "4300278902",
            "COSNR": null,
            "AccountingNO": null,
            "APPLYYMD": null,
            "APPLYNO": null,
            "Materialentered": "300000300                               ",
            "WHOLEMNY": 41900.99,
            "SAPCUSTOMERCD": "2200003131       ",
            "OriginBillingNO": null,
            "UPDATEMAN": "UPDATEMAN           ",
            "UPDATETIME": "2023-07-05T11:24:52.703",
            "CREATEMAN": "EAI                 ",
            "CREATETIME": "2023-04-07T10:53:05",
            "IFFlg": "0",
            "counteractFlg": "1",
            "PRODUCTCD": "300000300 ",
            "SSSFLG": "0",
            "CheckPlatFlg": "0"
        }
    ]
}

Error:

{
    "status": "error",
    "message": ""
}

4.9 SAP Issued Billing Reversal Documents Query

Request URL: /api/v1/outBound/getBillingCounteract
Description: Query SAP issued billing reversal documents
Request Type: HTTP GET

4.9.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredRemarks
Page data entriespageSizeINTNoFetch data by pages, entries per page. Defaults to 50 if not provided.
Page numberpageNoINTNoFetch data by pages, current page number. Starts from 1 (1 is the initial page). Defaults to page 1 if not provided.
Billing DocumentbillingNoVARCHARNoExample: 1504575834
Billing DatebillingYMDdatetimeNoFilters data from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
Sales Order (SO) NumbersapOrderNOVARCHARNoExample: 4300439027
Delivery NumberdeliveryNOVARCHARNoExample: 2200003451
PO DateapplyYMDdatetimeNoFilters data from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
PO NumberapplyNOVARCHARNoExample: RT102002152024140
Original Billing Document (for reversal)originBillingNOVARCHARNo
Reversal StatuscounteractStatusVARCHARNo0: Reversed, 1: Original document not found
Update TimeupdateTimedatetimeNoFilters data updated from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Request Example:
/api/v1/outBound/getBillingCounteract?pageNo=1&pageSize=2&updateTime=2024-07-23 12:02:49


4.9.2 Response Parameters

Field DescriptionField NameTypeRequiredRemarks
Return statusstatusStringYes"success" indicates success, "error" indicates failure.
Current page numberpageNoINTYes
Entries per pagepageSizeINTYes
Total pagestotalPagesINTYes
Total entriestotalRecordsINTYes
DatadataarrayYesQueried data.
Error messagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredRemarks
Billing DocumentBillingNoCHARNo
Billing TypeBillingTypeCHARNo
Sales OrganizationSAP_SALESORGANIZATIONCHARNo
Distribution ChannelSAP_DISTRIBUTIONCHANNELCHARNo
Billing DateBillingYMDDATETIMENo
SAP Region CodeSAP_REGIONCHARNo
Company CodeCOMPANYCDCHARNo
Payer CodeSAP_PayerCDCHARNo
Sold-To CodeSAP_SoldToCDCHARNo
Payer NameSAP_PayerNMCHARNo
CityCITYCHARNo
LanguageSAP_LANGUAGECHARNo
Payer Address 1LOCATION1CHARNo
Payer Address 2LOCATION2CHARNo
Contact NumberContactNumberCHARNo
CurrencySAP_CURRENCYCHARNo
Line NumberPOSEXCHARNo
Billed QuantityBilledQuantityINTNo
Sales UnitSalesunitCHARNo
Net WeightNetweightnvarcharNo
Product CodeSAPPRODUCTCDCHARNo
Product DescriptionItemDescriptionCHARNo
PlantPLANTCHARNo
CountryCountryCHARNo
Net ValueNetValuemoneyNo
Tax AmountTaxAmountmoneyNo
Product BarcodePRODBARCODE1CHARNo
Tax CodeTaxCodeCHARNo
Tax RateTaxRatemoneyNo
Sales Order NumberSAPORDERNOCHARNo
Sales Order LinePOSEX_SOCHARNo
Delivery NumberDeliveryNOCHARNo
Delivery LineCOSNRCHARNo
Accounting DocumentAccountingNOCHARNo
PO DateAPPLYYMDDATETIMENo
PO NumberAPPLYNOCHARNo
Material NumberMaterialenteredCHARNo
Total Amount (incl. Tax)WHOLEMNYMONEYNo
Ship-To CodeSAPCUSTOMERCDCHARNo
Original Billing Document (for reversal)OriginBillingNOCHARNo
Update HandlerUPDATEMANCHARNo
Update TimeUPDATETIMEDATETIMENo
Creation HandlerCREATEMANCHARNo
Creation TimeCREATETIMEDATETIMENo
Interface FlagIFFlgCHARNo
Reconciliation Platform FlagCheckPlatFlgCHARNo
Product Short CodePRODUCTCDCHARNo
Reversal StatuscounteractStatusCHARNo

4.9.3 Return Value Examples

Success:

{
    "status": "success",
        "pageNo": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalRecords": 2,
    "data": [
        {
            "BillingNo": "4700310614",
            "BillingType": "Z4S2",
            "SAP_SALESORGANIZATION": "7851",
            "SAP_DISTRIBUTIONCHANNEL": "11",
            "BillingYMD": "2023-04-03T00:00:00",
            "SAP_REGION": "010",
            "COMPANYCD": "785 ",
            "SAP_PayerCD": "2300001897",
            "SAP_SoldToCD": "2100002528",
            "SAP_PayerNM": "北京汉光百货有限责任公司                                                        ",
            "CITY": "北京                                              ",
            "SAP_LANGUAGE": "ZH",
            "LOCATION1": null,
            "LOCATION2": null,
            "ContactNumber": "010-63608899    ",
            "SAP_CURRENCY": null,
            "POSEX": "000020",
            "BilledQuantity": 58240,
            "Salesunit": "EA ",
            "Netweight": "1747200.000",
            "SAPPRODUCTCD": "1018N162000CN     ",
            "ItemDescription": "肌肤之钥 沁肌调理精华露 S 30ml                                                  ",
            "PLANT": "7857",
            "Country": null,
            "NetValue": 0,
            "TaxAmount": 0,
            "PRODBARCODE1": "729238988200      ",
            "TaxCode": null,
            "TaxRate": null,
            "SAPORDERNO": "4300301535",
            "POSEX_SO": "000020",
            "DeliveryNO": "4600263960",
            "COSNR": "000010",
            "AccountingNO": "4700310614",
            "APPLYYMD": "2023-04-03T00:00:00",
            "APPLYNO": "#                                  ",
            "Materialentered": "1018N162000CN                           ",
            "WHOLEMNY": 0,
            "SAPCUSTOMERCD": "2200003433       ",
            "OriginBillingNO": "4700305882     ",
            "UPDATEMAN": "UPDATEMAN           ",
            "UPDATETIME": "2023-07-05T11:19:56.363",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2023-04-18T16:00:32.903",
            "IFFlg": "3",
            "CheckPlatFlg": "0",
            "PRODUCTCD": "1018N162  ",
            "counteractStatus": "0"
        },
        {
            "BillingNo": "4700310615",
            "BillingType": "Z4S2",
            "SAP_SALESORGANIZATION": "7851",
            "SAP_DISTRIBUTIONCHANNEL": "11",
            "BillingYMD": "2023-04-16T00:00:00",
            "SAP_REGION": "240",
            "COMPANYCD": "785 ",
            "SAP_PayerCD": "2300001766",
            "SAP_SoldToCD": "2100002670",
            "SAP_PayerNM": "昆明王府井百货有限责任公司                                                      ",
            "CITY": "昆明                                              ",
            "SAP_LANGUAGE": "ZH",
            "LOCATION1": null,
            "LOCATION2": null,
            "ContactNumber": "0871-65230566   ",
            "SAP_CURRENCY": null,
            "POSEX": "000010",
            "BilledQuantity": 7,
            "Salesunit": "EA ",
            "Netweight": null,
            "SAPPRODUCTCD": "74383756801       ",
            "ItemDescription": "SHI 银卡升级礼220206(wtl15ml+utm10ml)                                          ",
            "PLANT": "7857",
            "Country": null,
            "NetValue": 0,
            "TaxAmount": 0,
            "PRODBARCODE1": null,
            "TaxCode": null,
            "TaxRate": null,
            "SAPORDERNO": "4300305736",
            "POSEX_SO": "000010",
            "DeliveryNO": "4600267786",
            "COSNR": "000010",
            "AccountingNO": "4700310615",
            "APPLYYMD": null,
            "APPLYNO": "#                                  ",
            "Materialentered": "74383756801                             ",
            "WHOLEMNY": 0,
            "SAPCUSTOMERCD": "2200003286       ",
            "OriginBillingNO": "4700310183     ",
            "UPDATEMAN": "UPDATEMAN           ",
            "UPDATETIME": "2023-07-05T11:19:56.363",
            "CREATEMAN": "SAP                 ",
            "CREATETIME": "2023-04-18T16:00:33.087",
            "IFFlg": "3",
            "CheckPlatFlg": "0",
            "PRODUCTCD": "74383756  ",
            "counteractStatus": "0"
        }
    ]
}

Error:

{
    "status": "error",
    "message": ""
}

4.10 POS Loan and Credit Payment Method Query

Request URL: /api/v1/outBound/getCoupoChargePlatform
Description: Query POS loan and credit payment methods
Request Type: HTTP GET

4.10.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredRemarks
Page data entriespageSizeINTNoFetch data by pages, entries per page. Defaults to 50 if not provided.
Page numberpageNoINTNoFetch data by pages, current page number. Starts from 1 (1 is the initial page). Defaults to page 1 if not provided.
Transaction Time (payment sent time)tradeTimedatetimeNoFilters data from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447
Timestamp (current time)TimestampdatetimeNoFilters data updated from and including this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Request Example:
/api/v1/outBound/getCoupoChargePlatform?pageNo=1&pageSize=2&Timestamp=2024-07-23 12:02:49


4.10.2 Response Parameters

Field DescriptionField NameTypeRequiredRemarks
Return statusstatusStringYes"success" indicates success, "error" indicates failure.
Current page numberpageNoINTYes
Entries per pagepageSizeINTYes
Total pagestotalPagesINTYes
Total entriestotalRecordsINTYes
DatadataarrayYesQueried data.
Error messagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredRemarks
Document unique IDDocumentIDCHAR
Order type flagshopCodeVARCHAR(10)
Shop nameshopNameVARCHAR(500)
POS machine numberposNoVARCHAR(500)Fixed value: 1
Terminal numberdeviceNoVARCHAR(500)Fixed value: 1
Transaction numbertradeNoVARCHAR(500)
Receipt numberinvoiceNumberVARCHAR(500)Yes
POS unique order numberposTradeNoVARCHAR(500)Yes
Sales typesaleTypeVARCHAR(500)Yes
Event time (payment sent time)tradeTimedatetime500Yes
Business date (settlement time)businessDatedate500Yes
Payment method codepayTypeCodeVARCHAR(500)Yes1: Voucher (deprecated)
15: Citic Card (deprecated)
16: Citic Alipay (deprecated)
17: Citic WeChat (deprecated)
18: Citic QR Code (deprecated)
51: Cash
52: QR Payment (POS cashier QR code)
53: Xiaomao Card
58: Scan Payment
59: QR Payment (Yisheng cashier QR code, deprecated)
60: E-Money (deprecated)
61: Mobile POS (customer QR code scanned by Yisheng POS machine)
63: New World Activity Voucher
64: Others
(POS only allows the methods marked in red)
Payment method namepayTypeNmVARCHAR(500)Yes
Card typecardTypeVARCHAR(500)
AmountamountDouble500Yes
Internal payment order numberposPayNoVARCHAR(500)Yes
Merchant order numbermerchantOrderNoVARCHAR(500)Yes
Platform transaction numberplatformTradeNoVARCHAR(500)Yes
Peripheral identifierSysFlgCHAR(1)1-POS
2-SCHD
3-E-order
4-Shopex
5-UCO
6-LeQee
7-Judgment
8-Purchase
Timestamp (current time)TimestampdatetimeYes

4.10.3 Return Value Examples

Success:

{
    "status": "success",
    "pageNo": 1,
    "pageSize": 2,
    "totalPages": 1,
    "totalRecords": 1,
    "data": [
        {
            "DocumentID": "DOC123456",
            "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"
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

4.11 SAP confirms the document query

Request URL: /api/v1/outBound/getOrderConfirmation
Description: SAP confirms the document query
Request Type: HTTP GET

4.11.1 Request Parameters

Field DescriptionField NameTypeLengthRequiredRemarks
Page data entriespageSizeINTNoFetch data by pages, entries per page. Defaults to 50 if not provided.
Page numberpageNoINTNoFetch data by pages, current page number. Starts from 1 (1 is the initial page). Defaults to page 1 if not provided.
Document numberapplyNoVARCHAROptionalExample: 1504575834
SAP Shipto codesapCustomerCdVARCHAROptionalExample: 2200003451
SAP order codesapOrderNoVARCHAROptionalExample: 4203193399
Update timeupdateTimedatetimeOptionalRetrieve data updated after (including) this time. Supports yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. Example: 2023-09-15 18:06:32.447

Request Example:
`/api/v1/outBound/getOrderConfirmation?sapOrderNo=4205171130&pageSize=10&pageNo=1&updateTime=2024-10-31T12:02:23.767


4.11.2 Response Parameters

Field DescriptionField NameTypeRequiredRemarks
Return statusstatusStringYes"success" indicates success, "error" indicates failure.
Current page numberpageNoINTYes
Entries per pagepageSizeINTYes
Total pagestotalPagesINTYes
Total entriestotalRecordsINTYes
DatadataarrayYesQueried data.
Error messagemessageStringNoReturned when status is "error".
data
Field DescriptionField NameTypeRequiredRemarks
Document numberAPPLYNOcharRC-000035-005
SAP Shipto codeSAP_CUSTOMERCDchar2200003675
SAP order codeSAPORDERNOchar4205176582
product codePRODUCTCDchar34501010
SAP Product CodeSAPPRODUCTCDchar34501010102CN
Material identification numberDETERMINECODEchar34501010101CN
Acknowledged quantityADMQNTYint2
Update timeUPDATETIMEDatetime2024-12-23 12:00:42.720

4.11.3 Return Value Examples

Success:

{
    "status": "success",
    "pageNo": 1,
    "pageSize": 10,
    "totalPages": 1,
    "totalRecords": 1,
    "data": [
        {
            "APPLYNO": "4205171130                         ",
            "SAP_CUSTOMERCD": "2200004677",
            "SAPORDERNO": "4205171130                         ",
            "PRODUCTCD": "34500509  ",
            "SAPPRODUCTCD": "34500509101CN",
            "DETERMINECODE": "34500509101CN",
            "ADMQNTY": 30,
            "UPDATETIME": "2024-10-31T12:02:23.767"
        }
    ]
}

Failure:

{
    "status": "error",
    "message": ""
}

Reviews