DX STF Client API

<back to all web services

SearchItemDataNotification

Item Data Notification Requests

Item Data Notification

Requires Authentication
The following routes are available for this service:
POST/api/itemDataNotification/searchSearch item data notification based on search parameters
import Foundation
import ServiceStack

/**
* Item Data Notification
*/
// @Api(Description="Item Data Notification")
// @ApiResponse(Description="Paged ItemDataNotification data", IsDefaultResponse=true, ResponseType=typeof(0, Culture=neutral, PublicKeyToken=null]]), StatusCode=200)
public class SearchItemDataNotification : Codable
{
    /**
    * Search query
    */
    // @ApiMember(Description="Search query", ParameterType="model")
    public var query:SearchItemDataNotificationQuery

    required public init(){}
}

public class SearchItemDataNotificationQuery : ISearchItemDataNotification, Codable
{
    public var receiverGln:String
    public var senderGln:String
    public var partnerGln:[String] = []
    public var requestedPage:Int
    public var numberOfRecordsPerPage:Int
    public var continuationToken:String
    public var categoryCode:String
    public var identifier:String
    public var tradeItemDescription:String
    public var gtin:String
    public var orderBy:String
    public var order:ORDER

    required public init(){}
}

public enum ORDER : String, Codable
{
    case ASC
    case DESC
}

public class PagedQueryResponseWithToken<T : Codable> : PagedQueryResult<ResultItem<InvoiceMessage>>
{
    public var continuationToken:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case continuationToken
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        continuationToken = try container.decodeIfPresent(String.self, forKey: .continuationToken)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if continuationToken != nil { try container.encode(continuationToken, forKey: .continuationToken) }
    }
}

public class PagedQueryResult<T : Codable> : Codable
{
    public var startIndex:Int
    public var endIndex:Int
    public var numberOfRecordsReturned:Int
    public var totalNumberOfPages:Int
    public var totalNumberOfRecords:Int
    public var results:[ResultItem<ClaimMessage>] = []

    required public init(){}
}


Swift SearchItemDataNotification DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/itemDataNotification/search HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	query: 
	{
		receiverGln: String,
		senderGln: String,
		partnerGln: 
		[
			String
		],
		requestedPage: 0,
		numberOfRecordsPerPage: 0,
		continuationToken: String,
		categoryCode: String,
		identifier: String,
		tradeItemDescription: String,
		gtin: String,
		orderBy: String,
		order: ASC
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	continuationToken: String,
	startIndex: 0,
	endIndex: 0,
	numberOfRecordsReturned: 0,
	totalNumberOfPages: 0,
	totalNumberOfRecords: 0,
	results: 
	[
		{
			
		}
	]
}