版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

Description

Create a draft purchase order (inbound order) in eTowerOne.

Path

HTTP Verb

URL

POST

/api/supplier-service/v1/b2b/po

Header Sample


代码块
POST

...

 /api/supplier-service/v1/b2b/

...

po HTTP/1.1

...

Host: cfs-qa.etowertech.com


Content-Type: application/json

...


Accept: application/json

...


User-Agent: Mozilla 5.0
Host: http://cfs-qa.etowertech.com/
X-WallTech-Date: Thu, 06 Aug 2020 06:

...

36:

...

24 GMT

...


Authorization: WallTech testLvs2jdug2qIoRsJyuxs:

...

VaWNgikNP0NGcoxVCeWYid50MYQ=

...

Fields

Field

Data Type

Length

Mandatory

Description

referenceNo

String

50

M

订单唯一标识

Unique identification of PO

warehouseCode

String

20

M

目的仓代码

Destination warehouse code

shipperWarehouseCode

String

100

O/M

发货地址代码

Shipper address code

shipperContactName

String

20

M

发货人名称(填写发货地址代码时无需填写)

Contact name(No need to insert when you send field ”shipperWarehouseCode“)

addressLine1

String

50

O/M

发货人地址第一行(填写发货地址代码时无需填写)

Shipper address Line1(No need to insert when you send field ”shipperWarehouseCode“)

addressLine2

String

100

O

发货人地址第二行(填写发货地址代码时无需填写)

Shipper address Line2(No need to insert when you send field ”shipperWarehouseCode“)

addressLine3

String

100

O

发货人地址第三行(填写发货地址代码时无需填写)

Shipper address Line3(No need to insert when you send field ”shipperWarehouseCode“)

city

String

20

O

发货人城市(填写发货地址代码时无需填写)

Shipper city(No need to insert when you send field ”shipperWarehouseCode“)

state

String

20

O

发货人州(填写发货地址代码时无需填写)

Shipper state(No need to insert when you send field ”shipperWarehouseCode“)

postCode

String

20

O

发货人邮编(填写发货地址代码时无需填写)

Shipper postcode(No need to insert when you send field ”shipperWarehouseCode“)

district

String

20

O

发货人区(填写发货地址代码时无需填写)

Shipper district(No need to insert when you send field ”shipperWarehouseCode“)

country

String

2

O

发货人国家(二字码,填写发货地址代码时无需填写)

Shipper country(Two-character,No need to insert when you send field ”shipperWarehouseCode“)

shipperPhone

String

20

O/M

发货人电话(填写发货地址代码时无需填写)

