POST 创建ASN

POST /apicenter/api/asn

Body 请求参数

  1. {
  2. "items": [
  3. {
  4. "code": "0.01.0002",
  5. "qty": 100,
  6. "po_number": "customer-001",
  7. "weight": 1.00,
  8. "length": 1.00,
  9. "width": 1.00,
  10. "height": 1.00,
  11. "expire_at": "2024-05-30",
  12. "manufacture_at": "2023-08-31"
  13. }
  14. ],
  15. "centre_code": "CKMX",
  16. "client_code": "CK2023",
  17. "asn_number": "testck-0919-01",
  18. "is_return_asn": "N",
  19. "asn_date": "2023-11-13",
  20. "eta_at": "2023-11-14"
  21. }

请求参数

名称 位置 类型 必选 说明
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”

返回示例

成功

  1. {
  2. "code": 201,
  3. "data": {
  4. "centre_code": "CKMX",
  5. "client_code": "CK2023",
  6. "asn_number": "testck-0919-01",
  7. "asn_date": "2023-11-13",
  8. "eta_at": "2023-11-14",
  9. "remarks": null,
  10. "items": [
  11. {
  12. "code": "0.01.0002",
  13. "qty": 100,
  14. "box_number":"testck-0919-01-B001-1"
  15. "po_number": "customer-001",
  16. "po_date": null,
  17. "expire_at": "2024-05-30",
  18. "manufacture_at": "2023-08-31",
  19. "lot_no": null,
  20. "barcode": null,
  21. "name": null,
  22. "description": null,
  23. "declare_name": null,
  24. "origin_country": null,
  25. "category_id": null,
  26. "category_name": null,
  27. "color": null,
  28. "size": null,
  29. "line": null,
  30. "style": null,
  31. "season": null,
  32. "gender": null,
  33. "business_line": null,
  34. "product_type": null,
  35. "ingredient": null,
  36. "business_type": null,
  37. "brand": null,
  38. "model": null,
  39. "battery_type": null,
  40. "manufacturer_name": null,
  41. "manufacturer_address": null,
  42. "queue_order": null,
  43. "weight": 1.00,
  44. "length": 1.00,
  45. "width": 1.00,
  46. "height": 1.00,
  47. "box_qty": 0,
  48. "is_packing_material": null,
  49. "is_expire_date_required": null,
  50. "is_lot_no_required": null,
  51. "is_manufacture_date_required": null
  52. }
  53. ],
  54. "vas": []
  55. },
  56. "message": "success"
  57. }

返回结果

状态码 状态码含义 说明 数据模型
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”;

请求示例

  1. {
  2. "items": [
  3. {
  4. "code": "BA-FTJY-57X1",
  5. "qty": 100,
  6. "po_number": "MT09123-P001-001",
  7. "expire_at": "2022-09-30",
  8. "manufacture_at": "2022-08-31"
  9. },
  10. {
  11. "code": "BA-FTJY-57X2",
  12. "qty": 100,
  13. "po_number": "MT09123-P001-002",
  14. "expire_at": "2022-09-30",
  15. "manufacture_at": "2022-08-31"
  16. }
  17. ],
  18. "centre_code": "MTMX",
  19. "client_code": "MT2023",
  20. "asn_number": "MT09123",
  21. "is_return_asn": "N",
  22. "asn_date": "2024-09-22",
  23. "eta_at": "2022-09-23"
  24. }