Dokumentation Entwickler API

Customer Ressource

Aktualisiert am 16.03.2017

Customer Ressource

Attention

Those resources are read-only by default.


Customer Associations


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

Customer Ressource

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/customers.json

Customer Ressource

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
}
}
]

Customer Ressource

Get Customer

GET /api/customers/:customer_id.json

  • GET /api/customers/:customer_id.json will return the specified customer.


Example

Customer Ressource

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/customers/:customer_id.json

Customer Ressource

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 Ressource

Get Customer Count

GET /api/customers/count.json

  • GET /api/customers/count.json will return the customers count.


Example

Customer Ressource

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/customers/count.json

Customer Ressource

{
"count": 43
}