Northwind Web Services

<back to all web services

CachedGetAllCustomers

Cached
The following routes are available for this service:
All Verbs/cached/customers
namespace Northwind.ServiceModel

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

    [<DataContract>]
    [<AllowNullLiteral>]
    type Customer() = 
        [<DataMember>]
        member val Id:String = null with get,set

        [<DataMember>]
        member val CompanyName:String = null with get,set

        [<DataMember>]
        member val ContactName:String = null with get,set

        [<DataMember>]
        member val ContactTitle:String = null with get,set

        [<DataMember>]
        member val Address:String = null with get,set

        [<DataMember>]
        member val City:String = null with get,set

        [<DataMember>]
        member val Region:String = null with get,set

        [<DataMember>]
        member val PostalCode:String = null with get,set

        [<DataMember>]
        member val Country:String = null with get,set

        [<DataMember>]
        member val Phone:String = null with get,set

        [<DataMember>]
        member val Fax:String = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type CustomersResponse() = 
        [<DataMember>]
        member val Results:ResizeArray<Customer> = new ResizeArray<Customer>() with get,set

        [<DataMember>]
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type CachedGetAllCustomers() = 
        interface IGet

F# CachedGetAllCustomers DTOs

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

HTTP + OTHER

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

POST /cached/customers HTTP/1.1 
Host: northwind.netcore.io 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"results":[{"id":"String","companyName":"String","contactName":"String","contactTitle":"String","address":"String","city":"String","region":"String","postalCode":"String","country":"String","phone":"String","fax":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}