AlbaApi

<back to all web services

UpdateConfigReq

The following routes are available for this service:
POST/config/update
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AlbaApi.ServiceModel;
using AlbaApi.Model;
using TasSyd.Model.Base;

namespace AlbaApi.Model
{
    public partial class Configuration
        : Entity
    {
        public Configuration()
        {
            Countries = new Dictionary<string, Country>{};
            ListItems = new List<ListItem>{};
            ListRelationships = new Dictionary<string, string>{};
            SectionElements = new Dictionary<string, List<String>>{};
            SiteStructure = new Dictionary<string, SiteSection>{};
        }

        public virtual string Category { get; set; }
        public virtual Dictionary<string, Country> Countries { get; set; }
        public virtual List<ListItem> ListItems { get; set; }
        public virtual Dictionary<string, string> ListRelationships { get; set; }
        public virtual Dictionary<string, List<String>> SectionElements { get; set; }
        public virtual Dictionary<string, SiteSection> SiteStructure { get; set; }
        public virtual int Version { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime? DateCreated { get; set; }
        public virtual string UpdatedBy { get; set; }
        public virtual DateTime? DateUpdated { get; set; }
    }

    public partial class Country
    {
        public Country()
        {
            Languages = new Dictionary<string, string>{};
        }

        public virtual string Name { get; set; }
        public virtual Dictionary<string, string> Languages { get; set; }
    }

    public partial class ListItem
        : Entity
    {
        public virtual string ListId { get; set; }
        public virtual string Country { get; set; }
        public virtual string RelatedId { get; set; }
        public virtual string Code { get; set; }
        public virtual string Custom { get; set; }
    }

    public partial class SiteSection
    {
        public SiteSection()
        {
            HideFrom = new List<string>{};
        }

        public virtual string Route { get; set; }
        public virtual bool Public { get; set; }
        public virtual string Parent { get; set; }
        public virtual int Roles { get; set; }
        public virtual List<string> HideFrom { get; set; }
        public virtual int Order { get; set; }
    }

}

namespace AlbaApi.ServiceModel
{
    public partial class UpdateConfigReq
    {
        public UpdateConfigReq()
        {
            Countries = new Dictionary<string, Country>{};
            ListItems = new List<ListItem>{};
            ListRelationships = new Dictionary<string, string>{};
            SectionElements = new Dictionary<string, List<String>>{};
            SiteStructure = new Dictionary<string, SiteSection>{};
        }

        public virtual string Category { get; set; }
        public virtual Dictionary<string, Country> Countries { get; set; }
        public virtual List<ListItem> ListItems { get; set; }
        public virtual Dictionary<string, string> ListRelationships { get; set; }
        public virtual Dictionary<string, List<String>> SectionElements { get; set; }
        public virtual Dictionary<string, SiteSection> SiteStructure { get; set; }
    }

}

namespace TasSyd.Model.Base
{
    public partial class Entity
        : IEntity
    {
        public virtual string Id { get; set; }
    }

}

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

POST /config/update HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateConfigReq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.ServiceModel">
  <Category>String</Category>
  <Countries xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringCountryFNLs6TVB>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
        <d4p1:Languages>
          <d2p1:KeyValueOfstringstring>
            <d2p1:Key>String</d2p1:Key>
            <d2p1:Value>String</d2p1:Value>
          </d2p1:KeyValueOfstringstring>
        </d4p1:Languages>
        <d4p1:Name>String</d4p1:Name>
      </d2p1:Value>
    </d2p1:KeyValueOfstringCountryFNLs6TVB>
  </Countries>
  <ListItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
    <d2p1:ListItem>
      <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id>
      <d2p1:Code>String</d2p1:Code>
      <d2p1:Country>String</d2p1:Country>
      <d2p1:Custom>String</d2p1:Custom>
      <d2p1:ListId>String</d2p1:ListId>
      <d2p1:RelatedId>String</d2p1:RelatedId>
    </d2p1:ListItem>
  </ListItems>
  <ListRelationships xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ListRelationships>
  <SectionElements xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringArrayOfstringty7Ep6D1>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>
        <d2p1:string>String</d2p1:string>
      </d2p1:Value>
    </d2p1:KeyValueOfstringArrayOfstringty7Ep6D1>
  </SectionElements>
  <SiteStructure xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringSiteSectionFNLs6TVB>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
        <d4p1:HideFrom>
          <d2p1:string>String</d2p1:string>
        </d4p1:HideFrom>
        <d4p1:Order>0</d4p1:Order>
        <d4p1:Parent>String</d4p1:Parent>
        <d4p1:Public>false</d4p1:Public>
        <d4p1:Roles>0</d4p1:Roles>
        <d4p1:Route>String</d4p1:Route>
      </d2p1:Value>
    </d2p1:KeyValueOfstringSiteSectionFNLs6TVB>
  </SiteStructure>
</UpdateConfigReq>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Configuration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
  <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id>
  <Category>String</Category>
  <Countries xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringCountryFNLs6TVB>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>
        <Languages>
          <d2p1:KeyValueOfstringstring>
            <d2p1:Key>String</d2p1:Key>
            <d2p1:Value>String</d2p1:Value>
          </d2p1:KeyValueOfstringstring>
        </Languages>
        <Name>String</Name>
      </d2p1:Value>
    </d2p1:KeyValueOfstringCountryFNLs6TVB>
  </Countries>
  <CreatedBy>String</CreatedBy>
  <DateCreated>0001-01-01T00:00:00</DateCreated>
  <DateUpdated>0001-01-01T00:00:00</DateUpdated>
  <ListItems>
    <ListItem>
      <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id>
      <Code>String</Code>
      <Country>String</Country>
      <Custom>String</Custom>
      <ListId>String</ListId>
      <RelatedId>String</RelatedId>
    </ListItem>
  </ListItems>
  <ListRelationships xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ListRelationships>
  <SectionElements xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringArrayOfstringty7Ep6D1>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>
        <d2p1:string>String</d2p1:string>
      </d2p1:Value>
    </d2p1:KeyValueOfstringArrayOfstringty7Ep6D1>
  </SectionElements>
  <SiteStructure xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringSiteSectionFNLs6TVB>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>
        <HideFrom>
          <d2p1:string>String</d2p1:string>
        </HideFrom>
        <Order>0</Order>
        <Parent>String</Parent>
        <Public>false</Public>
        <Roles>0</Roles>
        <Route>String</Route>
      </d2p1:Value>
    </d2p1:KeyValueOfstringSiteSectionFNLs6TVB>
  </SiteStructure>
  <UpdatedBy>String</UpdatedBy>
  <Version>0</Version>
</Configuration>