Skip to content

Stock Out

以下接口适用于数据集成 API,对接前请了解 API 接入流程

发送数据到Lenovo

Description:3PL发送stock out的数据
Method:POST PUT DELETE
ContentType:application/json
Path:/3pl/stock_out
  • API
EnvURL
testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out
prdhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out
业务数据说明
参数名称KEY必填参数类型长度参数格式描述
uidYYString32数据行唯一标识
warehouse_nameYstring40---e.g.:HE XN HUB, MTY CEVA, etc. length is around 30. this is provided by 3PL, SCC does not control it.
stock_typeYstring10SOI or LOI
lenovo_plant_codeYstring30Lenovo SAP Plant Code
lenovo_storage_locationYstring50Lenovo SAP Storage Location
lenovo_pnYstring30
vendor_codeYstring30
posaYstring30
posa_lineYstring30
aging_daysYstring(integer)10
stock_receiving_dateYstring(datetime)yyyy-MM-dd HH24:mm:ss
tpl_receiving_idYstring32XNG Receive No.
receipt_idYstring32
line_idYstring32
supplier_invoice_noYstring100suppiler invoice
supplier_delivery_noteYstring100
stock_receiving_typeYstring201.通过PO/SA GR的 (SOI, LOI), rebalance in
2.SOI转LOI的LOI进
3.没有PO/SA的收货,但有3PL Pull No.的场景
4.除1,2,3之外,其他归为others
(传数字代码)
order_type_instring301.Normal Procurement
a.for LOI, PO's GR
b.for SOI, SA's GR as consigned stock
c.for financing supplier, Po's GR asn consigned stock
2.Normal Buy Ahead
a.75 PO approved by leadership
b.GSM inform 3PL that buy ahead SOI convert to LOI
3.Special Buy Ahead
a.GSM inform 3PL that this is special buy ahead, 3PL mark it here
4.Rebalance In
5.ODM Return
stock_issuing_typeYstring301. VMI pull trigger的sell出库或者生产叫料出库
2. SOI转LOI的SOI出
3. Stock Transfer in Site (Out) (没有SO/PO/STO等的出库,HUB到HUB之间的转储)
4. Others
5. rebalance SO 出库,或者STO出库
(3PL给数字)
order_type_outstring301.Sales Order to ODM
2.Rebalance Out
3.SOI Reverse
4.Purchase Return
5.SOI Transfer to InvFin
6.Normal Buy Ahead SOI Out
7.Special Buy Ahead SOI Out
8.Transfer Between Customs Areas
9.SOI Transfer to LOI for MFG
tpl_goods_issue_noYstring1000XNG Pull No.
goods_issue_dateYstring(datetime)yyyy-MM-dd HH24:mm:ssPull Date
vmi_pull_idYstring32
vmi_line_idYstring32
delivery_quantityYstring(decimal)10,3
odmstring32
ship_tostring501. 当HUB转HUB,填写目的地hub的名称。
2. 当卖给ODM,填写ODM name 缩写。
3. Others=NA
cooYstring30
supplier_pnstring50
tpl_remarkstring200any thing 3PL would like to remark
syn_dateYstring(datetime)yyyy-MM-dd HH24:mm:sswhen the record is uploaded, 显示最新的Syn Date. 格式是date+time
senderYstring50
pull_dateYstring(date)yyyy-MM-dd
delivery_dateYstring(date)yyyy-MM-dd
comment1string100
comment2string100
请求示例

json

