Update multiple attributes using REST API

302 views
Skip to first unread message

Mark Miller

unread,
Mar 26, 2015, 7:02:39 PM3/26/15
to ca...@googlegroups.com
Does the REST API support updating multiple product attributes in a single call? If so, what would the request look like?

I tried this:


{
    [{
        Name: "Attribute1",
        Value: "Foo"
    },
    {
        Name: "Attribute2",
        Value: "Bar"
    }]
}

And got the following response:

HTTP/1.1 404 Not Found
Content-Length: 354
Content-Type: application/json; odata.metadata=minimal
Server: Microsoft-IIS/7.5
OData-Version: 4.0
X-ServerName: RDU-APPWEB-22
Date: Thu, 26 Mar 2015 22:58:49 GMT

{
  "error":{
    "code":"","message":"No HTTP resource was found that matches the request URI 'https://api.channeladvisor.com/v1/Products(14399717)/Attributes'.","innererror":{
      "message":"No routing convention was found to select an action for the OData path with template '~/entityset/key/navigation'.","type":"","stacktrace":""
    }
  }
}

I'm guessing the answer is no, but it would be both convenient and more performant for the client and the API. 

BTW, the API is great. I love being able to only update the attributes that I care about. It feels much safer from a consistency point of view.

Thanks

[ChannelAdvisor] Marshall McClure

unread,
Mar 31, 2015, 11:44:17 AM3/31/15
to ca...@googlegroups.com
Hi, Mark. Thanks for the feedback.  At this time, we only support updating one attribute at a time, but multiple updates are certainly possible.  I will forward your request to the inventory dev team for their consideration.

I'm glad to hear you like the new API.  Please let us now if there are any other enhancements you would like to see.
Reply all
Reply to author
Forward
0 new messages