Skip to content

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

send data to Lenovo

Description:3PL send stock in data
Method:POST PUT DELETE
ContentType:application/json application/xml
Path:/3pl/stock_in
EnvironmentURL
testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_in
prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_in
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_pnYstring50
vendor_codeYstring50
posaYstring50
posa_lineYstring50
stock_receiving_dateYstring(datetime)yyyy-MM-dd HH24:mm:ss
tpl_receiving_idYstring50
receipt_idYstring50
line_idYstring50
supplier_invoice_noYstring50commercial invoice number
supplier_delivery_noteYstring50
stock_receiving_typeYstring501.Purchase GR (SOI GR, LOI GR) 2.SOI Tranfer to LOI 3.Stock Transfer in Site (In) 4.ODM Return 5.Others
order_type_instring50
received_qtyYstring(decimal)10,3goods arrive and haven't been checked quality yet.
good_quantityYstring(decimal)10,3good quantity after IQC
ng_qtyYstring(decimal)10,3unqualified quantity after IQC
cooYstring50
supplier_pnstring50
tpl_remarkstring200any thing 3PL would like to remark
tpl_issuing_nostring50XN Pull No.
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":"code-1",
      "lenovo_storage_location":"location_1",
      "lenovo_pn":"pn01",
      "vendor_code":"vendor001",
      "posa":"tst",
      "posa_line":"tst",
      "stock_receiving_date":"2023-09-20 12:23:31",
      "tpl_receiving_id":"0232823233343",
      "receipt_id":"102343",
      "line_id":"30233",
      "supplier_invoice_no":"",
      "supplier_delivery_note":"",
      "stock_receiving_type":"",
      "order_type_in":"",
      "received_qty":"233.23",
      "good_quantity":"2344.42",
      "ng_qty":"1.23",
      "coo":"xx",
      "supplier_pn":"pn01",
      "tpl_remark":"any thing to remark",
      "tpl_issuing_no": "12123",
      "syn_date": "2023-10-24 23:32:12",
      "sender": "3pl"
    }
  ]
}

xml

xml
<?xml version="1.0" encoding="UTF-8"?>
<Req>
  <batch_id>11300</batch_id>
  <batch_size>1</batch_size>
  <seq_id>1</seq_id>
  <seq_size>1</seq_size>
  <data>
    <warehouse_name>test_name</warehouse_name>
    <stock_type>SOI</stock_type>
    <lenovo_plant_code>code-1</lenovo_plant_code>
    <lenovo_storage_location>location_1</lenovo_storage_location>
    <lenovo_pn>pn01</lenovo_pn>
    <vendor_code>vendor001</vendor_code>
    <posa>tst</posa>
    <posa_line>tst</posa_line>
    <stock_receiving_date>2023-09-20 12:23:31</stock_receiving_date>
    <tpl_receiving_id>0232823233343</tpl_receiving_id>
    <receipt_id>102343</receipt_id>
    <line_id>30233</line_id>
    <supplier_invoice_no>3</supplier_invoice_no>
    <supplier_delivery_note>2</supplier_delivery_note>
    <stock_receiving_type>1</stock_receiving_type>
    <order_type_in></order_type_in>
    <received_qty>233.23</received_qty>
    <good_quantity>2344.42</good_quantity>
    <ng_qty>1.23</ng_qty>
    <coo>xx</coo>
    <supplier_pn>pn01</supplier_pn>
    <tpl_remark>any thing to remark</tpl_remark>
    <tpl_isussing_no>122321</tpl_isussing_no>
    <syn_date>2023-10-24 23:32:12</syn_date>
    <sender>3pl</sender>
  </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>