I am trying to implement call this API method in Ruby https://zferral.com/api-docs/affiliate#aff-create-usage-example which expects this object:
{ "affiliate" : {
"email" : "[email protected]",
"send_user_email" : "1" }}
Using a Httparty class, I call this:
result = self.class.post("/api/#{@apikey}/affiliate/create.xml", :body => {:affiliate => {:email => email}})
Unfortunately, the API keeps sending me "Email is required". I have tried to switch to json, I am changed :body with :query, etc...
Anybody could show me how to call the affiliate/create method correctly?
Thank you.