API Reference




Examples

All code samples are hosted on github

Overview

The Wish Merchant API will be using oAuth to authenticate in order to offer better security for its users

  • Learn about oAuth here.
  • If you are a merchant and want to create an application for yourself, learn about how to create a private app here
  • If you are a ERP and create applications that'll be used by multiple merchants, learn about how to create a public app here. You will need to apply to be a verified public application
  • Learn how to invoke the APIs after obtaining the access token here

Introduction

The Wish merchant platform is an ecommerce platform. It allows merchants to upload and manage inventory for sale on Wish. The platform is intended to be full-featured so merchants can manage their inventory, fulfill orders and handle customer issues.

This API is intended to be a fully programmable alternative to the GUI version of this platform. However, it is a work in progress and is constantly being updated with new features.

The best way to get started using this API is to read through this section and then visit the User Guide section. If you're too excited and need to start now please visit the Quick Start Guide.

Please note that all dates and times in our API are always in UTC unless otherwise mentioned.

To install the PHP SDK which makes it easier for developers to integrate with the api, go here for instructions: https://github.com/ContextLogic/Wish-Merchant-API

API Base Url

  • https://merchant.wish.com/api/v2/

API Base Url For China

  • https://china-merchant.wish.com/api/v2/

List of Endpoints

  • /auth_test
  • /product
  • /product/multi-get
  • /product/update
  • /product/enable
  • /product/disable
  • /product/add
  • /product/create-download-job
  • /product/get-download-job-status
  • /product/cancel-download-job
  • /variant
  • /variant/multi-get
  • /variant/update
  • /variant/enable
  • /variant/disable
  • /variant/update-inventory
  • /variant/add
  • /order
  • /order/multi-get
  • /order/get-fulfill
  • /order/fulfill-one
  • /order/modify-tracking
  • /order/create-download-job
  • /order/get-download-job-status
  • /order/cancel-download-job
  • /order/get-confirmed-delivery-countries
  • /order/get-confirmed-delivery-shipping-carriers-for-country

Authentication

Wish uses the OAuth 2.0 specification to authenticate your requests. For a detailed guide on how to authenticate, click here.

Every request will need to be authenticated with an access token. When making requests, provide the access token as a GET or POST request parameter:

ParameterTypeExample
access_tokenString1qaz2wsx3edc4rfv5tgb

Alternatively, the access token can be included in the header in this format: 'Authorization: Bearer {access_token}'

Requests must be made over HTTPS. Any call made over HTTP will be rejected.

Response Scheme

Every response returned from the Wish API will have the same schema. This schema is intended to give you a predictable manner to check the status of your request and know where to get the data. Each response will have the following top level attributes: code, data, message, and sometimes paging.

Attributes
CodeContains the status code for the request, 0 means success and any other number implies a failure.
DataThis attribute will store the response data that was requested.
MessageSometimes will store a human readable status message to aid in debugging. It is generally used only for errors.
PagingIf the number of results exceeds the limit for the request, this parameter will aid the client in paging to collect all the results.

Response Formats

This API can return results in either JSON or XML. To specify the format you would like your response in, include the 'format' parameter in your GET or POST request. This parameter is optional and defaults to JSON.

ParameterTypeExampleRequired
formatString'xml' or 'json', default is 'json'No

API Errors

The Wish API returns specific error data back to the client in the event of an error. Each error will contain the following data: 'code', 'message', 'data', and 'type'. Please see table below for descriptions of each attribute.

Attributes
CodeA unique number which represents the error that has occurred, example: 4001.
TypeA unique human readable representation of the error, example: not_found
MessageA message describing the error that happened, example: "We could not find a product for id: 'aaa'"
DataFor most errors this will be empty.

Example Request

> curl https://merchant.wish.com/api/v2/order/fulfill-one -d "tracking_provider=USPSSSSSSSSSSSSSSSSSSSSSSSSS&tracking_number=12345679&id=098765432112345678901234&access_token=an_example_access_token"

Example Response

{
    "message":"Tracking provider is not one of the accepted providers on Wish",
    "code":1000,
    "data":2003
}

HTTP Status Codes

As well as using specific error codes in the event of an error, this API tries to conform to conventional HTTP response codes to indicate success or failure. Any response code of the form 2xx is generally considered successful. A status code of 4xx means that there was an error with the inputs. Any code in the 5xx range means that the server experienced an unexpected error and means we screwed up!

The HTTP status code should be used as a quick reference, but to get specific details please refer to the error code provided in the response.

Pagination

For performance reasons it is necessary for this API to limit the number of results returned in each request. This limit varies per request, but there is always an upper bound on the number of items returned in any response. In the case that the number of results is too large, you may page through all the results with multiple requests.

If the results must be paginated the 'paging' attribute will exist in the response. This attribute will contain 'next' and 'prev' which are URLs for fetching the next (or previous) page of data.

Example

Note: access token and format have been removed from the URLs for brevity.
{
    code: 0,
    data : [/* results will be here */],
    message: '',
    paging : {
        next:https://merchant.wish.com/api/v2/product/multi-get?start=20&limit=10,
prev:https://merchant.wish.com/api/v2/product/multi-get?start=10&limit=10
}
}

How to Test

To avoid testing the API on production data, use our sandbox. The sandbox is completely contained and will not affect Wish users or your merchant account.

To reach the sandbox, visit: https://sandbox.merchant.wish.com

To use the sandbox in testing, use "https://sandbox.merchant.wish.com/v2/" as your base URL.

If you are using the PHP-SDK you can use the sandbox by specifing "sandbox" instead of "prod".

Steps to create sandbox user:

  1. Go to the sandbox :


  2. Sign up with your information





  3. To generate test transactions for api testing, click on Orders -> Action Required





  4. Click the generate transactions button


Assuming your access token is "an_example_access_token"


Examples

> curl "https://sandbox.merchant.wish.com/api/v2/auth_test?access_token=an_example_access_token"

> curl "https://sandbox.merchant.wish.com/api/v2/product?id=4ef2858a9795c776ce000120&access_token=an_example_access_token"

> curl https://sandbox.merchant.wish.com/api/v2/product/enable -d "id=123456789009876543211234&access_token=an_example_access_token"

<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf("https://sandbox.merchant.wish.com/api/v2/auth_test?access_token=%s);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'sandbox');

$client->authTest();
?>

How To Debug

When API errors, it'll still return a JSON or XML response. The response contains information on exactly what caused the error

For more information, check out here

Example Request

> curl https://merchant.wish.com/api/v2/order/fulfill-one -d "tracking_provider=USPSSSSSSSSSSSSSSSSSSSSSSSSS&tracking_number=12345679&id=098765432112345678901234&access_token=an_example_access_token"

Example Response

{
    "message":"Tracking provider is not one of the accepted providers on Wish",
    "code":1000,
    "data":2003
}

Debugging

USPSSSSSSSSSSSSSSSSSSSSSSSSS is not a shipping provider, to fix, change it to USPS

Example Request 2

> curl https://merchant.wish.com/api/v2/order/fulfill-one -d "tracking_provider=USPS&tracking_number=12345679&id=098765432112345678901234&access_token=an_example_access_token"

Example Response 2

{
    'code': 0,
    'data': {'success': True},
    'message': 'Your order is been processed right now!'
}

FAQ (Frequently Asked Questions)

Here are some quick code snippets that are commonly used to get you started

How do I update price of a product?'

Update price of a product:

> curl https://merchant.wish.com/api/v2/variant/update -d "sku=productsku&access_token=an_example_access_token&price=12.3"

<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('123456789009876543211234')
$new_price = urlencode('11.3');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/update?access_token=%s&sku=%s&price=%s",
    $access_token, $sku,$new_price,);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = json_decode(file_get_contents($url, TRUE, $context));
print_r($response);
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$variant = $client->getProductVariatonBySKU('sku');
$variant->price = 10.2;
$client->updateProductVariant($variant);
    

How do I update inventory of a product?

Update inventory of a product:

> curl https://merchant.wish.com/api/v2/variant/update -d "sku=productsku&access_token=an_example_access_token&inventory=100"

<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('blue-shoe-11');
$inventory = urlencode('100');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/update-inventory?access_token=%s&sku=%s&inventory=%s",
    $access_token, $sku, $inventory);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->updateInventoryBySKU($sku,100);
?>

How do I enable/disable a product?

Enable/disable product:

> curl https://merchant.wish.com/api/v2/product/enable -d "id=productid312&access_token=an_example_access_token"

<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543211234')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/enable?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->enableProductVariationBySKU('sku');
$client->enableProductVById('product_id');
?>

How do I get all products?

Download all products:

Start your batch Product download:
> curl https://merchant.wish.com/api/v2/product/create-download-job?access_token=an_example_access_token"

This will provide you with a 'job_id' for your download.


Check the status of your download by 'job_id':
> curl https://merchant.wish.com/api/v2/product/create-download-job?job_id=an_example_job_id&access_token=an_example_access_token"

When your download is ready, you will receive a 'download_link' in the response.


You will also receive an email with a link to download your Products.

<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$products = $client->getAllProducts();
$product_variations = $client->getAllProductVariations();
?>
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/create-download-job?access_token=%s",
$access_token);
$context = stream_context_create(array(
'http' => array(
'method' => 'GET',
'ignore_errors' => true,
),
));
// Send the request
$response = json_decode(file_get_contents($url, TRUE, $context));
print_r($response);
?>

How do I get all orders?

Download all orders:

Start your batch Order download:
> curl https://merchant.wish.com/api/v2/order/create-download-job?access_token=an_example_access_token"

This will provide you with a 'job_id' for your download.


Check the status of your download by 'job_id':
> curl https://merchant.wish.com/api/v2/order/create-download-job?job_id=an_example_job_id&access_token=an_example_access_token"

When your download is ready, you will receive a 'download_link' in the response.


You will also receive an email with a link to download your Orders.

<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$unfulfilled_orders = $client->getAllUnfulfilledOrdersSince('2010-01-20');
$changed_orders = $client->getAllChangedOrdersSince('2010-01-20');
?>
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/create-download-job?access_token=%s",
$access_token);
$context = stream_context_create(array(
'http' => array(
'method' => 'GET',
'ignore_errors' => true,
),
));
// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
?>

Quick Start Guide

We encourage you to skim through the section above to get an understanding about the fundamentals of this API. If you simply cannot wait, we hope this will get you started.

Get Your Access Token

Every request made must have an access token in the request. This token is used for authentication so please keep it a secret.

To obtain an access token, please visit this guide.

Test Authentication

Now that you have your access token you can test it by making a simple test request to the API and ensuring it works.

Assume your access token is "an_example_access_token" , you can now make a GET request to the following API to test your authentication:
https://merchant.wish.com/api/v2/auth_test?access_token=an_example_access_token


Example

> curl https://merchant.wish.com/api/v2/auth_test?access_token=an_example_access_token
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf("https://merchant.wish.com/api/v2/auth_test?access_token=%s);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
echo $client->authTest();
?>

Install the PHP SDK

Wish provides a PHP SDK for easier integration into the API system.

To install the SDK, go to: https://github.com/ContextLogic/Wish-Merchant-API

Examples can be found here: https://github.com/ContextLogic/Wish-Merchant-API/tree/master/examples

Product

The product entity represents an item that is for sale on Wish. Each product can have multiple variations comprised of different sizes and colors. Each product has at least one product variation. Product variations, not products, are purchased by users. Each product contains multiple related SKUs.



With this API you can create, and update products. You can also retrieve one or many of your products.

Attributes
idThe Wish Id of the product, a 24 character string
nameThe name which you have given the product, example: 'Blue Shoe'
parent_skuYour unique identifier for the product
num_soldNumber of sales this product has received
num_savesNumber of times this product has been added to users' wishlists
review_statusOur review status of the product, example: 'approved'
tagsComma separated list of tags which are applied to the product
descriptionA blurb of text uploaded as the description to the product
variantsA list of Product Variation entities
brandBrand or manufacturer of your product
landing_page_urlURL on your website containing the product details
upc12-digit Universal Product Codes (UPC)-contains no letters or other characters
main_imageURL of the main image of the product
extra_imagesURL of all extra images of the product, separated by the character '|'
enabledIf true, this product is eligible for sale.
is_promotedIf true, this product is promoted.
original_image_urlURL of the original image when product was created.
date_uploadedDate when product was created.
last_updatedTime when product was last updated (%m-%d-%YT%H:%M:%S).
wish_express_country_codesIf a product listing is enrolled in Wish Express this field will be a list of two letter country codes that the listing is eligible for

Create a Product

Use the endpoint to create a new product. Each product creation must include at least one variation because each product must have at least 1 variation.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/add

Explore API

Parameters
nameName of the product as shown to users on Wish
descriptionDescription of the product. Should not contain HTML. If you want a new line use "\n".
tagsComma separated list of strings that describe the product. Only 10 are allowed. Any tags past 10 will be ignored.
skuThe unique identifier that your system uses to recognize this product
coloroptional The color of the product. Example: red, blue, green
sizeoptional The size of the product. Example: Large, Medium, Small, 5, 6, 7.5
inventoryThe physical quantities you have for this product, max 500,000
priceThe price of the product when the user purchases one, max 100,000
shippingThe shipping of the product when the user purchases one, max 1000
msrpoptional Manufacturer's Suggested Retail Price. This field is recommended as it will show as a strikethrough price on Wish and appears above the selling price for the product.
shipping_timeoptional The amount of time it takes for the shipment to reach the buyer. Please also factor in the time it will take to fulfill and ship the item. Provide a time range in number of days. Lower bound cannot be less than 2 days. Upper bound must be at least 5 days after the lower bound. Example: 15-20
main_imageURL of a photo of your product. Link directly to the image, not the page where it is located. We accept JPEG, PNG or GIF format. Images should be at least 100 x 100 pixels in size.
parent_skuoptional When defining a variant of a product we must know which product to attach the variation to. parent_sku is the unique id of the product that you can use later when using the add product variation API.
brandoptional Brand or manufacturer of your product
landing_page_urloptional URL on your website containing the product details
upcoptional 12-digit Universal Product Codes (UPC)-contains no letters or other characters
extra_imagesoptional URL of extra photos of your product. Link directly to the image, not the page where it is located. Same rules apply as main_image. You can specify one or more additional images separated by the character '|'. The total number of extra images plus the number of variation images must not exceed 20.
max_quantityoptional The maximum quantityof products per order.

Returns
Upon success, a product will be created and that product is returned in the response with its corresponding Wish identifier.

Example

Lets say you had product named "red shoe" with a SKU of red-shoe-11,with price $100.00 and shipping of $10.00. If you want the description to be "this is a cool shoe" and its tags to be "red,shoe,cool". You want "http://i.imgur.com/Q1a32kD.jpg" to be the main image for your product and have additional imge "http://i.imgur.com/Cxagv.jpg" and "http://i.imgur.com/LuPSxBM.jpg". Assume your access token is "an_example_access_token"

  • name = red shoe
  • parent_sku = red-shoe
  • sku = red-shoe-11
  • inventory = 100
  • price = 100
  • shipping = 10
  • description = this is a cool shoe
  • tags = red,shoe,cool
  • main_image = http://i.imgur.com/Q1a32kD.jpg
  • extra_images=http://i.imgur.com/Cxagv.jpg|http://i.imgur.com/Cxagv.jpg
  • access_token = an_example_access_token

Example Request

<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$product = array(
  'name'=>'red shoe',
  'main_image'=>'http://i.imgur.com/Q1a32kD.jpg',
  'extra_images'=>'http://i.imgur.com/Cxagv.jpg|http://i.imgur.com/Cxagv.jpg',
  'sku'=>'red-shoe-11',
  'parent_sku'=>'red-shoe',
  'shipping'=>'10',
  'tags'=>'red,shoe,cool',
  'description'=>'a cool shoe',
  'price'=>'100',
  'inventory'=>'100'
  );
$prod_res = $client->createProduct($product);
print_r($prod_res);
?>
> curl https://merchant.wish.com/api/v2/product/add -d "main_image=http://i.imgur.com/Q1a32kD.jpg&name=shoe&description=this is a cool shoe&tags=red,shoe,cool&sku=red-shoe-11&inventory=100&price=100&shipping=10&extra_images=http://i.imgur.com/Q1a32kD.jpg|http://i.imgur.com/Cxagv.jpg&parent_sku=red-shoe&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');

$name = urlencode('red shoe');
$parent_sku = urlencode('red-shoe');
$sku = urlencode('red-shoe-11');
$inventory = urlencode('100');
$price = urlencode('100');
$shipping = urlencode('10');
$description = urlencode('this is a cool shoe');
$tags = urlencode('red,shoe,cool');
$main_image = urlencode('http://i.imgur.com/Q1a32kD.jpg');
$extra_images = urlencode('http://i.imgur.com/Cxagv.jpg|http://i.imgur.com/Cxagv.jpg');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/add?access_token=%s&main_image=%s&name=%s&description=%s&tags=%s&sku=%s&inventory=%s&price=%s&shipping=%s&extra_images=%s&parent_sku=%s",
    $access_token, $main_image, $name, $description, $tags, $sku, $inventory, $price, $shipping, $extra_images, $parent_sku);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data':
    {'Product': {'description': ' this is a cool shoe',
                 'id': '52a11ebdf94adc0cfee0dbd9',
                 'name': 'red shoe',
                 'number_saves': '0',
                 'number_sold': '0',
                 'parent_sku': 'red-shoe',
                 'review_status': 'pending',
                 'tags': [{'Tag': {'id': 'red',
                                   'name': 'red'}},
                          {'Tag': {'id': 'cool',
                                   'name': 'cool'}},
                          {'Tag': {'id': 'shoe',
                                   'name': 'shoe'}}],
                  'variants': [{'Variant': {'enabled': 'True',
                                            'id': '52a11ebef94adc0cfee0dbdb',
                                            'product_id': '52a11ebdf94adc0cfee0dbd9',
                                            'inventory': '100',
                                            'price': '100.0',
                                            'shipping': '10.0',
                                            'shipping_time': '5-10',
                                            'sku': 'red-shoe-11'}}]}},
 'message': ''}

