Pecuario.Backend

<back to all web services

PublishAnimals

Requires Authentication
The following routes are available for this service:
POST/api/v1/marketplace/animals
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class PublishAnimals implements IPost
    {
        public String name = null;
        public String phoneNumber = null;
        public Integer regionId = null;
        public Integer cityId = null;
        public Integer categoryId = null;
        public Integer purposeId = null;
        public String description = null;
        public Integer quantity = null;
        public Integer priceTypeId = null;
        public BigDecimal price = null;
        
        public String getName() { return name; }
        public PublishAnimals setName(String value) { this.name = value; return this; }
        public String getPhoneNumber() { return phoneNumber; }
        public PublishAnimals setPhoneNumber(String value) { this.phoneNumber = value; return this; }
        public Integer getRegionId() { return regionId; }
        public PublishAnimals setRegionId(Integer value) { this.regionId = value; return this; }
        public Integer getCityId() { return cityId; }
        public PublishAnimals setCityId(Integer value) { this.cityId = value; return this; }
        public Integer getCategoryId() { return categoryId; }
        public PublishAnimals setCategoryId(Integer value) { this.categoryId = value; return this; }
        public Integer getPurposeId() { return purposeId; }
        public PublishAnimals setPurposeId(Integer value) { this.purposeId = value; return this; }
        public String getDescription() { return description; }
        public PublishAnimals setDescription(String value) { this.description = value; return this; }
        public Integer getQuantity() { return quantity; }
        public PublishAnimals setQuantity(Integer value) { this.quantity = value; return this; }
        public Integer getPriceTypeId() { return priceTypeId; }
        public PublishAnimals setPriceTypeId(Integer value) { this.priceTypeId = value; return this; }
        public BigDecimal getPrice() { return price; }
        public PublishAnimals setPrice(BigDecimal value) { this.price = value; return this; }
    }

    public static class PublishAnimalsResponse extends BaseResponse
    {
        public String id = null;
        
        public String getId() { return id; }
        public PublishAnimalsResponse setId(String value) { this.id = value; return this; }
    }

    public static class BaseResponse
    {
        public Status status = null;
        
        public Status getStatus() { return status; }
        public BaseResponse setStatus(Status value) { this.status = value; return this; }
    }

    public static class Status
    {
        public String message = null;
        public Integer statusCode = null;
        
        public String getMessage() { return message; }
        public Status setMessage(String value) { this.message = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public Status setStatusCode(Integer value) { this.statusCode = value; return this; }
    }

}

Java PublishAnimals DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/v1/marketplace/animals HTTP/1.1 
Host: pecuario-backend.develsystems.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"name":"String","phoneNumber":"String","regionId":0,"cityId":0,"categoryId":0,"purposeId":0,"description":"String","quantity":0,"priceTypeId":0,"price":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"String"}