Northwind Web Services

<back to all web services

GetAllCustomers

Customers
The following routes are available for this service:
All Verbs/customers
"use strict";
export class Customer {
    /** @param {{id?:string,companyName?:string,contactName?:string,contactTitle?:string,address?:string,city?:string,region?:string,postalCode?:string,country?:string,phone?:string,fax?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    companyName;
    /** @type {string} */
    contactName;
    /** @type {string} */
    contactTitle;
    /** @type {string} */
    address;
    /** @type {string} */
    city;
    /** @type {string} */
    region;
    /** @type {string} */
    postalCode;
    /** @type {string} */
    country;
    /** @type {string} */
    phone;
    /** @type {string} */
    fax;
}
export class CustomersResponse {
    /** @param {{results?:Customer[],responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Customer[]} */
    results;
    /** @type {ResponseStatus} */
    responseStatus;
}
export class GetAllCustomers {
    constructor(init) { Object.assign(this, init) }
}

JavaScript GetAllCustomers 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 /customers HTTP/1.1 
Host: northwind.netcore.io 
Accept: text/x-vcard
Content-Type: text/x-vcard
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/x-vcard
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"}}}