Customer Resource
Content
Attention
Those resources are read-only by default.
Get Customers
GET /api/customers.json
- GET /api/customers.json will return the first 150 (default limit) customers. You can increase the limit to a maximum of 250 customers.
Example:
$ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u APP_API_KEY:APP_API_PASSWORD \ -X GET \ https://shop_subdomain.versacommerce.de/api/customers.json<br>
Status: 200 OK
[
{
"customer": {
"accepts_newsletter": false,
"active": true,
"birthday": null,
"created_on": "2012-11-09",
"email": "support@versacommerce.de",
"id": 100,
"option_01": "",
"option_02": "",
"option_03": "",
"option_04": "",
"registered": true,
"shop_id": 953,
"updated_on": "2012-11-09
}
},
{
"customer": {
"accepts_newsletter": true,
"active": false,
"birthday": null,
"created_on": "2013-03-28",
"email": "customer1@versacommerce.de",
"id": 101,
"option_01": null,
"option_02": null,
"option_03": null,
"option_04": null,
"registered": true,
"shop_id": 953,
"updated_on": "2013-03-28
}
},
{
"customer": {
"accepts_newsletter": false,
"active": false,
"birthday": null,
"created_on": "2013-09-17",
"email": "customer3@versacommerce.de",
"id": 102,
"option_01": null,
"option_02": null,
"option_03": null,
"option_04": null,
"registered": true,
"shop_id": 953,
"updated_on": "2013-09-28
}
}
]
Get Customer
GET /api/customers/:customer_id.json
- GET /api/customers/:customer_id.json will return the specified customer.
Example:
$ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u APP_API_KEY:APP_API_PASSWORD \ -X GET \ https://shop_subdomain.versacommerce.de/api/customers/:customer_id.json
Status: 200 OK
{
"customer": {
"accepts_newsletter": false,
"active": true,
"birthday": null,
"created_on": "2012-11-09",
"email": "support@versacommerce.de",
"id": 100,
"option_01": "",
"option_02": "",
"option_03": "",
"option_04": "",
"registered": true,
"shop_id": 953,
"updated_on": "2012-11-09
}
}
Get Customer Count
GET /api/customers/count.json
- GET /api/customers/count.json will return the customers count.
Example:
$ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u APP_API_KEY:APP_API_PASSWORD \ -X GET \ https://shop_subdomain.versacommerce.de/api/customers/count.json
Status: 200 OK
{
"count": 43
}