Clients/Customers
Clients in our system are defined as the consumer of the event tickets. A client will need to be created in order to track who and to where the events tickets will need to be sent.
The table below describes the attributes that can be passed in when creating a client via the v9/clients
endpoint.
Name | Description | Type | Presence | Limitations |
---|---|---|---|---|
name | Name of the client | String | Required | Must include a space. “Prince Fielder” is valid. “Prince” is not. |
addresses | Array of addresses belonging to this client | Array | Optional | |
phone_numbers | Array of phone numbers belonging to this client | Array | Optional | |
email_addresses | Array of email addresses belonging to this client | Array | Optional | |
notes | Notes you want to store regarding this Client | Sting | Optional |
Simple Client create
In order to create a client the minimum requirements are just passing in the client name. See below for a more complicated example.
Basic Request with minimal information
curl -i \
-X POST \
-H "X-Signature: ryBB5ZTECpzmt1sWVzmNYEGMXbW7bVVKkoG6ZTriu1A=" \
-H "X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"clients": [
{
"name": "Ned Flanders"
}
]
}' \
--url 'https://api.sandbox.ticketevolution.com/v9/clients?'
Example Response
{
"clients":[
{
"addresses":[
],
"company":null,
"email_addresses":[
],
"id":"171225",
"name":"Ned Flanders",
"notes":null,
"affiliate_store":{
"id":"72",
"name":"Ticket Platform Test",
"affiliate":{
"id":"119",
"name":"Ticket Platform"
}
},
"phone_numbers":[
],
"primary_credit_card":null,
"primary_shipping_address":null,
"primary_billing_address":null,
"primary_phone_number":null,
"primary_email_address":null,
"tags":[
],
"updated_at":"2018-05-25T14:23:26+00:00",
"url":"/v9/clients/171225",
"balance":"0.0",
"pnr_id":null
}
]
}
Creating clients with more information
In most cases, you will want to create a client with more than just a name. You can pass in as many or as little information as you want. This example shows how to pass in multiple attributes.
Example with multiple attributes
curl -i \
-X POST \
-H "X-Signature: JUDfMBchr5ACc9bkNWgcMpiaEd8YUN+GzaVIsM5R5wY=" \
-H "X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"clients": [
{
"name": "Ned Flanders",
"addresses": [
{
"label": "home",
"name": "Ned Flanders",
"company": null,
"street_address": "742 Evergreen Terrace",
"extended_address": null,
"locality": "Springfield",
"region": "OR",
"postal_code": "97475",
"country_code": "US",
"is_primary_shipping": false,
"is_primary_billing": true
},
{
"label": "work",
"name": "Ned Flanders",
"company": "The Leftorium",
"street_address": "7721 Springfield Mall Drive",
"extended_address": "Suite 202",
"locality": "Springfield",
"region": "OR",
"postal_code": "97475",
"country_code": "US",
"is_primary_shipping": true,
"is_primary_billing": false
}
],
"phone_numbers": [
{
"label": "home",
"country_code": "+1",
"area_code": "541",
"number": "555-0123",
"extension": null,
"is_primary": false
},
{
"label": "work",
"country_code": "+1",
"area_code": "541",
"number": "555-0987",
"extension": 5,
"is_primary": false
},
{
"label": "cell",
"country_code": "+1",
"area_code": "541",
"number": "555-0573",
"extension": null,
"is_primary": true
}
],
"email_addresses": [
{
"label": "home",
"address": "[email protected]",
"is_primary": false
},
{
"label": "work",
"address": "[email protected]",
"is_primary": true
}
],
"notes": "Fan of rock band U2."
}
]
}' \
--url 'https://api.sandbox.ticketevolution.com/v9/clients?'
Example Response
{
"clients":[
{
"addresses":[
{
"region":"OR",
"longitude":null,
"extended_address":"Suite 202",
"label":"work",
"locality":"Springfield",
"street_address":"7721 Springfield Mall Drive",
"name":"Ned Flanders",
"primary":true,
"primary_shipping_address":true,
"primary_billing_address":true,
"country_code":"US",
"id":"649129",
"latitude":null,
"postal_code":"97475",
"po_box":false
},
{
"region":"OR",
"longitude":null,
"extended_address":null,
"label":"home",
"locality":"Springfield",
"street_address":"742 Evergreen Terrace",
"name":"Ned Flanders",
"primary":false,
"primary_shipping_address":false,
"primary_billing_address":false,
"country_code":"US",
"id":"649128",
"latitude":null,
"postal_code":"97475",
"po_box":false
}
],
"company":null,
"email_addresses":[
{
"address":"[email protected]",
"label":"work",
"id":"213178",
"primary":true
},
{
"address":"[email protected]",
"label":"home",
"id":"213177",
"primary":false
}
],
"id":"171229",
"name":"Ned Flanders",
"notes":"Fan of rock band U2.",
"affiliate_store":{
"id":"72",
"name":"Ticket Platform Test",
"affiliate":{
"id":"119",
"name":"Ticket Platform"
}
},
"phone_numbers":[
{
"label":"cell",
"extension":null,
"number":"555-0573",
"id":"297235",
"country_code":"1",
"primary":true
},
{
"label":"work",
"extension":"5",
"number":"555-0987",
"id":"297234",
"country_code":"1",
"primary":false
},
{
"label":"home",
"extension":null,
"number":"555-0123",
"id":"297233",
"country_code":"1",
"primary":false
}
],
"primary_credit_card":null,
"primary_shipping_address":{
"region":"OR",
"longitude":null,
"extended_address":"Suite 202",
"label":"work",
"locality":"Springfield",
"street_address":"7721 Springfield Mall Drive",
"name":"Ned Flanders",
"primary":true,
"primary_shipping_address":true,
"primary_billing_address":true,
"country_code":"US",
"id":"649129",
"latitude":null,
"postal_code":"97475",
"po_box":false
},
"primary_billing_address":{
"region":"OR",
"longitude":null,
"extended_address":"Suite 202",
"label":"work",
"locality":"Springfield",
"street_address":"7721 Springfield Mall Drive",
"name":"Ned Flanders",
"primary":true,
"primary_shipping_address":true,
"primary_billing_address":true,
"country_code":"US",
"id":"649129",
"latitude":null,
"postal_code":"97475",
"po_box":false
},
"primary_phone_number":{
"label":"cell",
"extension":null,
"number":"555-0573",
"id":"297235",
"country_code":"1",
"primary":true
},
"primary_email_address":{
"address":"[email protected]",
"label":"work",
"id":"213178",
"primary":true
},
"tags":[
],
"updated_at":"2018-05-25T15:31:19+00:00",
"url":"/v9/clients/171229",
"balance":"0.0",
"pnr_id":null
}
]
}