| POST | /api/invoice/search/sender | Search invoice 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.Invoice
Imports DX.STF.Models.Queries.Invoice
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.Invoice
'''<Summary>
'''Invoice
'''</Summary>
<Api(Description:="Invoice")>
<ApiResponse(Description:="Paged Purchase data", IsDefaultResponse:=true, ResponseType:=GetType(0, Culture=neutral, PublicKeyToken=null]]), StatusCode:=200)>
Public Partial Class SearchSenderInvoice
'''<Summary>
'''Search query
'''</Summary>
<ApiMember(Description:="Search query", ParameterType:="model")>
Public Overridable Property Query As SearchInvoiceByDateFilter
End Class
End Namespace
Namespace DX.STF.Contracts.Enums
Public Enum ORDER
ASC
DESC
End Enum
End Namespace
Namespace DX.STF.Models.Queries.Invoice
Public Partial Class SearchInvoiceByDateFilter
Implements ISearchInvoiceByDateFilter
Public Overridable Property FromDate As Date Implements ISearchInvoiceByDateFilter.FromDate
Public Overridable Property ToDate As Date Implements ISearchInvoiceByDateFilter.ToDate
Public Overridable Property ContinuationToken As String Implements ISearchInvoiceByDateFilter.ContinuationToken
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 SearchSenderInvoice 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/invoice/search/sender HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"query":{"continuationToken":"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":[{}]}