MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your Settings > API Tokens and clicking Create New Token in the App.

Customer Wishlist

APIs for managing customer wishlists

Retrieve List of wishlists

requires authentication

Example request:
curl --request GET \
    --get "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/lists" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/lists';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "data": {
        "wishlists": [
            {
                "id": 1,
                "uuid": "6b7b2285-6631-4e36-aa4b-7fdbbe95b8cc",
                "user_id": 1,
                "customer_id": 1,
                "customer": 10000000000,
                "name": "Jon's wishlist",
                "count": 4,
                "is_default": true,
                "is_public": true,
                "created_at": "2024-12-31T21:59:19.000000Z",
                "updated_at": "2025-01-06T20:01:02.000000Z"
            },
            {
                "id": 2,
                "uuid": "027b401c-f22d-4404-87f7-91a0d6b8268c",
                "user_id": 1,
                "customer_id": 1,
                "customer": 10000000000,
                "name": "Test List",
                "count": 3,
                "is_default": false,
                "is_public": true,
                "created_at": "2024-12-31T21:59:29.000000Z",
                "updated_at": "2025-01-05T20:25:25.000000Z"
            }
        ]
    },
    "message": "Wishlist list fetched successfully."
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/customer/wishlist/lists

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

customer_id   integer   

The Shopify customer id of the customer. Example: 99999999

Create a new wishlist

requires authentication

Example request:
curl --request POST \
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/create" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"customer_id\": 99999999,
    \"list_name\": \"My Wishlist\",
    \"is_public\": true
}"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "customer_id": 99999999,
    "list_name": "My Wishlist",
    "is_public": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'customer_id' => 99999999,
            'list_name' => 'My Wishlist',
            'is_public' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "status": 201,
    "error": false,
    "data": {
        "id": 1,
        "uuid": "6b7b2285-6631-4e36-aa4b-7fdbbe95b8cc",
        "user_id": 1,
        "customer_id": 1,
        "customer": 10000000000,
        "name": "Jon's wishlist",
        "count": 0,
        "is_default": false,
        "is_public": true,
        "created_at": "2024-12-31T21:59:19.000000Z",
        "updated_at": "2025-01-06T20:01:02.000000Z"
    },
    "message": "Wishlist was created successfully!"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

POST api/v1/customer/wishlist/create

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

customer_id   integer   

The Shopify customer id of the customer. Example: 99999999

list_name   string   

The name of the wishlist. Example: My Wishlist

is_public   boolean  optional  

Whether the wishlist is public or private, Defaults to false. Example: true

Update the existing wishlist

requires authentication

Example request:
curl --request PUT \
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/1/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"list_name\": \"My Wishlist\",
    \"is_public\": true
}"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/1/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "list_name": "My Wishlist",
    "is_public": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/1/update';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'list_name' => 'My Wishlist',
            'is_public' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "status": 201,
    "error": false,
    "data": {
        "id": 1,
        "uuid": "6b7b2285-6631-4e36-aa4b-7fdbbe95b8cc",
        "user_id": 1,
        "customer_id": 1,
        "customer": 10000000000,
        "name": "Jon's wishlist",
        "count": 0,
        "is_default": false,
        "is_public": true,
        "created_at": "2024-12-31T21:59:19.000000Z",
        "updated_at": "2025-01-06T20:01:02.000000Z"
    },
    "message": "Wishlist was created successfully!"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

PUT api/v1/customer/wishlist/{id}/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the wishlist. Example: 1

Body Parameters

list_name   string  optional  

The name of the wishlist. Example: My Wishlist

is_public   boolean  optional  

Whether the wishlist is public or private. Example: true

Delete the existing wishlist

requires authentication

Example request:
curl --request DELETE \
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/333/delete" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/333/delete"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/333/delete';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "message": "Wishlist was deleted successfully!"
    "data": 333
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

DELETE api/v1/customer/wishlist/{id}/delete

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the wishlist. Example: 333

Customer Wishlist Items

APIs for managing customer wishlist items

Retrieve List of wishlist items

requires authentication

