NAV

<back to all web services

CallCenter1099Get

The following routes are available for this service:
GET/call-center/1099/{AccountNumber}/{Year}
namespace NAV.ServiceModel

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type TransactionDetail() = 
        member val Date:DateTime = new DateTime() with get,set
        member val TransactionNumber:String = null with get,set
        member val Description:String = null with get,set
        member val Value1099:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type CallCenter1099GetResponse() = 
        member val AccountNumber:Decimal = new Decimal() with get,set
        member val Year:Int32 = new Int32() with get,set
        member val MerchandiseSales:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val TotalActualWithholdingToDate:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val TotalFutureWithholdingToDate:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val TotalEarnings:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val TransactionDetails:ResizeArray<TransactionDetail> = new ResizeArray<TransactionDetail>() with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type CallCenter1099Get() = 
        interface IGet
        member val AccountNumber:Decimal = new Decimal() with get,set
        member val Year:Int32 = new Int32() with get,set

F# CallCenter1099Get DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /call-center/1099/{AccountNumber}/{Year} HTTP/1.1 
Host: extensions.avon.ca 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"accountNumber":0,"year":0,"merchandiseSales":0,"totalActualWithholdingToDate":0,"totalFutureWithholdingToDate":0,"totalEarnings":0,"transactionDetails":[{"date":"0001-01-01T00:00:00.0000000","transactionNumber":"String","description":"String","value1099":0}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}