Hi,
I am trying to create a custom collection using the REST admin API and I am getting a 400 bad request when sending POST request to a dev store. I am developing on nodejs front end next js and backend koa js. Sending this request from the backend through public ngrok tunnel.
Could use a little bit of help here since I cannot see whats going on from shopify's end. If there is a way to see logs from a dev store that could also work for me.
What do you have in your collection object you are sending with the POST?
Would you elaborate a little? Can you share the code that creates the collection object from your code snippet above?
Request:
curl -X POST \
https://amrendrabahubali.myshopify.com/admin/api/2020-04/custom_collections.json \
-H 'authorization: Basic YmNhN2U0Yzg5MmQzNTUwMjRkM2RmMjU3MjU1MTE5NTY6Y2FhZTE4YTM1NWQ2NDZmOTZkNjJlZmI2MzhlN2EwZTI=' \
-H 'cache-control: no-cache' \
-H 'postman-token: bc8eddae-36da-2acb-dfab-d385879ed989' \
-d '{
"custom_collection": {
"title": "custom_squadup"
}
}'
Response:
<html>
<body>
<noscript>
<a href="https://app.shopify.com/services/login/identity?destination_uuid=ae3dcf6f-9299-4771-a76a-5d515f479df...>
</noscript>
<script type="text/javascript" defer>
window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=ae3dcf6f-9299-4771-a76a-5d515f479df7\u0026prompt=merge\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Ffrom_signup%3Dfalse%26locale%3Den%26shop_name%3Damrendrabahubali%26state%3DfknBEa4vq9ZJ28rP-XeEspMfuBWrKB5K-iBH5Is5hgES7fQJJURYNWrTgDmdpWnmCsuOgXiXDIVWKcMf_aeic3Eur6JzbvCRQlMSyLNLwoC_FqDPsvw4m0DQY3yJzQr_xTj447DAQ8t9m8MvusmGrEXjJgRSVgmrcqoVsJzJNDlTciHcqHprPMxBaEKHrbmZAQP-epGOU6-_LIOFVHPv9k2MQY3WQpk7NS0JsGoZgl_luCKPWrEaUzT3CzErhOLm\u0026ui_locales=en\u0026ux=shop";
</script>
</body>
</html>
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |