Inbound Shipment Create and Update In Sandbox

Monday, Dec 17, 2018

Inbound Shipment Create and Update is now live in sandbox

You can now make POST and PUT requests to https://sandbox.masonhub.co/account_name/api/v1/inbound_shipments. The full API documentation for Inbound Shipments is located here: https://docs.masonhub.co/api/v1#tag/InboundShipments

The Inbound Shipment model is often called an ASN (or Advance Ship Notice) and it’s used to notify MasonHub that there is, you guessed it, and shipment inbound. It tells us who it’s coming from, who’s carrying the shipment and, most importantly, what skus and what quantity of each item should we expect. A couple of requirements you need to be aware of:

  • You cannot submit an Inbound Shipment without Line Items and you must submit Line Items with Skus already in your item master.
  • You cannot submit more than 10 at a time. Inbound Shipments, by their nature, can be large and it requires a significant amount of validation on submission, so we’ve limited the inbound to 10 at a time…for now.
  • You can only change Inbound Shipments that are in the ‘open’ status. If they are already being received against, are in receiving, or have been deleted, you’ll get a validation error.
  • We keep a copy of every Inbound Shipment change you send to us. Which is why the model has a version field attached to it. In the future, you’ll be able to view the different versions in the UI.
  • Most Important: An Inbound Shipment requires a MasonHub Inventory Location UUID. It tells what location we should expect to receive the shipment. Right now, we only have the Rancho Cucamonga location, and the ‘inventory_location_id’ in sandbox is bf7bb516-ce52-8950-2a8b-9008f0091d93.

An Example

To create or update new Inbound Shipments, issue a POST or a PUT to the https://sandbox.masonhub.co/account_name/api/v1/inbound_shipments endpoint using your client name. The post should have the form like below:

[
	{
		"customer_identifier": "shipment32432",
		"customer_purchase_order_id": "po234532",
		"inventory_location_id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
		"carrier_information": {
			"name": "Frankie's Red Hot Carrier",
			"type": "TL",
			"contact_name": "John Jacob",
			"driver_name": "Donny James Jr",
			"driver_phone": "555-343-4213"
		},
		"tracking_number": "356732154",
		"shipper_name": "Freddie's Pirate Army",
		"shipper_city": "Kalamazoo",
		"shipper_locale": "MI",
		"shipper_country": "US",
		"expected_arrival_date": "2018-12-11T10:00:00Z",
		"special_instructions": "It's important that they are folded during put away using the provided folding template.",
		"comments": "These shipments are often not labeled. Carrier has been reliable though.",
		"line_items": [
			{
				"customer_sku_id": "10000",
				"quantity": 80
			},
			{
				"customer_sku_id": "10001",
				"quantity": 20
			}
		]
	},
	{
		"customer_identifier": "shipment32476",
		"customer_purchase_order_id": "po854456",
		"inventory_location_id": "52c7c6ee-6e63-4f25-db83-c987fc52116c",
		"carrier_information": {
			"name": "Melinda's Super Carrier",
			"type": "LTL",
			"contact_name": "John Jacob",
			"driver_name": "Donny James",
			"driver_phone": "555-343-4213"
		},
		"tracking_number": "356732154",
		"shipper": "Freddie's Pirate Army",
		"shipper_city": "Kalamazoo",
		"shipper_locale": "MI",
		"shipper_country": "US",
		"expected_arrival_date": "2018-12-18T10:00:00Z",
		"special_instructions": "It's important that they are folded during put away using the provided folding template.",
		"comments": "These shipments often come mixed.",
		"line_items": [
			{
				"customer_sku_id": "shirt-32423",
				"quantity": 50
			},
			{
				"customer_sku_id": "shirt-674556",
				"quantity": 45
			},
			{
				"customer_sku_id": "pant-764543",
				"quantity": 10
			},
			{
				"customer_sku_id": "short-63453",
				"quantity": 500
			},
			{
				"customer_sku_id": "jammies-63432",
				"quantity": 200
			},
			{
				"customer_sku_id": "shirt-56342",
				"quantity": 150
			}
		]
	}
]

That’s all there is to it. In the future (tomorrow, really), Inbound Shipments, when posted will alter inventory by adjusting the expected total in the inventory_ledger. You will get a skuInventoryChange event when that happens. It won’t change the available inventory, but it will adjust expected totals based on your posted updates. After that, we will release the GET and DELETE verbs and the inboundShipmentOnDock and inboundShipmentClose callbacks.

Don’t be afraid to reach out to Chris or Andy with any questions.