| POST | /cmd/products/register |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class RegisterProduct
{
public String id = null;
public String name = null;
public Ref productProvider = null;
public String category = null;
public String getId() { return id; }
public RegisterProduct setId(String value) { this.id = value; return this; }
public String getName() { return name; }
public RegisterProduct setName(String value) { this.name = value; return this; }
public Ref getProductProvider() { return productProvider; }
public RegisterProduct setProductProvider(Ref value) { this.productProvider = value; return this; }
public String getCategory() { return category; }
public RegisterProduct setCategory(String value) { this.category = value; return this; }
}
public static class Ref
{
public String id = null;
public String val = null;
public String getId() { return id; }
public Ref setId(String value) { this.id = value; return this; }
public String getVal() { return val; }
public Ref setVal(String value) { this.val = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cmd/products/register HTTP/1.1
Host: api.sbbet.ath.cx
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"id":"String","name":"String","productProvider":{"id":"String","val":"String"},"category":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}