POST Customers

Creates a new Customer

Request Information

URI Parameters

None.

Body Parameters

The new customer

InputCustomerModel
NameDescriptionTypeAdditional information
Name

string

Required

Max length: 128

ParentCustomerID

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "ParentCustomerID": 1
}

text/html

Sample:
{"Name":"sample string 1","ParentCustomerID":1}

application/xml, text/xml

Sample:
<InputCustomerModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Toluna.TEF.Common.ViewModels.Authentication">
  <Name>sample string 1</Name>
  <ParentCustomerID>1</ParentCustomerID>
</InputCustomerModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'InputCustomerModel'.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

The model of the newly-created Customer

OutputCustomerModel
NameDescriptionTypeAdditional information
ChildCustomers

Collection of OutputCustomerModel

None.

CustomerID

integer

Required

IsDisabled

boolean

None.

Name

string

Required

Max length: 128

ParentCustomerID

integer

None.

Response Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected with type 'Toluna.TEF.Common.ViewModels.Authentication.OutputCustomerModel'. Path 'ChildCustomers'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected with type 'Toluna.TEF.Common.ViewModels.Authentication.OutputCustomerModel'. Path 'ChildCustomers'.

text/html

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/html'. Exception message: Self referencing loop detected with type 'Toluna.TEF.Common.ViewModels.Authentication.OutputCustomerModel'. Path 'ChildCustomers'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[Toluna.TEF.Common.ViewModels.Authentication.OutputCustomerModel, Toluna.TEF.Common, Version=2.9.231.0, Culture=neutral, PublicKeyToken=4e91e76674745180]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[Toluna.TEF.Common.ViewModels.Authentication.OutputCustomerModel, Toluna.TEF.Common, Version=2.9.231.0, Culture=neutral, PublicKeyToken=4e91e76674745180]]' contains cycles and cannot be serialized if reference tracking is disabled.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.