NAV

<back to all web services

CampaignsGetList

The following routes are available for this service:
GET/campaigns
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using NAV.ServiceModel;

namespace NAV.ServiceModel
{
    public partial class CampaignDetails
    {
        public virtual int CampaignNumber { get; set; }
        public virtual string CampaignName { get; set; }
        public virtual decimal BatchNumber { get; set; }
        public virtual string BatchName { get; set; }
        public virtual int CampaignsAwayFromCurrent { get; set; }
        public virtual int Cycle { get; set; }
        public virtual DateTime PeriodStartTime { get; set; }
        public virtual DateTime PeriodEndTime { get; set; }
        public virtual int FiscalYear { get; set; }
        public virtual string Status { get; set; }
    }

    public partial class CampaignsGetList
    {
    }

    public partial class CampaignsGetListResponse
        : GetResponse<CampaignViewModel>
    {
    }

    public partial class CampaignViewModel
    {
        public CampaignViewModel()
        {
            Campaigns = new List<CampaignDetails>{};
        }

        public virtual int CurrentCampaignNumber { get; set; }
        public virtual int PriorYearCampaignNumber { get; set; }
        public virtual List<CampaignDetails> Campaigns { get; set; }
    }

    public partial class GetResponse<TEntity>
    {
        public virtual TEntity Item { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# CampaignsGetList 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 /campaigns HTTP/1.1 
Host: extensions.avon.ca 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	item: 
	{
		currentCampaignNumber: 0,
		priorYearCampaignNumber: 0,
		campaigns: 
		[
			{
				campaignNumber: 0,
				campaignName: String,
				batchNumber: 0,
				batchName: String,
				campaignsAwayFromCurrent: 0,
				cycle: 0,
				periodStartTime: 0001-01-01T00:00:00,
				periodEndTime: 0001-01-01T00:00:00,
				fiscalYear: 0,
				status: String
			}
		]
	},
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}