POST api/Customer/CreateCustomer
Creates a new customer.
Request Information
Parameters
| Name | Description | Additional information |
|---|---|---|
| customer | The customer info |
Define this parameter in the request body. |
Request body formats
application/json, text/json
Sample:
{
"alternate_domains": [
"sample string 1",
"sample string 2",
"sample string 3"
],
"address1": "sample string 1",
"address2": "sample string 2",
"city": "sample string 3",
"company_name": "sample string 4",
"country": "sample string 5",
"is_active": true,
"location": "sample string 7",
"notes": "sample string 8",
"phone_number": "sample string 9",
"postal_code": "sample string 10",
"custom_fields": [
{
"Name": "sample string 1",
"Type": "sample string 2",
"Value": "sample string 3"
},
{
"Name": "sample string 1",
"Type": "sample string 2",
"Value": "sample string 3"
},
{
"Name": "sample string 1",
"Type": "sample string 2",
"Value": "sample string 3"
}
],
"id": 1
}
application/xml, text/xml
Sample:
<customer_create xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ticket.Api.Org">
<id xmlns="http://schemas.datacontract.org/2004/07/Ticket.Api">1</id>
<address1>sample string 1</address1>
<address2>sample string 2</address2>
<city>sample string 3</city>
<company_name>sample string 4</company_name>
<country>sample string 5</country>
<custom_fields>
<custom_field>
<Name>sample string 1</Name>
<Type>sample string 2</Type>
<Value>sample string 3</Value>
</custom_field>
<custom_field>
<Name>sample string 1</Name>
<Type>sample string 2</Type>
<Value>sample string 3</Value>
</custom_field>
<custom_field>
<Name>sample string 1</Name>
<Type>sample string 2</Type>
<Value>sample string 3</Value>
</custom_field>
</custom_fields>
<is_active>true</is_active>
<location>sample string 7</location>
<notes>sample string 8</notes>
<phone_number>sample string 9</phone_number>
<postal_code>sample string 10</postal_code>
<alternate_domains xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
<d2p1:string>sample string 3</d2p1:string>
</alternate_domains>
</customer_create>
Response Information
Response body formats
application/json, text/json
Sample:
{
"id": 1,
"errors": [],
"is_valid": true
}
application/xml, text/xml
Sample:
<create_result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ticket.Api"> <errors /> <is_valid>true</is_valid> <id>1</id> </create_result>
