| POST | /api/customerMaster/search/owner | Search customer master based on search parameters |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports DX.STF.Application.ClientApi.Messages.CustomerMaster
Imports DX.STF.Models.Queries.CustomerMaster
Imports DX.STF.Contracts.Enums
Imports DX.STF.Models.Queries.QueryResult
Imports DX.Framework.Core.Querying
Namespace Global
Namespace DX.Framework.Core.Querying
Public Partial Class PagedQueryResult(Of T)
Public Overridable Property StartIndex As Long
Public Overridable Property EndIndex As Long
Public Overridable Property NumberOfRecordsReturned As Integer
Public Overridable Property TotalNumberOfPages As Integer
Public Overridable Property TotalNumberOfRecords As Long
Public Overridable Property Results As List(Of ResultItem(Of ClaimMessage)) = New List(Of ResultItem(Of ClaimMessage))
End Class
End Namespace
Namespace DX.STF.Application.ClientApi.Messages.CustomerMaster
'''<Summary>
'''Customer Master
'''</Summary>
<Api(Description:="Customer Master")>
<ApiResponse(Description:="Paged Customer Master data", IsDefaultResponse:=true, ResponseType:=GetType(0, Culture=neutral, PublicKeyToken=null]]), StatusCode:=200)>
Public Partial Class SearchCustomerMaster
'''<Summary>
'''Search query
'''</Summary>
<ApiMember(Description:="Search query", ParameterType:="model")>
Public Overridable Property Query As SearchCustomerMasterQuery
End Class
End Namespace
Namespace DX.STF.Contracts.Enums
Public Enum ORDER
ASC
DESC
End Enum
End Namespace
Namespace DX.STF.Models.Queries.CustomerMaster
Public Partial Class SearchCustomerMasterQuery
Implements ISearchCustomerMaster
Public Overridable Property ContinuationToken As String Implements ISearchCustomerMaster.ContinuationToken
Public Overridable Property PayByEntityIdentification As String Implements ISearchCustomerMaster.PayByEntityIdentification
Public Overridable Property RequestedPage As Integer
Public Overridable Property NumberOfRecordsPerPage As Integer
Public Overridable Property OrderBy As String
Public Overridable Property Order As ORDER
End Class
End Namespace
Namespace DX.STF.Models.Queries.QueryResult
Public Partial Class PagedQueryResponseWithToken(Of T)
Inherits PagedQueryResult(Of ResultItem(Of InvoiceMessage))
Public Overridable Property ContinuationToken As String
End Class
End Namespace
End Namespace
VB.NET SearchCustomerMaster DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/customerMaster/search/owner HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"query":{"continuationToken":"String","payByEntityIdentification":"String","requestedPage":0,"numberOfRecordsPerPage":0,"orderBy":"String","order":"ASC"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"continuationToken":"String","startIndex":0,"endIndex":0,"numberOfRecordsReturned":0,"totalNumberOfPages":0,"totalNumberOfRecords":0,"results":[{}]}