Retrieve a Product

Retrieve the details about a product which exists on the Wish platform. You must have the unique product Id or the parent sku that was returned upon product creation.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product

Explore API

Parameters
idMust provide either id or parent_sku The unique wish identifier for this product
parent_skuMust provide either id or parent_sku The parent sku for this product

Returns
Returns a product entity if a valid identifier was provided.

Example

Assume your access token is "an_example_access_token" . If you want to retrieve a product with the id 4ef2858a9795c776ce000120:

  • id = 4ef2858a9795c776ce000120
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/product?id=4ef2858a9795c776ce000120&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$product = $client->getProductById('4ef2858a9795c776ce000120');
print_r($product);
?>
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('4ef2858a9795c776ce000120');

$url = sprintf("https://merchant.wish.com/api/v2/product?access_token=%s$id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': {'Product': {'description': 'JIMMY CRACK CORN',
                      'id': '51e0a2c47d41a236cfffe3a0',
                      'name': 'TEST!!!',
                      'number_saves': '12529',
                      'number_sold': '14',
                      'review_status': 'approved',
                      'tags': [{'Tag': {'id': 'jimmy', 'name': 'jimmy'}},
                               {'Tag': {'id': 'crack', 'name': 'Crack'}},
                               {'Tag': {'id': 'corn', 'name': 'Corn'}},
                               {'Tag': {'id': 'but', 'name': 'but'}},
                               {'Tag': {'id': 'i', 'name': 'I'}},
                               {'Tag': {'id': 'dont', 'name': 'dont'}},
                               {'Tag': {'id': 'care', 'name': 'Care'}}],
                      'variants': [{'Variant': {'enabled': 'True',
                                                'id': '51e0a2c67d41a236cfffe3a2',
                                                'product_id': '51e0a2c47d41a236cfffe3a0',
                                                'inventory': '10000',
                                                'msrp': '20000.0',
                                                'price': '10000.0',
                                                'shipping': '101.0',
                                                'sku': 'Bottle'}}]}},
 'message': ''}

Update a Product

Updates the specified product with the parameters passed in the request. Any attribute not provided will be left unchanged. For example, if you pass the name parameter we will update the name of the product and leave everything else unchanged.

This request can only update attributes specific to products and cannot be used to update anything to do with the product variations of a product.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/update

Explore API

Parameters
idMust provide either id or parent_sku Wish's unique identifier for the product you would like to update
parent_skuMust provide either id or parent_sku The parent sku for the product you would like to update
nameoptional Name of the product as shown to users
descriptionoptional Description of the product. If you want a new line use "\n".
tagsoptional Comma separated list of strings. The tags passed into this parameter will completely replace the tags that are currently on the product
brandoptional Brand or manufacturer of your product
landing_page_urloptional URL on your website containing the product detail and buy button for the applicable product.
upcoptional 12-digit Universal Product Codes (UPC)-contains no letters or other characters
main_imageoptional URL of a photo of your product. Link directly to the image, not the page where it is located. We accept JPEG, PNG or GIF format. Images should be at least 100 x 100 pixels in size.
extra_imagesoptional URL of a photo of your product. Link directly to the image, not the page where it is located. Same rules apply as main_image. You can specify one or more additional images separated by the character '|'. The total number of extra images plus the number of variation images must not exceed 20.
max_quantityoptional The maximum quantityof products per order.

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you had a product with id 123456789009876543211234 and you wanted to change the name to "Awesome shoe", update the description to "This shoe is the best on Wish" and change the tags to "shoe,awesome,size 11" your parameters would be:

  • id = 123456789009876543211234
  • name = Awesome shoe
  • description = This shoe is the best on Wish
  • tags = shoe, awesome, size 11
  • access_token = an_example_access_token

If you did not want to update the tags, you would omit that parameter from your API call.

Example Request

> curl https://merchant.wish.com/api/v2/product/update -d "id=123456789009876543211234&name=Awesome shoe&description=This shoe is the best on Wish&tags=shoe, awesome, size 11&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$product = $client->getProductById('123456789009876543211234');
$product->name = "Awesome name";
$product->description = "This shoe is the best on Wish";
$product->tags = "shoe, awesome, size 11";
$client->updateProduct($product);
?>
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543211234')
$name = urlencode('Awesome shoe');
$description = urlencode('This shoe is the best on Wish');
$tags = urlencode('shoe, awesome, size 11')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/update?access_token=%s&id=%s&name=%s&description=%s&tags=%s",
    $access_token, $id, $name, $description, $tags);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

Enable a Product

Enable a product and all of its product variations. This marks the product available for sale.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/enable

Explore API

Parameters
idMust provide either id or parent_sku Wish's unique identifier for the product you would like to update
parent_skuMust provide either id or parent_sku The parent sku for the product you would like to update

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you had a product with id 123456789009876543211234 and you wanted to enable it, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/enable -d "id=123456789009876543211234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->enableProductById('123456789009876543211234');
?>
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543211234')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/enable?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

Disable a Product

Disable a product and all of its product variations. This marks the product unavailable for sale.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/disable

Explore API

Explore API

Parameters
idMust provide either id or parent_sku Wish's unique identifier for the product you would like to update
parent_skuMust provide either id or parent_sku The parent sku supplied when product was uploaded

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you had a product with id 123456789009876543211234 and you wanted to disable it, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/disable -d "id=123456789009876543211234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->disableProductById('123456789009876543211234');
?>
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543211234')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/disable?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

List all Products

This API will be changed starting Oct. 24. Please switch to the batch download API to download all Products.

Returns a list of all your products currently on the Wish platform. If you have a high number of products the response will be paginated. The response will contain the URL for fetching the next page of products.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product/multi-get

Explore API

Parameters
startoptional An offset into the list of returned items. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
Starting Oct. 24, 'start' will be limited to a maximum value of 25000
limitoptional A limit on the number of products that can be returned. Limit can range from 1 to 250 items and the default is 50
sinceoptional A date/time string in the format YYYY-MM-DD or YYYY-MM-DDTHH-MM-SS. If a date or time is provided, only products updated since the given date or time will be fetched. Default is to fetch all.
show_rejectedoptional If specified to 'true', this API will return all products including those inappropriate products that were rejected during review.

Returns
Response will contain a list of product objects as well as a 'paging' field with paging options if needed.

Example

Assume your access token is "an_example_access_token" . If you would like to view your products updated after 2014-10-15 in groups of 2 and you would like to see the 10th group your parameters would be:

  • start = 20
  • limit = 2
  • since = 2014-10-15
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/product/multi-get?limit=2&start=20&since=2014-10-15&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$products = $client->getAllProducts();
echo "You have ".count($products)." products!\n";
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('20');
$limit = urlencode('2');
$since = urlencode('2014-10-15');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/multi-get?access_token=%s&limit=%s&start=%s",
    $access_token, $limit, $start, $since);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': [{'Product': {'description': 'Example description',
                       'id': '5284e18fb5baba49d5xxxxxx',
                       'name': 'Cute Ring',
                       'number_saves': '6',
                       'number_sold': '0',
                       'parent_sku': 'Cute Bow Ring',
                       'review_status': 'approved',
                       'tags': [{'Tag': {'id': 'womensring', 'name': 'womens ring'}},
                                {'Tag': {'id': 'jewelry', 'name': 'Jewelry'}},
                                {'Tag': {'id': 'bow', 'name': 'Bow'}}],
                       'variants': [{'Variant': {'color': 'green',
                                                 'enabled': 'True',
                                                 'id': '5284e192b111ba49d5xxxxxx',
                                                 'product_id': '5284e18fb5baba49d5xxxxxx',
                                                 'inventory': '11',
                                                 'msrp': '113.9',
                                                 'price': '110.9',
                                                 'shipping': '10.5',
                                                 'sku': 'AA1'}},
                                    {'Variant': {'color': 'blue',
                                                 'enabled': 'True',
                                                 'id': '5284e19qqqbaba49d5bbbbbb',
                                                 'product_id': '5284e18fb5baba49d5xxxxxx',
                                                 'inventory': '100',
                                                 'msrp': '19.9',
                                                 'price': '15.9',
                                                 'shipping': '10.5',
                                                 'sku': 'ZZ1'}}]}},
           {'Product': {'description': 'Example Description',
                         'id': '5284efafb5bab119d1zzzzzz',
                         'name': 'Fairisle Scarf',
                         'number_saves': '0',
                         'number_sold': '0',
                         'parent_sku': 'Fairisle Scarf',
                         'review_status': 'rejected',
                         'tags': [{'Tag': {'id': 'cottonscarf', 'name': 'cotton scarf'}},
                                  {'Tag': {'id': 'fashionaccessorie', 'name': 'Fashion Accessories'}},
                                  {'Tag': {'id': 'fashion', 'name': 'Fashion'}},
                                  {'Tag': {'id': 'scarf', 'name': 'scarf'}}],
                         'variants': [{'Variant': {'color': 'gray',
                                                   'enabled': 'True',
                                                   'id': '5284efb1b111ba49d1qqqqqq',
                                                   'product_id': '5284efafb5bab119d1zzzzzz',
                                                   'inventory': '1010',
                                                   'msrp': '25.9',
                                                   'price': '21.91',
                                                   'shipping': '10.0',
                                                   'sku': 'AA4'}},
                                       {'Variant': {'color': 'red',
                                                    'enabled': 'True',
                                                    'id': '5284efbaaababa49d1eiwqdf',
                                                    'product_id': '5284efafb5bab119d1zzzzzz',
                                                    'inventory': '1100',
                                                    'msrp': '21.99',
                                                    'price': '21.91',
                                                    'shipping': '11.0',
                                                    'sku': 'AAB'}}]}}],
 'message': '',
 'paging': {'next': 'https://merchant.wish.com/api/v2/product/multi-get?start=22&limit=2&since=2014-10-15&access_token=an_example_access_token',
'previous': 'https://merchant.wish.com/api/v2/product/multi-get?start=18&limit=2&since=2014-10-15&access_token=an_example_access_token'}}

Remove Extra Images from a Product

This removes all the extra images from the product.
The main product image and variation images will not be affected.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/remove-extra-images

Explore API

Parameters
idMust provide either id or parent_sku The unique Wish identifier for this product
parent_skuMust provide either id or parent_sku The parent sku for this product

Example

Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234 and you wanted to remove its extra images, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/remove-extra-images -d "access_token=an_example_access_token" --data-urlencode "id=123456789009876543211234"
<?php

$access_token = urlencode('an_example_access_token');
$id = urlencode('123456789009876543211234');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/remove-extra-images?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->removeExtraImagesById('123456789009876543211234');
?>

Example Response

{
    "message":"",
    "code":0,
    "data":{}
}

Edit Shipping Price of a Product

This edits the shipping prices of a product to a specific country.

The merchant's shipping settings for this country must exist to indicate that the merchant supports this country.

You can set field 'enabled' to false to indicate that the product is disabled for that country. Users from a disabled country will not be able to buy the product. To re-enable a prodcut, set the 'enabled' field to true or set the shipping price without the 'enabled' field.

If you are part of the Wish Express program, you can set the field 'wish_express' to indicate whether the product should be enrolled in Wish Express for this country. You cannot disable Wish Express if the product is promoted. If you make a mistake, you must correct it immediately.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/update-shipping

Explore API

Parameters
idMust provide either id or parent_sku The unique Wish identifier for this product
parent_skuMust provide either id or parent_sku The parent sku for this product
countryRequired The 2 letter country code. See Shippable Countries for a list of supported countries. Choose one from:
AE, AR, AT, AU, BB, BE, BG, BM, BR, BY, CA, CH, CL, CO, CR, CZ, DE, DK, DO, EC, EE, EG, ES, FI, FR, GB, GR, HK, HR, HU, ID, IE, IL, IN, IT, JM, JO, JP, KR, KW, LI, LT, LU, LV, MA, MC, MX, MY, NL, NO, NZ, PE, PH, PK, PL, PR, PT, RO, RU, SA, SE, SG, SI, SK, TH, TR, TW, UA, US, VE, VG, VI, VN, ZA,
priceRequired The shipping price (in USD) of this product to this country, max 1000.
use_product_shipping If this field is set to 'true', this product will use the product variation shipping prices for this country.
enabled Determines if the product is enabled or disabled. Users from a disabled country will not be able to buy the product.
wish_express Determines whether the product is enrolled in the Wish Express program for this country. If yes, the product must be delivered to customers in that country within 5 working days.

Example

Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234 and you wanted to edit its shipping price of Canada to $2.99 USD as well as enable Wish Express to Canada, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token
  • country = CA
  • price = 2.99
  • wish_express = true

Example Request

> curl https://merchant.wish.com/api/v2/product/update-shipping -d "id=123456789009876543211234&country=CA&price=2.99&wish_express=true&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');
$id = urlencode('123456789009876543211234');
$country = urlencode('CA');
$price = urlencode('2.99');
$wish_express = urlencode('true');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/update-shipping?access_token=%s&id=%s&country=%s&price=%s",
    $access_token, $id, $country, $price, $wish_express);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->updateShippingById('123456789009876543211234', 'CA', 2.99);

?>

Example Response

{
    "message":"",
    "code":0,
    "data":{}
}

Edit Shipping Prices of a Product

This edits the shipping prices of a product.

The merchant's shipping settings for this country must exist to indicate that the merchant supports this country.

If you are enrolled in the Wish Express program, you can specify Wish Express countries to enable for the product. To disable Wish Express countries, please use the Merchant Dashboard.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/update-multi-shipping

