Pecuario.Backend

<back to all web services

GetProductDetails

The following routes are available for this service:
GET/api/v1/products/{ProductId}
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Pecuario.Backend.Application.DTOs

Namespace Global

    Namespace Pecuario.Backend.Application.DTOs

        Public Partial Class BaseResponse
            Public Overridable Property Status As Status
        End Class

        Public Partial Class DetailRow
            Public Overridable Property Order As Integer
            Public Overridable Property TextType As String
            Public Overridable Property Text As String
        End Class

        Public Partial Class GetProductDetails
            Implements IGet
            Public Overridable Property ProductId As String
        End Class

        Public Partial Class GetProductDetailsResponse
            Inherits BaseResponse
            Public Overridable Property Details As ProductDetails
        End Class

        Public Partial Class ProductDetails
            Public Sub New()
                Images = New List(Of String)
                DetailRows = New List(Of DetailRow)
            End Sub

            Public Overridable Property Id As String
            Public Overridable Property [Date] As String
            Public Overridable Property Images As List(Of String)
            Public Overridable Property DetailRows As List(Of DetailRow)
            Public Overridable Property ContactEnabled As Boolean
            Public Overridable Property ContactLink As String
            Public Overridable Property PriceType As String
            Public Overridable Property Price As String
        End Class

        Public Partial Class Status
            Public Overridable Property Message As String
            Public Overridable Property StatusCode As Integer
        End Class
    End Namespace
End Namespace

VB.NET GetProductDetails DTOs

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

HTTP + CSV

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/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"details":{"id":"String","date":"String","images":["String"],"detailRows":[{}],"contactEnabled":false,"contactLink":"String","priceType":"String","price":"String"}}