NAV

<back to all web services

RegionGetList

DomainAPI|Regions
The following routes are available for this service:
GET/regions
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Nxnw.Adc.CountryCulture.ServiceModel;
using Nxnw.Adc.Common.ServiceModel;

namespace Nxnw.Adc.Common.ServiceModel
{
    public partial class GetListResponse<TEntity>
    {
        public GetListResponse()
        {
            Items = new List<TEntity>{};
        }

        public virtual List<TEntity> Items { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

namespace Nxnw.Adc.CountryCulture.ServiceModel
{
    public partial class RegionGetList
        : IGet
    {
    }

    public partial class RegionGetListResponse
        : GetListResponse<RegionViewModel>
    {
    }

    public partial class RegionViewModel
    {
        public virtual string RegionId { get; set; }
        public virtual string RegionDescription { get; set; }
    }

}

C# RegionGetList 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.

GET /regions HTTP/1.1 
Host: extensions.avon.ca 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	items: 
	[
		{
			regionId: String,
			regionDescription: String
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}