CDD Engine Web Service v2.14.0.0

<back to all web services

CompaniesHouseRequest

iNASA
Requires Authentication
The following routes are available for this service:
GET, POST/CompaniesHouse/{CompanyNumber}
GET, POST/CompaniesHouse
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CDD_Engine_WS.dto.Requests;
using CDD_Engine_WS.dto.Responses;
using CDD_Engine_DLL.DataObjects;

namespace CDD_Engine_DLL.DataObjects
{
    public partial class CompaniesHouseAddress
    {
        public virtual string address1 { get; set; }
        public virtual string address2 { get; set; }
        public virtual string address3 { get; set; }
        public virtual string city { get; set; }
        public virtual string postcode { get; set; }
    }

    public partial class CompaniesHouseData
    {
        public CompaniesHouseData()
        {
            shareHolders = new List<CompaniesHouseShareHolderData>{};
            directors = new List<CompaniesHouseDirectorsData>{};
        }

        public virtual string registeredName { get; set; }
        public virtual CompaniesHouseAddress address { get; set; }
        public virtual CompaniesHouseIncorporationDate dateOfIncorporation { get; set; }
        public virtual List<CompaniesHouseShareHolderData> shareHolders { get; set; }
        public virtual List<CompaniesHouseDirectorsData> directors { get; set; }
    }

    public partial class CompaniesHouseDirectorsData
    {
        public virtual string title { get; set; }
        public virtual string firstName { get; set; }
        public virtual string middleNames { get; set; }
        public virtual string lastName { get; set; }
    }

    public partial class CompaniesHouseIncorporationDate
    {
        public virtual int day { get; set; }
        public virtual int month { get; set; }
        public virtual int year { get; set; }
    }

    public partial class CompaniesHouseShareHolderData
    {
        public virtual string title { get; set; }
        public virtual string firstName { get; set; }
        public virtual string middleNames { get; set; }
        public virtual string lastName { get; set; }
        public virtual double? percentageOfVotingSharesOwned { get; set; }
    }

}

namespace CDD_Engine_WS.dto.Requests
{
    public partial class CompaniesHouseRequest
    {
        ///<summary>
        ///The registered company number.
        ///</summary>
        [Required]
        public virtual string CompanyNumber { get; set; }

        ///<summary>
        ///The Csr of the application (if available).
        ///</summary>
        public virtual string Csr { get; set; }
    }

}

namespace CDD_Engine_WS.dto.Responses
{
    public partial class CompaniesHouseResponse
    {
        ///<summary>
        ///Contains the companies house lookup result when successful.
        ///</summary>
        public virtual CompaniesHouseData Result { get; set; }
        ///<summary>
        ///Contains response status, details and errors.
        ///</summary>
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

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

POST /CompaniesHouse/{CompanyNumber} HTTP/1.1 
Host: wpcdd-featuretest-ws.worldpay.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CompanyNumber: String,
	Csr: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Result: 
	{
		registeredName: String,
		address: 
		{
			address1: String,
			address2: String,
			address3: String,
			city: String,
			postcode: String
		},
		dateOfIncorporation: 
		{
			day: 0,
			month: 0,
			year: 0
		},
		shareHolders: 
		[
			{
				title: String,
				firstName: String,
				middleNames: String,
				lastName: String,
				percentageOfVotingSharesOwned: 0
			}
		],
		directors: 
		[
			{
				title: String,
				firstName: String,
				middleNames: String,
				lastName: String
			}
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}