Explore API

Parameters
idRequired The unique Wish identifier for this product
AE, AR, AT, AU, BB, BE, BG, BM, BR, BY, CA, CH, CL, CO, CR, CZ, DE, DK, DO, EC, EE, EG, ES, FI, FR, GB, GR, HK, HR, HU, ID, IE, IL, IN, IT, JM, JO, JP, KR, KW, LI, LT, LU, LV, MA, MC, MX, MY, NL, NO, NZ, PE, PH, PK, PL, PR, PT, RO, RU, SA, SE, SG, SI, SK, TH, TR, TW, UA, US, VE, VG, VI, VN, ZA, You can set multiple countries at once. Each parameter is a 2 letter country code. Each value is the shipping price (in USD) of this product to the country (max 1000). See Shippable Countries for a list of supported countries.
use_product_shipping_countries A string that consists of country codes separated by comma. For example, 'AU,CA,US'. Each country will use the product variation shipping price.
disabled_countries A string that consists of country codes separated by comma. For example, 'AU,CA,US'. Users in disabled countries cannot see or buy the product.
wish_express_add_countries A string that consists of country codes separated by comma. For example, 'AU,CA,US'. The product must be shipped to a customer in any of those countries within 5 working days. Warning: Wish Express countries cannot be disabled for promoted products. If you make a mistake, you must correct it immediately.
wish_express_remove_countries A string that consists of country codes separated by comma. For example, 'AU,CA,US'.

Example

Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234 and you wanted to edit its shipping price of Canada to $2.99 USD, of Australia to $1.99, of Great Britain and Italy to "Use product variation prices", disable the product Mexico and Brazil, enable Wish Express for the product in France and Spain, and disable Wish Express for the product in the United States and Canada, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token
  • CA = 2.99
  • AU = 1.99
  • use_product_shipping_countries = 'GB,IT'
  • disabled_countries = 'MX,BR'
  • wish_express_add_countries = 'FR,ES'
  • wish_express_remove_countries = 'US,CA'

Example Request

> curl https://merchant.wish.com/api/v2/product/update-multi-shipping -d "id=123456789009876543211234&CA=2.99&AU=1.99&use_product_shipping_countries=GB,IT&disabled_countries=MX,BR&wish_express_add_countries=FR,ES&wish_express_remove_countries=US,CA&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');
$id = urlencode('123456789009876543211234');
$CA = urlencode('2.99');
$AU = urlencode('1.99');
$use_product_shipping_countries = urlencode('GB,IT');
$disabled_countries = urlencode('MX,BR');
$wish_express_add_countries = urlencode('FR,ES');
$wish_express_remove_countries = urlencode('US,CA');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/update-multi-shipping?access_token=%s&id=%s&CA=%s&AU=%s&use_product_shipping_countries=%s&disabled_countries=%s&wish_express_countries=%s",
    $access_token, $id, $CA, $AU, $use_product_shipping_countries, $disabled_countries, $wish_express_countries);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php

?>

Example Response

{
    "message":"",
    "code":0,
    "data":{}
}

Get Shipping Prices of a Product

Retrieve the shipping price of a product to a specific country and a flag indicating if the product is enabled for the country.

If merchant's shipping setting indicates that merchant does not ship to this country, the result will be an error.

If merchant's shipping setting indicates that he/she uses the product variation level shipping prices, the result will be an error.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product/get-shipping

Explore API

Parameters
idMust provide either id or parent_sku The unique Wish identifier for this product
parent_skuMust provide either id or parent_sku The parent sku for this product
countryRequired The 2 letter country code. See Shippable Countries for a list of supported countries. Choose one from:
AE, AR, AT, AU, BB, BE, BG, BM, BR, BY, CA, CH, CL, CO, CR, CZ, DE, DK, DO, EC, EE, EG, ES, FI, FR, GB, GR, HK, HR, HU, ID, IE, IL, IN, IT, JM, JO, JP, KR, KW, LI, LT, LU, LV, MA, MC, MX, MY, NL, NO, NZ, PE, PH, PK, PL, PR, PT, RO, RU, SA, SE, SG, SI, SK, TH, TR, TW, UA, US, VE, VG, VI, VN, ZA,
Response
country_code The 2 letter country code of the shipping price.
id Product ID of the product in question.
use_product_shipping 'True'/'False'. If 'True' then the product shipping price to the country is determined by the product variations. If 'False' then the product shipping price is the fixed value in the field shipping_price.
shipping_price The shipping price of the product to the country. This field could be a number to indicate a shipping price. It could also be the string "Use Product Shipping Price" to indicate that the shipping price to this country is determined by the product variations.
enabled 'True'/'False'. If 'True' then the product is available for sale in this country. If 'False' then the product is not available for sale in this country.
wish_express 'True'/'False'. If 'True' then the product is part of the Wish Express program and must be shipped to customers within the destination country's delivery deadline. View each country's Wish Express delivery deadline here.

Example

Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234 and you wanted to know its shipping price to Canada, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token
  • country = CA

Example Request

> curl https://merchant.wish.com/api/v2/product/get-shipping -d "id=123456789009876543211234&country=CA&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');
$id = urlencode('123456789009876543211234');
$country = urlencode('CA');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/get-shipping?access_token=%s&id=%s&country=%s",
    $access_token, $id, $country);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->getShippingById('123456789009876543211234', 'CA');

?>

Example Response

{
    'code': 0,
    'data': {
        'ProductCountryShipping': {
            'country_code': 'CA',
            'id': '123456789009876543211234',
            'shipping_price': '3.00',
            'use_product_shipping': 'False',
            'enabled': 'True',
            'wish_express': 'False'
        }
    },
    'message': ''
}

Get All Shipping Prices of a Product

Retrieve the shipping prices of a product to all enabled countries.

If merchant's shipping setting indicates that merchant ships worldwide, the result will be an error.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product/get-all-shipping

Explore API

Parameters
idMust provide either id or parent_sku The unique Wish identifier for this product
parent_skuMust provide either id or parent_sku The parent sku for this product
Response

Response will contain a list of 'ProductCountryShipping'.

country_code The 2 letter country code of the shipping price.
id Product ID of the product in question.
use_product_shipping 'True'/'False'. If 'True' then the product shipping price to the country is determined by the product variations. If 'False' then the product shipping price is the fixed value in the field shipping_price.
shipping_price The shipping price of the product to the country. This field could be a number to indicate a shipping price. It could also be the string "Use Product Shipping Price" to indicate that the shipping price to this country is determined by the product variations.
enabled 'True'/'False'. If 'True' then the product is available for sale in this country. If 'False' then the product is not available for sale in this country.
wish_express 'True'/'False'. If 'True' then the product is part of the Wish Express program and must be shipped to customers within the destination country's delivery deadline. View each country's Wish Express delivery deadline here.

Example

Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/get-all-shipping -d "id=123456789009876543211234&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');
$id = urlencode('123456789009876543211234');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/get-shipping?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->getAllShippingById('123456789009876543211234');

?>

Example Response

{'code': 0,
 'data': {'ProductCountryAllShipping': {
   'id': '123456789009876543211234',
   'shipping_prices': [
    {'ProductCountryShipping': {'country_code': 'AU',
      'enabled': 'True',
      'id': '123456789009876543211234',
      'shipping_price': '1.0',
      'use_product_shipping': 'False',
      'wish_express': 'True'}},
    {'ProductCountryShipping': {'country_code': 'CA',
      'enabled': 'True',
      'id': '123456789009876543211234',
      'shipping_price': 'Use Product Shipping Price',
      'use_product_shipping': 'True',
      'wish_express': 'False'}},
    {'ProductCountryShipping': {'country_code': 'GB',
      'enabled': 'True',
      'id': '123456789009876543211234',
      'shipping_price': 'Use Product Shipping Price',
      'use_product_shipping': 'True',
      'wish_express': 'True'}},
    {'ProductCountryShipping': {'country_code': 'US',
      'enabled': 'True',
      'id': '123456789009876543211234',
      'shipping_price': '0.9',
      'use_product_shipping': 'False',
      'wish_express': 'False'}}]}},
 'message': ''}

Get Shipping Prices of Many Products

Retrieve the shipping prices of many products to all enabled countries.

If merchant's shipping setting indicates that merchant ships worldwide, the result will be an error.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product/get-products-shipping

Explore API

Parameters
idsRequired List of product IDs separated by ','. At most 50 product IDs.
Response

Response will contain a list of 'ProductCountryAllShipping'.

country_code The 2 letter country code of the shipping price.
id Product ID of the product in question.
use_product_shipping 'True'/'False'. If 'True' then the product shipping price to the country is determined by the product variations. If 'False' then the product shipping price is the fixed value in the field shipping_price.
shipping_price The shipping price of the product to the country. This field could be a number to indicate a shipping price. It could also be the string "Use Product Shipping Price" to indicate that the shipping price to this country is determined by the product variations.
enabled 'True'/'False'. If 'True' then the product is available for sale in this country. If 'False' then the product is not available for sale in this country.
wish_express 'True'/'False'. If 'True' then the product is part of the Wish Express program and must be shipped to customers within the destination country's delivery deadline. View each country's Wish Express delivery deadline here.

Example

Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234, your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/get-products-shipping -d "ids=123456789009876543211234&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');
$id = urlencode('123456789009876543211234');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/get-shipping?access_token=%s&ids=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->getAllShippingById('123456789009876543211234');

?>

Example Response

{'code': 0,
 'data': [
  {'ProductCountryAllShipping': {'id': '123456789009876543211234',
    'shipping_prices': [
     {'ProductCountryShipping': {'country_code': 'AU',
       'enabled': 'True',
       'id': '123456789009876543211234',
       'shipping_price': '1.0',
       'use_product_shipping': 'False',
       'wish_express': 'True'}},
     {'ProductCountryShipping': {'country_code': 'CA',
       'enabled': 'True',
       'id': '123456789009876543211234',
       'shipping_price': 'Use Product Shipping Price',
       'use_product_shipping': 'True',
       'wish_express': 'True'}},
     {'ProductCountryShipping': {'country_code': 'GB',
       'enabled': 'True',
       'id': '123456789009876543211234',
       'shipping_price': 'Use Product Shipping Price',
       'use_product_shipping': 'True',
       'wish_express': 'False'}},
     {'ProductCountryShipping': {'country_code': 'US',
       'enabled': 'True',
       'id': '123456789009876543211234',
       'shipping_price': '0.9',
       'use_product_shipping': 'False',
       'wish_express': 'True'}}]}},
  {'ProductCountryAllShipping': {'id': '111122223333444455556666',
    'shipping_prices': [
     {'ProductCountryShipping': {'country_code': 'AU',
       'enabled': 'True',
       'id': '111122223333444455556666',
       'shipping_price': '1.0',
       'use_product_shipping': 'False',
       'wish_express': 'False'}},
     {'ProductCountryShipping': {'country_code': 'CA',
       'enabled': 'True',
       'id': '111122223333444455556666',
       'shipping_price': '2.0',
       'use_product_shipping': 'False',
       'wish_express': 'True'}},
     {'ProductCountryShipping': {'country_code': 'GB',
       'enabled': 'True',
       'id': '111122223333444455556666',
       'shipping_price': '3.0',
       'use_product_shipping': 'False',
       'wish_express': 'False'}},
     {'ProductCountryShipping': {'country_code': 'US',
       'enabled': 'True',
       'id': '111122223333444455556666',
       'shipping_price': 'Use Product Shipping Price',
       'use_product_shipping': 'True',
       'wish_express': 'False'}}]}}],
 'message': ''}

Get Merchant Shipping Settings

Retrieve merchant's shipping settings

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product/get-shipping-setting

Explore API

Parameters

No parameters for this API

Response

Response will contain a list of 'CountryShippingSetting'.

country_code The 2 letter country code of the shipping price.
use_product_shipping 'True'/'False'. If 'True' then the product shipping price to the country is determined by the product variations. If 'False' then the product shipping price is the fixed value in the field shipping_price.
shipping_price The shipping price of the product to the country. This field could be a number to indicate a shipping price. It could also be the string "Use Product Shipping Price" to indicate that the shipping price to this country is determined by the product variations.

Example

Assume your access token is "an_example_access_token". your parameters would be:

  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/get-shipping-setting -d "access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/get-shipping-setting?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->getShippingSetting();

?>

Example Response

{'code': 0,
 'data': {'ShippingSetting': {'country_settings': [
    {'CountryShippingSetting': {'country_code': 'AU',
      'shipping_price': '1.00',
      'use_product_shipping': 'False'}},
    {'CountryShippingSetting': {'country_code': 'CA',
      'shipping_price': '2.00',
      'use_product_shipping': 'False'}},
    {'CountryShippingSetting': {'country_code': 'GB',
      'shipping_price': '3.00',
      'use_product_shipping': 'False'}},
    {'CountryShippingSetting': {'country_code': 'US',
      'shipping_price': 'Use Product Shipping Price',
      'use_product_shipping': 'True'}}],
   'ships_worldwide': 'False'}},
 'message': ''}

Start a Batch Product Download

Call this to begin downloading a CSV file of your Products.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/create-download-job

Explore API

Parameters
sinceoptional The download will include Products last updated after this date.
Accepted formats: YYYY-MM-DD, YYYY-MM-DDTHH-MM-SS

To download all of your Products, do not provide the 'since' parameter.
limitoptional A limit on the number of Products that can be returned.
sortoptional The way the Products are sorted. By default, Products are sorted in descending order by last updated date.
Accepted values: asc, desc

Returns
Returns the 'job_id' of your Product download. Check the status of your download via /product/get-download-job-status or cancel your download via /product/cancel-download-job.

Example #1

Assume your access token is "an_example_access_token". Suppose you want to download all of your Products:

Example Request

> curl https://merchant.wish.com/api/v2/product/create-download-job -d "access_token=an_example_access_token"

Example #2

Suppose you want to download a batch of Products with the following constraints:

  • since = 2016-07-01

Example Request

> curl https://merchant.wish.com/api/v2/product/create-download-job -d "since='2016-07-01'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$since = '2016-07-01';
$client->productCreateDownloadJob('098765432112345678901234',$since);
<?php

$access_token = urlencode('an_example_access_token');

$since = urlencode('2016-07-01');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/create-download-job?access_token=%s&since=%s",
    $access_token, $since);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'job_id': "57bb5803ba2a1f181de31b01"},
    'message': ''
}

Get the Status of Your Batch Product Download

Call this to get a progress update for your batch Product download.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/get-download-job-status

Explore API

Parameters
job_id The unique identifier you received from starting your batch Product download ( /product/create-download-job )

Returns
The API returns the current progress of the batch Product download you started with that 'job_id'.

If the CSV file is ready, a 'download_link' will be provided in the response. The link will expire 72 hours after the download becomes ready.

Example

Assume your access token is "an_example_access_token" . Suppose you want to check the progress of your batch Product download with job_id "57bb5803ba2a1f181de31b01":

  • job_id = 57bb5803ba2a1f181de31b01
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/get-download-job-status -d "job_id='57bb5803ba2a1f181de31b01'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$job_id = '57bb5803ba2a1f181de31b01';
$client->productGetDownloadJobStatus('098765432112345678901234',$job_id);
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('57bb5803ba2a1f181de31b01');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/change-shipping?access_token=%s&job_id=%s",
    $access_token, $job_id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {
    "status": "PENDING",
        "created_date": "2016-08-18 02:40:25.238000"
    },
    'message': ''
}

Example Response

{
    'code': 0,
    'data': {
        "status": "FINISHED",
        "total_count": 20553,
        "processed_count": 20553,
        "download_link": "https://merchant.wish.com/static/sweeper-production-merchant-export/52f64e7aab980a038d62d61e-57bce38526778a33b3f8c375-2016-08-16-19:27:01.csv",
        "created_date": "2016-08-18 02:40:25.238000",
        "start_run_time": "2016-08-18 03:12:07.135000",
        "end_run_time": "2016-08-18 02:49:28.798000",
    },
    'message': ''
}

