Problems trying to update the subscribed "topic"

Solved
DanielEFGS
New Member
1 0 0

Greetings,

I have tried to make a PUT request to a webhook that I created, in order to modify the subscribed topic, as follows:

 

{
    "webhook": {
        "id": 1028087152804,
        "topic": "orders/create",
        "address": "https://xxxxxxx/api/shopify/response/31/",
        "format": "json"
    }
}

 

and I get the following response:

 

{
    "webhook": {
        "id": 1028087152804,
        "address": "https://xxxxxxx/api/shopify/response/31/",
        "topic": "orders/create",
        "created_at": "2021-04-16T12:53:32-04:00",
        "updated_at": "2021-04-19T09:41:33-04:00",
        "format": "json",
        "fields": [],
        "metafield_namespaces": [],
        "api_version": "2021-04",
        "private_metafield_namespaces": []
    }
}

 

As you can see, the answer is successful. Here comes the problem, making a GET request returns the initial value for "topic" (which is orders/fulfilled):

 

{
    "webhook": {
        "id": 1028087152804,
        "address": "https://xxxxxxx/api/shopify/response/31/",
        "topic": "orders/fulfilled",
        "created_at": "2021-04-16T12:53:32-04:00",
        "updated_at": "2021-04-19T09:41:33-04:00",
        "format": "json",
        "fields": [],
        "metafield_namespaces": [],
        "api_version": "2021-04",
        "private_metafield_namespaces": []
    }
}

 

 I tried with different versions of the API and there was no difference.

 

0 Likes
james-langille
Shopify Staff
Shopify Staff
49 10 12

This is an accepted solution.

Hello @DanielEFGS ,

Unfortunately, that endpoint does not update the topic as it says in the documentation. To keep consistency with the GraphQL mutations, I'll update the documentation, and if you want to change the topic that you're subscribing to, simply create a new subscription to that topic and delete the original.

james-langille | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog