You can track inventory transfer history in your shop. Alternatively, you can use it to transfer the available quantity of an inventory item from a location to another location.
Authenticated access scopes: com.read_inventories, com.write_inventories
What you can do with Inventory Transfer
The Haravan API lets you do the following with the Inventory Transfer resource.
- GET https://apis.haravan.com/com/inventories/transfers.json Retrieves a list of inventory transfers.
- GET https://apis.haravan.com/com/inventories/transfers/count.json Retrieve a count of the inventory transfer.
- GET https://apis.haravan.com/com/inventorytransfer/detail/{inventory_tranfer_id}.json Retrieves single the inventory transfer.
- POST https://apis.haravan.com/com/inventories/transfer.json Create an inventory transfer.
- POST https://apis.haravan.com/com/inventories/transfer/{inventory_tranfer_id}/recive.json Receive an inventory transfer.
Inventory transfer properties
Endpoints
Retrieves a list of inventory transfers. You can filter resources by params.
limit | Limit of the result. |
page | Page to show the result. |
since_id | Restrict results to after the specified ID |
from_location_id | Filter result by the specified transfer location ID. |
to_location_id | Filter result by the specified receive location ID. |
reason | Filter result by the reason. |
Retrieve all of the resources of the inventory transfers by page number. By default, the number of resources on the page is 50.
GET https://apis.haravan.com/com/inventories/transfers.json?page=1
HTTP/1.1 200 OK
{ "transfers": [ { "id": 1001030743, "transfer_number": "IT100001", "from_loc_id": 963414, "to_loc_id": 1007284, "reason": "shrinkage", "tran_date": "2021-06-01T09:36:22.046Z", "note": "Hoàn chuyển kho số #IT100000", "total": 10, "created_at": "2021-06-01T09:36:22.07Z", "updated_at": "2021-07-08T01:49:29.734Z", "status": "Received", "actived_at": "2021-06-01T09:36:22.046Z", "received_at": "2021-06-01T09:33:14.835Z", "created_user": 200000493247, "received_user": null, "tags": null, "line_items": [ { "id": 1009626370, "product_id": 1028183686, "product_variant_id": 1061514767, "quantity": 5, "sku": "AO551", "barcode": "AO551", "variant_title": "Đen / S", "product_name": "Váy Quây dài" }, { "id": 1009626371, "product_id": 1028183686, "product_variant_id": 1064240649, "quantity": 5, "sku": "30061644-45-KEZ", "barcode": "30061644-45-KEZ", "variant_title": "Đỏ / XL", "product_name": "Váy Quây dài" } ] }, { "id": 1001030739, "transfer_number": "IT100000", "from_loc_id": 1007284, "to_loc_id": 963414, "reason": "shrinkage", "tran_date": "2021-06-01T09:34:03.769Z", "note": "test", "total": 10, "created_at": "2021-06-01T09:34:03.792Z", "updated_at": "2021-06-01T09:34:11.15Z", "status": "Received", "actived_at": "2021-06-01T09:34:03.769Z", "received_at": "2021-06-01T09:33:14.835Z", "created_user": 200000493247, "received_user": null, "tags": null, "line_items": [ { "id": 1009626360, "product_id": 1028183686, "product_variant_id": 1061514767, "quantity": 5, "sku": "AO551", "barcode": "AO551", "variant_title": "Đen / S", "product_name": "Váy Quây dài" }, { "id": 1009626361, "product_id": 1028183686, "product_variant_id": 1064240649, "quantity": 5, "sku": "30061644-45-KEZ", "barcode": "30061644-45-KEZ", "variant_title": "Đỏ / XL", "product_name": "Váy Quây dài" } ] } ] }
Retrieve resources of the inventory adjustment by transfer location id or receive location id.
GET /com/inventories/transfers.json?from_location_id=963414
HTTP/1.1 200 OK
{ "transfers": [ { "id": 1001030743, "transfer_number": "IT100001", "from_loc_id": 963414, "to_loc_id": 1007284, "reason": "shrinkage", "tran_date": "2021-06-01T09:36:22.046Z", "note": "Hoàn chuyển kho số #IT100000", "total": 10, "created_at": "2021-06-01T09:36:22.07Z", "updated_at": "2021-07-08T01:49:29.734Z", "status": "Received", "actived_at": "2021-06-01T09:36:22.046Z", "received_at": "2021-06-01T09:33:14.835Z", "created_user": 200000493247, "received_user": null, "tags": null, "line_items": [ { "id": 1009626370, "product_id": 1028183686, "product_variant_id": 1061514767, "quantity": 5, "sku": "AO551", "barcode": "AO551", "variant_title": "Đen / S", "product_name": "Váy Quây dài" }, { "id": 1009626371, "product_id": 1028183686, "product_variant_id": 1064240649, "quantity": 5, "sku": "30061644-45-KEZ", "barcode": "30061644-45-KEZ", "variant_title": "Đỏ / XL", "product_name": "Váy Quây dài" } ] } ] }
Retrieve a count of the inventory transfer.
Retrieves single the inventory transfer by ID.
GET https://apis.haravan.com/com/inventorytransfer/detail/.json
HTTP/1.1 200 OK
{ "count": 2 }
Retrieves single the inventory transfer.
Retrieves single the inventory transfer by ID.
GET https://apis.haravan.com/com/inventorytransfer/detail/.json
HTTP/1.1 200 OK
{ "inventorytransfer": { "id": 1001030743, "transfer_number": "IT100001", "from_loc_id": 963414, "to_loc_id": 1007284, "reason": "shrinkage", "tran_date": "2021-06-01T09:36:22.046Z", "note": "Hoàn chuyển kho số #IT100000", "total": 10, "created_at": "2021-06-01T09:36:22.07Z", "updated_at": "2021-07-08T01:49:29.734Z", "status": "Received", "actived_at": "2021-06-01T09:36:22.046Z", "received_at": "2021-06-01T09:33:14.835Z", "created_user": 200000493247, "received_user": null, "user_id": null, "tags": null, "line_items": [ { "id": 1009626370, "product_id": 1028183686, "product_variant_id": 1061514767, "quantity": 5, "sku": "AO551", "barcode": "AO551", "variant_title": "Đen / S", "product_name": "Váy Quây dài" } ] } }
Create an inventory transfer.
POST https://apis.haravan.com/com/inventories/transfer.json
{ "transfer": { "from_loc_id": 479749, "to_loc_id": 479754, "note": "chuyển kho", "reason": "newproduct", "received_at": "2017-06-09T17:00:00Z", "user_id": 3, "line_items": [ { "product_id": 10000260270, "product_variant_id": 101021136, "quantity": 1 } ] } }
HTTP/1.1 200 OK
{ "transfer": { "id": 1000100351, "transfer_number": "IT1000100306", "from_loc_id": 479749, "to_loc_id": 479754, "tran_date": "2016-05-24T07:34:32.164Z", "note": "xdadada", "reason": "newproduct", "total": 1, "created_at": "2016-05-24T07:34:32.213Z", "updated_at": "2016-05-31T03:01:08.855Z", "status": "Active", "actived_at": "2016-05-24T07:34:32.164Z", "received_at": "2016-05-31T03:01:08.849Z", "created_user": 3, "received_user": 3, "line_items": [ { "id": 1000100732, "product_id": 10000260270, "product_variant_id": 101021136, "quantity": 1, "sku": null, "barcode": "19728011003", "variant_title": "Trắng", "product_name": "Bao da IPad Air 2 Kakusiga Transparent" } ] } }
Receive an inventory transfer.
POST https://apis.haravan.com/com/inventories/transfer/1000100351/receive.json
{ "transfer": { "user_id": 3 } }
HTTP/1.1 200 OK
{ "transfer": { "id": 1000100351, "transfer_number": "IT1000100306", "from_loc_id": 479749, "to_loc_id": 479754, "tran_date": "2016-05-24T07:34:32.164Z", "note": "xdadada", "reason": "newproduct", "total": 1, "created_at": "2016-05-24T07:34:32.213Z", "updated_at": "2016-05-31T03:01:08.855Z", "status": "Active", "actived_at": "2016-05-24T07:34:32.164Z", "received_at": "2016-05-31T03:01:08.849Z", "created_user": 3, "received_user": 3, "line_items": [ { "id": 1000100732, "product_id": 10000260270, "product_variant_id": 101021136, "quantity": 1, "sku": null, "barcode": "19728011003", "variant_title": "Trắng", "product_name": "Bao da IPad Air 2 Kakusiga Transparent" } ] } }