1. 3.API List
EWE
  • 1.准备工作
  • 2.Token
  • 3.API List
    • 创建包裹
      POST
    • 轨迹查询
      POST
  • 4.服务产品
  • 5.Error Code Mapping
  • 6.Q&A
  1. 3.API List

创建包裹

POST
createShipment

请求参数

Body 参数application/json

示例
{
    "username": "string",
    "digest": "string",
    "msgType": "pushUnCreatedShipments",
    "version": "string",
    "shipments": [
        {
            "sender_reference": "string",
            "from": {
                "name": "string",
                "phone": "string",
                "email": "string",
                "state": "string",
                "suburb": "string",
                "lines": [
                    "string"
                ],
                "country": "string",
                "postcode": "string"
            },
            "to": {
                "name": "string",
                "phone": "string",
                "email": "string",
                "country": "string",
                "state": "string",
                "suburb": "string",
                "lines": [
                    "string"
                ],
                "postcode": "string",
                "vat": "string"
            },
            "items": [
                {
                    "item_description": "string",
                    "product_id": "string",
                    "useStock": "string",
                    "weight": 0,
                    "length": 0,
                    "width": 0,
                    "height": 0,
                    "merchandise": [
                        {
                            "goodsNmae": "string",
                            "goodsNameCn": "string",
                            "sku": "string",
                            "quantity": 0,
                            "value": 0,
                            "weight": 0,
                            "hsCode": "string",
                            "imageUrl": "string"
                        }
                    ]
                }
            ]
        }
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'createShipment' \
--header 'Content-Type: application/json' \
--data '{
    "username": "string",
    "digest": "string",
    "msgType": "pushUnCreatedShipments",
    "version": "string",
    "shipments": [
        {
            "sender_reference": "string",
            "from": {
                "name": "string",
                "phone": "string",
                "email": "string",
                "state": "string",
                "suburb": "string",
                "lines": [
                    "string"
                ],
                "country": "string",
                "postcode": "string"
            },
            "to": {
                "name": "string",
                "phone": "string",
                "email": "string",
                "country": "string",
                "state": "string",
                "suburb": "string",
                "lines": [
                    "string"
                ],
                "postcode": "string",
                "vat": "string"
            },
            "items": [
                {
                    "item_description": "string",
                    "product_id": "string",
                    "useStock": "string",
                    "weight": 0,
                    "length": 0,
                    "width": 0,
                    "height": 0,
                    "merchandise": [
                        {
                            "goodsNmae": "string",
                            "goodsNameCn": "string",
                            "sku": "string",
                            "quantity": 0,
                            "value": 0,
                            "weight": 0,
                            "hsCode": "string",
                            "imageUrl": "string"
                        }
                    ]
                }
            ]
        }
    ]
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "shipments": [
        {
            "sender_references": "BG723456789014",
            "isSuccess": true,
            "items": [
                {
                    "article_id": "T2311502938",
                    "consignment_id": "T2311502938",
                    "item_description": "Clothes",
                    "pdf_url": "https://api.ewe.co.nz/pdf-file/T2311502938/21ed036c-3fda-11ee-8a7b-00163e06bec8.pdf"
                }
            ],
            "msg": "shipment sealed successfully"
        }
    ],
    "code": 0,
    "errors": []
}
修改于 2024-06-13 06:09:54
上一页
2.Token
下一页
轨迹查询
Built with