Skip to content

This interface is applicable for data integration API, read Api Access Process first

send data to Lenovo

Description:3PL send stock out data to Lenovo
Method:POST PUT DELETE
ContentType:application/json application/xml
Path:/3pl/stock_out
EnvironmentURL
testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out
prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out
Business data description
fieldKEYrequiredfield typelengthformatdescription
uidYYString32unique ID to identity records for update or delete
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_noYstring50suppiler invoice
supplier_delivery_noteYstring100
stock_receiving_typeYstring201.Purchase GR (SOI GR, LOI GR) 2.SOI Tranfer to LOI 3.Stock Transfer in Site (In) 4.ODM Return 5.Others
order_type_instring30
stock_issuing_typeYstring301.SOI Trasnfer to LOI 2.RMA Out 3.Sales Order Delivery 4.Pull to MFG 5.Rebalance Out 6.Stock Transfer in Site (Out) 7.Others
order_type_outstring30
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_tostring50
cooYstring30
supplier_pnstring50
tpl_remarkstring200any thing 3PL would like to remark
syn_dateYstring(datetime)yyyy-MM-dd HH24:mm:sswhen the record is uploaded
senderYstring50
comment1string100
comment2string100
request sample

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":"1.23",
      "odm":"",
      "ship_to":"xxx",
      "coo":"",
      "supplier_pn":"pn002",
      "tpl_remark":"remark anything",
      "syn_date":"2023-10-23 13:22:34",
      "sender": "3pl",
      "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>1233</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>1.23</delivery_quantity>
    <odm></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>
    <sender>3pl</sender>
    <comment1></comment1>
    <comment2></comment2>
  </data>
  <data>
    ...
  </data>
</Req>
success response sample

json

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

xml

xml
<Resp>
  <code>0</code>
  <msg>request success!</msg>
  <result>request success!</result>
</Resp>
failed response sample

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>