Cancel Your Batch Product Download

Call this to cancel a batch Product download that is pending or running.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product/cancel-download-job

Explore API

Parameters
job_id The unique identifier you received from starting your batch Product download ( /product/create-download-job )

Returns
The API will cancel your download and return a success message if your download is pending or currently running. If your CSV file is already ready or the download has already been cancelled, the API will provide you with an appropriate message accordingly.

Example

Assume your access token is "an_example_access_token" . Suppose you want to cancel your batch Product download with job_id = "57bb5803ba2a1f181de31b01":

  • job_id = 57bb5803ba2a1f181de31b01
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/product/cancel-download-job -d "job_id='57bb5803ba2a1f181de31b01'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$job_id = '57bb5803ba2a1f181de31b01';
$client->productCancelDownloadJob('098765432112345678901234',$job_id);
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('57bb5803ba2a1f181de31b01');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product/change-shipping?access_token=%s&job_id=%s",
    $access_token, $job_id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'message': 'Job cancelled successfully.'},
    'message': ''
}

Example Response

{
    'code': 0,
    'data': {'message': 'Job has already finished.'},
    'message': ''
}

Example Response

{
    'code': 0,
    'data': {'message': 'Job has already been cancelled.'},
    'message': ''
}

Product Variation

The product variation entity represents a SKU that is for sale. It has a price, shipping and possibly a size or color. Each product variation belongs to one product and each product has at least one product variation. A user always buys a product variation, and each SKU in your system will map to one product variation in Wish.



With this API you can create and update product variations. You can also retrieve details about specific product variations or page through all your product variations.

Attributes
idThe Wish Id of the product variation, a string of 24 characters
Product idThe Wish Id of the product this product variation belongs to, a 24 character string
skuThe unique identifier that your system uses to recognize this variant
colorWish's unique color identifier stored for the variant
color_nameThe human readable name of the color shown to customers when purchasing the variant
sizeThe size of the variation
inventoryThe physical quantities you have for this variation, max 500,000
priceThe price of the variation when the user purchases one
shippingThe shipping of the variation when the user purchases one
msrpThe manufacturer suggested retail price of the variation
enabledWhether or not this product variation is enabled for purchase
shipping_timeThe amount of time it takes for the shipment to reach the buyer
all_imagesUrl of all images of the product this product variation belongs to, separated by the character '|'

Create a Product Variation

To add a new variation to a product you can create a product variation. For example, a product has sizes Large and Extra-Large and you wanted to add size Medium, you would create a new product variation with this API.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/variant/add

Explore API

Parameters
parent_skuThe parent_sku of the product this new product variation should be added to. If the product is missing a parent_sku, then this should be the SKU of a product variation of the product
skuThe unique identifier that your system uses to recognize this variation
coloroptional The color of the variation. Example: red, blue, green. Note: color and size cannot both be empty.
sizeoptional The size of the variation. Example: Large, Medium, Small, 5, 6, 7.5 Note: color and size cannot both be empty.
inventoryThe physical quantities you have for this variation, max 500,000
priceThe price of the variation when the user purchases one, max 100,000
shippingThe shipping of the variation when the user purchases one, max 1000
msrpoptional Manufacturer's Suggested Retail Price. This field is recommended as it will show as a strikethrough price on Wish and appears above the selling price for the product.
shipping_timeoptional The amount of time it takes for the shipment to reach the buyer. Please also factor in the time it will take to fulfill and ship the item. Provide a time range in number of days. Lower bound cannot be less than 2 days. Upper bound must be at least 5 days after the lower bound. Example: 15-20
main_imageoptional URL of a photo for this product variation. Provide this when you have different pictures for different product variation of the product. If left out, it'll use the main_image of the product with the provided parent_sku. Link directly to the image, not the page where it is located. We accept JPEG, PNG or GIF format. Images should be at least 100 x 100 pixels in size.

Returns
If the request was successful and a Variant was added to the supplied Product, then the response will contain the variant created along with its Wish identifier.

Example

Assume your access token is "an_example_access_token" . If you have a product with a parent sku red-shoe and you would like to add a variant for the size 12, with sku red-shoe-12, your parameters would be:

  • parent_sku = red-shoe
  • sku = red-shoe-12
  • inventory = 10
  • price = 10
  • shipping = 3
  • access_token = an_example_access_token
  • size = 12

Example Request

> curl https://merchant.wish.com/api/v2/variant/add -d "parent_sku=red-shoe&sku=red-shoe-12&inventory=10&price=10&size=12&shipping=3&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$product_var = array(
    'parent_sku'=>'red-shoe',
    'color'=>'red',
    'sku'=>'red-shoe-12',
    'inventory'=>10,
    'price'=>10,
    'shipping'=>3,
    'size'=>12
    );
$var = $client->createProductVariaiton($product_var);
print_r($var);
<?php

$access_token = urlencode('an_example_access_token');

$parent_sku = urlencode('red-shoe');
$sku = urlencode('red-shoe-12');
$inventory = urlencode('10');
$price = urlencode('10');
$shipping = urlencode('3');
$size = urlencode('12');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/add?access_token=%s&sku=%s&inventory=%s&price=%s&size=%s&shipping=%s&parent_sku=%s",
    $access_token, $sku, $inventory, $price, $size, $shipping, $parent_sku);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': {'Variant': {'enabled': 'True',
                      'id': '529e6c2cf94aaa0cfe02846f',
                      'inventory': '10',
                      'price': '10',
                      'shipping': '3',
                      'size': '12',
                      'sku': 'red-shoe-12'}},
 'msg' : '',
}

Retrieve a Product Variation

Retrieves the details of an existing product variation. Provide the SKU of the product variation and Wish will return details about the corresponding product variation.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/variant

Explore API

Parameters
skuThe unique identifier of the item in your system.

Returns
For successful requests the response will contain a Variant object in the requested format.
Notice: If normal shipping is not set for the variant, shipping column will be null in JSON, and left blank in XML.

Example

Assume your access token is "an_example_access_token" . If your store has an item with sku "red-shoe-8" and you would like to know its state on with your request's parameters would be:

  • sku = red-shoe-8
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/variant?sku=red-shoe-8&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');

$var = $client->getProductVariationBySKU('red-shoe-8');
print_r($var);
<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('red-shoe-8');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant?access_token=%s&sku=%s",
    $access_token, $sku);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': {'Variant': {'enabled': 'True',
                      'id': '51e0a2c61111a236cfffe3a2',
                      'product_id' : '51e0a2c61111axxxcfffeyyy',
                      'inventory': '10100',
                      'msrp': '21100.0',
                      'price': '100.0',
                      'shipping': '10.0',
                      'sku': 'red-shoe-8'}},
 'message': ''}

Update a Product Variation

Updates the specified variation by updating the attributes of the parameters passed in the request. Any attribute not provided will be left unchanged.

This request can only update attributes specific to variations and cannot be used to update any attribute of a Product.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/variant/update

Explore API

Parameters
skuThe unique identifier for the variation you would like to update
inventoryoptional The physical quantities you have for this variation, max 500,000
priceoptional The price of the variation when the user purchases one, max 100,000
shippingoptional The shipping of the variation when the user purchases one, max 1000
enabledoptional True if the variation is for sale, False if you need to halt sales.
sizeoptional The size of the variation. Example: Large, Medium, Small, 5, 6, 7.5
coloroptional The color of the variation. Example: red, blue, green
msrpoptional Manufacturer's Suggested Retail Price.
shipping_timeoptional The amount of time it takes for the shipment to reach the buyer. Please also factor in the time it will take to fulfill and ship the item. Provide a time range in number of days. Lower bound cannot be less than 2 days. Upper bound must be at least 5 days after the lower bound. Example: 5-10
main_imageoptional URL of a photo for this variant. Provide this when you have different pictures for different variant of the product. If left out, it'll use the main_image of the product with the provided parent_sku. Link directly to the image, not the page where it is located. We accept JPEG, PNG or GIF format. Images should be at least 100 x 100 pixels in size.

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you have an item with the SKU 'blue-shoe-11' and it has the wrong size and you need to update its price, shipping and inventory your parameters would be:

  • sku = blue-shoe-11
  • price = 10.11
  • shipping = 10.00
  • inventory = 1000
  • access_token = an_example_access_token

Lets say you didn't need to update price, then you would omit this parameter from your request.

Example Request

> curl https://merchant.wish.com/api/v2/variant/update -d "sku=blue-shoe-11&price=10.11&inventory=1000&shipping=10.00&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');

$var = $client->getProductVariationBySKU('blue-shoe-11');
$var->price = 10.11;
$var->shipping = 10;
$var->inventory = 1000;
$client->updateProductVariation($var);
<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('blue-shoe-11');
$inventory = urlencode('1000');
$price = urlencode('10.11');
$shipping = urlencode('10.00');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/update?access_token=%s&sku=%s&inventory=%s&price=%s&shipping=%s",
    $access_token, $sku, $inventory, $price, $shipping);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

Change a Product Variation's SKU

Change a variantion's unique identifier, the new identifier must also be unique within all SKUs of the merchant

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/variant/change-sku

Explore API

Parameters
skuThe unique identifier for the variation you would like to change
new_skuThe new unique identifier for the variation you would like to change to

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you have an item with the SKU 'blue-shoe-11' and you would like to change it to 'blue-shoe-12' your parameters would be:

  • sku = blue-shoe-11
  • new_sku = blue-shoe-12
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/variant/change-sku -d "sku=blue-shoe-11&new_sku=blue-shoe-12&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->changeProductVariationSKU('blue-shoe-11', 'blue-shoe-12');
<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('blue-shoe-11');
$new_sku = urlencode('blue-shoe-12');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/update?access_token=%s&sku=%s&new_sku=%s",
    $access_token, $sku, $new_sku);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

Enable a Product Variation

Enable a product variation. This marks the product variation available for sale.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/variant/enable

Explore API

Parameters
skuThe unique identifier for the item you would like to update

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you have an item with the SKU 'blue-shoe-11' and you want to enable it, your parameters would be:

  • sku = blue-shoe-11
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/variant/enable -d "sku=blue-shoe-11&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->enableProductVariationBySKU('blue-shoe-11');
<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('blue-shoe-11');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/enable?access_token=%s&sku=%s",
    $access_token, $sku);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

Disable a Product Variation

Disable a product variation. This marks the product variation unavailable for sale.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/variant/disable

Explore API

Parameters
skuThe unique identifier for the item you would like to update

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you have an item with the SKU 'blue-shoe-11' and you want to disable it, your parameters would be:

  • sku = blue-shoe-11
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/variant/disable -d "sku=blue-shoe-11&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->disableProductVariationBySKU('blue-shoe-11');
<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('blue-shoe-11');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/disable?access_token=%s&sku=%s",
    $access_token, $sku);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

Update Inventory

Update inventory for a product variation.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/variant/update-inventory

Explore API

Parameters
skuThe unique identifier for the item you would like to update
inventoryThe physical number of items you have, max 500,000

Returns
If the request was successful the API will return an HTTP status code of 200 and a status code of 0.

Example

Assume your access token is "an_example_access_token" . If you have an item with the SKU 'blue-shoe-11' and you want to update the inventory to 100, your parameters would be:

  • sku = blue-shoe-11
  • access_token = an_example_access_token
  • inventory = 100

Example Request

> curl https://merchant.wish.com/api/v2/variant/update-inventory -d "sku=blue-shoe-11&inventory=100&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->updateProductInventoryBySKU('blue-shoe-11',100);
<?php

$access_token = urlencode('an_example_access_token');

$sku = urlencode('blue-shoe-11');
$inventory = urlencode('100');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/update-inventory?access_token=%s&sku=%s&inventory=%s",
    $access_token, $sku, $inventory);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {},
    'message': ''
}

List all Product Variations

Returns a list of all your product variations currently on the Wish platform. This API is useful to paginate through all the SKUs that you have uploaded to Wish. If the number of results is too large the full result set may require pagination.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/variant/multi-get

Explore API

Parameters
startoptional An offset into the list of returned items. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
limitA limit on the number of products that can be returned. Limit can range from 1 to 500 items and the default is 50

Returns
For successful requests the response data will contain a list of product variation objects. If the response requires pagination the 'paging' field will contain the URL for the next page of results.

Example

Assume your access token is "an_example_access_token" . If you would like to fetch information about all your items in groups of 2 and you would like to see the 10th group:

  • start = 20
  • limit = 2
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/variant/multi-get?limit=2&start=20&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$variations = $client->getAllProductVariations();
echo "You have ".count($variations)." product variations!\n";
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('20');
$limit = urlencode('2');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/multi-get?access_token=%s&start=%s&limit=%s",
    $access_token, $start, $limit);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

Example Response
{'code': 0,
 'data': [{'Variant': {'enabled': 'True',
                       'id': '5215451b31111f73ff2xxxxxx',
                       'product_id' : '51e0a2c61111axxxcfffeyyy',
                       'inventory': '1314',
                       'msrp': '150.0',
                       'price': '100.0',
                       'shipping': '21.0',
                       'sku': 'MMM'}},
           {'Variant': {'color': 'blue',
                        'enabled': 'True',
                        'id': '5214c1111c238837cdiiiiii',
                        'product_id' : '51e0a2c61111axxxcfffeyyy',
                        'inventory': '917',
                        'msrp': '100.0',
                        'price': '50.0',
                        'shipping': '9.81',
                        'sku': 'DD1111'}}],
 'message': '',
 'paging': {'next': 'https://merchant.wish.com/api/v2/variant/multi-get?start=22&limit=2&access_token=an_example_access_token',
'previous': 'https://merchant.wish.com/api/v2/variant/multi-get?start=18&limit=2&access_token=an_example_access_token'}}

Order

For every item that a user purchases from your store there is a corresponding Order. Each order corresponds with one SKU. The order object provides you with the destination, item and any other required information to fulfill a user's order.



With this API you can fetch order that require fulfillment and orders that have been updated since a given period. This API also allows you to fulfill one order at a time by providing tracking information for an order.

Order State

Orders can be in several different states depending on what has happened. State 'APPROVED' means that the order is ready to ship. State 'SHIPPED' means that the order has been marked as shipped by you. State 'REFUNDED' means that the order has been refunded to the user and should not be fulfilled. State 'REQUIRE_REVIEW' means that the order is under review for fraudulent activity and should not be fulfilled.

