| GET | /api/v1/products/{ProductId} |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Pecuario.Backend.Application.DTOs;
namespace Pecuario.Backend.Application.DTOs
{
public partial class BaseResponse
{
public virtual Status Status { get; set; }
}
public partial class DetailRow
{
public virtual int Order { get; set; }
public virtual string TextType { get; set; }
public virtual string Text { get; set; }
}
public partial class GetProductDetails
: IGet
{
public virtual string ProductId { get; set; }
}
public partial class GetProductDetailsResponse
: BaseResponse
{
public virtual ProductDetails Details { get; set; }
}
public partial class ProductDetails
{
public ProductDetails()
{
Images = new List<string>{};
DetailRows = new List<DetailRow>{};
}
public virtual string Id { get; set; }
public virtual string Date { get; set; }
public virtual List<string> Images { get; set; }
public virtual List<DetailRow> DetailRows { get; set; }
public virtual bool ContactEnabled { get; set; }
public virtual string ContactLink { get; set; }
public virtual string PriceType { get; set; }
public virtual string Price { get; set; }
}
public partial class Status
{
public virtual string Message { get; set; }
public virtual int StatusCode { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/products/{ProductId} HTTP/1.1
Host: pecuario-backend.develsystems.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
details:
{
id: String,
date: String,
images:
[
String
],
detailRows:
[
{
}
],
contactEnabled: False,
contactLink: String,
priceType: String,
price: String
}
}