Goods-Out Note GET

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/warehouse-service/order/{ID-SET}/goods-note/goods-out/{ID-SET}

Refer to our documentation on URI syntax for more information on how to construct URIs.

Description

This message allows you to get goods-out notes. Goods-out notes are used to represent stock leaving your stock control system. The most common use of a goods-out note is to facilitate the fulfilment of a sales order.

You may query for goods-out notes in several different ways:

  • By goods-out note ID:
    • /order/*/goods-note/goods-out/4
  • By an ID set of goods-out note IDs:
    • /order/*/goods-note/goods-out/4-99,1,2
  • By an order ID:
    • /order/55/goods-note/goods-out/
  • By a set of order IDs:
    • /order/55-90,45/goods-note/goods-out/
  • By a combination of order IDs and goods-out note IDs:
    • /order/100-500/goods-note/goods-out/40-45
Note the asterisk (*) which is inserted in the place of the order ID set. This represents all orders.

Any ID set supplied can have a maximum size of 500 IDs.

The response of the message is a map of goods note ID to goods-out note object. The table below describes the properties of a goods-out note. Be aware that for a goods out note associated with an external stock transfer (i.e. warehouse to warehouse), the response will be different. The differences are outlined in the table.

Property Description Notes
orderId ID of the order this goods-out note is associated with For stock transfers, the order ID is 0 (i.e. there is no order)
warehouseId ID of the warehouse that stock is leaving
targetWarehouseId The ID of the warehouse stock is being transferred to Transfers only
transfer Flag indicating if this goods-out note is an external transfer
priority Flag indicating if this goods-out note is marked as a priority
status Top level data about the status of the goods-out note
shipping Contains the shipping method ID, the tracking reference, the number of boxes and the weight for the goods-out note
releaseDate The time at which the stock has been released from your stock control
createdOn The time at which the goods-out note was created
createdBy ID of the user who created the goods-out note
orderRows

Note that this section follows our FIFO rules for stock.

Map of order row ID to a list of product rows. The product rows consist of a product ID, a quantity and a location ID.

For each order row you can have many product rows. This is because the required items may exist in several locations and they may also have been received into your warehouse in several different batches. The goods-out note respects these conditions and will you give you a list of product rows from which to pick respecting the FIFO rules.

Each row also specifies the batch reference you assigned to the goods-in note when you received the stock into your system.

Not present on transfers
transferRows

A list of products included in the external transfer. Each item has a product ID, quantity and location ID.

Each row also specifies the batch reference you assigned to the goods-in note when you received the stock into your system.

Present only on transfers
stockTransferId ID of the stock transfer for which this goods-out note was created Present only on transfers
sequence

Sequence number of the goods-out note. As you can part fulfil an order or even fulfil from different warehouses, you can create numerous goods-out notes for an order. Each time a goods-out note is created for a given order, this number is incremented.

For example, if you fulfil an order in 5 parts, 5 goods-out notes will have been created. The first will have a sequence number of 1 and the last a sequence number of 5.

events

A list of the events which have occurred for this goods-out note. Each event consists of an date and an event owner ID. This is the ID of the user who triggered this event. Each event also has a code that identifies what type of event it is.

Possible event codes:
  • PLA: Placed - The time the goods-out note was created
  • PRI: Printed - The time the goods-out note was printed
  • UPR: Unprinted - The time the goods-out note was unprinted
  • PIC: Picked - The time the goods-out note was picked
  • UPI: Unpicked - The time the goods-out note was unpicked
  • PAC: Packed - The time the goods-out note was packed
  • UPA: Unpacked - The time the goods-out note was unpacked
  • SHW: Shipped - The time the goods-out note was shipped from a warehouse
labelUri URL for the packing label. Optional, but must be a valid URL if supplied. The maximum length is 512 characters.
lastEventVersion Version of the last event for the given Goods Out Note

It is recommended to pass this value in the "If-Match" header field when calling API's related to adding Goods Out Note events. This ensures the state of the Goods Out Note events is same as when you loaded the information.

Example 1

Requesting a single goods-out note by ID. Here you can see for the orderRows we have only one item however it has entered the warehouse from two different batches so the stock FIFO rules have kicked in. Note the use of '*'.

Request URI