Other Attributes
order_idWish's unique identifier for the order
transaction_idOrders can be grouped under unique identifiers if the user makes several purchases at once
product_idWish's unique identifier for the Product being ordered
variant_idWish's unique identifier for the Product Variation that was ordered
buyer_idWish's unique identifier for the buyer of the order
quantityThe number of units that the user has purchased
skuThe unique identifier of the item in your system
sizeThe size of the item that was ordered (if applicable)
colorThe color of the item that was ordered (if applicable)
stateThe state of the order. This value can be: APPROVED, SHIPPED, REFUNDED, REQUIRE_REVIEW
shipping_providerThis is the courier that has been used to ship the package
tracking_numberThis is the number a user can use to track their package with your carrier
shipped_dateThe date the the order was marked as shipped
ship_noteA note to yourself when you marked the order as shipped (if applicable)
last_updated (UTC)The date and time of the last update to the order (for example, the last change in state)
order_totalThe total value of the order
days_to_fulfillNumber of days left to fulfill this order. If the order is not fulfilled in time it will be automatically refunded.
hours_to_fulfillNumber of hours left to fulfill this order. If the order is not fulfilled in time it will be automatically refunded.
expected_ship_dateDate and time (in UTC) the order must be fulfilled by. If the order is not fulfilled by this date it will be automatically refunded. The date and time are in the UTC timezone.
priceThe price of the item when the user purchases one
costThe amount of money that Wish pays you for the product (per unit)
shippingThe amount of money user pays for shipping for the product(per unit)
shipping_costThe amount of money that Wish pays you for shipping the product (per unit)
product_nameThe name of the product
product_image_urlThe image of the product
order_time (UTC)The date and time of when the order was placed
shipping_detailsContainer for all the details about how to ship the order to its destination
refunded_byA description of who refunded the order
refunded_time (UTC)The time when the order was refunded
refunded_reasonThe reason the order was refunded
is_wish_expressTrue if the order is a Wish Express order
we_required_delivery_dateThe date that an order must be received by a customer (only valid for Wish Express orders)
tracking_confirmedWhether tracking is confirmed or not
tracking_confirmed_dateThe date that tracking was confirmed
Shipping Detail Attributes
nameThe name of the person who this order is being shipped to
street_address1The street address the order is to be shipped to
street_address2Extra street address information about the package's destination
cityThe city name of where the order should be delivered
stateThe state/region where the order should be delivered
countryThe country where the order should be delivered
zipcodeThe zipcode/postal code of the address where the order is to be delivered
phone_numberThe phone number for the carrier to call in the case of missed deliveries

Retrieve an Order

Retrieves the details of an existing order. Supply the unique identifier for the order and if one exists this API will return the corresponding order. Each order will have all the information you need to fulfill it

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/order

Explore API

Parameters
idWish's unique identifier for the order (order_id in the Order object)

Returns
If there exists an order with the id provided for your account then the API returns a full order object in the response

Example

Assume your access token is "an_example_access_token" . If you have an order with order_id "123456789009876543210164" and you would like to retrieve any updates to it:

  • id = 123456789009876543210164
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/order?id=123456789009876543210164&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$order = $client->getOrderById('123456789009876543210164');
print_r($order);
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543210164');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': {'Order': {'ShippingDetail': {'city': 'North Bay',
                                       'country': 'US',
                                       'name': 'Mick Berry,
                                       'phone_number': '+1 555-181-7247',
                                       'state': 'NC',
                                       'street_address1': '2126 PO Box 5 Rt 49',
                                       'zipcode': '13123'},
                      'last_updated': '2013-12-06T20:20:20',
                      'order_time': '2013-12-06T20:20:20',
                      'order_id': '123456789009876543210164',
                      'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      'buyer_id': '1234fad43deaf71536cb2c74',
                      'quantity': '2',
                      'price':'8',
                      'cost':'6.8',
                      'shipping':'2.35',
                      'shipping_cost':'2',
                      'product_name':'Dandelion Necklace',
                      'product_image_url':'http://d1zog42tnv26ho.cloudfront.net/4fea11fac43bf532f4001419-normal.jpg',
                      'days_to_fulfill': '2',
                      'hours_to_fulfill': '49',
                      'sku': 'Dandelion Necklace',
                      'state': 'APPROVED',
                      'transaction_id': '11114026a99e980d4e500269',
                      'tracking_confirmed': 'True',
                      'tracking_confirmed_date: '2013-12-13T05:07:12'
                      'variant_id': '1111fad63deaf71536cb2c76'}},
 'message': ''}

Retrieve Recently Changed Orders

This API will be changed starting Oct. 24. Please switch to the batch download API to download all Orders.

Returns all orders that have changed state since the date and time requested. Use this API to keep your orders processing system in sync with Wish. This API takes a parameter 'since' and returns all orders that were updated since this time.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/order/multi-get

Explore API

Parameters
startoptional An offset into the list of returned items. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
Starting Oct. 24, 'start' will be limited to a maximum value of 25000
limitoptional A limit on the number of products that can be returned. Limit can range from 1 to 500 items and the default is 50
sinceoptional Collect all the orders that have been updated since the time value passed into this parameter (UTC). Fetches from beginning of time if not specified. We accept 2 formats, one with precision down to day and one with precision down to seconds. Example: Jan 20th, 2014 is 2014-01-20, Jan 20th, 2014 20:10:20 is 2014-01-20T20:10:20.
wish_express_onlyoptional If set to True, the API will only return Wish Express orders

Returns
This API returns all the orders that have been updated since the datetime from the 'since' parameter (UTC) ordered by order time starting with the offset 'start' up to the parameter 'limit.' For example, if there are 1000 orders since May 1, 2013 and start is 100, while limit is 50, this API will return the 100th order to the 149th order.

Example

Assume your access token is "an_example_access_token" . If you use this API to sync Wish orders into your order tracking software and you need all the orders that have changed since Jan 20, 2014 and you would like them in pages of 100 and you need the second page:

  • start = 200
  • limit = 100
  • since = 2014-01-20
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/order/multi-get?start=200&limit=100&since=2014-01-20&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$orders = $client->getAllChangedOrdersSince('2010-01-20');
echo "You have ".count($orders)." changed orders since 2010-01-20\n";
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('200');
$limit = urlencode('100');
$since = urlencode('2014-01-20');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/multi-get?access_token=%s&start=%s&limit=%s&since=%s",
    $access_token, $start, $limit, $since);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': [{'Order': {'ShippingDetail': {'city': 'New York City',
                                        'country': 'US',
                                        'name': 'Guadalupe Smith,
                                        'phone_number': '5554191609',
                                        'state': 'California',
                                        'street_address1': '3317 w 51st Street',
                                        'zipcode': '60632'},
                      'last_updated': '2014-01-20T20:20:20',
                      'order_time': '2014-01-20T20:20:20',
                      'order_id': '123456789009876543210164',
                      'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      'buyer_id': '1234fad43deaf71536cb2c74',
                      'quantity': '2',
                      'price':'8',
                      'cost':u’6.8',
                      'shipping':'2.35',
                      'shipping_cost':'2',
                      'product_name':'Dandelion Necklace',
                      'product_image_url':'http://d1zog42tnv26ho.cloudfront.net/4fea11fac43bf532f4001419-normal.jpg',
                      'days_to_fulfill': '2',
                      'hours_to_fulfill': '49',
                      'sku': 'Dandelion Necklace',
                      'state': 'APPROVED',
                      'transaction_id': '11114026a99e980d4e500269',
                      'variant_id': '1111fad63deaf71536cb2c76'}},
           {'Order': {'ShippingDetail': {'city': 'Lake City',
                                         'country': 'US',
                                         'name': 'Marko Schroeder',
                                         'phone_number': '+1 555-399-7785',
                                         'state': 'NY',
                                         'street_address1': '20685 W Verona Ave',
                                         'zipcode': '60046'},
                       'last_updated': '2014-01-20T20:20:20',
                       'order_time': '2014-01-20T20:20:20',
                       'order_id': '1114a7cfb2ec2d42d272b627',
                       'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      'buyer_id': '1234fad43deaf71536cb2c74',
                      'quantity': '2',
                      'price':'8',
                      'cost':'6.8',
                      'shipping':'2.35',
                      'shipping_cost':'2',
                      'product_name':'Dandelion Necklace',
                      'product_image_url':'http://d1zog42tnv26ho.cloudfront.net/4fea11fac43bf532f4001419-normal.jpg',
                      'days_to_fulfill': '2',
                      'hours_to_fulfill': '2',
                      'sku': 'Dandelion Necklace',
                      'state': 'APPROVED',
                      'transaction_id': '11114026a99e980d4e500269',
                      'tracking_confirmed': 'True',
                      'tracking_confirmed_date: '2013-12-13T05:07:12'
                      'variant_id': '1111fad63deaf71536cb2c76'}}],
 'message': '',
 'paging': {'next': 'https://merchant.wish.com/api/v2/order/multi-get??start=300&limit=100&since=2014-01-20&access_token=an_example_access_token',
'previous': 'https://merchant.wish.com/api/v2/order/multi-get?start=100&limit=100&since=2014-01-20&access_token=an_example_access_token'}}

Retrieve Unfulfilled Orders

Returns all orders that currently require fulfillment. This API takes no parameters but may require pagination if the number of orders is too large.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/order/get-fulfill

Explore API

Parameters
startoptional An offset into the list of returned items. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
limitoptional A limit on the number of products that can be returned. Limit can range from 1 to 500 items and the default is 50
sinceoptional Collect all the orders that have been updated since the time value passed into this parameter (UTC). Fetches from beginning of time if not specified. We accept 2 formats, one with precision down to day and one with precision down to seconds. Example: Jan 20th, 2014 is 2014-01-20, Jan 20th, 2014 20:10:20 is 2014-01-20T20:10:20.
wish_express_onlyoptional If set to True, the API will return only unfulfilled Wish Express orders

Returns
Returns a list of all order that currently require fulfillment that's updated since 'since' (UTC). If the list of orders is longer than 'limit' the results will require pagination.

Example

Assume your access token is "an_example_access_token" . If you want to get all the orders which still require fulfillment in pages of 100:

  • start = 0
  • limit = 100
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/order/get-fulfill?start=0&limit=100&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$orders = $client->getAllUnfulfilledOrdersSince('2010-01-20');
echo "You have ".count($orders)." unfulfilled orders since 2010-01-20";
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('0');
$limit = urlencode('100');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/get-fulfill?access_token=%s&start=%s&limit=%s",
    $access_token, $start, $limit);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{'code': 0,
 'data': [{'Order': {'ShippingDetail': {'city': 'New York City',
                                        'country': 'US',
                                        'name': 'Guadalupe Smith',
                                        'phone_number': '5554191609',
                                        'state': 'California',
                                        'street_address1': '3317 w 51st Street',
                                        'zipcode': '60632'},
                      'last_updated': '2014-01-20T20:20:20',
                      'order_time': '2014-01-20T20:20:20',
                      'order_id': '123456789009876543210164',
                      'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      'buyer_id': '1234fad43deaf71536cb2c74',
                      'quantity': '2',
                      'price':'8',
                      'cost':u’6.8',
                      'shipping':'2.35',
                      'shipping_cost':'2',
                      'product_name':'Dandelion Necklace',
                      'product_image_url':'http://d1zog42tnv26ho.cloudfront.net/4fea11fac43bf532f4001419-normal.jpg',
                      'days_to_fulfill': '2',
                      'hours_to_fulfill': '49',
                      'sku': 'Dandelion Necklace',
                      'state': 'APPROVED',
                      'transaction_id': '11114026a99e980d4e500269',
                      'variant_id': '1111fad63deaf71536cb2c76'}},
           {'Order': {'ShippingDetail': {'city': 'Lake City',
                                         'country': 'US',
                                         'name': 'Marko Schroeder',
                                         'phone_number': '+1 555-399-7785',
                                         'state': 'NY',
                                         'street_address1': '20685 W Verona Ave',
                                         'zipcode': '60046'},
                       'last_updated': '2014-01-20T20:20:20',
                       'order_time': '2014-01-20T20:20:20',
                       'order_id': '1114a7cfb2ec2d42d272b627',
                       'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      'buyer_id': '1234fad43deaf71536cb2c74',
                      'quantity': '2',
                      'price':'8',
                      'cost':'6.8',
                      'shipping':'2.35',
                      'shipping_cost':'2',
                      'product_name':'Dandelion Necklace',
                      'product_image_url':'http://d1zog42tnv26ho.cloudfront.net/4fea11fac43bf532f4001419-normal.jpg',
                      'days_to_fulfill': '2',
                      'hours_to_fulfill': '49',
                      'sku': 'Dandelion Necklace',
                      'state': 'APPROVED',
                      'transaction_id': '11114026a99e980d4e500269',
                      'variant_id': '1111fad63deaf71536cb2c76'}}],
 'message': '',
 'paging': {'next': 'https://merchant.wish.com/api/v2/order/get-fulfill?start=100&limit=100&access_token=an_example_access_token'}}

Fulfill an Order

Fulfills an order in the Wish system. Call this API once you have shipped the item to the recipient. Wish will notify the user their order has been shipped upon completion of this request.

Orders affected by the Confirmed Delivery Policy must be shipped with one of our qualified carriers that provides last mile tracking. Click here to view the qualified shipping carriers list.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/fulfill-one

Explore API

Parameters
idWish's unique identifier for the order, or 'order_id' in the Order object
tracking_providerThe carrier that will be shipping your package to its destination
tracking_numberoptional The unique identifier that your carrier provided so that the user can track their package as it is being delivered. Tracking number should only contain alphanumeric characters with no space between them.
ship_noteoptional A note to yourself when you marked the order as shipped

Returns
If the order is in the 'APPROVED' state, the order is not already fulfilled and all the parameters are correct, the API will mark the order as shipped and return a HTTP status code of 200.

Example

Assume your access token is "an_example_access_token" . Use this if you have shipped an order to a user and would like to mark it shipped on Wish. If the order's order_id is "098765432112345678901234",the tracking number is "12345679" and the provider is USPS:

  • id = 098765432112345678901234
  • tracking_provider = USPS
  • tracking_number = 12345678
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/fulfill-one -d "tracking_provider=USPS&tracking_number=12345679&id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;
use Wish\Model\WishTracker;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$tracker = new WishTracker('USPS','12345678','some message');
$client->fulfillOrderById('098765432112345678901234',$tracker);
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');
$tracking_provider = urlencode('usps');
$tracking_number = urlencode('12345678');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/fulfill-one?access_token=%s&tracking_provider=%s&tracking_number=%s&id=%s",
    $access_token, $tracking_provider, $tracking_number, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': 'Your order is been processed right now!'
}

Refund/Cancel an Order

Refund/Cancel an order in the Wish system. Call this API if you cannot fulfill the order for any reason. Wish will notify the user their order has been cancelled shipped and refund them upon completion of this request.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/refund

Explore API

Parameters
idWish's unique identifier for the order, or 'order_id' in the Order object
reason_codeAn integer representing the reason for the refund. Check the table between for accepted reason codes
reason_noteoptional A note to the user explaining reason for the refund. This field is required if reason_code is -1(Other)
Refund Reason Codes -- All Orders
-1Other
18Placed order by mistake
20Shipping taking too long
22Item does not fit
23Received the wrong item
24Item is counterfeit
25Item is damaged
26Item does not work as described
27Item does not match listing
30Item delivered to wrong address
31Customer provided the wrong address
32Item was returned to sender
33Incomplete Order
34Store is unable to fulfill order
35Item marked delivered but user did not receive it
38Replacement item shipment beyond latest delivery date
1001Received the wrong color
1002Item is of poor quality
1004Product listing is missing information
1005Item did not meet expectations
1006Package was empty
Refund Reason Codes -- Unfulfilled Orders Only
1Store is unable to fulfill order

Returns
If the order is not already refunded and all the parameters are correct, the API will mark the order as refunded and return a HTTP status code of 200.

Example

Assume your access token is "an_example_access_token" . If you want to refund the order with order_id "098765432112345678901234" because you are out of inventory.

  • id = 098765432112345678901234
  • reason_code = 18
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/refund -d "reason_code=18&id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;
use Wish\Model\WishReason;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->refundOrderById('098765432112345678901234',WishReason::NO_MORE_INVENTORY);
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');
$reason_code = urlencode('18');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/refund?access_token=%s&reason_code=%s&id=%s",
    $access_token, $reason_code, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Modify Tracking of a Shipped Order

Update tracking information about an order. Call this to change the tracking number or provider for an order that has already been marked shipped.

Orders affected by the Confirmed Delivery Policy must be shipped with one of our qualified carriers that provides last mile tracking. Click here to view the qualified shipping carriers list.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/modify-tracking

Explore API

Parameters
idWish's unique identifier for the order, or 'order_id' in the Order object
tracking_providerThe carrier that will be shipping your package to its destination
tracking_numberoptional The unique identifier that your carrier provided so that the user can track their package as it is being delivered. Tracking number should only contain alphanumeric characters with no space between them.
ship_noteoptional A note to yourself when you marked the order as shipped