Example request:
curl --request POST \
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"products\": [
        {
            \"product_id\": 8460971049249,
            \"variant_id\": 46035853771041
        }
    ],
    \"customer_id\": 7195877802273,
    \"unique_device_id\": \"a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd\"
}"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "products": [
        {
            "product_id": 8460971049249,
            "variant_id": 46035853771041
        }
    ],
    "customer_id": 7195877802273,
    "unique_device_id": "a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/status';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'products' => [
                [
                    'product_id' => 8460971049249,
                    'variant_id' => 46035853771041,
                ],
            ],
            'customer_id' => 7195877802273,
            'unique_device_id' => 'a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "error": false,
    "status": 201,
    "data": [
        {
            "_id": 5757748,
            "product_id": 8460971049249,
            "variant_id": 46035853771041,
            "status": true,
            "count": 2
        },
        {
            "_id": 76878677,
            "product_id": 8460971049249,
            "variant_id": 46035853771041,
            "status": true,
            "count": 2
        }
    ],
    "message": "Wishlist products fetch successfully!"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "status": 422,
    "error": true,
    "message": "OOPS! items size exceeds limit, max items is 100 to per request"
    "data": null
}
 

Request   

POST api/v1/customer/wishlist/items/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

products   object[]   

The Shopify product items, limit is 100 items per request

product_id   integer   

The shopify product id. Example: 8460971049249

variant_id   integer   

The shopify variant id. Example: 46035853771041

customer_id   integer   

The Shopify customer id of the customer. Example: 7195877802273

unique_device_id   string   

The unique identifier, max length is 50 characters. This one will be as a device identifier, you have to generate it for a users first time visit to your app and have to store it for permanently use case. Example: a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd

Add new item to customer wishlist

requires authentication

Add a product to customer wishlist item resource

Example request:
curl --request POST \
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/add" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"customer_id\": 7195877802273,
    \"wishlist_id\": 233,
    \"product_id\": 8460971049249,
    \"variant_id\": 46035853771041,
    \"unique_device_id\": \"a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd\"
}"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/add"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "customer_id": 7195877802273,
    "wishlist_id": 233,
    "product_id": 8460971049249,
    "variant_id": 46035853771041,
    "unique_device_id": "a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/add';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'customer_id' => 7195877802273,
            'wishlist_id' => 233,
            'product_id' => 8460971049249,
            'variant_id' => 46035853771041,
            'unique_device_id' => 'a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "error": false,
    "status": 201,
    "data": {
        "_id": 5757748,
        "wishlist_id": 233,
        "product_id": 8460971049249,
        "variant_id": 46035853771041,
        "status": true,
        "count": 2,
        "item": {
            "product": {
                "id": 434343,
                "title": "The Art of Living",
                "handle": "the-art-of-living",
                "product_id": 8460971049249
            },
            "variant": {
                "id": 34333445,
                "variant_id": 46035853771041,
                "title": "Small / White",
                "sku": "SS-123",
                "price": "10.00",
                "inventory": 10,
                "in_stock": true
            }
        }
    },
    "message": "Wishlist item was successfully created!"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "status": 403,
    "error": true,
    "message": "Maximum wishlist item limit exceeded!"
    "data": null
}
 

Request   

POST api/v1/customer/wishlist/items/add

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

customer_id   integer   

The Shopify customer id of the customer. Example: 7195877802273

wishlist_id   integer   

The wishlist id. Example: 233

product_id   integer   

The shopify product id. Example: 8460971049249

variant_id   integer   

The shopify variant id. Example: 46035853771041

unique_device_id   string   

The unique identifier, max length is 50 characters. This one will be as a device identifier, you have to generate it for a users first time visit to your app and have to store it for permanently use case. Example: a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd

Retrieve count customer wishlist items

requires authentication

Example request:
curl --request GET \
    --get "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/count?customer_id=7195877802273" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/count"
);

const params = {
    "customer_id": "7195877802273",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'customer_id' => '7195877802273',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "data": {
         "count": 1,
    },
    "message": "Wishlist items total fetched successfully."
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/customer/wishlist/items/count

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

customer_id   integer   

The Shopify customer id of the customer. Example: 7195877802273

Remove item from customer wishlist

requires authentication

Example request:
curl --request DELETE \
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/333/remove" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/333/remove"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/items/333/remove';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "data": {
         "_id":333,
         "count": 4,
    },
    "message": "Wishlist item deleted successfully"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

DELETE api/v1/customer/wishlist/items/{id}/remove

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the wishlist item. Example: 333