Shipper phone(No need to insert when you send field ”shipperWarehouseCode“

shipperEmail

String

50

O

发货人邮箱(填写发货地址代码时无需填写)

Shipper email(No need to insert when you send field ”shipperWarehouseCode“

shipperBizName

String

50

O

发货人公司名称

Shipper company name

boxNo

String

20

M

箱号

Box No

boxQty

(
Int

5

,1)

M

箱数

Box Qty

lengthDeclared

BigDecimal

(

5

8,1)

M

箱子申报长度(CM)

Declare length of box(CM)

widthDeclared

BigDecimal

(

5

8,1)

M

箱子申报宽度(CM)

Declare width of box(CM)

heightDeclared

BigDecimal

(

5

8,1)

M

箱子申报高度(CM)

Declare height of box(CM)

weightDeclared

BigDecimal

(

10

8,3)

M

箱子申报重量(KG)

SKU

Declare weight of box(KG)

sku

String

20

M

商品编码

SKU code

productQty

Int

10

M

单箱商品数

Product qty in simple box

Remark

String

100

O

箱信息备注

Remark of box

orderNo

String

-

返回值

Response

系统订单号

Order No

code

String

-

-

返回编码

Response code

errors

Object[]

-

-

报错

Response error

message

String

-

-

返回信息

Response message

messageId

String

-

-

返回信息编码

Response message ID

success

Boolean

-

-

成功响应

Success

warnList

-

-

-

废弃字段

No use


Request Sample

[

    {

...

代码块
[
    {
        "shipperAddress":

...

 {
            "country":

...

            "postCode": "",

            "state": "上海市",

            "city": "市辖区",

            "district": "黄浦区",

            "addressLine1": "中国",

            "addressLine2": "上海市",

            "addressLine3": "黄浦区"

        },

        "shipperContactName": "testzhang",

        "shipperBizName": "",

        "shipperPhone": "18856789348",

        "shipperEmail": "",

        "referenceNo": "CA-0001",

        "warehouseCode": "Canada Warehouse",

        "shipperWarehouseCode": "cnzhang",

        "packingDetails": [

            {

                "boxNo": "1",

                "lengthDeclared": 20.00,

                "heightDeclared": 20.00,

                "widthDeclared": 20.00,

                "weightDeclared": 20.00,

                "boxQty": 1,

                "sku": "deli1498603",

                "productQty": 20,

                "remark": ""

            }

        ]

    }

]

Response

...

[

    {

        "code": "0",

        "data": {

            "orderNo": "E12283221114000007O",

            "referenceNo": "CA-0008"

        },

        "errors": "",

        "message": "",

        "messageId": "",

        "success": true,

        "warnList": ""

    }

]

 [

    {

        "code": "0005",

        "data": "",

        "errors": [

            {

                "code": "600904",

                "message": "referenceNo:CA-0001,Already exists in the system"

            }

        ],

        "message": "paramter error",

        "messageId": "",

        "success": false,

        "warnList": ""

    }

 "CN",
            "postCode": "300321",
            "state": "shanghaishi",
            "city": "shixiaqu",
            "district": "pudongxinqu",
            "addressLine1": "street no.200",
            "addressLine2": "302hao",
            "addressLine3": "009shi"
        },
        "shipperContactName": "testzhang",
        "shipperBizName": "",
        "shipperPhone": "18856789348",
        "shipperEmail": "",
        "referenceNo": "AUTEST000001",
        "warehouseCode": "testuser",
        "shipperWarehouseCode": "",
        "packingDetails": [
            {
                "boxNo": "1",
                "lengthDeclared": 100.00,
                "heightDeclared": 100.00,
                "widthDeclared": 100.00,
                "weightDeclared": 100.00,
                "boxQty": 1,
                "sku": "test001",
                "productQty": 100,
                "remark": ""
            }
        ]
    },
    {
        "shipperAddress": {
            "country": "aa",
            "postCode": "",
            "state": "",
            "city": "",
            "district": "",
            "addressLine1": "",
            "addressLine2": "",
            "addressLine3": ""
        },
        "shipperContactName": "testzhang",
        "shipperBizName": "",
        "shipperPhone": "18856789348",
        "shipperEmail": "",
        "referenceNo": "AUTEST000002",
        "warehouseCode": "testuser",
        "shipperWarehouseCode": "cnzhang",
        "packingDetails": [
            {
                "boxNo": "1",
                "lengthDeclared": 100.00,
                "heightDeclared": 100.00,
                "widthDeclared": 100.00,
                "weightDeclared": 100.00,
                "boxQty": 1,
                "sku": "test001",
                "productQty": 1,
                "remark": ""
            }
        ]
    }
]


Response

代码块
[
    {
        "code": "0",
        "data": {
            "orderNo": "E12283230203000005O",
            "referenceNo": "AUTEST000001"
        },
        "errors": "",
        "message": "",
        "messageId": "",
        "success": true,
        "warnList": ""
    },
    {
        "code": "0",
        "data": {
            "orderNo": "E12283230203000006O",
            "referenceNo": "AUTEST000002"
        },
        "errors": "",
        "message": "",
        "messageId": "",
        "success": true,
        "warnList": ""
    }
]


代码块
[
    {
        "code": "0005",
        "data": {
            "orderIndex": 1,
            "referenceNo": "AUTEST000001"
        },
        "errors": [
            {
                "code": "600904",
                "message": "referenceNo:AUTEST000001,Already exists in the system"
            }
        ],
        "message": "paramter error",
        "messageId": "",
        "success": false,
        "warnList": ""
    },
    {
        "code": "0005",
        "data": {
            "orderIndex": 2,
            "referenceNo": "AUTEST000002"
        },
        "errors": [
            {
                "code": "600904",
                "message": "referenceNo:AUTEST000002,Already exists in the system"
            }
        ],
        "message": "paramter error",
        "messageId": "",
        "success": false,
        "warnList": ""
    }
]