JSON
{
  "batch_id": "11297",
  "batch_size": 1,
  "seq_id": "1",
  "seq_size": 1,
  "data": [
    {
      "uid": "2C437F1A87FC4874A73ED2F180F875B7",
      "warehouse_name":"test_name",
      "stock_type":"SOI",
      "lenovo_plant_code":"code01",
      "lenovo_storage_location":"location01",
      "lenovo_pn":"pn01",
      "vendor_code":"code01",
      "posa":"",
      "posa_line":"",
      "aging_days":"",
      "stock_receiving_date":"2023-9-10 23:43:22",
      "tpl_receiving_id":"ud001",
      "receipt_id":"23234324",
      "line_id":"4335501",
      "supplier_invoice_no":"",
      "supplier_delivery_note":"",
      "stock_receiving_type":"",
      "order_type_in":"",
      "stock_issuing_type":"",
      "order_type_out":"",
      "tpl_goods_issue_no":"",
      "goods_issue_date":"2023-08-25 14:44:32",
      "vmi_pull_id":"id3",
      "vmi_line_id":"id2",
      "delivery_quantity":"0.00",
      "odm":"ABC",
      "ship_to":"xxx",
      "coo":"1",
      "supplier_pn":"pn002",
      "tpl_remark":"remark anything",
      "syn_date":"2023-10-23 13:22:34",
      "sender": "3pl",
      "pull_date":"2024-03-13",
      "delivery_date":"2024-03-13",
      "comment1": "",
      "comment2": ""
    }
  ]
}

xml

xml
<?xml version="1.0" encoding="UTF-8" ?>
<Req>
  <batch_id>11397</batch_id>
  <batch_size>1</batch_size>
  <seq_id>1</seq_id>
  <seq_size>1</seq_size>
  <data>
    <uid>2C437F1A87FC4874A73ED2F180F875B7</uid>
    <warehouse_name>test_name</warehouse_name>
    <stock_type>SOI</stock_type>
    <lenovo_plant_code>code01</lenovo_plant_code>
    <lenovo_storage_location>location01</lenovo_storage_location>
    <lenovo_pn>pn01</lenovo_pn>
    <vendor_code>code01</vendor_code>
    <posa>1</posa>
    <posa_line>2</posa_line>
    <aging_days>3</aging_days>
    <stock_receiving_date>2023-9-10 23:43:22</stock_receiving_date>
    <tpl_receiving_id>ud001</tpl_receiving_id>
    <receipt_id>23234324</receipt_id>
    <line_id>4335501</line_id>
    <supplier_invoice_no>2242</supplier_invoice_no>
    <supplier_delivery_note>note_xx</supplier_delivery_note>
    <stock_receiving_type>1</stock_receiving_type>
    <order_type_in>1</order_type_in>
    <stock_issuing_type>1</stock_issuing_type>
    <order_type_out>2</order_type_out>
    <tpl_goods_issue_no>3</tpl_goods_issue_no>
    <goods_issue_date>2023-08-25 14:44:32</goods_issue_date>
    <vmi_pull_id>id3</vmi_pull_id>
    <vmi_line_id>id2</vmi_line_id>
    <delivery_quantity>0.00</delivery_quantity>
    <odm>ABC</odm>
    <ship_to>xxx</ship_to>
    <coo>1</coo>
    <supplier_pn>pn002</supplier_pn>
    <tpl_remark>remark anything</tpl_remark>
    <syn_date>2023-10-23 13:22:34</syn_date>
    <pull_date>2024-03-13</pull_date>
    <delivery_date>2024-03-13</delivery_date>
    <comment1></comment1>
    <comment2></comment2>
  </data>
  <data>
    ...
  </data>
</Req>
返回成功示例

json

json
{
  "code": "0",
  "msg": "request success"
}

xml

xml
<Resp>
  <code>0</code>
  <msg>request success!</msg>
  <result>request success!</result>
</Resp>
返回包含错误数据示例

json

json
{
  "code": "E00V00",
  "msg": "data verification failed!",
  "result": {
    "verify": {
      "type": "value missing",
      "fields": "tpl_receiving_id"
    },
    "row": {
      "uid": "1233"
    }
  }
}

xml

xml
<Resp>
  <code>E00V00</code>
  <msg>data verification failed!</msg>
  <result>
    <verify>
      <type>value missing</type>
      <fields>tpl_receiving_id</fields>
    </verify>
    <row>
      <uid>1233</uid>
    </row>
  </result>
</Resp>