Returns
If the order is in the SHIPPED state, and all the parameters are correct, the API will update the tracking information of that order and return a HTTP status code of 200.

Example

Assume your access token is "an_example_access_token" . Suppose you want to update the order with order_id "098765432112345678901234" to have tracking_provider of 'USPS' and tracking number of "12345678":

  • id = 098765432112345678901234
  • tracking_provider = USPS
  • tracking_number = 12345678
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/modify-tracking -d "tracking_provider=USPS&tracking_number=12345678&id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;
use Wish\Model\WishTracker;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$tracker = new WishTracker('USPS','12345678','some message');
$client->changeShippingById('098765432112345678901234',$tracker);
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');
$tracking_provider = urlencode('usps');
$tracking_number = urlencode('12345678');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/modify-tracking?access_token=%s
    &tracking_provider=%s&tracking_number=%s&id=%s",
    $access_token, $tracking_provider, $tracking_number, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Modify Shipping Address of an Order Before Shipping

Change shipping information for an order. Call this to change the shipping address for an order that has not been marked shipped.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/change-shipping

Explore API

Parameters
idWish's unique identifier for the order, or 'order_id' in the Order object
street_address1 The first line of the customer's street adress
street_address2optional The second line of the customer's street address
cityThe city of the customer's new shipping address
stateoptional The state of the shipping address, e.g. CA, LA, NY and etc...
zipcodeThe zipcode or equivalent for country of the shipping address
phone_numberoptional The phone number of the customer, if given

Returns
If the order is can be shipped, and all the parameters are correct, the API will update the shipping address for that order and return a HTTP status code of 200.

Example

Assume your access token is "an_example_access_token" . Suppose you want to update the order with order_id "098765432112345678901234" to have a new, customer provided shipping address:

  • id = 098765432112345678901234
  • street_address1 = 123 Fake St
  • city = Montreal
  • state = CA
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/change-shipping -d "street_address1='123 Fake St'&city=Montreal&state=CA&id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;
use Wish\Model\WishAddress;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$address = new WishAddress('123 Fake St', null,'Montreal','CA', '123456', 'US', '450-012-3456');
$client->updateShippingAddressInfoById('098765432112345678901234',$address);
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');
$street_address1 = urlencode('123 Fake St');
$city = urlencode('Montreal');
$state = urlencode('US');
$country = urlencode('CA');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/change-shipping?access_token=%s
    &street_address1=%s&city=%s&state=%s&country=%s&id=%s",
    $access_token, $street_address1, $city, $state, $country);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Start a Batch Order Download

Call this to begin downloading a CSV file of your Orders.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/create-download-job

Explore API

Parameters
startoptional The download will include Orders which were last updated starting from this date. The 'start' parameter must be accompanied by an 'end' parameter.
Accepted formats: YYYY-MM-DD, YYYY-MM-DDTHH-MM-SS

To download all of your Orders, do not provide the 'start' and 'end' parameters.
endoptional The download will include Orders which were last updated up until this date. The 'end' parameter must be accompanied by a 'start' parameter.
Accepted formats: YYYY-MM-DD, YYYY-MM-DDTHH-MM-SS

To download all of your Orders, do not provide the 'start' and 'end' parameters.
limitoptional A limit on the number of orders that can be returned.
sortoptional The way the orders are sorted. By default, Orders are sorted in descending order by last update date.
Accepted values: asc, desc

Returns
Returns the 'job_id' of your Order download. Check the status of your download via /order/get-download-job-status or cancel your download via /order/cancel-download-job.

Example #1

Assume your access token is "an_example_access_token". Suppose you want to download all of your Orders:

Example Request

> curl https://merchant.wish.com/api/v2/order/create-download-job -d "access_token=an_example_access_token"

Example #2

Suppose you want to download a batch of Orders with the following constraints:

  • start = 2016-07-01
  • end = 2016-07-25

Example Request

> curl https://merchant.wish.com/api/v2/order/create-download-job -d "start='2016-07-01'&end='2016-07-25'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$start = '2016-07-01';
$end = '2016-07-25';
$client->orderCreateDownloadJob('098765432112345678901234',$start,$end);
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('2016-07-01');
$end = urlencode('2016-07-25');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/create-download-job?access_token=%s
    &start=%s&end=%s",
    $access_token, $start, $end);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'job_id': "57bb5803ba2a1f181de31b01"},
    'message': ''
}

Get the Status of Your Batch Order Download

Call this to get a progress update for your batch Order download.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/get-download-job-status

Explore API

Parameters
job_id The unique identifier you received from starting your batch Order download ( /order/create-download-job )

Returns
The API returns the current progress of the batch Order download you started with that 'job_id'.

If the CSV file is ready, a 'download_link' will be provided in the response. The link will expire 72 hours after the download becomes ready.

Example

Assume your access token is "an_example_access_token" . Suppose you want to check the progress of your batch Order download with job_id "57bb5803ba2a1f181de31b01":

  • job_id = 57bb5803ba2a1f181de31b01
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/get-download-job-status -d "job_id='57bb5803ba2a1f181de31b01'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$job_id = '57bb5803ba2a1f181de31b01';
$client->orderGetDownloadJobStatus('098765432112345678901234',$job_id);
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('57bb5803ba2a1f181de31b01');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/change-shipping?access_token=%s&job_id=%s",
    $access_token, $job_id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {
    "status": "PENDING",
        "created_date": "2016-08-18 02:40:25.238000"
    },
    'message': ''
}

Example Response

{
    'code': 0,
    'data': {
        "status": "FINISHED",
        "total_count": 20553,
        "processed_count": 20553,
        "download_link": "https://merchant.wish.com/static/sweeper-production-merchant-export/52f64e7aab980a038d62d61e-57bce38526778a33b3f8c375-2016-08-16-19:27:01.csv",
        "created_date": "2016-08-18 02:40:25.238000",
        "start_run_time": "2016-08-18 03:12:07.135000",
        "end_run_time": "2016-08-18 02:49:28.798000",
    },
    'message': ''
}

Cancel Your Batch Order Download

Call this to cancel a batch Order download that is pending or running.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/cancel-download-job

Explore API

Parameters
job_id The unique identifier you received from starting your batch Order download ( /order/create-download-job )

Returns
The API will cancel your download and return a success message if your download is pending or currently running. If your CSV file is already ready or the download has already been cancelled, the API will provide you with an appropriate message accordingly.

Example

Assume your access token is "an_example_access_token" . Suppose you want to cancel your batch Order download with job_id = "57bb5803ba2a1f181de31b01":

  • job_id = 57bb5803ba2a1f181de31b01
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/cancel-download-job -d "job_id='57bb5803ba2a1f181de31b01'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$job_id = '57bb5803ba2a1f181de31b01';
$client->orderCancelDownloadJob('098765432112345678901234',$job_id);
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('57bb5803ba2a1f181de31b01');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/change-shipping?access_token=%s&job_id=%s",
    $access_token, $job_id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'message': 'Job cancelled successfully.'},
    'message': ''
}

Example Response

{
    'code': 0,
    'data': {'message': 'Job has already finished.'},
    'message': ''
}

Example Response

{
    'code': 0,
    'data': {'message': 'Job has already been cancelled.'},
    'message': ''
}

Get Countries that Require Confirmed Delivery

Get a list of country codes for countries that require Confirmed Delivery for the Confirmed Delivery Policy.

For more information about the Confirmed Delivery Policy, click here.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/get-confirmed-delivery-countries

Explore API

Parameters None

Returns
Returns a list of country codes for countries that require Confirmed Delivery.

Example

Assume your access token is "an_example_access_token". Suppose you want a list of shipping carriers that provide Delivery Confirmation to the US:

  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/get-confirmed-delivery-countries -d "access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->orderGetConfirmedDeliveryCountries('098765432112345678901234');
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/get-confirmed-delivery-countries?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'message': '',
    'code': 0,
    'data': {
        'countries' : [ 'FR',
                        'DE',
                        'GB',
                        'US' ]
    }
}

Get Confirmed Delivery Shipping Carriers For Country

Get a list of Shipping Carriers that provide tracking with Delivery Confirmation to a specified country.

For a full list of these Shipping Carriers, click here.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/order/get-confirmed-delivery-shipping-carriers-for-country

Explore API

Parameters
country_code The 2-letter country code you want to ship to.

Returns
Returns a list of shipping carriers, as well as a link describing additional requriements for specific carriers, which you will need when fulfilling orders on Wish that require Delivery Confirmation.

Example

Assume your access token is "an_example_access_token". Suppose you want a list of shipping carriers that provide Delivery Confirmation to the US:

  • country_code = US
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/order/get-confirmed-delivery-shipping-carriers-for-country -d "country_code='US'&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$country_code = 'US'
$client->orderGetConfirmedDeliveryShippingCarriersForCountry('098765432112345678901234',$country_code);
<?php

$access_token = urlencode('an_example_access_token');

$country_code = urlencode('US');

$url = sprintf(
    "https://merchant.wish.com/api/v2/order/get-confirmed-delivery-shipping-carriers-for-country?access_token=%s&country_code=%s",
    $access_token, $country_code);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'message': '',
    'code': 0,
    'data': {
        'carriers': [ 'USPS',
                      'WishPost',
                      'EMS (China)',
                      'AsendiaUSA',
                      'BRTBartolini',
                      'DHLExpress',
                      'DPD',
                      'DPEXChina',
                      'EMPSExpress',
                      'EPacket',
                      'FedEx',
                      'GLS',
                      'Hermes',
                      'SFExpress',
                      'TNT',
                      'TollIPEC',
                      'UPS',
                      'XPO',
                      'YODEL'],
        'extra_info': {
            'WishPost': 'https://merchant.wish.com/documentation/confirmeddeliveryshippingcarriers'
        }
  }
}

Example Response

{
    'code': 0,
    'data': {
        'carriers': [],
        'extra_info': {}
  },
  'message': ''
}

Ticket

For each consumer question or complaint, a ticket is created to manage the dialogue between you, Wish, and the consumer.



With this API, you can fetch tickets awaiting your response, fetch a specific ticket, close a ticket, and reply to tickets.

Attributes
idWish's unique identifier for the ticket
transaction_idThe transaction the ticket is related to. Each ticket relates to at most one transaction
merchant_idThe merchant the ticket is for
buyer_infoThe information of the user who created the ticket
subjectThe subject for the ticket
stateThe state of the ticket can be: "Awaiting your response", "Awaiting buyer response", and "Awaiting store response"
is_closedWhether the ticket has been closed
labelWish's label for the ticket
sublabelWish's sublabel for the ticket
default_refund_reasonThe default reason the order will be refunded for, depends on the label of the ticket
photo_proofWhether the user has provided a photo
open_date (UTC)The date the ticket was created
last_update_date (UTC)The time that the ticket was last updated at
close_date (UTC)The date the ticket was closed (if applicable)
closed_byWho closed the ticket, can be: user, merchant, wish support, wish automated support
itemsA list of all items affected by the ticket, each item is an Order object
repliesA list of all replies to the ticket
User Attributes
idWish's indentifier of the user
nameThe name of the user
joined_dateThe date the user joined wish
localeThe language preference of the user
Reply Attributes
dateWhen the reply was sent
messageContents of the reply
senderWho sent the reply, can be: user, merchant, wish support, wish automated support
image_urlsUrls of the images provided in the reply
translated_messageAn automatic translation to English
translated_message_zhAn automatic translation to Chinese

Retrieve a Ticket

Retrieves the details of an existing ticket. Supply the unique identifier for the ticket and if one exists this API will return the corresponding ticket.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/ticket

Explore API

Parameters
idWish's unique identifier for the ticket (id in the Ticket object)

Returns
If there exists an ticket with the id provided for your account then the API returns a ticket object in the response

Example

Assume your access token is "an_example_access_token" . If you have an ticket with id "123456789009876543210164" and you would like to retrieve any updates to it:

  • id = 123456789009876543210164
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/ticket?id=123456789009876543210164&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$ticket = $client->getTicketById('123456789009876543210164');
print_r($ticket);
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543210164');

$url = sprintf(
    "https://merchant.wish.com/api/v2/ticket?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{u'code': 0,
 u'data': {u'Ticket': {u'UserInfo': {u'id': u'123456789012345678901234',
                                     u'joined_date': u'2012-02-02T11:22:21',
                                     u'locale': u'en',
                                     u'name': u'George Forman'},
                       u'close_date': u'2015-03-08T22:31:02',
                       u'closed_by': u'wish support',
                       u'id': u'123456789012345678901234',
                       u'items': [{u'Order': {u'ShippingDetail': {u'city': u'',
                                                                  u'country': u'US',
                                                                  u'name': u'George Forman',
                                                                  u'phone_number': u'123456',
                                                                  u'state': u'California',
                                                                  u'street_address1': u'123 Fake St',
                                                                  u'zipcode': u'11111'},
                                              u'buyer_id': u'123456789012345678901234',
                                              u'cost': u'6.69',
                                              u'last_updated': u'2011-03-08T22:31:02',
                                              u'order_id': u'123456789012345678901234',
                                              u'order_time': u'2015-02-20T02:55:27',
                                              u'order_total': u'9.39',
                                              u'price': u'6.4',
                                              u'product_id': u'123456789012345678901234',
                                              u'product_image_url': u'https://google.com/not-a-image',
                                              u'product_name': u'A product',
                                              u'quantity': u'1',
                                              u'refunded_by': u'REFUNDED BY WISH FOR MERCHANT',
                                              u'refunded_reason': u'Item did not work as described',
                                              u'refunded_time': u'2015-03-18',
                                              u'shipped_date': u'2015-02-20',
                                              u'shipping': u'3.0',
                                              u'shipping_cost': u'2.7',
                                              u'shipping_provider': u'USPS',
                                              u'sku': u'SKU123',
                                              u'state': u'REFUNDED',
                                              u'tracking_number': u'TR1234ACK',
                                              u'transaction_id': u'1223456789012345678901234',
                                              u'variant_id': u'123456789012345678901234'}}],
                       u'label': u'Return or Exchange',
                       u'last_update_date': u'2015-02-09T12:13:43',
                       u'merchant_id': u'123456789012345678901234',
                       u'open_date': u'2015-03-06T21:23:01',
                       u'photo_proof': u'True',
                       u'replies': [{u'Reply': {u'date': u'2015-03-06T21:23:01',
                                                u'image_urls': u"[u'https://fake-url']",
                                                u'message': u"Where is my product?",
                                                u'sender': u'user',
                                                u'translated_message': u"Where is my product?",
                                                u'translated_message_zh': u'\u54EA\u91CC\u662F\u6211\u7684\u4EA7\u54C1\uFF1F'}}]
                       u'state': u'Awaiting your response',
                       u'state_id': u'1',
                       u'subject': u'Return or Exchange',
                       u'sublabel': u'',
                       u'transaction_id': u'123456789012345678901234'}},
 u'message': u''}

List all Tickets Awaiting You

Returns a list of all your open tickets currently on the Wish platform awaiting your response. If you have a high number of tickets the response will be paginated. The response will contain the URL for fetching the next page of tickets, as well as the previous page.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/ticket/get-action-required

Explore API

Parameters
startoptional An offset into the list of returned tickets. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
limitoptional A limit on the number of tickets that can be returned. Limit can range from 1 to 500 items and the default is 50

Returns
Response will contain a list of ticket objects as well as a 'paging' field with paging options if needed.

Example

Assume your access token is "an_example_access_token" . If you would like to view your tickets in groups of 2 and you would like to see the 10th group your parameters would be:

  • start = 20
  • limit = 2
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/ticket/get-action-required?limit=2&start=20&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$tickets = $client->getAllActionRequiredTickets();
echo "You have ".count($tickets)." tickets!\n";
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('20');
$limit = urlencode('2');

