NAV

<back to all web services

CampaignsGetList

The following routes are available for this service:
GET/campaigns
namespace NAV.ServiceModel

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

    [<AllowNullLiteral>]
    type CampaignDetails() = 
        member val CampaignNumber:Int32 = new Int32() with get,set
        member val CampaignName:String = null with get,set
        member val BatchNumber:Decimal = new Decimal() with get,set
        member val BatchName:String = null with get,set
        member val CampaignsAwayFromCurrent:Int32 = new Int32() with get,set
        member val Cycle:Int32 = new Int32() with get,set
        member val PeriodStartTime:DateTime = new DateTime() with get,set
        member val PeriodEndTime:DateTime = new DateTime() with get,set
        member val FiscalYear:Int32 = new Int32() with get,set
        member val Status:String = null with get,set

    [<AllowNullLiteral>]
    type CampaignViewModel() = 
        member val CurrentCampaignNumber:Int32 = new Int32() with get,set
        member val PriorYearCampaignNumber:Int32 = new Int32() with get,set
        member val Campaigns:ResizeArray<CampaignDetails> = new ResizeArray<CampaignDetails>() with get,set

    [<AllowNullLiteral>]
    type CampaignsGetListResponse() = 
        inherit GetResponse<CampaignViewModel>()

    [<AllowNullLiteral>]
    type CampaignsGetList() = 
        class end

    [<AllowNullLiteral>]
    type GetResponse<'TEntity>() = 
        member val Item:'TEntity = null with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

F# CampaignsGetList DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CampaignsGetListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NAV.ServiceModel">
  <Item>
    <Campaigns>
      <CampaignDetails>
        <BatchName>String</BatchName>
        <BatchNumber>0</BatchNumber>
        <CampaignName>String</CampaignName>
        <CampaignNumber>0</CampaignNumber>
        <CampaignsAwayFromCurrent>0</CampaignsAwayFromCurrent>
        <Cycle>0</Cycle>
        <FiscalYear>0</FiscalYear>
        <PeriodEndTime>0001-01-01T00:00:00</PeriodEndTime>
        <PeriodStartTime>0001-01-01T00:00:00</PeriodStartTime>
        <Status>String</Status>
      </CampaignDetails>
    </Campaigns>
    <CurrentCampaignNumber>0</CurrentCampaignNumber>
    <PriorYearCampaignNumber>0</PriorYearCampaignNumber>
  </Item>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</CampaignsGetListResponse>