Dashboard Wishlist Items

APIs for managing guest or customer wishlist items for user dashboard

Retrieve List of guest wishlist items

requires authentication

Example request:
curl --request GET \
    --get "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items?unique_device_id=a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd&per_page=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items"
);

const params = {
    "unique_device_id": "a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'unique_device_id' => 'a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd',
            'per_page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "message": "Wishlist Items retrieved successfully.",
    "data": {
        "items": [
            {
                "id": 13,
                "product_id": 7,
                "variant_id": 9,
                "product": {
                    "id": 7,
                    "shopify_product_id": 8460971376929,
                    "title": "Abito Adele",
                    "handle": "abito-adele-2",
                    "vendor": "Mia Rebel Moda",
                    "image": "https://cdn.shopify.com/s/files/1/0800/0589/0337/products/d78acba9b161.jpg?v=1691051895",
                    "count": 1
                },
                "variant": {
                    "id": 9,
                    "product_id": 7,
                    "shopify_variant_id": 46035854098721,
                    "title": "Verde acqua / Cotone elastico / S",
                    "price": "19.99",
                    "sku": "0090",
                    "inventory": 10,
                    "in_stock": true
                }
            },
            {
                "id": 14,
                "product_id": 8,
                "variant_id": 13,
                "product": {
                    "id": 8,
                    "shopify_product_id": 8460970852641,
                    "title": "Abito Barbara",
                    "handle": "abito-barbara",
                    "vendor": "Mia Rebel Moda",
                    "image": "https://cdn.shopify.com/s/files/1/0800/0589/0337/products/795326.jpg?v=1691051874",
                    "count": 2
                },
                "variant": {
                    "id": 13,
                    "product_id": 8,
                    "shopify_variant_id": 46035853541665,
                    "title": "Lilla / S",
                    "price": "12.99",
                    "sku": "0124",
                    "inventory": 1,
                    "in_stock": true
                }
            }
        ],
        "meta": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 2,
            "per_page": 2
        }
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/guest/wishlist/items

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

unique_device_id   string   

The unique identifier, max length is 50 characters. This one will be as a device identifier, you have to generate it for a users first time visit to your app and have to store it for permanently use case. Example: a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd

per_page   integer  optional  

The number of items per page, default is 10. Example: 10

Retrieve List of customer wishlist items

requires authentication

Example request:
curl --request GET \
    --get "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/333/items?per_page=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/333/items"
);

const params = {
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/customer/wishlist/333/items';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "message": "Wishlist Items retrieved successfully.",
    "data": {
        "items": [
            {
                "id": 13,
                "product_id": 7,
                "variant_id": 9,
                "product": {
                    "id": 7,
                    "shopify_product_id": 8460971376929,
                    "title": "Abito Adele",
                    "handle": "abito-adele-2",
                    "vendor": "Mia Rebel Moda",
                    "image": "https://cdn.shopify.com/s/files/1/0800/0589/0337/products/d78acba9b161.jpg?v=1691051895",
                    "count": 1
                },
                "variant": {
                    "id": 9,
                    "product_id": 7,
                    "shopify_variant_id": 46035854098721,
                    "title": "Verde acqua / Cotone elastico / S",
                    "price": "19.99",
                    "sku": "0090",
                    "inventory": 10,
                    "in_stock": true
                }
            },
            {
                "id": 14,
                "product_id": 8,
                "variant_id": 13,
                "product": {
                    "id": 8,
                    "shopify_product_id": 8460970852641,
                    "title": "Abito Barbara",
                    "handle": "abito-barbara",
                    "vendor": "Mia Rebel Moda",
                    "image": "https://cdn.shopify.com/s/files/1/0800/0589/0337/products/795326.jpg?v=1691051874",
                    "count": 2
                },
                "variant": {
                    "id": 13,
                    "product_id": 8,
                    "shopify_variant_id": 46035853541665,
                    "title": "Lilla / S",
                    "price": "12.99",
                    "sku": "0124",
                    "inventory": 1,
                    "in_stock": true
                }
            }
        ],
        "meta": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 2,
            "per_page": 2
        }
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/customer/wishlist/{id}/items

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the wishlist. Example: 333

Query Parameters

per_page   integer  optional  

The number of items per page, default is 10. Example: 10

Guest Wishlist Items

APIs for managing guest wishlist items

Retrieve List of wishlist items

requires authentication

Example request:
curl --request POST \
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"products\": [
        {
            \"product_id\": 8460971049249,
            \"variant_id\": 46035853771041
        }
    ],
    \"unique_device_id\": \"a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd\"
}"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "products": [
        {
            "product_id": 8460971049249,
            "variant_id": 46035853771041
        }
    ],
    "unique_device_id": "a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/status';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'products' => [
                [
                    'product_id' => 8460971049249,
                    'variant_id' => 46035853771041,
                ],
            ],
            'unique_device_id' => 'a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "error": false,
    "status": 201,
    "data": [
        {
            "_id": 5757748,
            "product_id": 8460971049249,
            "variant_id": 46035853771041,
            "status": true,
            "count": 2
        },
        {
            "_id": 76878677,
            "product_id": 8460971049249,
            "variant_id": 46035853771041,
            "status": true,
            "count": 2
        }
    ],
    "message": "Wishlist products fetch successfully!"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "status": 422,
    "error": true,
    "message": "OOPS! items size exceeds limit, max items is 100 to per request"
    "data": null
}
 

