External Transfer POST

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/warehouse-service/warehouse/{SOURCE-WAREHOUSE-ID}/external-transfer

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

Description

This method enables you to create an external transfer. Note that any products added to the stock transfer using the admin UI will be overwritten by this API.

URI parameters

  • Source warehouse ID - The ID of the warehouse from which the transfer originates.

Body parameters

Field Description Required Notes
targetWarehouseId The ID of the warehouse the stock is being transferred to. Required
stockTransferId The ID of the stock transfer. Obtain a stock transfer ID from the stock transfer POST API. Required
shippingMethodId The ID of the transfer shipping method. Optional
releaseDate The release date. Optional Defaults to the current time.
transferredProducts This block contains a list of products to be moved. Required
transferredProducts.productId The ID of the product to be transferred. Required
transferredProducts.quantity The quantity of the product to be transferred. Required
transferredProducts.fromLocationId The location in the warehouse from which the product is to be transferred. Optional If not specified, the location picked from is determined according FIFO. You may specify at most one combination of a product ID and location ID in your request. You may specify at most one transferredProduct with no location ID: the resulting goods out note may fulfil this product from multiple different locations, according to FIFO.

The return from the method is an array of goods out note IDs.

Example 1

Create an external transfer from warehouse 1 with two movements: transfer of 5 products (ID 34) from location 13 to warehouse 2; transfer of 3 products (ID 34) from location 16 to warehouse 2.

Request URI

/warehouse/1/external-transfer

Request body

{
	"targetWarehouseId": 2,
	"stockTransferId": 22,
	"shippingMethodId": 1,
	"releaseDate": "2012-03-20T14:47:24.244Z",
	"transferredProducts": [
		{
			"productId": 34,
			"quantity": 5,
			"fromLocationId": 13
		},
		{
			"productId": 34,
			"quantity": 3,
			"fromLocationId": 16
		}
	]
}

Response

{
	"response": [
		60
	]
}

Example 2

This will create an external transfer from warehouse 1 to warehouse 2 with two products moved - each from an unspecified location, to be determined by FIFO

Request URI

/warehouse/1/external-transfer

Request body

{
	"targetWarehouseId": 2,
	"stockTransferId": 22,
	"shippingMethodId": 1,
	"releaseDate": "2012-03-20T14:47:24.244Z",
	"transferredProducts": [
		{
			"productId": 34,
			"quantity": 5
		},
		{
			"productId": 34,
			"quantity": 3
		}
	]
}

Response

{
	"response": [
		60
	]
}