$url = sprintf(
    "https://merchant.wish.com/api/v2/ticket/get-action-required?access_token=%s&limit=%s&start=%s",
    $access_token, $limit, $start);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{u'code': 0,
 u'data': [{u'Ticket': {u'UserInfo': {u'id': u'54f8e4ef2743dxxxxxxxxxxx',
                                      u'joined_date': u'2014-03-05T13:21:19',
                                      u'locale': u'pt',
                                      u'name': u'Mr. Rogers'},
                        u'default_refund_reason': u'19',
                        u'id': u'54f8ecd2f0812xxxxxxxxxx',
                        u'items': [{u'Order': {u'ShippingDetail': {u'city': u'San Fransicso',
                                                                   u'country': u'BR',
                                                                   u'name': u'Mr. Rogers',
                                                                   u'phone_number': u'1234567890',
                                                                   u'state': u'S\xe3o Paulo',
                                                                   u'street_address1': u'123 Fake St',
                                                                   u'street_address2': u'Apt 5',
                                                                   u'zipcode': u'10000000'},
                                               u'buyer_id': u'54f8e4ef274*************',
                                               u'color': u'black',
                                               u'cost': u'16.2',
                                               u'last_updated': u'2014-03-06T07:37:16',
                                               u'order_id': u'123456789012345678901234',
                                               u'order_time': u'2015-03-05T23:40:53',
                                               u'order_total': u'22.5',
                                               u'price': u'18.0',
                                               u'product_id': u'123456789012345678901234',
                                               u'product_image_url': u'http://contestimg.wish.com/api/webimage/123456789012345678901234-normal.jpg',
                                               u'product_name': u'Cloth',
                                               u'quantity': u'1',
                                               u'refunded_by': u'CANCELLED BY CUSTOMER',
                                               u'refunded_reason': u'Customer cancelled the order',
                                               u'refunded_time': u'2015-03-05',
                                               u'shipping': u'7.0',
                                               u'shipping_cost': u'6.3',
                                               u'size': u'M',
                                               u'sku': u'SKU123-XL',
                                               u'state': u'REFUNDED',
                                               u'transaction_id': u'123456789012345678901234',
                                               u'variant_id': u'5285bd3fb5baba7*********'}}],
                        u'label': u'Request Refund/Cancel Order: Request a Different Color',
                        u'last_update_date': u'2015-03-09T12:13:57',
                        u'merchant_id': u'123456789012345678901234',
                        u'open_date': u'2015-03-05T23:54:58',
                        u'photo_proof': u'False',
                        u'replies': [{u'Reply': {u'date': u'2015-03-05T23:54:58',
                                                 u'image_urls': u'[]',
                                                 u'message': u'Quero meu reembolso ',
                                                 u'sender': u'user',
                                                 u'translated_message': u'I want my refund',
                                                 u'translated_message_zh': u'\u6211\u5e0c\u671b\u6211\u7684\u9000\u6b3e'}}],
                        u'state': u'Awaiting your response',
                        u'state_id': u'4',
                        u'subject': u'Solicitar Reembolso/ Cancelar Pedido',
                        u'sublabel': u'Request a Different Color',
                        u'transaction_id': u'123456789012345678901234'}},
           {u'Ticket': {u'UserInfo': {u'id': u'123456789012345678901234',
                                      u'joined_date': u'2011-12-12T05:22:52',
                                      u'locale': u'en',
                                      u'name': u'George Bush'},
                        u'id': u'123456789012345678901234',
                        u'items': [{u'Order': {u'ShippingDetail': {u'city': u'Waterloo',
                                                                   u'country': u'CA',
                                                                   u'name': u'George Bush',
                                                                   u'phone_number': u'1123-123-1234',
                                                                   u'state': u'Ontario',
                                                                   u'street_address1': u'Fake St',
                                                                   u'zipcode': u'A0A 0A0'},
                                               u'buyer_id': u'12345678901234567890',
                                               u'cost': u'4.6',
                                               u'last_updated': u'2015-03-09T10:23:13',
                                               u'order_id': u'123456789012345678901234',
                                               u'order_time': u'2012-12-12T06:40:12',
                                               u'order_total': u'29.2',
                                               u'price': u'5.11',
                                               u'product_id': u'123456789012345678901234',
                                               u'product_image_url': u'http://contestimg.wish.com/api/webimage/5253fd0b1xxxxxxxxxxx-normal.jpg',
                                               u'product_name': u'Automatic Car',
                                               u'quantity': u'4',
                                               u'shipped_date': u'2011-12-12',
                                               u'shipping': u'3.0',
                                               u'shipping_cost': u'2.7',
                                               u'shipping_provider': u'SwissPost',
                                               u'sku': u'SKU123',
                                               u'state': u'SHIPPED',
                                               u'tracking_number': u'TR1ACK',
                                               u'transaction_id': u'123456789012345678901234',
                                               u'variant_id': u'123456789012345678901234'}}],
                        u'label': u'Shipping Status or ETA Inquiry',
                        u'last_update_date': u'2015-03-09T11:02:28',
                        u'merchant_id': u'123456789012345678901234',
                        u'open_date': u'2012-03-09T04:11:00',
                        u'photo_proof': u'False',
                        u'replies': [{u'Reply': {u'date': u'2015-03-09T04:57:33',
                                                 u'image_urls': u'[]',
                                                 u'message': u'I did not yet receive this item and it is know march 8 2015 it was estimated that it would be here Jan 2 2015 and it has not arrived ',
                                                 u'sender': u'user',
                                                 u'translated_message': u'I did not yet receive this item and it is know march 8 2015 it was estimated that it would be here Jan 2 2015 and it has not arrived ',
                                                 u'translated_message_zh': u'\u6211\u8fd8\u4e0d\u63a5\u53d7\u8fd9\u4e2a\u9879\u76ee\uff0c\u8fd9\u662f\u4e86\u89e32015\u5e743\u67088\u65e5\uff0c\u636e\u4f30\u8ba1\uff0c\u8fd9\u5c06\u662f\u8fd9\u91cc2015\u5e741\u67082\u65e5\uff0c\u4e5f\u6ca1\u6709\u5230\u8fbe'}},
                                     {u'Reply': {u'date': u'2015-03-09T10:23:12',
                                                 u'image_urls': u'[]',
                                                 u'message': u"Hello,friend\n\nSorry for caused you any troubles \n\nWe got the sad news from our shipping agent that your parcel may be lost due to the long time no information online. \n\nPlease don't worry, we won't let our customer lost their money, would you like us to sent your a new parcel for your order to your address:\n\nDain Steiner\nbox 203\nTeslin, Yukon, Y0A 1B0\nCanada\n\nOr you perfer a full refund for this order? Your reply will be highly appreciated, have a nice day :)\n\nRegards\nScreamprice Service Team",
                                                 u'sender': u'merchant'}},
                                     {u'Reply': {u'date': u'2015-03-09T11:02:28',
                                                 u'image_urls': u'[]',
                                                 u'message': u'Please send me a new parcel thank you',
                                                 u'sender': u'user',
                                                 u'translated_message': u'Please send me a new parcel thank you',
                                                 u'translated_message_zh': u'\u8bf7\u7ed9\u6211\u4e00\u4e2a\u65b0\u7684\u5305\u88f9\u8c22\u8c22'}}],
                        u'state': u'Awaiting your response',
                        u'state_id': u'4',
                        u'subject': u'Where is my order?',
                        u'sublabel': u'',
                        u'transaction_id': u'548a8de6baa0830ffxxxxxxx'}}],
 u'message': u'',
 u'paging': {u'next': u'https://merchant.wish.com/api/v2/ticket/get-action-required?start=2&limit=2&access_token=an_example_access_token'}}

Notifications


Attributes
idWish's unique identifier for the notification
titleThe title of the notification
messageThe message content of the notification
perma_linkThe permanent link to the notification

Fetch Notifications

Returns a list of all your unviewed notifications. If you have a high number of notifications the response will be paginated. The response will contain the URL for fetching the next page of notifications, as well as the previous page.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/noti/fetch-unviewed

Explore API

Parameters
startoptional An offset into the list of returned notifications. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
limitoptional A limit on the number of notifications that can be returned. Limit can range from 1 to 500 items and the default is 50

Returns
Response will contain a list of GetNotiResponse objects as well as a 'paging' field with paging options if needed.

Example

Assume your access token is "an_example_access_token" . If you would like to view your notifications in groups of 2 and you would like to see the 10th group your parameters would be:

  • start = 20
  • limit = 2
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/noti/fetch-unviewed?limit=2&start=20&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$notifications = $client->getAllNotifications();
echo $notifications;
<?php

$access_token = urlencode('an_example_access_token');

$start = urlencode('20');
$limit = urlencode('2');

$url = sprintf(
    "https://merchant.wish.com/api/v2/noti/fetch-unviewed?access_token=%s&limit=%s&start=%s",
    $access_token, $limit, $start);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{"message":"","code":0,"data":[
{"GetNotiResponse":{
    "perma_link":"http:\/\/merchant.wish.com\/release\/57180d6c49xxxxxxxxxxxxxx",
    "message":"Sizing Chart XXXXX",
    "id":"571810da7exxxxxxxxxxxxxx",
    "title":"There is a new xxxxxxxxxx"}},
{"GetNotiResponse":{
    "perma_link":"http:\/\/merchant.wish.com\/release\/57180d6c49xxxxxxxxxxxxxx",
    "message":"Sizing Chart XXXXX",
    "id":"571812abf9xxxxxxxxxxxxxx",
    "title":"There is a new xxxxxxxxxx"}}],
"paging":{"next":"https:\/\/merchant.wish.com\/api\/v2\/noti\/fetch-unviewed?start=12","previous":"https:\/\/merchant.wish.com\/api\/v2\/noti\/fetch-unviewed?start=8"}}

Mark a notification as viewed

Marks a notification as viewed

HTTP Request Type: POST

Definition
GET https://merchant.wish.com/api/v2/noti/mark-as-viewed

Explore API

Parameters None

Returns
If there exists an unviewed notification with the id provided for your notification then the API returns success

Example

Assume your access token is "an_example_access_token" . If you have a notification with id "123456789009876543210164" and you would like to mark is viewed.

  • id = 123456789009876543210164
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/noti/mark-as-viewed?noti_id=123456789009876543210164&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->markNotificationAsViewed('98753984xxxxxxx');
<?php

$access_token = urlencode('an_example_access_token');

$noti_id = urlencode('123456789009876543210164');

$url = sprintf(
    "https://merchant.wish.com/api/v2/noti/mark-as-viewed?access_token=%s&id=%s",
    $access_token, $noti_id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Get the unviewed notification count

Get the count of unviewed notification count

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/noti/get-unviewed-count

Explore API

Parameters None

Returns
Returns the count of the unviewed notifications

Example

Assume your access token is "an_example_access_token" and if you would like to get the unviewed notification count

  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/noti/get-unviewed-count?access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$count = $client->getUnviewedNotiCount();
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/noti/mark-as-viewed?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'count': 8},
    'message': ''
}

Fetch Announcements

Fetch the Announcements

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/fetch-bd-announcement

Explore API

Parameters None

Returns
Response will contain a list of GetBDAnnResponse objects which contains the details of announcements

Example

Assume your access token is "an_example_access_token" and if you would like to fetch the announcements

  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/fetch-bd-announcement?access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$count = $client->getBDAnnouncemtns();
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/fetch-bd-announcement?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    u 'message': u '', u 'code': 0, u 'data': {
        u 'GetBDAnnResponse': {
            u 'title': u '\u5173\u4e8e\u4e0b\u8c03XXXXXXXXXXXXXXXXXXX',
            u 'created': u 'Apr 01, 2016',
            u 'bd_id': u '55781a50d29XXXXXXXXXX',
            u 'bd_name': u 'TraXX XXXX',
            u 'message': u '\u611f\u8c22\u5927\u5bb6\u957fXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
            u 'viewed': u 'False'
        }
    }
}

Fetch system update notifications

Fetch system update notifications

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/fetch-sys-updates-noti

Explore API

Parameters None

Returns
Response will contain a list of SystemUpdatesResponse objects which contains the details of each update

Example

Assume your access token is "an_example_access_token" and if you would like to get the system updatez

  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/fetch-sys-updates-noti?access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$count = $client->getSystemUpdatesNotifications();
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/fetch-sys-updates-noti?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    u 'message': u '', u 'code': 0, u 'data': [{
        u 'SystemUpdatesResponse': {
            u 'release_date': u 'Thursday May 19, 2016',
            u 'id': u '573e46218db5d1487ee4bdd8',
            u 'features': [{
                u 'Feature': {
                    u 'cn_title': u '\u5173\u4e8e\u66f4\u65b0\u6bcf\u4e2a\u4ea7\u54c1\u56fd\u9645\u8fd0\u8d39\u7684\u65b0\u529f\u80fd',
                    u 'body': u 'We are very excited to announce that you can set international shipping prices per product now. No matter what sizes and weights your products are or what countries you are shipping to, you can always set shipping prices accordingly. You can start with changing overall default shipping prices on shipping settings page. Next step is to update per product shipping prices for specific countries by updating manually or a CSV file.\n\nFor a step to step guide, please visit our FAQ page for more information:',
                    u 'title': u 'New Feature About Updating International Shipping Prices Per Product',
                    u 'link': u 'http://merchantfaq.wish.com/hc/en-us/articles/218812008',
                    u 'cn_body': u '\u5c0a\u656c\u7684\u5546\u6237\uff0c\n\n\u6211\u4eec\u975e\u5e38\u8363\u5e78\u7684\u901a\u77e5\u60a8\uff0c\u60a8\u73b0\u5728\u53ef\u4ee5\u7ed9\u6bcf\u4e2a\u4ea7\u54c1\u9488\u5bf9\u4e0d\u540c\u56fd\u5bb6\u6765\u8bbe\u7f6e\u4e0d\u540c\u8fd0\u8d39\u4e86\u3002\u65e0\u8bba\u60a8\u7684\u4ea7\u54c1\u662f\u4ec0\u4e48\u5c3a\u5bf8\u548c\u91cd\u91cf\u6216\u8005\u8981\u5bc4\u5f80\u54ea\u4e9b\u56fd\u5bb6\uff0c\u60a8\u603b\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u4ea7\u54c1\u8bbe\u5b9a\u90ae\u8d39\u3002\u64cd\u4f5c\u65b9\u6cd5\u5982\u4e0b\uff0c\u60a8\u53ef\u4ee5\u5148\u4f7f\u7528\u914d\u9001\u8bbe\u7f6e\u9875\u9762\u6765\u8bbe\u7f6e\u6bcf\u4e2a\u56fd\u5bb6\u7684\u9ed8\u8ba4\u8fd0\u8d39\uff0c\u518d\u53bb\u4ea7\u54c1\u4e00\u89c8\u9875\u9762\u6839\u636e\u4e0d\u540c\u7684\u56fd\u5bb6\u66f4\u6539\u6bcf\u4e2a\u4ea7\u54c1\u7684\u8fd0\u8d39\uff0c\u53ef\u4ee5\u624b\u52a8\u4fee\u6539\u6216\u8005\u4e0a\u4f20CSV\u6587\u4ef6\u3002 \n\n\u5982\u679c\u60a8\u60f3\u8981\u83b7\u53d6\u66f4\u591a\u4fe1\u606f\u548c\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\uff0c\u8bf7\u8bbf\u95ee\u5e38\u89c1\u95ee\u9898:',
                    u 'cn_link': u 'http://merchantfaq.wish.com/hc/zh-cn/articles/218812008'
                }
            }]
        }
    }, {
        u 'SystemUpdatesResponse': {
            u 'release_date': u 'Monday August 03, 2015',
            u 'id': u '55bfae216daddd41f93512ce',
            u 'features': [{
                u 'Feature': {
                    u 'cn_title': u '\u5546\u6237APP(Android)\u6700\u65b0\u4e0a\u7ebf',
                    u 'body': u 'We are happy to announce a new mobile app for merchants. This app will be released initially on Android and will allow merchants to keep up to date with the latest metrics about their store. The app will also enable you to get the latest system updates and notifications right to your phone.\n\nGet the app from Google play, Xiaomi store, or direct download here: ',
                    u 'title': u 'Announcing New Merchant Android App',
                    u 'link': u 'http://merchant.wish.com/mobile',
                    u 'cn_body': u '\u6211\u4eec\u5f88\u9ad8\u5174\u5730\u5ba3\u5e03\uff1aWish\u5546\u6237APP\u4e0a\u7ebf\u4e86\u3002\u8be5APP\u4f1a\u9996\u5148\u5728\u5b89\u5353\u7cfb\u7edf\u4e0a\u7ebf, \u8ba9\u5e7f\u5927\u5546\u6237\u5728\u624b\u673a\u4e0a\u4fbf\u80fd\u67e5\u770b\u5e97\u94fa\u5185\u7684\u6700\u65b0\u6570\u636e\u52a8\u6001\uff0c\u4e86\u89e3\u6700\u65b0\u7684\u7cfb\u7edf\u66f4\u65b0\uff0c\u5e76\u6536\u5230\u66f4\u65b0\u4fe1\u606f\u7684\u53ca\u65f6\u901a\u77e5\u3002\n\n\u8bf7\u4eceGoogle play\uff0cXiaomi\u5e94\u7528\u5546\u5e97\u4e0b\u8f7d\u3002\u4e5f\u53ef\u76f4\u63a5\u70b9\u51fb\u4ee5\u4e0b\u94fe\u63a5\u4e0b\u8f7d\uff1a',
                    u 'cn_link': u 'http://merchant.wish.com/mobile'
                }
            }]
        }
    }]
}

