Customers
Third-party applications can manipulate customer information in Uphance including contacts and addresses.
GET all customers
Retrieve details for all customers.
$ curl https://api.uphance.com/customers \
-H "Authorization: ACCESS_TOKEN"
Example response:
{
"customers": [
{
"id": 9498,
"name": "Barneys",
"country": "",
"city": "",
"vat_number": "VAT24234234234",
"people": [
{
"id": 6789,
"first_name": "Jamie",
"last_name": "Ortega",
"position": "CTO",
"phone_1": "",
"phone_2": "",
"email": "[email protected]",
"notes": ""
}
]
},
{
"id": 9936,
"name": "Closing Ceremony",
"country": "",
"city": "",
"vat_number": "",
"people": [
{
"id": 6957,
"first_name": "Jamie",
"last_name": "Ortega",
"position": "Buyer",
"phone_1": "+1 232 448 98232",
"phone_2": "",
"email": "[email protected]",
"notes": ""
}
]
},
{
"id": 10771,
"name": "unknown customer",
"country": null,
"city": null,
"vat_number": "",
"people": [
{
"id": 8571,
"first_name": "first",
"last_name": "contact",
"position": "",
"phone_1": "",
"phone_2": "",
"email": "",
"notes": ""
}
]
},
{
"id": 13384,
"name": "Macy's",
"country": "",
"city": "",
"vat_number": "12345678",
"people": [
{
"id": 10772,
"first_name": "Joe",
"last_name": "Smith",
"position": "",
"phone_1": "",
"phone_2": "",
"email": "",
"notes": ""
}
]
}
}
GET one customer by Customer ID
Retrieve details for one customer.
$ curl https://api.uphance.com/customers/[Customer_ID] \
-H "Authorization: ACCESS_TOKEN"
GET customer by contact email address
Retrieve details for a customer using the email address of a contact.
$ curl https://api.uphance.com/customers/[email protected] \
-H "Authorization: ACCESS_TOKEN"
GET customer contacts
Retrieve contacts for a customer.
$ curl https://api.uphance.com/customers/[Customer_ID]/contacts \
-H "Authorization: ACCESS_TOKEN"
GET customer addresses
Retrieve addresses for a customer.
$ curl https://api.uphance.com/customers/[Customer_ID]/addresses \
-H "Authorization: ACCESS_TOKEN"
POST a customer
You can create a customer record in Uphance from an external system using a POST request to /customers.
POST https://api.uphance.com/customers
The caller should provide the following headers along with the request:
Content-Type : application/json
Authorization: Bearer ACCESS_TOKEN
The body of your request should be a JSON document formatted as below.
Example request:
{
"name":"John Doe's Company 2",
"vat_number":"XE554",
"country":"US",
"city":"Miami",
"customer_type":"wholesale",
"channelId":6932,
"paymentTerm": "PIA"
}
POST a customer contact
You can create a customer contact record in Uphance from an external system using a POST request to /customers.
POST https://api.uphance.com/customers/[CUSTOMER_ID]/create_contact
The caller should provide the following headers along with the request:
Content-Type : application/json
Authorization: Bearer ACCESS_TOKEN
The body of your request should be a JSON document formatted as below.
Example request:
{
"firstName":"Jon",
"lastName":"Doe",
"position":"CEO",
"phone":"+305-610-0517",
"email":"[email protected]"
}
POST a customer address
You can create a customer address record in Uphance from an external system using a POST request to /customers.
POST https://api.uphance.com/customers/[CUSTOMER_ID]/create_address
The caller should provide the following headers along with the request:
Content-Type : application/json
Authorization: Bearer ACCESS_TOKEN
The body of your request should be a JSON document formatted as below.
Example request:
{
"address1":"Mainstreet 5",
"address2":"Entrance 5",
"address3":"Floor 10",
"city":"New York City",
"state":"NY",
"country":"US",
"zipCode":10013,
"default_for_shipping":true,
"default_for_billing":true
}