post price_rules.json is not working with me

Highlighted
New Member
1 0 0

Hi Shopify,



im trying to create price rules 
using 
https://"user-name":"password"@"my-store-name".myshopify.com/admin/api/2020-07/price_rules.json
with body 

{
"price_rule": {
"title": "test",
"target_type": "line_item",
"target_selection": "all",
"allocation_method": "across",
"value_type": "fixed_amount",
"value": "-10.0",
"customer_selection": "all",
"starts_at": "2020-07-14T20:10:15+08:00"
}
}

the API returns 200 ok 
with html body 

<html>

<body>
  <noscript>
    <a
  </noscript>

  <script type="text/javascript" defer>
    window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=03ed2424-2700-49ef-bdff-bf53dd128e57\u0026prompt=merge\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Ffrom_signup%3Dfalse%26locale%3Den%26shop_name%3Dtest-amjad%26state%3D3yNgYO1nrMEPhJzm7zJ7PcYpJjBVFbTTCrTL7Njk88eX7MGflLw0taiL6eQLpAkGa5d6eYbNPjBZWQ1AeIG1KsMWBUyWniWqG0jOxSdi4FHongWpLiiU9wi8xlWrcvquY0wasSlsKZgLBTZ8R3o_GEZ_eEp2XspJwxlIftePBPEmUFppfHbLMhRfYMZf7c6Nuc5XwjLow2cG76r3iqUX-dYRP2B3HzfFJj2Q1s9rTRlPbcHUQU6XuP8roYl51MrD\u0026ui_locales=en\u0026ux=shop";
  </script>
</body>

</html>

I can use get and put and delete so im sure that there is no authentication issue
but I don't know why it 
returns like that with post 
0 Likes
Highlighted
Shopify Staff
Shopify Staff
496 64 111

Hey @amjad1,

This is due to cookies being sent from your HTTP client. Please see this post for more details.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes