Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to Bulk Upload Collections via API Using Postman?

How to Bulk Upload Collections via API Using Postman?

VasconX
Visitor
3 0 1

Hello everyone,

I am trying to bulk upload collections to my Shopify store using the API and Postman. I need to create about 600 collections, but I am facing difficulties. I managed to create collections individually, but I need a solution to automate the entire process. Here are the details of what I have tried and the issues I encountered:

  1. JSON File with Collections: I have a collections.json file with the following structure:

    json
     
    [ { "title": "chocolate", "rules": [ { "column": "tag", "relation": "equals", "condition": "fruta1" }, { "column": "tag", "relation": "equals", "condition": "fruta2" } ], "image": { "src": "https://cdn.shopify.com/s/files/1/0699/6593/8943/files/Tattoo_Body_ArtTattoo_Needles.jpg?v=171624721...", "alt": "Rails Logo" } }, { "title": "vanilla", "rules": [ { "column": "tag", "relation": "equals", "condition": "fruta3" }, { "column": "tag", "relation": "equals", "condition": "fruta4" } ], "image": { "src": "https://cdn.shopify.com/s/files/1/0699/6593/8943/files/Tattoo_Body_ArtTattoo_Needles.jpg?v=171624721...", "alt": "Rails Logo" } } ]
  2. Configuring the Request in Postman: I created a POST request to the Shopify API URL:

    bash
     
    https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/{{api_version}}/smart_collections.json
     

    Problem Encountered: Even with these scripts, only the first collection is sent. The others are not processed. I'm not sure what I'm doing wrong or if there is a more effective approach to bulk uploading these collections using Postman.

     

    Question: Can anyone help me understand what I'm doing wrong? Is there a better or more efficient way to bulk upload multiple collections to Shopify using Postman?

     

    Thank you for any help or suggestions.

     
Replies 0 (0)