Follow

API Method - Customer Add

This method will add a customer.
Parameters
appKey
 
string
A key identifying the application making the call
userKey
 
string
A key identifying the user making the call
corpOrgID
 
int
The corp organization ID
firstName
 
string
The first name of the customer
lastName
 
string
The last name of the customer
email
 
string
The email address of the customer
address1
 
string
The first line of the address
address2
 
string
 
optional
The second line of the address
city
 
string
The city for the address
state
 
string
The two digit abbreviation for the state/province for the address (AL, TN, BC, etc.)
zip
 
string
The zip/postal code for the address
country
 
string
The full country name for the address (United States, Canada, etc.)
phoneNumber
 
string
 
optional
The phone number of the customer (Must be formatted 123-456-1234)
username
 
string
 
optional
The requested account username
password
 
string
The account password
Return Values
A customer authentication data structure with the following fields
Authenticated
 
bool
An indicator that the customer has authenticated
CustomerID
 
long
The customer ID
CustomerName
 
string
The name of the customer
Members
 
list
A list of member data structures with the following fields
MemberID
 
long
The member ID
MemberNumber
 
string
The member number
MembershipID
 
int
The membership program ID
MembershipExpiration
 
datetime
The expiration date of the membership
ValidBuyerTypes
 
list
A list of int values for the restricted buyer types this member has access to
Barcode
 
string
The barcode of the membership
MembershipProgram
 
string
The name of the membership program
MembershipLevel
 
string
The level of the membership
Errors
ApplicationKeyMissing
 
1000
Required parameter appkey is missing or invalid
UserCredentialsMissing
 
1001
Required user credentials are missing or invalid
SecurityInsufficient
 
1002
User security does not permit access to the requested function
RequiredParameter
 
1028
Required parameter is missing
InvalidParameter
 
1039
Invalid parameter format
DuplicateUsernameFound
 
1006
Username is already in use
Example Request
https://prod1.agileticketing.net/api/sales.svc/json/CustomerAdd?appkey={APPKEY}&userkey={USERKEY}&corporgid={CORPORGID}&firstname={FIRSTNAME}&lastname={LASTNAME}&email={EMAIL}&address1={ADDRESS1}&address2={ADDRESS2}&city={CITY}&state={STATE}&zip={ZIP}&country={COUNTRY}&phonenumber={PHONENUMBER}&username={USERNAME}&password={PASSWORD}&
Example JSON Response
{
	"Authenticated":true,
	"CustomerID":9223372036854775807,
	"CustomerName":"String content",
	"Members":[{
		"MemberID":9223372036854775807,
		"MemberNumber":"String content",
		"MembershipID":2147483647,
		"MembershipExpiration":"\/Date(928167600000-0500)\/",
		"ValidBuyerTypes":[2147483647],
		"Barcode":"String content",
		"MembershipProgram":"String content",
		"MembershipLevel":"String content"
	}]
}
Example XML Response
<CustomerAuth xmlns="http://www.agiletix.com/api">
  <Authenticated>true</Authenticated>
  <CustomerID>9223372036854775807</CustomerID>
  <CustomerName>String content</CustomerName>
  <Members>
    <Member>
      <MemberID>9223372036854775807</MemberID>
      <MemberNumber>String content</MemberNumber>
      <MembershipID>2147483647</MembershipID>
      <MembershipExpiration>1999-05-31T11:20:00</MembershipExpiration>
      <ValidBuyerTypes>
        <int xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">2147483647</int>
        <int xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">2147483647</int>
      </ValidBuyerTypes>
      <Barcode>String content</Barcode>
      <MembershipProgram>String content</MembershipProgram>
      <MembershipLevel>String content</MembershipLevel>
    </Member>
    <Member>
      <MemberID>9223372036854775807</MemberID>
      <MemberNumber>String content</MemberNumber>
      <MembershipID>2147483647</MembershipID>
      <MembershipExpiration>1999-05-31T11:20:00</MembershipExpiration>
      <ValidBuyerTypes>
        <int xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">2147483647</int>
        <int xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">2147483647</int>
      </ValidBuyerTypes>
      <Barcode>String content</Barcode>
      <MembershipProgram>String content</MembershipProgram>
      <MembershipLevel>String content</MembershipLevel>
    </Member>
  </Members>
</CustomerAuth>
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments