Zoey REST API reference ยท Interactive version: apidocs.zoey.com
GET https://container-url.zoeysite.com/api/rest/customers2/customer?id=1
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 1 | ID of customer to fetch info. ( Required ) |
Example response (Get), HTTP 200:
{
"customer_id": "1",
"created_at": "2016-08-24T09:26:52-04:00",
"updated_at": "2020-12-10 13:40:18",
"increment_id": null,
"store_id": "1",
"website_id": "1",
"is_active": "1",
"sales_rep_user_id": "13058631632732613440,10932762742589794610,3",
"is_login_disabled": "0",
"quickbooks_customer_id": null,
"adyen_customer_ref": null,
"affirm_customer_mfp": null,
"avatax_customer_code": null,
"block_fraud_customer": null,
"braintree_customer_id": null,
"can_create_addresses": "0",
"can_delete_addresses": "0",
"can_edit_addresses": "0",
"company_customer_created_by": null,
"confirmation": null,
"created_in": null,
"customer_tokenpan": null,
"cybersource_subscription_id": null,
"cybersource_verif_address": null,
"default_billing": "9",
"default_shipping": "9",
"deprecated_tokens": null,
"disable_auto_group_change": "0",
"dob": null,
"ebizmarts_reviews_cntr_total": null,
"ebizmarts_reviews_coupon_total": null,
"email": "test@zoey.com",
"facorder_id": "no",
"firstname": "Zoey's test",
"gender": null,
"group_id": "1",
"is_tokenized": "no",
"lastname": "customer",
"lightspeed_id": null,
"mark_fraud": null,
"middlename": null,
"net_term": null,
"net_term_credit": "1000.0000",
"net_term_detail": "[store_name] has offered you payment terms of [term_name]. Payment is due within [term_period] days for this order, after-which interest may be due. Invoices may be paid via Check, Wire Transfer, Cash or Credit Card by calling customer support at [store_phone].",
"net_term_disable_past_due": null,
"net_term_disable_past_due_day": null,
"net_term_enabled": "1",
"old_customer_id": null,
"order_notification_emails": "test@gmail.com,additionaltest@gmail.com,anotherTest@gmail.com",
"password_created_at": "1596489576",
"password_hash": "e0f96453d5766026595724af90cf7838:8WtCmikvOr7YOs6tw0b1X7AazkPRoR6c",
"prefix": null,
"reference_number": null,
"rp_customer_id": null,
"rp_token": null,
"rp_token_created_at": null,
"suffix": null,
"taxvat": "123445",
"xp_buffer": null,
"zoey_agreement": null,
"custom_attributes": [
{
"attribute_id": "234",
"attribute_code": "affirm_customer_mfp",
"value": null,
"value_string": ""
},
{
"attribute_id": "279",
"attribut
... (truncated)
GET https://container-url.zoeysite.com/api/rest/customers2/full?limit=1&page=2&filters[email]=test@zoey.com&filters[zb2b_pending_status]=1
Filtering this collection requires an attribute and a value.
How To Filter A Data Type in Query
Query parameters:
| Name | Example | Notes |
|---|---|---|
limit | 1 | Limit the response. |
page | 2 | Paginate the response. |
filters[email] | test@zoey.com | |
filters[zb2b_pending_status] | 1 | zb2b_pending_status is the filter used for Pending. A value of 1 means approved. |
Example response (Updated At), HTTP 200:
[
{
"customer_id": "1",
"created_at": "2016-08-24 13:26:52",
"updated_at": "2021-06-02 11:16:05",
"store_id": "1",
"website_id": "1",
"is_active": "1",
"is_login_disabled": "0",
"can_create_addresses": "0",
"can_delete_addresses": "0",
"can_edit_addresses": "0",
"default_billing": "1",
"disable_auto_group_change": "0",
"email": "test@zoey.com",
"facorder_id": "no",
"firstname": "Zoey's test",
"group_id": "1",
"is_tokenized": "no",
"lastname": "customer",
"net_term": "net10",
"net_term_credit": "10000.0000",
"net_term_detail": "[store_name] has offered you payment terms of [term_name]. Payment is due within [term_period] days for this order, after-which interest may be due. Invoices may be paid via Check, Wire Transfer, Cash or Credit Card by calling customer support at [store_phone].",
"net_term_disable_past_due": "0",
"net_term_enabled": "1",
"order_notification_emails": "",
"password_created_at": "1550872437",
"password_hash": "e0f96453d5766026595724af90cf7838:8WtCmikvOr7YOs6tw0b1X7AazkPRoR6c",
"wysiwyg": "",
"yes_no": "0",
"zoey_has_placed_order": "1",
"custom_attributes": [
{
"attribute_id": "234",
"attribute_code": "affirm_customer_mfp",
"value": null,
"value_string": ""
},
{
"attribute_id": "279",
"attribute_code": "avatax_customer_code",
"value": null,
"value_string": ""
},
{
"attribute_id": "248",
"attribute_code": "braintree_customer_id",
"value": null,
"value_string": ""
},
{
"attribute_id": "347",
"attribute_code": "date",
"value": null,
"value_string": ""
},
{
"attribute_id": "346",
"attribute_code": "drop_down",
"value": null,
"value_string": false
},
{
"attribute_id": "139",
"attribute_code": "ebizmarts_reviews_cntr_total",
"value": null,
"value_string": ""
},
{
... (truncated)
GET https://container-url.zoeysite.com/api/rest/customers2/count
Used to count the customers.
See Get All for filtering options.
POST https://container-url.zoeysite.com/api/rest/customers2/customer
customerDataTypeThis data is required when creating a new customer. All other customer data is either optional/required based on the attribute values.
customerDataType AttributesThese are common attributes that are typically assigned to customers. This list may change depending on the attributes settings in Customers > Attributes > Manage Customer Attributes page in Admin Panel. For example, a required status of the middlename attribute (Middle Name/Initial) may be changed to 'YES".
customerDataType DataThis is non-attribute data or actions that are associated with creating the customer.
storeCreditConfigExample request body:
{
"customerData": {
"firstname": "Earl",
"lastname": "Hickey",
"password": "12345678",
"email": "earl@example.com",
"group_id": 1,
"zoey_customer_confirmation": 2
}
}
Example response (Create):
"5"
PUT https://container-url.zoeysite.com/api/rest/customers2/customer
customerDataType AttributesThese are common attributes that are typically assigned to customers. This list may change depending on the attributes settings in Customers > Attributes > Manage Customer Attributes page in Admin Panel. For example, a required status of the middlename attribute (Middle Name/Initial) may be changed to 'YES".
customerDataType DataThis is non-attribute data or actions that are associated with creating the customer.
storeCreditConfigExample request body:
{
"customerId": 6,
"customerData": {
"firstname": "Earl",
"lastname": "Hickey",
"password": "123123q",
"email": "earl@example.com",
"group_id": 2
}
}
GET https://container-url.zoeysite.com/api/rest/customers/:id/ordered-items?limit=10&page=1&order=item_id&dir=ASC
Query parameters:
| Name | Example | Notes |
|---|---|---|
limit | 10 | Limit the response. |
page | 1 | Paginate the response. |
order | item_id | Order the response by attribute. |
dir | ASC | Order direction. (ASC, DESC) |
Example response (Orderd Items), HTTP 200:
[
{
"item_id": "1",
"order_id": "1",
"created_at": "2019-08-07 14:55:15",
"product_id": "115",
"product_options": {
"info_buyRequest": {
"qty": 1,
"product_id": 115,
"id": "13",
"reset_count": true
}
},
"sku": "Simple",
"name": "Simple",
"qty_ordered": "1.0000"
}
]