You need to sign in to do that
Don't have an account?
motti10
How can I create a new Product with REST call?
I am trying to create a new Product with REST (using Groovy)
product= [
"ProductName":"test",
]
def jsonString = JSONObject.fromObject(product).toString(2)
http.request( POST ) {
contentType = JSON
uri.path = '/services/data/v20.0/sobjects/Product/'
uri.query = [_HttpMethod:'POST']
send JSON, jsonString
headers.'Authorization' = "OAuth $accessToken"
}
}
I get
INFO - {
"faultcode ": "Groovy Exception",
"faultstring": "Bad Request"
}