Pecuario.Backend

<back to all web services

PublishAnimals

Requires Authentication
The following routes are available for this service:
POST/api/v1/marketplace/animals
namespace Pecuario.Backend.Application.DTOs

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Status() = 
        member val Message:String = null with get,set
        member val StatusCode:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type BaseResponse() = 
        member val Status:Status = null with get,set

    [<AllowNullLiteral>]
    type PublishAnimalsResponse() = 
        inherit BaseResponse()
        member val Id:String = null with get,set

    [<AllowNullLiteral>]
    type PublishAnimals() = 
        interface IPost
        member val Name:String = null with get,set
        member val PhoneNumber:String = null with get,set
        member val RegionId:Int32 = new Int32() with get,set
        member val CityId:Int32 = new Int32() with get,set
        member val CategoryId:Int32 = new Int32() with get,set
        member val PurposeId:Int32 = new Int32() with get,set
        member val Description:String = null with get,set
        member val Quantity:Int32 = new Int32() with get,set
        member val PriceTypeId:Int32 = new Int32() with get,set
        member val Price:Decimal = new Decimal() with get,set

F# PublishAnimals DTOs

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

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
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: text/jsv
Content-Length: length

{
	id: String
}