FROM CACHE - en_header

Transfer API

Harith_Kotelawa
Shopify Partner
2 0 6

I am trying to integrate Shopify APIs with a third party system. 
In order to integrate I need Transfer data. But in the API documentation there are no information about Transfer Data API. Is there a way that I can retreive those data or it is currrently unavaiable?

 

Products >> Transfers 

Replies 12 (12)
Jason
Shopify Expert
10918 193 2191

The REST API doesn't have a transfers endpoint, so that isn't available information.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
Harith_Kotelawa
Shopify Partner
2 0 6

Hi,

what about the following API : https://XXXX.myshopify.com/admin/transfers.json

what will happen if i use the above

Jason
Shopify Expert
10918 193 2191

Easy to test that for yourself.
That's a url in the Admin and not an official public Rest API endpoint. You should go off what's in the docs for what should be trusted.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
Kenny_Ashton
New Member
1 0 1

On the unite conference they annouced that an api was planned in the future with no specific date. Hopefully we will get news of it before the end of the year

ClementG
Shopify Partner
660 0 140

I've been waiting for this API too.

I'm not going to use an unofficial API that might break at any time...

John24
Shopify Partner
15 0 9

Has anyone heard any updates on this?

RosalieL
Shopify Partner
11 0 70

How can something so simple be ignored for so long by Shopify. Even an export option on the transfers screen in shopify admin would be better than nothing. Unless this is is fixed, getting stock from suppliers requires double handling. Once for the purchase order and once for the transfer. Surely being able to enter the transfer, then export it so we can use it as a purchase order is simple. I’m sure if the API was updated then devs could build apps to make it more beautiful, but in the meantime without an export option shops cannot seamlessly order stock, which is a fairly basic requirement for a retailer.

 

mmarcus15
Shopify Partner
9 0 1

Has anyone heard any updates on the transfers API?

John24
Shopify Partner
15 0 9

I too am very interested in this.

tomasseveryn
Tourist
6 0 2

I second that as well.

For our app to give our users even more added value we need transfer api as well. thank you very much for considering it 

den232
Shopify Partner
109 1 28

It's been a few years since your request.  Any action, perhaps a graphQL API?  Thx jb

Thomas_Lang1
Shopify Partner
213 6 43

the way I do this is a bit hacky, but for me it works, so I'd like to share it in the hopes that it will help someone else. (at least untill shopify gives us a way to do this through an official endpoint.) only issue currently is that the destination location is missing (only source location is available, but if you dont have too many transfers between more than 2 locations it will work for you.

 

or you can use the query parameter to look for a certain locations transfers: admin/transfers.json?query=location_name if the source is the same as the location name you know it was not to this location, and you could skip it, this way you would only get transfers to this location (I haven't used this part, and I know it's not ideal, but better than nothing)

I use nodejs to fetch the transfers json.

if you are in the shopify admin, open up transfers, add .json after the url and press enter:

Thomas_Lang1_0-1624821143177.png

open the google chrome webinspector, and find the get request to the transfers.json endpoint, then copy it as nodejs fetch:

 

Thomas_Lang1_1-1624821221976.png

 

paste it into an editor like webstorm, add the node-fetch module and you will be able to fetch the json (the cookies are valid for about 24 hours, so if you need to fetch again you will need to do above steps again.

 

your code should look something like this (i removed my cookie data and sessionids ofcourse):

 

 

 

 

 

const fetch = require('node-fetch');

async function getTransfers() {
    let res = await fetch("https://xx.myshopify.com/admin/transfers.json", {
        "headers": {
            "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
            "accept-language": "en-US,en;q=0.9,nl;q=0.8",
            "cache-control": "no-cache",
            "pragma": "no-cache",
            "sec-ch-ua": "\" Not;A Brand\";v=\"99\", \"Google Chrome\";v=\"91\", \"Chromium\";v=\"91\"",
            "sec-ch-ua-mobile": "?0",
            "sec-fetch-dest": "document",
            "sec-fetch-mode": "navigate",
            "sec-fetch-site": "none",
            "sec-fetch-user": "?1",
            "upgrade-insecure-requests": "1",
            "cookie": "_master_udr=verylongstring; new_admin=1; _secure_admin_session_id=session_id; _secure_admin_session_id_csrf=csrf; koa.sid=sid; koa.sid.sig=sid.sig; _ab=1; __ssid=sig; secure_customer_sig=; _shopify_m=session; _tracking_consent=%D; identity-state=xx; _s=xx _shopify_y=xx; _shopify_s=xx; _orig_referrer=; _landing_page=%2Fadmin%2Ftransfers; _shopify_evids="
        },
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": null,
        "method": "GET",
        "mode": "cors"
    });

    let jsonResult = await res.json();
   console.log("transfer json result:", jsonResult);
}

getTransfers();

 

 

 

 

 

 

there is also another endpoint available which will give you a single transfer by id (although the other endpoint has all the data, maybe it's useful for you) 

/admin/transfers/(yourtransferid).json

 

 

 

Software Developer | Owner of Tom IT - We build shopify apps
Marketplace Order Connector | Amazon bol.com & Walmart DSV
Product Inventory Information | Geolocation, Store Pickup & More

Order Related Documents | Link Documents to Products Or Countries