Infractions count

Get the count of infractions need the attention of the merchant

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/count/infractions

Explore API

Parameters None

Returns
Response will contain a CountInfractionsResponse object that has the count of infractions

Example

Assume your access token is "an_example_access_token" and if you would like to get the count of the infractions that need the attention of the merchant

  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/count/infractions?access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$count = $client->getInfractionCount();
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/count/infractions?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    u 'message': u '', u 'code': 0, u 'data': {
        u 'CountInfractionsResponse': {
            u 'count': u '156'
        }
    }
}

Fetch infractions

Fetch infraction links that need the attention of the merchant

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/get/infractions

Explore API

Parameters
startoptional An offset into the list of returned infractions. Use 0 to start at the beginning. The API will return the requested number of items starting at this offset. Default to 0 if not supplied
limitoptional A limit on the number of infractions that can be returned. Limit can range from 1 to 500 items and the default is 50

Returns
Response will contain a InfractionsResponse object that has a list of infraction objects which includes a link to that infraction

Example

Assume your access token is "an_example_access_token" and if you would like to get the infractions that need the attention of the merchant

  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2/get/infractions?access_token=an_example_access_token&limit=5"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$count = $client->getInfractionLinks();
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/get/infractions?access_token=%s",
    $access_token);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    u 'message': u '', u 'code': 0, u 'data': {
        u 'InfractionsResponse': {
            u 'infractions': [{
                u 'Infraction': {
                    u 'link': u 'https://merchant.wish.com/warning/view/5475d08d6fa88c67d5416fb9',
                    u 'id': u '5475d08d6fa88cxxxxxxxxxx'
                }
            }, {
                u 'Infraction': {
                    u 'link': u 'https://merchant.wish.com/warning/view/547720da6fa88cXXXXXXXXXX',
                    u 'id': u '547720da6fa88cXXXXXXXXXX'
                }
            }, {
                u 'Infraction': {
                    u 'link': u 'https://merchant.wish.com/warning/view/547872746fa88cXXXXXXXXXX',
                    u 'id': u '547872746fa88cXXXXXXXXXX'
                }
            }, {
                u 'Infraction': {
                    u 'link': u 'https://merchant.wish.com/warning/view/5479c3dc6fa88cXXXXXXXXXX',
                    u 'id': u '5479c3dc6fa88cXXXXXXXXXX'
                }
            }, {
                u 'Infraction': {
                    u 'link': u 'https://merchant.wish.com/warning/view/5479c3e16fa88cXXXXXXXXXX',
                    u 'id': u '5479c3e16fa88cXXXXXXXXXX'
                }
            }]
        }
    }, u 'paging': {
        u 'next': u 'https://merchant.wish.com/api/v2/get/infractions?access_token=57685a3d1ce64a5479c3e16fa88cXXXXXXXXXX&start=5'
    }
}

Reply to a Ticket

Send a reply for a ticket. Wish will notify the user of the reply if required.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/ticket/reply

Explore API

Parameters
idWish's unique identifier for the ticket, or 'id' in the Ticket object
replyThe message you wish to send, with a max of 2000 characters

Returns
If you can access the ticket, it is not yet closed, and all the parameters are correct, the API will send the reply and return a HTTP status code of 200.

Example

Assume your access token is "an_example_access_token" . If the ticket's id is "098765432112345678901234":

  • id = 098765432112345678901234
  • reply = "some message"/li>
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/ticket/reply -d "reply=some%20message&id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->replyToTicketById('098765432112345678901234',"some message");
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');
$reply = "some message"

$url = sprintf(
    "https://merchant.wish.com/api/v2/ticket/reply?access_token=%s&reply=%s&id=%s",
    $access_token, $reply, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Close a Ticket

Close a order in the Wish system. Call this API if you answered all the users questions to their statisification.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/ticket/close

Explore API

Parameters
idWish's unique identifier for the ticket, or 'id' in the Ticket object

Returns
If the ticket is not already closed, and the id is correct, the API will mark the ticket as closed and return a HTTP status code of 200, notifying the user if required.

Example

Assume your access token is "an_example_access_token" . If you want to close the ticket with id "098765432112345678901234" because the order has been refunded.

  • id = 098765432112345678901234

Example Request

> curl https://merchant.wish.com/api/v2/ticket/close -d "id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->closeTicketById('098765432112345678901234');
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');

$url = sprintf(
    "https://merchant.wish.com/api/v2/ticket/close?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Appeal to Wish Support for Ticket

Appeal to wish support for a ticket. Call this if the user has questions you are unable to answer.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/ticket/appeal-to-wish-support

Explore API

Parameters
idWish's unique identifier for the ticket, or 'id' in the Ticket object

Returns
If the ticket is not already awaiting a response from wish, and the id is correct, the API will mark the ticket as awaiting wish response and return a HTTP status code of 200.

Example

Assume your access token is "an_example_access_token" . If you want wish to be aware of the ticket.

  • id = 098765432112345678901234

Example Request

> curl https://merchant.wish.com/api/v2/ticket/appeal-to-wish-support -d "id=098765432112345678901234&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;
use Wish\Model\WishReason;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->appealTicketById('098765432112345678901234');
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');

$url = sprintf(
    "https://merchant.wish.com/api/v2/ticket/appeal-to-wish-support?access_token=%s&id=%s",
    $access_token, $id);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Re-open a Ticket

Re-open a ticket on the Wish platform. Call this API if something happens to make the ticket relevant again.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/ticket/re-open

Explore API

Parameters
idWish's unique identifier for the ticket, or 'id' in the Ticket object
replyThe reason for re-opening the ticket, max of 2000 characters

Returns
If the ticket is closed, and the id is correct, the API will mark the ticket as open and return a HTTP status code of 200, notifying the user if required.

Example

Assume your access token is "an_example_access_token" . If you want to re-open the ticket with id "098765432112345678901234" because you have been notified delivery failed

  • id = 098765432112345678901234
  • reply = "some message"

Example Request

> curl https://merchant.wish.com/api/v2/ticket/re-open -d "id=098765432112345678901234&reply=some%20message&access_token=an_example_access_token"
<?php
require_once 'vendor/autoload.php';

use Wish\WishClient;

$access_token = 'an_example_access_token';

$client = new WishClient($access_token,'prod');
$client->reOpenTicketById('098765432112345678901234', "some message");
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('098765432112345678901234');
$reply = urlencode('some message');

$url = sprintf(
    "https://merchant.wish.com/api/v2/ticket/re-open?access_token=%s&id=%s&message=%s",
    $access_token, $id, $reply);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    'code': 0,
    'data': {'success': True},
    'message': ''
}

Upload a Temporary Image

This uploads an image to our servers. The response will contain the URL of the image that was uploaded.
The image will be removed after 2 weeks. The maximum size of the image is 5 MB.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/image

Explore API

Parameters
imageThe image, in base64 encoded JPG format

Example

Assume your access token is "an_example_access_token". If you had an image with base64 encoding "ABCD1234abcd", your parameters would be:

  • image = ABCD1234abcd
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/image -d "access_token=an_example_access_token " --data-urlencode "image=ABCD1234abcd"
Note: The base 64 data for the image must be URL Encoded to be transmitted correctly.
<?php

$access_token = urlencode('an_example_access_token');
$image = urlencode('ABCD1234abcd');

$url = sprintf(
    "https://merchant.wish.com/api/v2/image?access_token=%s&image=%s",
    $access_token, $image);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    "message":"",
    "code":0,
    "data":{"url" : http://merchant.wish.com/static/tmp-uploads/12345678901234567890123456789012.jpg?v=e3456}
}

Accepted Shipping Providers

This fetches all accepted shipping providers.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/get-shipping-carriers

Explore API

Parameters None

Returns
Response will contain an alphabetized list of all accepted shipping providers.

Here is the full list of accepted providers on Wish:

4PX
AirpakExpress
Aramex
AsendiaGermany
AsendiaUK
AsendiaUSA
AuPostChina
AustraliaPost
AustrianPost
AustrianPostRegistered
BPost
BPostInternational
BRTBartolini
Belpost
BrazilCorreios
CNEExpress
CanadaPost
CeskaPosta
ChinaAirPost
Chukou1
ColisPrive
Colissimo
CorreosChile
CorreosCostaRica
CorreosDeEspana
CorreosDeMexico
CyprusPost
DHL
DHL2MannHandling
DHLBenelux
DHLExpress
DHLGermany
DHLGlobalMail
DHLGlobalMailAsia
DHLNetherlands
DHLParcelNL
DHLPoland
DHLSpainDomestic
DPD
DPDGermany
DPDIreland
DPDPoland
DPDUK
DPEXChina
DanmarkPost
DeutschePost
DirectLink
ECFirstClass
EMPSExpress
EMS
EPacket
EPostG
Envialia
EquickChina
FastwayAustralia
FedEx
FedExApex
FedExUK
FlytExpress
Freipost
GLS
GLSItaly
GLSNetherlands
GlobegisticsInc
Hermes
HermesGermany
HongKongPost
IndiaPost
IndiaPostInternational
IndonesiaPost
JapanPost
KoreaPost
LaPosteColissimo
LaserShip
LatviaPost
LithuaniaPost
MagyarPosta
MalaysiaPost
MalaysiaPostPosDaftar
NewZealandPost
OnTrac
OneWorldExpress
PTTPosta
PX4
PocztaPolska
PortugalCTT
PostNL
PostNLInternational
PostNLInternational3S
RRDonnelley
RoyalMail
RussianPost
SFCService
SFExpress
SFInternational
SimplyPost
SingaporePost
SingaporeSpeedpost
SprintPack
SwedenPosten
SwissPost
TNT
TNTAustralia
TNTClickItaly
TNTFrance
TNTItaly
TNTPostItaly
TNTUK
TaiwanPost
ThailandThaiPost
TollIPEC
TollPriority
TrakPak
TurkishPost
UBILogisticsAustralia
UKMail
UPS
UPSFreight
UPSMailInnovations
UPSSurePost
USPS
UkrPoshta
VietnamPost
VietnamPostEMS
WishPost
XPO
YODEL
Yamato
Yanwen
YodelInternational
YunExpress

Example

Assume your access token is "an_example_access_token":

  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/get-shipping-carriers -d "access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/get-shipping-carriers?access_token=%s",
    $access_token, $image);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'POST',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
    "message":"",
    "code":0,
    "data":{
        "shipping_carriers": ["4PX", "AirpakExpress","Aramex","AsendiaGermany","AsendiaUK","AsendiaUSA","AuPostChina","AustraliaPost","AustrianPost","AustrianPostRegistered","BPost","BPostInternational","Belpost","CNEExpress","CanadaPost","ChinaAirPost","Chukou1","ColisPrive","Colissimo","CorreosDeEspana","DHL","DHL2MannHandling","DHLBenelux","DHLExpress","DHLGermany","DHLGlobalMail","DHLGlobalMailAsia","DHLNetherlands","DHLParcelNL","DHLPoland","DHLSpainDomestic","DPD","DPDGermany","DPDIreland","DPDPoland","DPDUK","DPEXChina","DanmarkPost","DeutschePost","DirectLink","ECFirstClass","EMPSExpress","EMS","EPacket","Envialia","EquickChina","FedEx","FedExApex","FedExUK","FlytExpress","GLS","GLSItaly","GLSNetherlands","GlobegisticsInc","Hermes","HermesGermany","HongKongPost","IndiaPost","IndiaPostInternational","IndonesiaPost","JapanPost","KoreaPost","LaPosteColissimo","LithuaniaPost","MagyarPosta","MalaysiaPost","MalaysiaPostPosDaftar","NewZealandPost","OnTrac","OneWorldExpress","PTTPosta", "PocztaPolska","PostNL","PostNLInternational","PostNLInternational3S","RoyalMail","RussianPost","SFCService","SFExpress","SFInternational","SimplyPost","SingaporePost","SingaporeSpeedpost","SwedenPosten","SwissPost","TNT","TNTAustralia","TNTClickItaly","TNTFrance","TNTItaly","TNTPostItaly","TNTUK","TaiwanPost","ThailandThaiPost","TollIPEC","TollPriority","TrakPak","TurkishPost","UBILogisticsAustralia","UKMail","UPS","UPSFreight","UPSMailInnovations","USPS","VietnamPost","VietnamPostEMS","WeDoLogisitics","WishPost","YODEL","Yanwen","YodelInternational","YunExpress"]
    }
}

Shippable Countries

AE United Arab Emirates
AR Argentina
AT Austria
AU Australia
BB Barbados
BE Belgium
BG Bulgaria
BM Bermuda
BR Brazil
BY Belarus
CA Canada
CH Switzerland
CL Chile
CO Colombia
CR Costa Rica
CZ Czech Republic
DE Germany
DK Denmark
DO Dominican Republic
EC Ecuador
EE Estonia
EG Egypt
ES Spain
FI Finland
FR France
GB United Kingdom (Great Britain)
GR Greece
HK Hong Kong
HR Croatia
HU Hungary
ID Indonesia
IE Ireland
IL Israel
IN India
IT Italy
JM Jamaica
JO Jordan
JP Japan
KR South Korea
KW Kuwait
LI Liechtenstein
LT Lithuania
LU Luxembourg
LV Latvia
MA Morocco
MC Monaco
MX Mexico
MY Malaysia
NL Netherlands
NO Norway
NZ New Zealand
PE Peru
PH Philippines
PK Pakistan
PL Poland
PR Puerto Rico
PT Portugal
RO Romania
RU Russia
SA Saudi Arabia
SE Sweden
SG Singapore
SI Slovenia
SK Slovakia
TH Thailand
TR Turkey
TW Taiwan
UA Ukraine
US United States
VE Venezuela
VG Virgin Islands, British
VI Virgin Islands, U.S.
VN Vietnam
ZA South Africa