Skip to content

API

1. API 账号

自2023年9月11日起,为了给系统对接提供更安全的保障,凡第三方ERP(含自研系统)对接,均需提交相关信息审核。

api申请1
api申请2
api申请3
申请成功后,会看到更新的API信息。

api申请4

2. API 网址

WSDL地址

正式线:http://oms.sweip.com/default/svc/wsdl

service地址(curl数据)

正式线:http://oms.sweip.com/default/svc/web-service

3. API 处理模块示例

api模块1
api模块2
api模块3

创建产品

Request

XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callService>
            <paramsJson>
                {
                    "product_sku":"EA140512114042",
                    "reference_no":"EA140512114042",
                    "product_title":"EA140512114042",
                    "product_title_en":"EA140512114042",
                    "product_weight":0.35,
                    "product_net_weight":0.2,
                    "product_length":29.70,
                    "product_width":21.00,
                    "product_height":4,
                    "contain_battery":0,
                    "battery_type":"PI970 DHL no more than 2 batteries",
                    "product_declared_value":10,
                    "product_declared_name":"EN140512114042",
                    "product_declared_name_zh":"申报中文名称",
                    "cat_lang":"en",
                    "hs_code":"543535",
                    "cat_id_level0":400001,
                    "cat_id_level1":500013,
                    "cat_id_level2":600109,
                    "verify":1,
                    "warning_qty":100,
                    "warning_days":10,
                    "product_brand":"易仓神速",
                    "product_model":"EC0001",
                    "product_origin":"深圳",
                    "product_material":"304",
                    "product_use_en":"calling",
                    "product_material_en":"plastic",
                    "product_desc_url":"http://www.ec.com",
                    "customerImg":{"file_type":"img","base64_img":"data:image/png;base64,23423423423dfhkjnafalj234789snk3423/234/23/2323/23aaaa/saa/a/a/dsfoisouisjkjhjskj"},
                    "product_color":"蓝色",
                    "shared_product":1,
                    "shared_unit_price":"11.11",
                    "product_description":"mmmm描述",
                    "is_box_more_sku":"0",
					"fragile_property": 1
                }
            </paramsJson>
            <appToken>appToken</appToken>
            <appKey>appKey</appKey>
            <service>createProduct</service>
        </ns1:callService>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response

XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callServiceResponse>
            <response>
                {
                    "ask":"Success",
                    "f_ask":"1",
                    "message":"Success",
                    "product_sku":"EA140512114042"
                }
            </response>
        </ns1:callServiceResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

创建入库单

Request

XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callService>
            <paramsJson>
                {
                    "reference_no":"dfdfd1399866764",
                    "income_type":0,
                    "receiving_type":"T",
                    "warehouse_code":"HRBW",
                    "transit_warehouse_code":"SZW",
                    "shipping_method":"\u987a\u4e30",
                    "entiry_code":"11111",
                    "tracking_number":"12313213",
                    "receiving_desc":"dfdfdf",
                    "eta_date":"2013-04-15",
                    "contacter":null,
                    "contact_phone":null,
                    "region_id_level0":1,
                    "region_id_level1":1,
                    "region_id_level2":1,
                    "street":"address",
                    "sm_code":"EUB",
                    "verify":1,
                    "verify_source":"wms",
                    "contract_no":"TEST20200519001",
                    "receiving_attachment":"http://ec-m2c-cn.oss-cn-shenzhen.aliyuncs.com/demofx/images/2019/09/06/15137667-20190905053742_vRV2M.jpg",
                    "vat_tax_code":"3242",
                    "incoming_order_goods_type":"0",
                    "spontaneous_head_cheng_type":"0",
                    "tax_type":"P",
                    "customer_type":"Y",
                    "container_type":"",
                    "bulk_cargo_type":0,
                    "bulk_cargo_type_piece":0,
                    "pallet_cnt":"",
                    "is_save_inventory_code":0,
                    "stock_type": "1",
                    "items":[
                        {
                            "product_sku":"EA140509201610",
                            "quantity":10,
                            "box_no":1,
                            "product_price":1.00,
                            "currency_code":"RMB",
                            "associated_barcode":"sdgv554561",
                            "product_date":"2024-03-19",
                            "inventory_type":"1"

                        },
                        {
                            "product_sku":"EA140509201610",
                            "quantity":10,
                            "box_no":2,
                            "product_price":1.00,
                            "currency_code":"RMB",
                            "associated_barcode":"sdgv554562",
                            "product_date":"2024-03-19",
                            "inventory_type":"1"
                        },
                        {
                            "product_sku":"EA140509201610",
                            "quantity":10,
                            "box_no":3,
                            "product_price":1.00,
                            "currency_code":"RMB",
                            "associated_barcode":"sdgv554563",
                            "product_date":"2024-03-19",
                            "inventory_type":"1"
                        }
                    ]
                }
            </paramsJson>
            <appToken>appToken</appToken>
            <appKey>appKey</appKey>
            <service>createAsn</service>
        </ns1:callService>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response

XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callServiceResponse>
            <response>
                {
                    "ask": "Success",
                    "f_ask": "1",
                    "message": "Success",
                    "data": {
                        "receiving_code": "RV100002-140512-0001"
                    }
                }
            </response>
        </ns1:callServiceResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

新建订单

Request

XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callService>
            <paramsJson>
                {
                    "platform":"OTHER",
                    "allocated_auto":"0",
                    "warehouse_code":"HRBW",
                    "shipping_method":"F4",
                    "reference_no":"ref_1399867101",
                    "aliexpress_order_no":"8000777788889999",
                    "order_desc":"\u8ba2\u5355\u63cf\u8ff0",
                    "remark":"我是备注",
                    "order_business_type":"b2c",
                    "lp_order_number":"lp_123456",
                    "country_code":"RU",
                    "province":"province",
                    "city":"city",
                    "district":"收件人区",
                    "address1":"address1",
                    "address2":"address2",
                    "address3":"address3",
                    "zipcode":"142970",
                    "license":"420904",
                    "doorplate":"doorplate",
                    "company":"company",
                    "name":"name",
                    "phone":"phone",
                    "cell_phone":"cell_phone",
                    "phone_extension":"",
                    "email":"email",
                    "platform_shop":"shop",
                    "is_order_cod":1,
                    "order_cod_price":99,
                    "order_cod_currency":"RMB",
                    "order_age_limit":2,
                    "is_signature":0,
                    "is_insurance":0,
                    "insurance_value":0,
					"channel_code":"demo",
                    "packageCenterCode":"center_code",
                    "packageCenterName":"集包地中心名称",
                    "QrCode":"123ABC",
                    "shortAddress":"100-200-30-400",
                    "seller_id":"ebay-test001",
                    "buyer_id":"ebay-test002",
                    "only_logistics":0,
                    "assign_date":"2021-01-01",
                    "assign_time":"02",
                    "items":[
                        {
                            "product_sku":"EA140509201610",
                            "reference_no":"149H6286",
                            "product_name_en":"Product Name",
                            "product_name":"Product Name",
                            "product_declared_value":5.000,
                            "quantity":1,
                            "ref_tnx":"1495099983020",
                            "ref_item_id":"302588235574",
                            "ref_buyer_id":"esramo_a62szxok",
                            "already_taxed":"I_TAXED",
                            "child_order_id":"child_order_id",
                            "batch_info":[
                                {
                                    "inventory_code": "RVJRY-220308-0008_EA140509201610_444_20220308151424",
                                    "sku_quantity": "1"
                                }
                            ]
                        }
                    ],
                    "report":[
                        {
                            "product_sku":"EA140509201610",
                            "product_title":"键盘",
                            "product_title_en":"keyboard",
                            "product_quantity":1,
                            "product_declared_value":5,
                            "product_weight":3
                         }
                    ],
                    "tracking_no":"123",
                    "label":{
                        "file_type":"png",
                        "file_data":"hVJPjUP4+yHjvKErt5PuFfvRhd...",
                        "file_size":"100x100",
                        "file_name":"name"
                    },
                     "attach":[
                        {
                        "file_type":"zip",
                        "attach_id":"4276"
                        },
                        {
                        "file_type":"pdf",
                        "attach_id":"4277"
                        }
                    ],
                    "other_documents":[
                        {
                            "attach_id":"133",
                        }
                    ],
                    "is_pack_box":0,
                    "is_release_cargo":0,
                    "is_vip":0,
                    "order_kind":"BC",
                    "order_payer_name":"小明",
                    "order_id_number":"1325323112323",
                    "order_payer_phone":"13120775656",
                    "order_country_code_origin":"美国",
                    "order_sale_amount":"0",
                    "order_sale_currency":"RMB",
                    "is_platform_ebay":"0",
                    "ebay_item_id":"130056",
                    "ebay_transaction_id":"202009041652-0001",
                    "tax_payment_method":"CFR_OR_CPT",
                    "customs_company_name":"我是清关公司",
                    "customs_address":"我是清关地址",
                    "customs_contact_name":"我是清关联系人",
                    "customs_email":"15026521351@gmail.com",
                    "customs_tax_code":"156156156",
                    "customs_phone":"15625231521",
                    "customs_city":"武汉市",
                    "customs_state":"湖北省",
                    "customs_country_code":"CN",
                    "customs_postcode":"434400",
                    "customs_doorplate":"601",
                    "consignee_tax_number":"682515426999999",
                    "consignee_eori":"我是收件人EORI号",
                    "order_battery_type":"UN3481",
                    "vat_tax_code":"16515612231",
                    "distribution_information":"distribution information",
                    "consignee_tax_type":1,
                    "api_source":"mabangerp",
                    "verify":1,
                    "forceVerify":0,
                    "lp_code":"AEOWH0000345968",
                    "is_merge":0,
                    "merge_order_count":0,
                    "insurance_type":1,
                    "insurance_type_goods_value":1,
                    "is_ju_order":0,
                    "is_allow_open":1,
                    "is_prime":0,
                    "transaction_no": ""
                }
            </paramsJson>
            <appToken>appToken</appToken>
            <appKey>appKey</appKey>
            <service>createOrder</service>
        </ns1:callService>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response

XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callServiceResponse>
            <response>
                {
                    "ask":"Success",
                    "f_ask":"f_ask",
                    "message":"Success",
                    "order_code":"100002-140512-0003"
                }
            </response>
        </ns1:callServiceResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

4. API文档

上面列举了常用的模块对接和报文信息,如果需要对接,请参考完整的API文档

本网站可能包含指向第三方网站的链接,这些链接仅为方便用户提供,我们不对这些链接的内容或可用性负责,用户访问这些第三方网站的风险由用户自行承担。