POST 创建ASN
POST /apicenter/api/asn
Body 请求参数
{"items": [{"code": "0.01.0002","qty": 100,"po_number": "customer-001","weight": 1.00,"length": 1.00,"width": 1.00,"height": 1.00,"expire_at": "2024-05-30","manufacture_at": "2023-08-31"}],"centre_code": "CKMX","client_code": "CK2023","asn_number": "testck-0919-01","is_return_asn": "N","asn_date": "2023-11-13","eta_at": "2023-11-14"}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| items | Request Body | Array | 是 | 包含产品信息的数组 |
| centre_code | Request Body | String | 是 | 仓库代码 |
| client_code | Request Body | String | 是 | 客户(店铺)编码 |
| asn_number | Request Body | String | 是 | ASN编号 |
| is_return_asn | Request Body | String | 是 | 是否为退货ASN,取值为 “Y” 或 “N” |
| asn_date | Request Body | String | 是 | ASN日期,格式为 “YYYY-MM-DD” |
| eta_at | Request Body | String | 是 | 预计到达日期,格式为 “YYYY-MM-DD” |
| code | items Array Element | String | 是 | 产品代码 |
| qty | items Array Element | Number | 是 | 产品数量 |
| po_number | items Array Element | String | 是 | 箱号 :做区分不同箱子使用,请按系统规则定义生成箱号,参考箱号生成说明 |
| weight | items Array Element | decimal(6,2 ) | 否 | 箱子的重量 (kg) |
| length | items Array Element | decimal(6,2 ) | 否 | 箱子的长度 (cm) |
| width | items Array Element | decimal(6,2 ) | 否 | 箱子的宽度 (cm) |
| height | items Array Element | decimal(6,2 ) | 否 | 箱子的高度 (cm) |
| expire_at | items Array Element | String | 否 | 产品过期日期,格式为 “YYYY-MM-DD” |
| manufacture_at | items Array Element | String | 否 | 产品生产日期,格式为 “YYYY-MM-DD” |
返回示例
成功
{"code": 201,"data": {"centre_code": "CKMX","client_code": "CK2023","asn_number": "testck-0919-01","asn_date": "2023-11-13","eta_at": "2023-11-14","remarks": null,"items": [{"code": "0.01.0002","qty": 100,"box_number":"testck-0919-01-B001-1""po_number": "customer-001","po_date": null,"expire_at": "2024-05-30","manufacture_at": "2023-08-31","lot_no": null,"barcode": null,"name": null,"description": null,"declare_name": null,"origin_country": null,"category_id": null,"category_name": null,"color": null,"size": null,"line": null,"style": null,"season": null,"gender": null,"business_line": null,"product_type": null,"ingredient": null,"business_type": null,"brand": null,"model": null,"battery_type": null,"manufacturer_name": null,"manufacturer_address": null,"queue_order": null,"weight": 1.00,"length": 1.00,"width": 1.00,"height": 1.00,"box_qty": 0,"is_packing_material": null,"is_expire_date_required": null,"is_lot_no_required": null,"is_manufacture_date_required": null}],"vas": []},"message": "success"}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 201 | Created | 操作成功 | data 字段包含了创建的 ASN 信息 |
箱号”po_number” 规则
“po_number” = “asn_number”-“boxtype”-“Serial Number” ;
**规则:“boxtype” 箱类号 从 P001 开始递增 ,每个不同箱号后的序号 “Serial Number” 从 001开始递增;
如: 单号asn_number为 “ MT09123 ”的入库单,其下箱号为:
“MT09123-P001-001”;
“MT09123-P001-002” ;
“MT09123-P002-001”;
“MT09123-P003-001”;
“MT09123-P003-002”;
“MT09123-P003-003”;
请求示例
{"items": [{"code": "BA-FTJY-57X1","qty": 100,"po_number": "MT09123-P001-001","expire_at": "2022-09-30","manufacture_at": "2022-08-31"},{"code": "BA-FTJY-57X2","qty": 100,"po_number": "MT09123-P001-002","expire_at": "2022-09-30","manufacture_at": "2022-08-31"}],"centre_code": "MTMX","client_code": "MT2023","asn_number": "MT09123","is_return_asn": "N","asn_date": "2024-09-22","eta_at": "2022-09-23"}