/order/*/goods-note/goods-out/56

Response

{
	"response": {
		"56": {
			"orderId": 5556,
			"warehouseId": 2,
			"transfer": false,
			"priority": true,
			"status": {
				"shipped": true,
				"packed": true,
				"picked": true,
				"printed": true,
				"pickedOn": "2011-07-11T10:05:15.000+01:00",
				"packedOn": "2011-07-11T10:05:23.000+01:00",
				"shippedOn": "2011-07-11T10:05:29.000+01:00",
				"printedOn": "2011-07-11T10:05:05.000+01:00",
				"pickedById": 203,
				"packedById": 203,
				"shippedById": 203,
				"printedById": 203
			},
			"shipping": {
				"reference": "mpuk-32468-001",
				"boxes": 118,
				"shippingMethodId": 1,
				"weight": "113.28"
			},
			"releaseDate": "2011-07-11T10:04:47.000+01:00",
			"createdOn": "2011-07-11T10:02:34.000+01:00",
			"createdBy": 203,
			"orderRows": {
				"10": [
					{
						"productId": 1008,
						"quantity": 9,
						"locationId": 2,
						"userBatchReference": "1232-AZE"
					},
					{
						"productId": 1008,
						"quantity": 11,
						"locationId": 2,
						"userBatchReference": "12442-PLZ"
					}
				]
			},
			"sequence": 1,
			"events": [
				{
					"occured": "2011-07-11T10:04:48.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "PLA"
				},
				{
					"occured": "2011-07-11T10:05:05.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "PRI"
				},
				{
					"occured": "2011-07-11T10:05:15.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "PIC"
				},
				{
					"occured": "2011-07-11T10:05:23.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "PAC"
				},
				{
					"occured": "2011-07-11T10:05:29.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "SHW"
				}
			],
			"labelUri": "http://somedomain.com/packinglabel/image.jpg",
			"lastEventVersion": 209
		}
	}
}

Example 2

Requesting a single goods-out note by ID. Here we have two order row items.

Request URI

/order/*/goods-note/goods-out/40

Response

{
	"response": {
		"40": {
			"orderId": 5,
			"warehouseId": 2,
			"transfer": false,
			"priority": false,
			"status": {
				"shipped": true,
				"packed": true,
				"picked": true,
				"printed": true,
				"pickedOn": "2011-06-13T17:02:09.000+01:00",
				"packedOn": "2011-06-13T17:02:09.000+01:00",
				"shippedOn": "2011-06-13T17:02:09.000+01:00",
				"printedOn": "2011-06-13T17:02:09.000+01:00",
				"pickedById": 2,
				"packedById": 2,
				"shippedById": 2,
				"printedById": 2
			},
			"shipping": {
			},
			"releaseDate": "2011-06-13T16:59:44.000+01:00",
			"createdOn": "2011-06-13T16:57:34.000+01:00",
			"createdBy": 2,
			"orderRows": {
				"5": [
					{
						"productId": 1008,
						"quantity": 3,
						"locationId": 2,
						"userBatchReference": "Ref-232-2"
					}
				],
				"6": [
					{
						"productId": 1007,
						"quantity": 5,
						"locationId": 2
					}
				]
			},
			"sequence": 1,
			"events": [
				{
					"occured": "2011-06-13T16:59:44.000+01:00",
					"eventOwnerId": 2,
					"eventCode": "PLA"
				},
				{
					"occured": "2011-06-13T17:02:09.000+01:00",
					"eventOwnerId": 2,
					"eventCode": "PRI"
				},
				{
					"occured": "2011-06-13T17:02:09.000+01:00",
					"eventOwnerId": 2,
					"eventCode": "PIC"
				},
				{
					"occured": "2011-06-13T17:02:09.000+01:00",
					"eventOwnerId": 2,
					"eventCode": "PAC"
				},
				{
					"occured": "2011-06-13T17:02:09.000+01:00",
					"eventOwnerId": 2,
					"eventCode": "SHW"
				}
			],
			"labelUri": "http://somedomain.com/packinglabel/image.jpg",
			"lastEventVersion": 12
		}
	}
}

Example 3

Here we have requested all the goods-out notes for Order 5557. Notice there are two as we have part fulfilled this Order.

Request URI

/order/5557/goods-note/goods-out/

Response

{
	"response": {
		"58": {
			"orderId": 5557,
			"warehouseId": 2,
			"transfer": false,
			"priority": false,
			"status": {
				"shipped": false,
				"packed": false,
				"picked": false,
				"printed": false
			},
			"shipping": {
				"shippingMethodId": 2
			},
			"releaseDate": "2011-07-11T11:11:17.000+01:00",
			"createdOn": "2011-07-11T11:10:32.000+01:00",
			"createdBy": 402,
			"orderRows": {
				"11": [
					{
						"productId": 1008,
						"quantity": 25,
						"locationId": 2
					}
				],
				"12": [
					{
						"productId": 1010,
						"quantity": 1,
						"locationId": 2
					}
				]
			},
			"sequence": 2,
			"events": [
				{
					"occured": "2011-07-11T11:11:17.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "PLA"
				}
			],
			"lastEventVersion": 12
		},
		"57": {
			"orderId": 5557,
			"warehouseId": 2,
			"transfer": false,
			"priority": false,
			"status": {
				"shipped": false,
				"packed": false,
				"picked": false,
				"printed": false
			},
			"shipping": {
				"shippingMethodId": 2
			},
			"releaseDate": "2011-07-11T11:11:03.000+01:00",
			"createdOn": "2011-07-11T11:11:03.000+01:00",
			"createdBy": 402,
			"orderRows": {
				"11": [
					{
						"productId": 1008,
						"quantity": 25,
						"locationId": 2
					}
				],
				"12": [
					{
						"productId": 1010,
						"quantity": 1,
						"locationId": 2
					}
				]
			},
			"sequence": 1,
			"events": [
				{
					"occured": "2011-07-11T11:11:03.000+01:00",
					"eventOwnerId": 203,
					"eventCode": "PLA"
				}
			],
			"labelUri": "http://somedomain.com/packinglabel/image.jpg",
			"lastEventVersion": 63
		}
	}
}