Skip to main content
Question

How do I get order costs from Printify using their API?


Hi everyone. I’ve got a Shopify store with Printify as my supplier. My cost of goods changes with every order, so I’m trying to find a way to use a Zap to pull this information from Printify into Shopify. I’ve tried to set this up first with a Google Sheet (which is just about there, but relies on some manual input), but then found this post on the Shopify help site and wondered if it would be possible to set up:
 

Automate Cost Tracking with Metafields

You can store Printify order costs in Shopify using metafields:

Steps:

  1. Set Up Metafields:

    • Go to your Shopify admin.
    • Navigate to Settings > Custom Data > Orders and add a metafield for "Printify Cost."
  2. Connect Printify Data: Use a tool like ZapierIntegromat, or custom scripts to fetch the Printify order cost (via Printify API) and automatically update the Shopify order metafield.

  3. Display Metafields:

    • Use a metafield app or Liquid code in Shopify to display the cost alongside order details in the admin.
  4. Calculate Profit: Add a script or app that subtracts the Printify cost (stored in the metafield) from the order total to calculate profit.

 

It’s step 2 I’m struggling with. I’ve managed to get my API key from Printify, but I can’t seem to find a way to use it in a Zap - however, I’m totally out of my depth here. I’ve got as far as having the trigger as a new order in Shopify, then a webhook to get the information from Printify, but on the Configure step of the webhook I honestly don’t know how to fill this in and the co-pilot hasn’t been helpful, and ChatGPT has been giving me options that don’t exist. 

Any help gratefully appreciated, either to get this working or to use a better method. Thanks!

Did this topic help you find an answer to your question?

6 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi ​@tarka33 

What is the link to the mentioned post you found?

What is the link to the Printify API endpoint documentation you are trying to use to configure the Webhook step?

 

NOTE: A helpful resource is to use ChatGPT to help you configure the Webhook fields.

You can post screenshots of the Zap step configuration and ask ChatGPT questions to get guidance.


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2188 replies
  • February 10, 2025

Hi ​@tarka33,
 
We just wanted to see how everything is going with your Zap. Did Troy's recommendation get the job done? Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.


  • Author
  • Beginner
  • 2 replies
  • February 10, 2025

Hi ​@Troy Tessalone and ​@JammerS - thanks for your replies.

Troy, here are the links you asked for:
Shopify help post regarding how to set up a Zap to automate reporting COGS from Printify

Printify API Documentation


I did ask ChatGPT for help setting up the webhook in Zapier and did exactly as you suggested, sending screenshots, but it was telling me to fill in fields that weren’t available on the Zap despite this. Hence I ended up here hoping for help. Any further advice is most welcome! 
Thank you both!


Troy Tessalone
Forum|alt.badge.img+14

@tarka33 

Which specific Printify API endpoint are you trying to use?


  • Author
  • Beginner
  • 2 replies
  • February 10, 2025

Hi ​@Troy Tessalone - I’m not 100% sure if this is what you mean, but ChatGPT suggested I use https://api.printify.com/v1/shops.json to connect to my shop. Is that what you are asking for?


Troy Tessalone
Forum|alt.badge.img+14

@tarka33 

If you are trying to interact with Prinity Orders, then these are the available Printify API endpoints: https://developers.printify.com/#orders

 

 

You will need to set these fields:

  • URL
    • Include your Printify Shop ID
    • Include the Printify Order ID
  • Headers
    • Authorization: Bearer PAT
      • Reference the section in the documentation about personal access token (PAT
    • Content-Type: application/json;charset=utf-8
      • Search the API docs for “content type”