| POST | /company |
|---|
namespace BH.CloudAPI.Common.DTO
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type Company() =
member val UniqueId:String = null with get,set
member val CreatedDateTime:DateTime = new DateTime() with get,set
member val ClientId:Int32 = new Int32() with get,set
member val GroupId:String = null with get,set
member val CompanyId:Int32 = new Int32() with get,set
member val ExternalCompanyId:String = null with get,set
member val CompanyName:String = null with get,set
member val Address1:String = null with get,set
member val Address2:String = null with get,set
member val City:String = null with get,set
member val State:String = null with get,set
member val ZipCode:String = null with get,set
member val Country:String = null with get,set
member val Website:String = null with get,set
member val PhoneNumber:String = null with get,set
member val Fax:String = null with get,set
member val StateId:Int32 = new Int32() with get,set
member val CountryId:Int32 = new Int32() with get,set
member val ChapId:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type ReplyBase() =
member val ErrorCode:Int32 = new Int32() with get,set
member val ErrorMessage:String = null with get,set
member val IsError:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type CompanyReply() =
inherit ReplyBase()
member val UniqueId:String = null with get,set
member val CompanyId:Int32 = new Int32() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /company HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<Company xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<Address1>String</Address1>
<Address2>String</Address2>
<ChapId>0</ChapId>
<City>String</City>
<ClientId>0</ClientId>
<CompanyId>0</CompanyId>
<CompanyName>String</CompanyName>
<Country>String</Country>
<CountryId>0</CountryId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<ExternalCompanyId>String</ExternalCompanyId>
<Fax>String</Fax>
<GroupId>String</GroupId>
<PhoneNumber>String</PhoneNumber>
<State>String</State>
<StateId>0</StateId>
<UniqueId>String</UniqueId>
<Website>String</Website>
<ZipCode>String</ZipCode>
</Company>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CompanyReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce"> <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">0</ErrorCode> <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">String</ErrorMessage> <CompanyId>0</CompanyId> <UniqueId>String</UniqueId> </CompanyReply>