| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator |
| GET | /v1/Products/{UserID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Products/ |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class Product
Public Overridable Property ID As Integer
Public Overridable Property ProductName As String
Public Overridable Property ProductTypeID As Byte
Public Overridable Property UnitPrice As Decimal
Public Overridable Property Description As String
Public Overridable Property ImageURL As String
Public Overridable Property ImageKey As String
Public Overridable Property SpecialSaleText As String
Public Overridable Property ShipPrice As Decimal
Public Overridable Property SalePrice As Decimal
Public Overridable Property UID As Guid
Public Overridable Property ProductCategory As Byte
Public Overridable Property ProductSubCategory As Byte
Public Overridable Property ProductWeight As Decimal
Public Overridable Property FreightMarkupPercent As Decimal
Public Overridable Property FreightMarkUpAmount As Decimal
Public Overridable Property PointValue As Decimal
Public Overridable Property IsActive As Boolean
Public Overridable Property StripeProductId As String
End Class
Public Partial Class ProductsRequest
Public Overridable Property UserID As Guid
Public Overridable Property Products As List(Of Product) = New List(Of Product)
End Class
Public Partial Class ProductsResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Products As List(Of Product) = New List(Of Product)
End Class
End Namespace
End Namespace
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.
POST /v1/Products/ HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserID: 00000000000000000000000000000000,
Products:
[
{
ID: 0,
ProductName: String,
ProductTypeID: 0,
UnitPrice: 0,
Description: String,
ImageURL: String,
ImageKey: String,
SpecialSaleText: String,
ShipPrice: 0,
SalePrice: 0,
UID: 00000000000000000000000000000000,
ProductCategory: 0,
ProductSubCategory: 0,
ProductWeight: 0,
FreightMarkupPercent: 0,
FreightMarkUpAmount: 0,
PointValue: 0,
IsActive: False,
StripeProductId: String
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Products:
[
{
ID: 0,
ProductName: String,
ProductTypeID: 0,
UnitPrice: 0,
Description: String,
ImageURL: String,
ImageKey: String,
SpecialSaleText: String,
ShipPrice: 0,
SalePrice: 0,
UID: 00000000000000000000000000000000,
ProductCategory: 0,
ProductSubCategory: 0,
ProductWeight: 0,
FreightMarkupPercent: 0,
FreightMarkUpAmount: 0,
PointValue: 0,
IsActive: False,
StripeProductId: String
}
]
}