Request   

POST api/v1/guest/wishlist/items/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

products   object[]   

The Shopify product items, limit is 100 items per request

product_id   integer   

The shopify product id. Example: 8460971049249

variant_id   integer   

The shopify variant id. Example: 46035853771041

unique_device_id   string   

The unique identifier, max length is 50 characters. This one will be as a device identifier, you have to generate it for a users first time visit to your app and have to store it for permanently use case. Example: a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd

Add new item to guest wishlist

requires authentication

Add a product to guest wishlist item resource

Example request:
curl --request POST \
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/add" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": 8460971049249,
    \"variant_id\": 46035853771041,
    \"unique_device_id\": \"a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd\"
}"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/add"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": 8460971049249,
    "variant_id": 46035853771041,
    "unique_device_id": "a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/add';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'product_id' => 8460971049249,
            'variant_id' => 46035853771041,
            'unique_device_id' => 'a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "error": false,
    "status": 201,
    "data": {
        "_id": 5757748,
        "wishlist_id": null,
        "product_id": 8460971049249,
        "variant_id": 46035853771041,
        "status": true,
        "count": 2,
        "item": {
            "product": {
                "id": 434343,
                "title": "The Art of Living",
                "handle": "the-art-of-living",
                "product_id": 8460971049249
            },
            "variant": {
                "id": 34333445,
                "variant_id": 46035853771041,
                "title": "Small / White",
                "sku": "SS-123",
                "price": "10.00",
                "inventory": 10,
                "in_stock": true
            }
        }
    },
    "message": "Wishlist item was successfully created!"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "status": 403,
    "error": true,
    "message": "Maximum wishlist item limit exceeded!"
    "data": null
}
 

Request   

POST api/v1/guest/wishlist/items/add

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer   

The shopify product id. Example: 8460971049249

variant_id   integer   

The shopify variant id. Example: 46035853771041

unique_device_id   string   

The unique identifier, max length is 50 characters. This one will be as a device identifier, you have to generate it for a users first time visit to your app and have to store it for permanently use case. Example: a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd

Retrieve count guest wishlist items

requires authentication

Example request:
curl --request GET \
    --get "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/count?unique_device_id=a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/count"
);

const params = {
    "unique_device_id": "a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'unique_device_id' => 'a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "data": {
         "count": 1,
    },
    "message": "Wishlist items total fetched successfully."
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/guest/wishlist/items/count

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

unique_device_id   string   

The unique identifier, max length is 50 characters. This one will be as a device identifier, you have to generate it for a users first time visit to your app and have to store it for permanently use case. Example: a464eced-0ece-4e6f-a10b-95d8de4fd299-193ff5ac9bd

Remove item from guest wishlist

requires authentication

Example request:
curl --request DELETE \
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/333/remove" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/333/remove"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/guest/wishlist/items/333/remove';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "data": {
         "_id":333,
         "count": 4,
    },
    "message": "Wishlist item deleted successfully"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

DELETE api/v1/guest/wishlist/items/{id}/remove

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the wishlist item. Example: 333

Settings

APIs for managing app settings for store

