Shipment
This article guides you through how to manage inbound and outbound deliveries.
Read
/api/stock.picking
Read all your picking orders.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/stock.picking -X GET -H
"access_token: XXXXXXXXXXXXXXXXX"
{
"code":200,
"data":{
"count":2,
"results":[
{
"origin":"1234567890",
"carrier_tracking_ref":null,
"create_date":"2022-06-08 12:00:00+00:00",
"weight":3.0,
"origin_id":{
"picking_type_code":null,
"id":null,
"name":null
},
"dpd_label_ids":[
],
"shipping_weight":null,
"send_email":null,
"pack_operation_product_ids":[
],
"partner_id":{
"city":"Graz",
"id":233592,
"name":"Martina Musterfrau",
},
"id":1234,
"note":null,
"date_done":null,
"picking_type_id":{
"id":953,
"name":"Outbound"
},
"location_id":{
"id":4200,
"name":"Warehouse"
},
"move_type":"one",
"name_external":null,
"company_id":{
"id":184,
"name":"We Ship Fulfillment GmbH"
},
"priority":"1",
"state":"confirmed",
"picking_type_code":"outgoing",
"location_dest_id":{
"id":9,
"name":"Customer"
},
"move_lines":[
{
"product_id":{
"attribute_line_ids":[
],
"barcode":null,
"type":"product",
"id":42964,
"name":"Test Product"
},
"product_uom":{
"id":1,
"name":"Unit(s)"
},
"product_uom_qty":12.0,
"rebound_check":null,
"inbound_check":null,
"state":"done",
"origin_returned_move_id":{
"id":null,
"name":null
},
"id":985865,
"name":"Test Product"
}
],
"min_date":"2022-06-08 13:44:46+00:00",
"carrier_id":{
"id":150,
"name":"GLS Austria"
},
"name":"1-O-220608168022",
"send_sms":null,
"inspection_with_product_counting":null,
"recurring_shipping":null
},
{...}
]
}
}
/api/stock.picking/<id>
Read a single picking order with the provided ID.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/stock.picking/1234 -X GET -H
"access_token: XXXXXXXXXXXXXXXXX"
{
"code":200,
"data":{
"origin":"1234567890",
"carrier_tracking_ref":null,
"create_date":"2022-06-08 12:00:00+00:00",
"weight":3.0,
"origin_id":{
"picking_type_code":null,
"id":null,
"name":null
},
"dpd_label_ids":[
],
"shipping_weight":null,
"send_email":null,
"pack_operation_product_ids":[
],
"partner_id":{
"city":"Graz",
"id":233592,
"name":"Martina Musterfrau",
},
"id":1234,
"note":null,
"date_done":null,
"picking_type_id":{
"id":953,
"name":"Outbound"
},
"location_id":{
"id":4200,
"name":"Warehouse"
},
"move_type":"one",
"name_external":null,
"company_id":{
"id":184,
"name":"We Ship Fulfillment GmbH"
},
"priority":"1",
"state":"confirmed",
"picking_type_code":"outgoing",
"location_dest_id":{
"id":9,
"name":"Customer"
},
"move_lines":[
{
"product_id":{
"attribute_line_ids":[
],
"barcode":null,
"type":"product",
"id":42964,
"name":"Test Product"
},
"product_uom":{
"id":1,
"name":"Unit(s)"
},
"product_uom_qty":12.0,
"rebound_check":null,
"inbound_check":null,
"state":"done",
"origin_returned_move_id":{
"id":null,
"name":null
},
"id":985865,
"name":"Test Product"
}
],
"min_date":"2022-06-08 13:44:46+00:00",
"carrier_id":{
"id":150,
"name":"GLS Austria"
},
"name":"1-O-220608168022",
"send_sms":null,
"inspection_with_product_counting":null,
"recurring_shipping":null
},
"success":true
}
Create
/res.company/<id>/create_api_company_stock_picking
Create a single picking order with product and customer data on the fly.
Linking a product
If you already have a product in our system, we will try to match it through the EAN code. Otherwise, a new product gets created. Keep in mind if you create an outbound with a new product, it will be on hold, until we receive an inbound.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/res.company/1234/create_api_company_stock_picking
-X POST -H "access_token: XXXXXXXXXXXXXXXXX " -d picking_data
{
"customer_address":{
"name":"Max Mustermann",
"email":"max.mustermann@example.org",
"phone":"+43664 123456789",
"street":"Musterweg 5",
"street2":"Tür 12",
"city":"Graz",
"zip":"8010",
"state_code":"ST",
"country_code":"AT"
},
"products":[
{
"name":"Test Product 1",
"ean":"BC12345678901",
"price":19.90,
"quantity":12,
"hs_code":"12345678",
"origin_country_code":"DE",
"tracking":"lot",
"lot_number":"12345678",
"lot_expiry_date":"2023-10-12",
"height_meter":0.2,
"width_meter":0.3,
"length_meter":0.5,
"weight_kg":0.25
},
{
"name":"Test Product 2",
"ean":"BC23456789012",
"price":29.90,
"quantity":5,
"hs_code":"23456781",
"origin_country_code":"DE",
"tracking":null,
"height_meter":0.2,
"width_meter":0.3,
"length_meter":0.5,
"weight_kg":0.25
}
],
"origin":"1234567890",
"expected_date":"2022-07-01 00:00:00",
"picking_type":"outgoing"
}
{"code": 200, "data": "1234", "success": true}
Update
/api/stock.picking<id>
Update a single picking order.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/stock.picking/1234 -X PUT -H
"access_token: XXXXXXXXXXXXXXXXX" -d '{"origin": "Test-1234", "min_date":"2022-08-10 05:00:00+00:00"}'
{
"code":200,
"data":{
"origin":"Test-1234",
"carrier_tracking_ref":null,
"create_date":"2022-06-08 12:00:00+00:00",
"weight":3.0,
"origin_id":{
"picking_type_code":null,
"id":null,
"name":null
},
"dpd_label_ids":[
],
"shipping_weight":null,
"send_email":null,
"pack_operation_product_ids":[
],
"wave_id":{
"state":null,
"id":null,
"name":null
},
"partner_id":{
"city":"Graz",
"id":233592,
"name":"Martina Musterfrau",
},
"id":1234,
"note":null,
"date_done":null,
"picking_type_id":{
"id":953,
"name":"Outbound"
},
"location_id":{
"id":4200,
"name":"Warehouse"
},
"move_type":"one",
"name_external":null,
"company_id":{
"id":184,
"name":"We Ship Fulfillment GmbH"
},
"priority":"1",
"state":"confirmed",
"picking_type_code":"outgoing",
"location_dest_id":{
"id":9,
"name":"Customer"
},
"move_lines":[
{
"product_id":{
"attribute_line_ids":[
],
"barcode":null,
"type":"product",
"id":42964,
"name":"Test Product"
},
"product_uom":{
"id":1,
"name":"Unit(s)"
},
"product_uom_qty":12.0,
"rebound_check":null,
"inbound_check":null,
"state":"done",
"origin_returned_move_id":{
"id":null,
"name":null
},
"id":985865,
"name":"Test Product"
}
],
"min_date":"2022-08-10 05:00:00+00:00",
"carrier_id":{
"id":150,
"name":"GLS Austria"
},
"name":"1-O-220608168022",
"send_sms":null,
"inspection_with_product_counting":null,
"recurring_shipping":null
},
"success":true
}
Delete
/api/stock.picking<id>
Delete a single picking order.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/stock.picking/1234 -X DELETE -H
"access_token: XXXXXXXXXXXXXXXXX"
{"code": 200, "data": {"id": 1234}, "success": true}
Properties
create_api_company_stock_picking
Properties related to create a picking order.
IMPORTANT: Only for creating an order
The property tables below is only used for create_api_company_stock_picking (see above). In the future, all requests and reponses will be updated in the same way.
| Field | Data type | Description | |
|---|---|---|---|
| customer_address |
Recipient of shipment weship.customer |
||
| expected_date |
Scheduled date of shipment. format : 'YYYY-MM-DD HH:MM:SS' |
||
| picking_type | Defines the type of shipment outgoing incoming | ||
| products |
Products related to the shipping weship.products |
||
| origin | Your order reference number |
weship.customer
Properties related to the weship.customer table.
| Field | Data type | Description | |
|---|---|---|---|
| city | Name of the city | ||
| country_code | Official ISO 3166 alpha-2 shortcode | ||
| Email address | |||
| name | First and last name | ||
| phone | Phone or mobile number | ||
| state_code | Official ISO 3166 alpha-2 shortcode | ||
| street | Name of the street, including house number | ||
| street2 | Additional address information | ||
| zip | ZIP code of the city |
weship.products
Properties related to the weship.products table.
| Field | Data type | Description | |
|---|---|---|---|
| ean | Unique barcode | ||
| height_meter | Height as m, including packaging. | ||
| hs_code | Specific tariff code for international shipments | ||
| length_meter | Length as meter, including packaging. | ||
| name | Name | ||
| origin_country_code | Origin country code. Important for tariff | ||
| price | Default sale price. Important for tariff | ||
| quantity | Amount of products to be shipped | ||
| tracking | If product has expiry date, must be set. lot | ||
| lot_number | Name or number of the lot. | ||
| lot_expiry_date |
Date when the product is going to be expire format : 'YYYY-MM-DD' |
||
| origin_country_code | Origin country code. Important for tariff | ||
| weight_kg | Weight as kg, including packaging | ||
| width_meter | Width as m, including packaging |
stock.picking
Properties related to the stock.picking table.
IMPORTANT: Only to read and update an order
The property tables below is only used for read and update a picking order. In the future, all requests and reponses will be updated the same way as in create_api_company_stock_picking.
| Field | Data type | Description | |
|---|---|---|---|
| carrier_id |
Carrier to use for the shipment weship.carrier |
||
| carrier_tracking_ref | Tracking reference from carrier. | ||
| create_date |
Datetime of when the order record was created. |
||
| company_id | WeShip company, based on location. | ||
| date_done |
Date and time when shipment was ready to be picked up by carrier format : 'YYYY-MM-DD HH:MM:SS' |
||
| dpd_label_ids |
List of all dpd labels dpd.label |
||
| id | Unique identifier of picking order | ||
| location_dest_id | Location, to which the shipment is sent. | ||
| location_id | Location, from where the shipment is sent. | ||
| min_date |
Scheduled date of shipment. format : 'YYYY-MM-DD HH:MM:SS' |
||
| move_lines |
List of all product data to deliver stock.move |
||
| move_type |
Specifies goods to be delivered partially, or at once.
direct (partially) one (all at once) |
||
| name | Name of picking order with sequence | ||
| note | Additional delivery information | ||
| origin | Your order reference number | ||
| origin_id | Link to ID of an existing picking order, if exists. | ||
| pack_operation_product_ids |
List of all packing operations stock.pack.operation |
||
| partner_id |
The recipient of the shipment, your customer res.partner |
||
| picking_type_id | Defines if it is an incoming or outgoing shipment | ||
| picking_type_code | Name of shipment type | ||
| priority | Priority of shipment (currently not used) | ||
| recurring_shipping | Mark delivery as recurring (currently not used) | ||
| send_email | Mark delivery to send email | ||
| send_sms | Mark delivery to send sms (currently not used) | ||
| shipping_weight | Total weight of products, including shipping box | ||
| state | Current status of the order | ||
| weight | Total weight of products, excluding shipping box |
stock.move
Properties related to the stock.move table
| Field | Data type | Description | |
|---|---|---|---|
| id | Unique identifier | ||
| inbound_check | Check product on inbound (currently not used for single product) | ||
| name | Name of product | ||
| product |
Product record product.product |
||
| product_uom |
Unit of measurement for product product.uom |
||
| product_uom_qty | Total amount of shipping products | ||
| rebound_check | Check product on return (currently not used for single product) | ||
| state | Current status of the shipping products |
dpd.labels
Properties related to the dpd.labels table
| Field | Data type | Description | |
|---|---|---|---|
| dpd_code | Shortcode of tracking event | ||
| dpd_url | URL to shipment tracking | ||
| id | Unique identifier | ||
| information | Additional information of shipment |