Zoey REST API reference ยท Interactive version: apidocs.zoey.com

Customers

Customers: Groups

Get All

GET https://container-url.zoeysite.com/api/rest/customers/groups?limit=1&page=1&order=customer_group_id&dir=ASC&filter[0][attribute]=customer_group_id&filter[0][gt]=2

Query parameters:

NameExampleNotes
limit1Limit the response.
page1Paginate the response.
ordercustomer_group_idOrder the response by attribute.
dirASCOrder direction. (ASC, DESC)
filter[0][attribute]customer_group_idFilter the response.
filter[0][gt]2

Get

GET https://container-url.zoeysite.com/api/rest/customers/groups/:groupId

Update

PUT https://container-url.zoeysite.com/api/rest/customers/groups/:groupId

Param Type Description
customer_group_code string Name of the Customer Group.
tax_class_id int ID of the Tax Class used for the customer group.
login_redirect_path string Include only the URL key after the base URL of your store.
restricted_stores_currencies restrictedStoresCurrenciesType If Language & Currency Restriction is enabled, only selected Languages and Currencies will be accessible by this group. At least 1 Language must be accessible and least 1 currency within a restricted Language must be accessible.
use_po_increments int (0,1) Use Automatic PO #s
use_group_sales_increments_order string (0,1) Use Order Custom Increment IDs.
use_group_sales_increments_invoice string (0,1) Use Invoice Custom Increment IDs.
use_group_sales_increments_shipment string (0,1) Use Shipment Custom Increment IDs.
use_group_sales_increments_creditmemo string (0,1) Use Credit Memo Custom Increment IDs.
b2b_quote_product_attribute_restriction int Limit Quote By Specific Product Attribute.
mage_quote_product_attribute_restriction int Limit Order By Specific Product Attribute.
group_sales_increments groupSalesIncrementsType Config for sales increments.
po_increment_data customIncrementDataType Config for PO increments

TYPES restrictedStoresCurrenciesType

Param Type Description
{{storeId}} string[] Array of currency codes.
// Example when Store ID is equal to 1
{
    "1": ["USD"]
},

groupSalesIncrementsType

Param Type Description
creditmemo customIncrementDataType Credit Memo Custom Increment Config.
invoice customIncrementDataType Credit Memo Custom Increment Config.
order customIncrementDataType Order Custom Increment Config.
shipment customIncrementDataType Shipment Custom Increment Config.

customIncrementDataType

Param Type Description
last_id string Last Increment ID must be an 8 digit number and cannot start with 9 or be set to a number less than its current value.
prefix string Only letters, numbers, dashes, underscores, pound sign, and periods allowed. Must start with letter or number. Max 20 characters.

Example request body:

{
    "customer_group_code": "API TEST",
    "tax_class_id": "3",
    "sales_rep_user_id": [],
    "restricted_stores_currencies": {
        "1": [
            "USD"
        ]
    },
    "login_redirect_path": "shirts",
    "b2b_quote_product_attribute_restriction": "92",
    "mage_quote_product_attribute_restriction": "92",
    "use_group_sales_increments_order": "1",
    "use_group_sales_increments_invoice": "1",
    "use_group_sales_increments_creditmemo": "1",
    "use_group_sales_increments_shipment": "1",
    "use_po_increments": "0",
    "po_increment_data": {
        "prefix": "api_group_",
        "last_id": ""
    },
    "group_sales_increments": {
        "order": {
            "prefix": "api_group_",
            "last_id": "10000000"
        },
        "invoice": {
            "prefix": "api_group_",
            "last_id": "20000000"
        },
        "creditmemo": {
            "prefix": "api_group_",
            "last_id": "30000000"
        },
        "shipment": {
            "prefix": "api_group_",
            "last_id": "40000000"
        }
    }
}

Create

POST https://container-url.zoeysite.com/api/rest/customers/groups

Param Type Description
customer_group_code string Name of the Customer Group.
tax_class_id int ID of the Tax Class used for the customer group.
login_redirect_path string Include only the URL key after the base URL of your store.
restricted_stores_currencies restrictedStoresCurrenciesType If Language & Currency Restriction is enabled, only selected Languages and Currencies will be accessible by this group. At least 1 Language must be accessible and least 1 currency within a restricted Language must be accessible.
use_po_increments int (0,1) Use Automatic PO #s
use_group_sales_increments_order string (0,1) Use Order Custom Increment IDs.
use_group_sales_increments_invoice string (0,1) Use Invoice Custom Increment IDs.
use_group_sales_increments_shipment string (0,1) Use Shipment Custom Increment IDs.
use_group_sales_increments_creditmemo string (0,1) Use Credit Memo Custom Increment IDs.
b2b_quote_product_attribute_restriction int Limit Quote By Specific Product Attribute.
mage_quote_product_attribute_restriction int Limit Order By Specific Product Attribute.
group_sales_increments groupSalesIncrementsType Config for sales increments.
po_increment_data customIncrementDataType Config for PO increments

TYPES restrictedStoresCurrenciesType

Param Type Description
{{storeId}} string[] Array of currency codes.
// Example when Store ID is equal to 1
{
    "1": ["USD"]
},

groupSalesIncrementsType

Param Type Description
creditmemo customIncrementDataType Credit Memo Custom Increment Config.
invoice customIncrementDataType Credit Memo Custom Increment Config.
order customIncrementDataType Order Custom Increment Config.
shipment customIncrementDataType Shipment Custom Increment Config.

customIncrementDataType

Param Type Description
last_id string Last Increment ID must be an 8 digit number and cannot start with 9 or be set to a number less than its current value.
prefix string Only letters, numbers, dashes, underscores, pound sign, and periods allowed. Must start with letter or number. Max 20 characters.

Example request body:

{
    "customer_group_code": "API TEST",
    "tax_class_id": 3,
    "sales_rep_user_id": [],
    "restricted_stores_currencies": {
        "1": [
            "USD"
        ]
    },
    "login_redirect_path": "shirts",
    "b2b_quote_product_attribute_restriction": 92,
    "mage_quote_product_attribute_restriction": 92,
    "use_group_sales_increments_order": 1,
    "use_group_sales_increments_invoice": 1,
    "use_group_sales_increments_creditmemo": 1,
    "use_group_sales_increments_shipment": 1,
    "use_po_increments": 0,
    "group_sales_increments": {
        "order": {
            "prefix": "api_group_",
            "last_id": "10000000"
        },
        "invoice": {
            "prefix": "api_group_",
            "last_id": "20000000"
        },
        "creditmemo": {
            "prefix": "api_group_",
            "last_id": "30000000"
        },
        "shipment": {
            "prefix": "api_group_",
            "last_id": "40000000"
        }
    }
}

Delete

DELETE https://container-url.zoeysite.com/api/rest/customers/groups/:groupId

Example request body:

{
    "customer_group_code": "API TEST"
}