Retrieve Store Settings and Widgets

requires authentication

Example request:
curl --request GET \
    --get "https://wishlist-lab.zapifycommerce.com/api/v1/shop/settings?locale=%60en%60" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://wishlist-lab.zapifycommerce.com/api/v1/shop/settings"
);

const params = {
    "locale": "`en`",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://wishlist-lab.zapifycommerce.com/api/v1/shop/settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'locale' => '`en`',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": 200,
    "error": false,
    "message": "App settings and widgets retrieved successfully",
    "data": {
        "settings": {
            "app_enable": true,
            "count_enable": true,
            "guest_enable": true,
            "multiple_enable": true,
            "cart_move_enable": true,
            "share_enable": true,
            "subscribe_enable": true,
            "analysis_enable": true
        },
        "widgets": {
            "custom-analytics": {
                "locale": "en",
                "style": {
                    "facebook_pixel_code": "453534534534",
                    "google_analytics_code": "G-H3X2856BN5"
                },
                "content": null
            },
            "custom-css": {
                "locale": "en",
                "style": {
                    "code": "body {\n  margin: 0;\n  padding: 0;\n  color: #000;\n  background: #fff;\n}"
                },
                "content": null
            },
            "collection_page": {
                "locale": "en",
                "style": {
                    "type": "icon-solid",
                    "bg_color": "#222222",
                    "text_color": "#fff",
                    "is_absolute": true
                },
                "content": {
                    "after_text": "Added to Wishlist",
                    "before_text": "Add to Wishlist"
                }
            },
            "header_menu": {
                "locale": "en",
                "style": {
                    "button_type": "regular",
                    "primary_color": "#222222",
                    "secondary_color": "#fff"
                },
                "content": null
            },
            "product_page": {
                "locale": "en",
                "style": {
                    "type": "icon-solid",
                    "bg_color": "#222222",
                    "is_block": true,
                    "text_color": "#fff"
                },
                "content": {
                    "after_text": "Added to Wishlist",
                    "before_text": "Add to Wishlist"
                }
            },
            "cart_page": {
                "locale": "en",
                "style": {
                    "type": "icon-solid",
                    "bg_color": "#222222",
                    "is_simple": false,
                    "text_color": "#fff"
                },
                "content": {
                    "after_text": "Saved For Later",
                    "before_text": "Save For Later"
                }
            },
            "wishlist_page": {
                "locale": "en",
                "style": {
                    "theme": {
                        "primary": "#222222",
                        "secondary": "#fff",
                        "primary_text": "#343a40",
                        "secondary_text": "#253d4e"
                    }
                },
                "content": {
                    "empty": {
                        "title": "Your wishlist is empty!",
                        "btn_url": "/shop",
                        "btn_text": "Go Shopping",
                        "description": "OOPS, There are no products in wishlist, go find the products you like!"
                    },
                    "login": {
                        "title": "Login is required to see your wishlist!",
                        "btn_text": "Login"
                    },
                    "popup": {
                        "confirm": {
                            "title": "Are you sure you want to delete this element?",
                            "no_btn_text": "No",
                            "yes_btn_text": "Yes",
                            "close_btn_text": "Close"
                        },
                        "add_edit": {
                            "add": {
                                "title": "Create a new list",
                                "btn_text": "Create New List"
                            },
                            "edit": {
                                "title": "Edit List",
                                "btn_text": "Update List"
                            },
                            "error": "Please enter list name",
                            "placeholder": "Enter list name",
                            "radio_public": "<b class=\"ws--strong\">Public</b> - Only people with a link to this list can see it",
                            "radio_private": "<b class=\"ws--strong\">Private</b> - Only you can see this list, you can't share it",
                            "close_btn_text": "Close"
                        },
                        "move_share": {
                            "move": {
                                "title": "Move to another list",
                                "btn_text": "Move to List",
                                "no_option_message": "OOPS, There are no lists to move."
                            },
                            "share": {
                                "title": "Share your wishlist",
                                "btn_text": "Copy"
                            },
                            "close_btn_text": "Close"
                        }
                    },
                    "header": {
                        "title": "My Wishlist",
                        "description": "To save your wishlist please <a href=\"/account/login\">login</a> Or <a href=\"/account/register\">sign up</a>.",
                        "search_placeholder": "Search"
                    },
                    "content": {
                        "layout": "grid",
                        "added_on": "Added on",
                        "stock_in": "In Stock",
                        "stock_out": "Stock Out",
                        "cart_btn_text": "Move to Cart",
                        "move_btn_text": "Move to another list"
                    },
                    "sidebar": {
                        "default_text": "Default",
                        "edit_btn_text": "Edit",
                        "share_btn_text": "Share",
                        "create_btn_text": "Create new list",
                        "delete_btn_text": "Delete"
                    },
                    "notification": {
                        "error": "OOPS, There was an error. Please try again!",
                        "copy_link": "Copied the link to clipboard!",
                        "list_create": "Wishlist was created successfully!",
                        "list_delete": "Wishlist was deleted successfully!",
                        "list_update": "Wishlist was updated successfully!",
                        "product_move": "Product was moved successfully!"
                    }
                }
            },
            "wishlist_popup": {
                "locale": "en",
                "style": {
                    "theme": {
                        "primary": "#222222",
                        "secondary": "#3e4146"
                    },
                    "button": {
                        "bg_color": "#222222",
                        "text_color": "#fff"
                    }
                },
                "content": {
                    "radio": {
                        "public": "<b class=\"ws--strong\">Public</b> - Only people with a link to this list can see it",
                        "private": "<b class=\"ws--strong\">Private</b> - Only you can see this list, you can't share it"
                    },
                    "button": {
                        "list_btn_text": "Create New List",
                        "close_btn_text": "Close",
                        "wishlist_btn_text": "Add to Wishlist"
                    },
                    "heading": {
                        "list_text": "Create a new list",
                        "wishlist_text": "Choose a wishlist",
                        "separator_text": "or"
                    },
                    "message": {
                        "no_option_text": "OOPS! No option to show.",
                        "list_input_empty_text": "Wishlist name is required!",
                        "list_input_placeholder": "Enter wishlist name..."
                    }
                }
            },
            "subscriber_popup": {
                "locale": "en",
                "style": {
                    "theme": {
                        "accent": "#3e4146",
                        "primary": "#222222",
                        "secondary": "#fff"
                    }
                },
                "content": {
                    "form": {
                        "email": {
                            "label": "Email Address",
                            "errors": {
                                "email": "Email address is invalid",
                                "required": "Email address is required"
                            },
                            "placeholder": "Enter your email"
                        },
                        "last_name": {
                            "label": "Last Name",
                            "placeholder": "Enter your last name"
                        },
                        "first_name": {
                            "label": "First Name",
                            "placeholder": "Enter your first name"
                        }
                    },
                    "button": {
                        "cancel_btn_text": "Cancel",
                        "subscribe_btn_text": "Subscribe"
                    },
                    "footer": {
                        "text": "We will send you an email when your wishlist products have interesting update to help save your time and money. We will never share your email address with anyone else."
                    },
                    "header": {
                        "title": "Remind Me About My Wishlist",
                        "sub_title": "Receive updates about your wishlist content via email",
                        "close_btn_text": "Close"
                    },
                    "messages": {
                        "error": "OOPS! There was an error, please try again.",
                        "unique": "OOPS! Email is already subscribed, please use another valid email.",
                        "success": "Subscribed successfully! Please confirm your email for activated",
                        "subscriber": "OOPS! Already subscribed, you are not able to subscribe again."
                    }
                }
            },
            "notification": {
                "locale": "en",
                "style": {
                    "theme": {
                        "primary": "#222222",
                        "secondary": "#3e4146"
                    },
                    "timeout": "3500"
                },
                "content": {
                    "button": {
                        "view_btn_text": "View",
                        "close_btn_text": "Close",
                        "btn_separator_text": "or"
                    },
                    "message": {
                        "added_text": "Product added in wishlist",
                        "removed_text": "Product removed to wishlist"
                    }
                }
            },
            "toast_notification": {
                "locale": "en",
                "style": null,
                "content": {
                    "common_error_text": "OOPS! Something went wrong, please try again later!",
                    "guest_disable_text": "Please login to add this item to your Wishlist!",
                    "wishlist_limit_text": "Maximum wishlist item limit exceeded!"
                }
            }
        }
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/shop/settings

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

locale   string  optional  

Language code, defaults to en. Example: en