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

API Update Log

Wish Merchant API Update Log. Every update of API will be recorded here.

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.

Locale

You can optionally specify locale in order to translate error messages into your language. If none is provided, your default locale will be used.

Supported locales: 'en', 'zh', 'fr', 'de'

Parameters
localeoptional The language you want the error message to be translated in. If none is provided, your default locale will be used. Supported locales: 'en', 'zh', 'fr', 'de'.

Example

Assume your access token is "an_example_access_token" . If you update a product with a invalid main_image url and you want error message to be translated in English('en'), your parameters would be:

  • id = 123456789009876543211234
  • access_token = an_example_access_token
  • main_image = xxx
  • locale = en

Example Request

> curl https://merchant.wish.com/api/v2/product/update -d "id=123456789009876543211234&access_token=an_example_access_token&main_image=xxx&locale=en"
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('123456789009876543211234')
$main_image = urlencode('xxx');
$locale = urlencode('en');

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

$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': 1000,
    'data': 13,
    'message': 'Cannot get image from URL xxx'
}

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. Can be 'approved', 'rejected' or 'pending'
country_shippingA list of CountryShipping objects. Each CountryShipping object contains attributes country_code and price, which represent the shipping price for that country
default_shipping_priceThe default shipping price for the product. Once set, the default shipping price will automatically apply as the shipping price for any new or unset countries.
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.

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 variation when the user purchases one, max 100,000
shippingThe shipping of the product when the user purchases one, max 1000. Note that this will be the product default shipping price and will be used as the shipping price for countries where shipping price is not provided when the product is created.
country_shipping_pricesoptional The country shipping prices of the product when user purchases one. JSON formatted dictionary of country codes and shipping prices accepted. Example: {"US":3.99,"CA":4.99}. Only countries you ship to are allowed. Any country you don't ship to is ignored.
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 quantity of products per order.
length optional The length of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 10
width optional The width of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 13.40
height optional The height of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 13.40
weight optional The weight of your product that will be packaged to ship to customer (Units in g)
  • Acceptable: 151.5
  • Acceptable: 10
declared_name optional Product name for logistics declaration
  • Acceptable: Repair Tools Kit Set
  • Acceptable: Rings
  • Unacceptable: !Rings
  • Unacceptable: T
  • Unacceptable: Good 衬衫
  • Unacceptable: Name that is longer than 200 characters
declared_local_name optional Product name written in local language for logistics declaration
  • Acceptable: 棉质外套
  • Unacceptable: !棉质外套
  • Unacceptable: 棉
  • Unacceptable: Name that is longer than 200 characters
pieces optional The amount of pieces associated with this item
  • Acceptable: 2
  • Acceptable: 1
  • Unacceptable: -1
declared_value optional The price of your product that will be declared to custom.
  • Acceptable: $100.99
  • Acceptable: 10.99
  • Unacceptable: $49.99 + S/H
hscode optional Harmonization System Code used for custom declaration.
  • Acceptable: 33021010.00
  • Acceptable: 6403.20
  • Unacceptable: 2
  • Unacceptable: a
origin_country optional country where product is manufactured. Country code should follow ISO 3166 Alpha-2 code. Example:CN, US
  • Acceptable: CN
  • Acceptable: US
  • Unacceptable: China
has_powder optional Whether product contains powder. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_liquid optional Whether product contains liquid. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_battery optional Whether product contains battery. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_metal optional Whether product contains metal. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0

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
  • country_shipping_prices = {"US":3.99,"CA":4.99}
  • 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',
  'country_shipping_prices'=>'{"US":3.99,"CA":4.99}'
  'tags'=>'red,shoe,cool',
  'description'=>'a cool shoe',
  'inventory'=>'100',
  'price'=>'100',
  'shipping'=>'10'
);
$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&country_shipping_prices={"US":3.99,"CA":4.99}&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');
$country_shipping_prices = urlencode('{"US":3.99,"CA":4.99}')
$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'}}],
                 'country_shippings': [{'CountryShipping': {'price': '4.99',
                                                            'country_code': 'CA'}},
                                       {'CountryShipping': {'price': '3.99',
                                                            'country_code': 'US'}}],
                 'variants': [{'Variant': {'enabled': 'True',
                                           'id': '52a11ebef94adc0cfee0dbdb',
                                           'product_id': '52a11ebdf94adc0cfee0dbd9',
                                           'inventory': '100',
                                           'shipping_time': '5-10',
                                           'sku': 'red-shoe-11',
                                           'price': '100.0',
                                           'shipping': '10.0'}}]}},
'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
warehouse_nameoptional The warehouse from where the variant shippings and inventories are fetched. If not specified, default warehouse shippings and inventories are used.

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': ' Cotton Women Fashion Dresses',
                      'id': '51e0a2c47d41a236cfffe3a0',
                      'name': 'TEST!!!',
                      'number_saves': '12529',
                      'number_sold': '14',
                      'review_status': 'approved',
                      'tags': [{'Tag': {'id': 'Dress', 'name': 'Dress'}},
                              ],
                      'default_shipping_price': '5.0',
                      'variants': [{'Variant': {'enabled': 'True',
                                                'id': '51e0a2c67d41a236cfffe3a2',
                                                'product_id': '51e0a2c47d41a236cfffe3a0',
                                                'inventory': '10000',
                                                'msrp': '20000.0',
                                                'price': '10000.0',
                                                'shipping': '101.0',
                                                'sku': 'Bottle',
                                                'LogisticsMetadata': {
                                                   'declared_name': 'Bottle',
                                                   'declared_local_name': '瓶子',
                                                   'pieces': 1,
                                                   'height': '12.0',
                                                   'weight': '2.0',
                                                   'width': '23.0',
                                                   'length': '2.0',
                                                   'origin_country': 'US',
                                                   'hscode':'6104299034',
                                                   'product_id': '59c17fbae3a3f61e0dba33b8',
                                                   'id': '51e0a2c67d41a236cfffe3a2',
                                                   'declared_value': '32.0',
                                                   'Composition': {
                                                   'has_liquid': 'True',
                                                   'has_battery': 'False',
                                                   'has_powder': 'False',
                                                   'has_metal': 'False'
                                                    }
                                                }
                                                }}]}},
                      'country_shippings': [{'CountryShipping': {'price': '4.99',
                                                                 'country_code': 'CA'}},
                                            {'CountryShipping': {'price': '3.99',
                                                                 'country_code': 'US'}}],
'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

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, 2016. 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, 2016, '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.
upto optional 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 before the given date or time will be fetched. Default is to fetch all updated products until now.
show_rejectedoptional If specified to 'true', this API will return all products including those inappropriate products that were rejected during review.
warehouse_nameoptional The warehouse from where the variants' shippings and inventories are fetched. If not specified, default warehouse variation shippings and inventories are used.

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 and before 2015-06-10 01:00:00 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
  • upto = 2015-06-10T01:00:00
  • 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');
$upto = urlencode('2015-06-10T01:00:00');

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

$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',
                       'default_shipping_price': '10.5',
                       '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',
                         'default_shipping_price': '10.0',
                         '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'}}]}}],
                         'country_shippings': [{'CountryShipping': {'price': '4.99',
                                                                    'country_code': 'CA'}},
                                               {'CountryShipping': {'price': '3.99',
                                                                    'country_code': 'US'}}],
'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 product, 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, AL, AR, AT, AU, BA, BB, BE, BG, BM, BR, CA, CH, CL, CO, CR, CY, CZ, DE, DK, DO, EC, EE, EG, ES, FI, FR, GB, GR, HN, HR, HU, ID, IE, IL, IN, IT, JM, JO, JP, KR, KW, LI, LT, LU, LV, MA, MC, MD, MK, MX, MY, NL, NO, NZ, PE, PH, PK, PL, PR, PT, QA, RO, RS, RU, SA, SE, SG, SI, SK, TH, TR, TW, UA, US, VE, VG, VI, VN, ZA,
priceMust provide either price or use_product_shipping The shipping price (in USD) of this product to this country, max 1000.
If use_product_shipping is set to true the value set here will be ignored, and it will use the product variation shipping prices for this country.
use_product_shippingMust provide either price or 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.
default_shipping_price The default shipping price for the product. Once set, the default shipping price will automatically apply as the shipping price for any new or unset countries.
warehouse_name The name of the warehouse on which the action will be performed. If warehouse name is not specified, the effect of enabled and wish_express will apply across all warehouses.
For example, if warehouse_name is not specified and:
if enabled is false, all standard / express warehouse's shipping to the specified country will be disabled;
if wish_express is false, the corresponding Express warehouse's shipping to that country will be disabled;
if wish_express is true, shipping will be copied to the corresponding Express warehouse, and inventory will be split between the corresponding Express warehouses and the Standard warehouse, no values will be modified if already set

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, enable Wish Express to Canada, and set the default shipping price to $3.99 USD, your parameters would be:

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

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');
$default_shipping_price = urlencode('3.99');

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

$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, AL, AR, AT, AU, BA, BB, BE, BG, BM, BR, CA, CH, CL, CO, CR, CY, CZ, DE, DK, DO, EC, EE, EG, ES, FI, FR, GB, GR, HN, HR, HU, ID, IE, IL, IN, IT, JM, JO, JP, KR, KW, LI, LT, LU, LV, MA, MC, MD, MK, MX, MY, NL, NO, NZ, PE, PH, PK, PL, PR, PT, QA, RO, RS, RU, SA, SE, SG, SI, SK, TH, TR, TW, UA, US, VE, VG, VI, VN, ZA, You can set shipping prices for 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. If a country in this list is also in use_product_shipping_countries the value set here will be ignored, and it will use the product variation shipping prices for that country.
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'.
default_shipping_price The default shipping price for the product. Once set, the default shipping price will automatically apply as the shipping price for any new or unset countries.
warehouse_name The name of the warehouse on which the action will be performed. If warehouse name is not specified, the effect of disabled_countries, wish_express_add_countries and wish_express_remove_countries will apply across all warehouses.
For example, if warehouse_name is not specified and:
if disabled_countries is set, all standard / express warehouse's shipping to the specified countries will be disabled;
if wish_express_add_countries is set, shipping will be copied to the corresponding Express warehouse, and inventory will be split between the corresponding Express warehouses and the Standard warehouse, no values will be modified if already set;
if wish_express_remove_countries is set, express shipping will be disabled for the corresponding countries;
Parameter Priority

use_product_shipping_countries will override the set shipping value for the country if both are provided

The three variables - disabled_countries, wish_express_remove_countries, and wish_express_add_countries - have the following priority.

  1. disabled_countries
  2. wish_express_remove_countries
  3. wish_express_add_countries
For example, when 'US' is specified for all three, the disabled_countries take effect above others.

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, disable Wish Express for the product in the United States and Canada, and set the default shipping price to $3.99 USD, 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'
  • default_shipping_price = 3.99

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');
$default_shipping_price = urlencode('3.99');

$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_add_countries=%s&wish_express_remove_countries=%s&default_shipping_price=%s",
    $access_token, $id, $CA, $AU, $use_product_shipping_countries, $disabled_countries, $wish_express_add_countries, $wish_express_remove_countries, $default_shipping_price);

$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, AL, AR, AT, AU, BA, BB, BE, BG, BM, BR, CA, CH, CL, CO, CR, CY, CZ, DE, DK, DO, EC, EE, EG, ES, FI, FR, GB, GR, HN, HR, HU, ID, IE, IL, IN, IT, JM, JO, JP, KR, KW, LI, LT, LU, LV, MA, MC, MD, MK, MX, MY, NL, NO, NZ, PE, PH, PK, PL, PR, PT, QA, RO, RS, 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.
warehouses DataV2 A list of shipping options from all warehouses. Each shipping option contains the type of the price and the warehouse's name where it ships from.

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

{
  "message": "",
  "code": 0,
  "data": {
    "ProductCountryShipping": {
      "DataV2": {
        "ProductCountryWarehouseShipping": {
          "wish_express": "True",
          "warehouses": [
            {
              "WarehouseShipping": {
                "price_type": "wish_express",
                "price": "3.0",
                "warehouse_name": "EXPRESS-CA",
                "enabled": "True",
                "use_product_shipping": "False"
              }
            },
            {
              "WarehouseShipping": {
                "price_type": "normal",
                "price": "None",
                "warehouse_name": "STANDARD",
                "enabled": "False",
                "use_product_shipping": "True"
              }
            }
          ],
          "enabled": "True",
          "id": "123456789009876543211234",
          "country_code": "CA"
        }
      },
      "shipping_price": "3.0",
      "country_code": "CA",
      "wish_express": "True",
      "enabled": "True",
      "id": "123456789009876543211234",
      "use_product_shipping": "True"
    }
  }
}

Get All Shipping Prices of a Product

Retrieve the shipping prices of a product to all countries(both enabled and disabled).

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.
warehouses DataV2 A list of shipping options from all warehouses. Each shipping option contains the type of the price and the warehouse's name where it ships from.

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

{
  "message": "",
  "code": 0,
  "data": {
    "ProductCountryAllShipping": {
      "shipping_prices": [
        {
          "ProductCountryShipping": {
            "shipping_price": "4.0",
            "country_code": "CA",
            "wish_express": "False",
            "enabled": "True",
            "id": "53ec23e3104dae0ad27e1ecf",
            "use_product_shipping": "False"
          }
        },
        {
          "ProductCountryShipping": {
            "shipping_price": "Use Product Shipping Price",
            "country_code": "US",
            "wish_express": "False",
            "enabled": "True",
            "id": "53ec23e3104dae0ad27e1ecf",
            "use_product_shipping": "False"
          }
        }
      ],
      "id": "123456789009876543211234",
      "DataV2": {
        "ProductCountryWarehouseAllShipping": {
          "id": "123456789009876543211234",
          "countries": [
            {
              "ProductCountryWarehouseShipping": {
                "wish_express": "False",
                "warehouses": [
                  {
                    "WarehouseShipping": {
                      "price_type": "normal",
                      "price": "4.0",
                      "warehouse_name": "STANDARD",
                      "enabled": "True",
                      "use_product_shipping": "False"
                    }
                  }
                ],
                "enabled": "True",
                "id": "123456789009876543211234",
                "country_code": "CA"
              }
            },
            {
              "ProductCountryWarehouseShipping": {
                "wish_express": "False",
                "warehouses": [
                  {
                    "WarehouseShipping": {
                      "price_type": "wish_express",
                      "price": "None",
                      "warehouse_name": "EXPRESS-US",
                      "enabled": "True",
                      "use_product_shipping": "True"
                    }
                  },
                  {
                    "WarehouseShipping": {
                      "price_type": "normal",
                      "price": "None",
                      "warehouse_name": "STANDARD",
                      "enabled": "False",
                      "use_product_shipping": "True"
                    }
                  }
                ],
                "enabled": "True",
                "id": "123456789009876543211234",
                "country_code": "US"
              }
            }
          ]
        }
      }
    }
  }
}

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.
warehouses DataV2 A list of shipping options from all warehouses. Each shipping option contains the type of the price and the warehouse's name where it ships from.

Example

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

  • ids = 123456789009876543211234,111122223333444455556666
  • access_token = an_example_access_token

Example Request

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

$access_token = urlencode('an_example_access_token');
$ids = urlencode('123456789009876543211234,111122223333444455556666');

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

$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

{
  "message": "",
  "code": 0,
  "data": [
    {
      "ProductCountryAllShipping": {
        "shipping_prices": [
          {
            "ProductCountryShipping": {
              "shipping_price": "4.0",
              "country_code": "CA",
              "wish_express": "False",
              "enabled": "True",
              "id": "123456789009876543211234",
              "use_product_shipping": "False"
            }
          },
          {
            "ProductCountryShipping": {
              "shipping_price": "None",
              "country_code": "US",
              "wish_express": "False",
              "enabled": "True",
              "id": "123456789009876543211234",
              "use_product_shipping": "False"
            }
          }
        ],
        "id": "123456789009876543211234",
        "DataV2": {
          "ProductCountryWarehouseAllShipping": {
            "id": "123456789009876543211234",
            "countries": [
              {
                "ProductCountryWarehouseShipping": {
                  "wish_express": "False",
                  "warehouses": [
                    {
                      "WarehouseShipping": {
                        "price_type": "normal",
                        "price": "4.0",
                        "warehouse_name": "STANDARD",
                        "enabled": "True",
                        "use_product_shipping": "False"
                      }
                    }
                  ],
                  "enabled": "True",
                  "id": "123456789009876543211234",
                  "country_code": "CA"
                }
              },
              {
                "ProductCountryWarehouseShipping": {
                  "wish_express": "False",
                  "warehouses": [
                    {
                      "WarehouseShipping": {
                        "price_type": "wish_express",
                        "price": "None",
                        "warehouse_name": "EXPRESS-US",
                        "enabled": "True",
                        "use_product_shipping": "True"
                      }
                    },
                    {
                      "WarehouseShipping": {
                        "price_type": "normal",
                        "price": "None",
                        "warehouse_name": "STANDARD",
                        "enabled": "True",
                        "use_product_shipping": "True"
                      }
                    }
                  ],
                  "enabled": "True",
                  "id": "123456789009876543211234",
                  "country_code": "US"
                }
              }
            ]
          }
        }
      }
    },
    {
      "ProductCountryAllShipping": {
        "shipping_prices": [
          {
            "ProductCountryShipping": {
              "shipping_price": "7.0",
              "country_code": "CA",
              "wish_express": "False",
              "enabled": "True",
              "id": "111122223333444455556666",
              "use_product_shipping": "False"
            }
          },
          {
            "ProductCountryShipping": {
              "shipping_price": "None",
              "country_code": "US",
              "wish_express": "False",
              "enabled": "True",
              "id": "111122223333444455556666",
              "use_product_shipping": "False"
            }
          }
        ],
        "id": "111122223333444455556666",
        "DataV2": {
          "ProductCountryWarehouseAllShipping": {
            "id": "111122223333444455556666",
            "countries": [
              {
                "ProductCountryWarehouseShipping": {
                  "wish_express": "False",
                  "warehouses": [
                    {
                      "WarehouseShipping": {
                        "price_type": "normal",
                        "price": "7.0",
                        "warehouse_name": "STANDARD",
                        "enabled": "True",
                        "use_product_shipping": "False"
                      }
                    }
                  ],
                  "enabled": "True",
                  "id": "111122223333444455556666",
                  "country_code": "CA"
                }
              },
              {
                "ProductCountryWarehouseShipping": {
                  "wish_express": "False",
                  "warehouses": [
                    {
                      "WarehouseShipping": {
                        "price_type": "wish_express",
                        "price": "3.0",
                        "warehouse_name": "EXPRESS-US",
                        "enabled": "True",
                        "use_product_shipping": "False"
                      }
                    },
                    {
                      "WarehouseShipping": {
                        "price_type": "normal",
                        "price": "None",
                        "warehouse_name": "STANDARD",
                        "enabled": "True",
                        "use_product_shipping": "True"
                      }
                    }
                  ],
                  "enabled": "True",
                  "id": "111122223333444455556666",
                  "country_code": "US"
                }
              }
            ]
          }
        }
      }
    }
  ]
}

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
show_rejectedoptional If specified to 'true', this API will return all products including those inappropriate products that were rejected during review.
warehouse_nameoptional The product information will be for this warehouse. If not specified, the default warehouse product information is returned.

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. If you add a new variation with the existing color and size pair, it will update the exisiting variation instead of creating a new variation. If the default shipping price is set, it will be used as the shipping price for the new variation. Otherwise, the highest active variation shipping price will be used.

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
color optional The color of the variation. Example: red, blue, green. Note: color and size cannot both be empty. The color and size pair should not be repetitive.
size optional The size of the variation. Example: Large, Medium, Small, 5, 6, 7.5 Note: color and size cannot both be empty. The color and size pair should not be repetitive.
inventoryThe physical quantities you have for this variation, max 500,000
priceThe price of the variation when the user purchases one, max 100,000
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.
length optional The length of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 10
width optional The width of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 13.40
height optional The height of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 13.40
weight optional The weight of your product that will be packaged to ship to customer (Units in g)
  • Acceptable: 151.5
  • Acceptable: 10
declared_name optional Product name for logistics declaration
  • Acceptable: Repair Tools Kit Set
  • Acceptable: Rings
  • Unacceptable: !Rings
  • Unacceptable: T
  • Unacceptable: Good 衬衫
  • Unacceptable: Name that is longer than 200 characters
declared_local_name optional Product name written in local language for logistics declaration
  • Acceptable: 棉质外套
  • Unacceptable: !棉质外套
  • Unacceptable: 棉
  • Unacceptable: Name that is longer than 200 characters
pieces optional The amount of pieces associated with this item
  • Acceptable: 2
  • Acceptable: 1
  • Unacceptable: -1
declared_value optional The price of your product that will be declared to custom.
  • Acceptable: $100.99
  • Acceptable: 10.99
  • Unacceptable: $49.99 + S/H
hscode optional Harmonization System Code used for custom declaration.
  • Acceptable: 33021010.00
  • Acceptable: 6403.20
  • Unacceptable: 2
  • Unacceptable: a
origin_country optional country where product is manufactured. Country code should follow ISO 3166 Alpha-2 code. Example:CN, US
  • Acceptable: CN
  • Acceptable: US
  • Unacceptable: China
has_powder optional Whether product contains powder. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_liquid optional Whether product contains liquid. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_battery optional Whether product contains battery. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_metal optional Whether product contains metal. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0

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&shipping=3&size=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');
$product_var = array(
    'parent_sku'=>'red-shoe',
    'color'=>'red',
    'sku'=>'red-shoe-12',
    'inventory'=>10,
    'size'=>12,
    'price'=>10,
    'shipping'=>3,
);
$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&shipping=%s&size=%s&parent_sku=%s",
$access_token, $sku, $inventory, $price, $shipping, $size, $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',
                      'size': '12',
                      'sku': 'red-shoe-12',
                      'price': '10',
                      'shipping': '3'}},
 '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.
warehouse_nameoptional The warehouse from where the variant shipping and inventory are fetched. If not specified, default warehouse shipping and inventory are used.

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
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.
update_product_imageoptional If left out, the default value is True. When updating the variant whose image is the same as the product image, it will change the product main image and images of other variants that are using the same product main image. If update_product_image = False, the product image will not be changed.
warehouse_nameoptional The name of the warehouse on which the action will be performed. If the warehouse name is not provided, only the shipping price and inventory, if provided, will be applied to the STANDARD warehouse. The price, size, color, and MSRP are set to the product regardless of the warehouse.
length optional The length of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 10
width optional The width of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 13.40
height optional The height of your product that will be packaged to ship to customer (Units in cm)
  • Acceptable: 13.40
weight optional The weight of your product that will be packaged to ship to customer (Units in g)
  • Acceptable: 151.5
  • Acceptable: 10
declared_name optional Product name for logistics declaration
  • Acceptable: Repair Tools Kit Set
  • Acceptable: Rings
  • Unacceptable: !Rings
  • Unacceptable: T
  • Unacceptable: Good 衬衫
  • Unacceptable: Name that is longer than 200 characters
declared_local_name optional Product name written in local language for logistics declaration
  • Acceptable: 棉质外套
  • Unacceptable: !棉质外套
  • Unacceptable: 棉
  • Unacceptable: Name that is longer than 200 characters
pieces optional The amount of pieces associated with this item
  • Acceptable: 2
  • Acceptable: 1
  • Unacceptable: -1
declared_value optional The price of your product that will be declared to custom.
  • Acceptable: $100.99
  • Acceptable: 10.99
  • Unacceptable: $49.99 + S/H
hscode optional Harmonization System Code used for custom declaration.
  • Acceptable: 33021010.00
  • Acceptable: 6403.20
  • Unacceptable: 2
  • Unacceptable: a
origin_country optional country where product is manufactured. Country code should follow ISO 3166 Alpha-2 code. Example:CN, US
  • Acceptable: CN
  • Acceptable: US
  • Unacceptable: China
has_powder optional Whether product contains powder. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_liquid optional Whether product contains liquid. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_battery optional Whether product contains battery. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0
has_metal optional Whether product contains metal. Example: true, false.
  • Acceptable: Yes
  • Acceptable: No
  • Unacceptable: 0

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&shipping=10.00&inventory=1000&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->inventory = 1000;
$var->price = 10.11;
$var->shipping = 10;

$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
warehouse_nameThe name of the warehouse on which the action will be performed. If the warehouse name is not provided, the inventory will be applied to the STANDARD warehouse.

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
warehouse_nameoptional The warehouse from where the variants' shippings and inventories are fetched. If not specified, default warehouse variation shippings and inventories are used.

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

Bulk Update Product Variations

Bulk update up to 100,000 existing product variations. You can use this API to update inventory, disable or enable product variations in a batch. This API is non-blocking, a job_id will be returned. Use Get Job Status of Variation Bulk Update to get the current status of the job. Once the job is completed, use the following APIs to get the results: Get Successfully Updated SKUs from Variation Bulk Update, Get Errors from Variation Bulk Update.

HTTP Request Type: POST

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

Explore API

Parameters
updatesA json array of SKU objects. Each SKU object must have attribute sku as the unique identifier of a variation. Use the attribute inventory to update the inventory of a variation, and attribute enabled to enable or disable a variation.

Returns
A job_id will be returned if request is successful.

Example

Assume your access token is "an_example_access_token". If you would like to update the inventory of SKU "aaa" to 10, and disable SKU "bbb":

  • updates=[{"sku":"aaa","inventory":10},{"sku":"bbb","enabled":false}]
  • access_token = an_example_access_token

Example Request

> curl "https://merchant.wish.com/api/v2//api/v2/variant/bulk-sku-update -d "access_token=an_example_access_token&format=json&updates=[{"sku":"aaa","inventory":10},{"sku":"bbb","enabled":false}]"
    Not supported in SDK yet.
<?php

$access_token = urlencode('an_example_access_token');

$updates = urlencode('[{"sku":"aaa","inventory":10},{"sku":"bbb","enabled":false}]');

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

$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

Example Response
{
  "message": "",
  "code": 0,
  "data": {
    "job_id": "59e15a939a64f71c5024a1e3"
  }
}

Get Job Status of Variation Bulk Updates

Call this to get the current state and progress for your Product Variations bulk update.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/variant/get-bulk-update-job-status

Explore API

Parameters
job_id The unique identifier you received from bulk update production variations (/variant/bulk-sku-update)

Returns
The status of the specified bulk update job and current number of processed items, as well as the number of successes and failures.

Example

Assume your access token is "an_example_access_token". Suppose you want to check the status of your bulk update for product variations with job_id "59e00339b2d5b8367ac3e8bd":

  • job_id = 59e00339b2d5b8367ac3e8bd
  • access_token = an_example_access_token

Example Request

> curl https://merchant.wish.com/api/v2/variant/get-bulk-update-job-status -d "job_id='59e00339b2d5b8367ac3e8bd'&access_token=an_example_access_token"
    Not supported in SDK yet.
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('59e00339b2d5b8367ac3e8bd');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-status?access_token=%s&job_id=%s",
    $access_token, $job_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

{
  "message": "",
  "code": 0,
  "data": {
    "status": 4,
    "state": "FINISHED",
    "merchant_id": "515a29092f533b2778a7f625",
    "success_count": 10
    "end_time": 2017-10-17T05:48:21,
    "failure_count": 10,
    "start_time": "2017-10-17T05:46:51",
    "processed_count": 20,
    "results": {
        "successes": "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-successes?job_id=59e00339b2d5b8367ac3e8bd"
        "failures": "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-failures?job_id=59e00339b2d5b8367ac3e8bd"
    }
    "id": "59e5994b9a64f72cafea7730",
    "uploader_id": "5ae5923b9a64f72cab4a772a"
  }
}

Get Successfully Updated SKUs from Variation Bulk Updates

Call this to get a list of all SKUs that were successfully updated from your Product Variations bulk update.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/variant/get-bulk-update-job-successes

Explore API

Parameters
job_id The unique identifier you received from bulk update production variations (/variant/bulk-sku-update)
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 items that can be returned. Limit can range from 1 to 250 items and the default is 50

Returns
A list of successfully updated SKUs. 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". Suppose you want to check the first 5 SKUs from your bulk update for product variations with job_id "59e00339b2d5b8367ac3e8bd" that were updated successfully:

  • job_id = 59e00339b2d5b8367ac3e8bd
  • access_token = an_example_access_token
  • limit = 5

Example Request

> curl https://merchant.wish.com/api/v2/variant/get-bulk-update-job-successes -d "job_id='59e00339b2d5b8367ac3e8bd'&access_token=an_example_access_token&limit='5'"
    Not supported in SDK yet.
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('59e00339b2d5b8367ac3e8bd');

$limit = urlencode('5');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-successes?access_token=%s&job_id=%s&limit=%s",
    $access_token, $job_id, $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

{
  "message": "",
  "code": 0,
  "data": {
    "successes": [
      "SKU1",
      "SKU2",
      "SKU3",
      "SKU4",
      "SKU5"
    ]
  },
  "paging": {
    "next": "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-successes?start=5&limit=5"
  }
}

Get Errors from Variation Bulk Updates

Call this to get a list of all errors encountered from your Product Variations bulk update.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/variant/get-bulk-update-job-failures

Explore API

Parameters
job_id The unique identifier you received from bulk update production variations (/variant/bulk-sku-update)
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 items that can be returned. Limit can range from 1 to 250 items and the default is 50

Returns
A list of errors. 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". Suppose you want to check the first 3 errors that were raised from your bulk update for product variations with job_id "59e00339b2d5b8367ac3e8bd":

  • job_id = 59e00339b2d5b8367ac3e8bd
  • access_token = an_example_access_token
  • limit = 3

Example Request

> curl https://merchant.wish.com/api/v2/variant/get-bulk-update-job-failures -d "job_id='59e00339b2d5b8367ac3e8bd'&access_token=an_example_access_token&limit='3'"
    Not supported in SDK yet.
<?php

$access_token = urlencode('an_example_access_token');

$job_id = urlencode('59e00339b2d5b8367ac3e8bd');

$limit = urlencode('3');

$url = sprintf(
    "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-failures?access_token=%s&job_id=%s&limit=%s",
    $access_token, $job_id, $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

{
  "message": "",
  "code": 0,
  "data": {
    "errors": [
      {
        "sku": "fake_sku1",
        "error_code": 29,
        "error": "Your store does not have product with SKU 'fake_sku1', therefore no update can be done."
      },
      {
        "sku": "fake_sku2",
        "error_code": 29,
        "error": "Your store does not have product with SKU 'fake_sku2', therefore no update can be done."
      },
      {
        "sku": "fake_sku3",
        "error_code": 29,
        "error": "Your store does not have product with SKU 'fake_sku3', therefore no update can be done."
      }
    ]
  },
  "paging": {
    "next": "https://merchant.wish.com/api/v2/variant/get-bulk-update-job-failures?start=3&limit=3"
  }
}

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
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)
state

The state of the order. This value can be: APPROVED, SHIPPED, REFUNDED, REQUIRE_REVIEW

APPROVED: ship this

SHIPPED: already shipped, don't ship

REFUNDED: already refunded, don't ship

REQUIRE_REVIEW: under review, don't ship

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
released_to_merchant_time (UTC)The date and time of when the order was released to merchant, and it is the begin time to compute days to fulfill
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
merchant_responsible_refund_amount optional If the order state is REFUNDED, this field will return. merchant_responsible_refund_amount is the refund amount which is charge of the merchant.
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)
is_wish_express_late_arrival optional If the order is not a Wish Express order, this attribute will not be returned. If is_wish_express_late_arrival is True, it means that this order is late for the Wish Express required delivery date. If is_wish_express_late_arrival is False, it means that this order either i.) is confirmed delivered already and delivered on time, or ii.) isn't confirmed delivered yet and still before the deadline for now.
tracking_confirmedWhether tracking is confirmed or not
tracking_confirmed_dateThe date that tracking was confirmed
requires_delivery_confirmation If True, the order must be shipped using a qualified carrier, using a service that confirms delivery with last mile tracking.
The full list of qualified carriers can be found by clicking here.
To learn more about the Confirmed Delivery Policy, click here.
fine_ids A list to specify the fine ids associated with this order
is_combined_order True means the order is an EPC order. combined_orders are only available to EPC enabled merchants
original_shipping_detail When show_original_shipping_detail parameter is marked True and both is_combined_order , tracking_confirmed are true, then this field shows the original shipping address, instead of the EPC address
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)
show_original_shipping_detailoptionalTrue or False. When it is set to True, if the order is an EPC order and it is comfirmed shipped, the response body will contain the attribute 'OriginalShippingDetail' of original shipping detail, which is the original buyer's address instead of EPC address.

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&show_original_shipping_detail=True"
                                <?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

{
    "message": "",
    "code": 0,
    "data": {
        "Order": {
            "last_updated": "2018-04-24T07:30:52",
            "order_time": "2018-04-23T05:24:53",
            "color": "lightbrown",
            "price": "1.0",
            "variant_id": "aabfd88a7ddb06714ae5dde3",
            "ShippingDetail": {
                "phone_number": "+86 13816792755",
                "city": "Shanghai",
                "state": "Shanghai",
                "name": "EPC Shanghai - 542195",
                "country": "CN",
                "zipcode": "201901",
                "street_address1": "No.419 Gongyue RD Baoshan District Shanghai - 542195"
            },
            "shipped_date": "2018-04-24",
            "cost": "0.85",
            "shipping_cost": "0.85",
            "is_wish_express": "False",
            "requires_delivery_confirmation": "False",
            "product_image_url": "https://contestimg.wish.com/api/webimage/5abfd8801ab08a1da66447ad-normal.jpg?cache_buster=4b66fc88f4ad4c7c3176cd07fbfab237",
            "size": "One Size",
            "sku": "aa2620a43d9844313509e019-light brown-One Size",
            "shipping_provider": "WishPost",
            "order_total": "1.7",
            "product_id": "aabfd8801ab08a1da66447ad",
            "tracking_confirmed": "True",
            "state": "SHIPPED",
            "shipping": "1.0",
            "OriginalShippingDetail": {
                "phone_number": "01233434",
                "city": "Edinburg",
                "state": "Texas",
                "name": "Mabel hinojosa",
                "country": "US",
                "zipcode": "78511",
                "street_address1": "aaaa n terry rd"
            },
            "order_id": "aadd6e252ad6c17fd4542195",
            "tracking_number": "WI0000000aa056EPC",
            "released_to_merchant_time": "2018-04-23T13:30:50",
            "is_combined_order": "True",
            "tracking_confirmed_date": "2018-04-24T15:43:40",
            "quantity": "1",
            "product_name": "Waterproof Eyebrow Pencil Pen Eye Brow Liner Cosmetic Makeup Beauty Tool Lasting waterproof eye brow pencil",
            "transaction_id": "aadd6e22a016522e7b6f781e",
            "fine_ids": ["5ab4e367ae3004ebb12c28ab"]
        }
    }
}
                            

Retrieve Recently Changed Orders

This API will be changed starting Oct. 24, 2016. 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, 2016, '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.
upto optional 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 before the given date or time will be fetched. Default is to fetch all updated products until now.
wish_express_onlyoptional If set to True, the API will only return Wish Express orders
show_original_shipping_detailoptionalTrue or False. When it is set to True, if the order is an EPC order and it is comfirmed shipped, the response body will contain the attribute 'OriginalShippingDetail' of original shipping detail, which is the original buyer's address instead of EPC address.

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: (And you would like to get the original shipping details)

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

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&show_original_shipping_detail=True"
                                <?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

{
    "message": "",
    "code": 0,
    "data": [
        {
            "Order": {
                "last_updated": "2018-04-20T09:58:20",
                "order_time": "2018-04-15T22:06:32",
                "color": "white",
                "price": "8.0",
                "variant_id": "aa4a4305227c624cbe00698c",
                "ShippingDetail": {
                    "phone_number": "3282833435",
                    "city": "Phillsburfg%b",
                    "state": "New Jersey",
                    "name": "John",
                    "country": "US",
                    "zipcode": "08865",
                    "street_address1": "111 Thomas St"
                },
                "shipped_date": "2018-04-20",
                "cost": "6.8",
                "shipping_cost": "5.1",
                "is_wish_express": "False",
                "requires_delivery_confirmation": "True",
                "product_image_url": "https://contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f",
                "size": "7(EUR37)",
                "sku": "aaf3106_7_White",
                "shipping_provider": "EMS",
                "order_total": "11.9",
                "product_id": "aa4a42ffd20e930b10742434",
                "tracking_confirmed": "True",
                "state": "SHIPPED",
                "shipping": "6.0",
                "order_id": "aad3cce86cb7a067f1680a92",
                "tracking_number": "LY113628433CN",
                "released_to_merchant_time": "2018-04-16T06:20:21",
                "is_combined_order": "False",
                "tracking_confirmed_date": "2018-04-24T12:15:48",
                "quantity": "1",
                "product_name": "Fashion Womens Sneakers Breathable Mesh Running Sports Shoes",
                "transaction_id": "aad3cce5d130801451d77758",
                "fine_ids": ["5ab4e367ae3004ebb12c28ab"]
            }
        },
        {
            "Order": {
                "last_updated": "2018-04-20T07:09:09",
                "order_time": "2018-03-12T20:23:25",
                "color": "rose",
                "price": "8.0",
                "variant_id": "aa4a433695f79f3bc9f0c381",
                "ShippingDetail": {
                    "phone_number": "+86 13816792755",
                    "city": "Shanghai",
                    "state": "Shanghai",
                    "name": "EPC Shanghai - 088220",
                    "country": "CN",
                    "zipcode": "201901",
                    "street_address1": "No.419 Gongyue RD Baoshan District Shanghai - 088220"
                },
                "shipped_date": "2018-03-15",
                "cost": "6.8",
                "shipping_cost": "5.1",
                "is_wish_express": "False",
                "requires_delivery_confirmation": "True",
                "product_image_url": "https://contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f",
                "size": "6(EUR35)",
                "sku": "aaf31048_6_Rose",
                "shipping_provider": "WishPost",
                "order_total": "11.9",
                "product_id": "aa4a42ffd20e930b10742434",
                "tracking_confirmed": "True",
                "state": "SHIPPED",
                "shipping": "6.0",
                "OriginalShippingDetail": {
                    "phone_number": "206446113765",
                    "city": "Des moines",
                    "state": "Washington",
                    "name": "Uyen John",
                    "country": "US",
                    "zipcode": "98198",
                    "street_address1": "1111 marine view dr. S"
                },
                "order_id": "aaa6e1bd631b6c703c088220",
                "tracking_number": "WI110000001743EPC",
                "released_to_merchant_time": "2018-03-13T04:31:02",
                "is_combined_order": "True",
                "tracking_confirmed_date": "2018-03-15T15:54:24",
                "quantity": "1",
                "product_name": "Fashion Womens Sneakers Breathable Mesh Running Sports Shoes",
                "transaction_id": "aaa6e1bcb40365735be165a9",
                "fine_ids": []
            }
        }
    ],
    "paging": {
        "next": "https://merch.corp.contextlogic.com/api/v2/order/multi-get?show_original_shipping_detail=True&start=121&limit=20&access_token=8f937c7c6cea4f8c89f6428444edb178&since=2018-04-20",
        "previous": "https://merch.corp.contextlogic.com/api/v2/order/multi-get?show_original_shipping_detail=True&start=81&limit=20&access_token=8f937c7c6cea4f8c89f6428444edb178&since=2018-04-20"
    }
}
                            

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',
                      'released_to_merchant_time': '2014-01-20T21:20:20',
                      'order_id': '123456789009876543210164',
                      'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      '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',
                      'is_combined_order': False,
                      'fine_ids': []}},
           {'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',
                       'released_to_merchant_time': '2014-01-20T21:20:20',
                       'order_id': '1114a7cfb2ec2d42d272b627',
                       'order_total': '17.6',
                      'product_id': '1113fad43deaf71536cb2c74',
                      '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',
                      'is_combined_order': False,
                      'fine_ids': []}}],
 '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 Confirmed Delivery carriers that provides last mile tracking.
Click here to view the list of Confirmed Delivery carriers.
Click here to view the list of Confirmed Delivery countries.
Orders being fulfilled to Sweden must be shipped with certain carriers.
Click here to view the list of accepted carriers when shipping to Sweden.

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.
origin_country_codeoptional The country where the package is shipping from. Country code should follow ISO 3166 Alpha-2 code. Example: CN, US
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
  • origin_country_code = CN
  • 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&origin_country_code=CN&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.

Use refund reason code 1 if you are refunding an order that is not marked shipped.

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 tables below 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, item is out of stock
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, unable to ship

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 Confirmed Delivery carriers that provides last mile tracking.
Click here to view the list of Confirmed Delivery carriers.
Click here to view the list of Confirmed Delivery countries.

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.
origin_country_codeoptional The country where the package is shipping from. Country code should follow ISO 3166 Alpha-2 code. Example: CN, US
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
  • origin_country_code = CN
  • 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&origin_country_code=CN&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': ''
}

Warehouse

The Warehouse object represents separate Warehouses and shipping options you provide. With this API, you can fetch a list of your warehouses.

Attributes
idWish's unique identifier for the warehouse
warehouse_unit_idThe human readable ID for the warehouse, this is the ID to use for other API calls
destination_countriesThe list of destination country codes the Warehouse ships to, this field is currently only provided for Wish Express warehouses and only supports one country per Warehouse.
warehouse_typeThe type of shipping the Warehouse provides, 1 for Standard Shipping, 2 for Wish Express
warehouse_type_nameHuman readable string for the type of shipping the Warehouse provides

Get all Warehouses

Retrieves a list of all of your warehouses.

HTTP Request Type: GET

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

Explore API

Returns
Returns your list of Warehouses objects.

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/warehouse/get-all?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');
$warehouses = $client->getAllWarehouses();
print_r($warehouses);
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/warehouse/get-all?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

{
  "message": "",
  "code": 0,
  "data": [
    {
      "MerchantWarehouse": {
        "warehouse_type_name": "EXPRESS",
        "destination_countries": [
          "US"
        ],
        "warehouse_type": "2",
        "id": "59e6xxxxxxxxxxxxxxxxxxxx",
        "warehouse_unit_id": "EXPRESS-US"
      }
    },
    {
      "MerchantWarehouse": {
        "warehouse_type_name": "STANDARD",
        "warehouse_type": "1",
        "id": "59e6xxxxxxxxxxxxxxxxxxxx",
        "warehouse_unit_id": "STANDARD"
      }
    }
  ]
}

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

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

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

{'code': 0,
 'data': [{'Ticket': {'UserInfo': {'id': '54f8e4ef2743dxxxxxxxxxxx',
                                      'joined_date': '2014-03-05T13:21:19',
                                      'locale': 'pt',
                                      'name': 'Mr. Rogers'},
                        'default_refund_reason': '19',
                        'id': '54f8ecd2f0812xxxxxxxxxx',
                        'items': [{'Order': {'ShippingDetail': {'city': 'San Fransicso',
                                                                   'country': 'BR',
                                                                   'name': 'Mr. Rogers',
                                                                   'phone_number': '1234567890',
                                                                   'state': 'S\xe3o Paulo',
                                                                   'street_address1': '123 Fake St',
                                                                   'street_address2': 'Apt 5',
                                                                   'zipcode': '10000000'},
                                               'color': 'black',
                                               'cost': '16.2',
                                               'last_updated': '2014-03-06T07:37:16',
                                               'order_id': '123456789012345678901234',
                                               'order_time': '2015-03-05T23:40:53',
                                               'released_to_merchant_time': '2015-03-05T23:45:53',
                                               'order_total': '22.5',
                                               'price': '18.0',
                                               'product_id': '123456789012345678901234',
                                               'product_image_url': 'http://contestimg.wish.com/api/webimage/123456789012345678901234-normal.jpg',
                                               'product_name': 'Cloth',
                                               'quantity': '1',
                                               'refunded_by': 'CANCELLED BY CUSTOMER',
                                               'refunded_reason': 'Customer cancelled the order',
                                               'refunded_time': '2015-03-05',
                                               'shipping': '7.0',
                                               'shipping_cost': '6.3',
                                               'size': 'M',
                                               'sk': 'SKU123-XL',
                                               'state': 'REFUNDED',
                                               'transaction_id': '123456789012345678901234',
                                               'variant_id': '5285bd3fb5baba7*********'}}],
                        'label': 'Request Refund/Cancel Order: Request a Different Color',
                        'last_update_date': '2015-03-09T12:13:57',
                        'merchant_id': '123456789012345678901234',
                        'open_date': '2015-03-05T23:54:58',
                        'photo_proof': 'False',
                        'replies': [{'Reply': {'date': '2015-03-05T23:54:58',
                                                 'image_urls': '[]',
                                                 'message': 'Quero meu reembolso ',
                                                 'sender': 'user',
                                                 'translated_message': 'I want my refund',
                                                 'translated_message_zh': '我希望我的退款'}}],
                        'state': 'Awaiting your response',
                        'state_id': '4',
                        'subject': 'Solicitar Reembolso/ Cancelar Pedido',
                        'sublabel': 'Request a Different Color',
                        'transaction_id': '123456789012345678901234'}},
           {'Ticket': {'UserInfo': {'id': '123456789012345678901234',
                                      'joined_date': '2011-12-12T05:22:52',
                                      'locale': 'en',
                                      'name': 'George Bush'},
                        'id': '123456789012345678901234',
                        'items': [{'Order': {'ShippingDetail': {'city': 'Waterloo',
                                                                   'country': 'CA',
                                                                   'name': 'George Bush',
                                                                   'phone_number': '1123-123-1234',
                                                                   'state': 'Ontario',
                                                                   'street_address1': 'Fake St',
                                                                   'zipcode': 'A0A 0A0'},
                                               'cost': '4.6',
                                               'last_updated': '2015-03-09T10:23:13',
                                               'order_id': '123456789012345678901234',
                                               'order_time': '2012-12-12T06:40:12',
                                               'released_to_merchant_time': '2012-12-12T07:40:12',
                                               'order_total': '29.2',
                                               'price': '5.11',
                                               'product_id': '123456789012345678901234',
                                               'product_image_url': 'http://contestimg.wish.com/api/webimage/5253fd0b1xxxxxxxxxxx-normal.jpg',
                                               'product_name': 'Automatic Car',
                                               'quantity': '4',
                                               'shipped_date': '2011-12-12',
                                               'shipping': '3.0',
                                               'shipping_cost': '2.7',
                                               'shipping_provider': 'SwissPost',
                                               'sk': 'SKU123',
                                               'state': 'SHIPPED',
                                               'tracking_number': 'TR1ACK',
                                               'transaction_id': '123456789012345678901234',
                                               'variant_id': '123456789012345678901234'}}],
                        'label': 'Shipping Status or ETA Inquiry',
                        'last_update_date': '2015-03-09T11:02:28',
                        'merchant_id': '123456789012345678901234',
                        'open_date': '2012-03-09T04:11:00',
                        'photo_proof': 'False',
                        'replies': [{'Reply': {'date': '2015-03-09T04:57:33',
                                                 'image_urls': '[]',
                                                 'message': '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 ',
                                                 'sender': 'user',
                                                 'translated_message': '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 ',
                                                 'translated_message_zh': '我还不接受这个项目,这是了解2015年3月8日,据估计,这将是这里2015年1月2日,也没有到达'}},
                                     {'Reply': {'date': '2015-03-09T10:23:12',
                                                 'image_urls': '[]',
                                                 'message': "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",
                                                 'sender': 'merchant'}},
                                     {'Reply': {'date': '2015-03-09T11:02:28',
                                                 'image_urls': '[]',
                                                 'message': 'Please send me a new parcel thank yo',
                                                 'sender': 'user',
                                                 'translated_message': 'Please send me a new parcel thank yo',
                                                 'translated_message_zh': '请给我一个新的包裹谢谢'}}],
                        'state': 'Awaiting your response',
                        'state_id': '4',
                        'subject': 'Where is my order?',
                        'sublabel': '',
                        'transaction_id': '548a8de6baa0830ffxxxxxxx'}}],
 'message': '',
 'paging': {'next': '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 Announcement

Fetch the Announcement

HTTP Request Type: GET

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

Explore API

Parameters None

Returns
Response will contain a GetBDAnnResponse object

Example

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

  • 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

{
    'message': '', 'code': 0, 'data': {
        'GetBDAnnResponse': {
            'title': '关于下调XXXXXXXXXXXXXXXXXXX',
            'created': 'Apr 01, 2016',
            'bd_id': '55781a50d29XXXXXXXXXX',
            'bd_name': 'TraXX XXXX',
            'message': '感谢大家XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
            'viewed': '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

{
    'message': '', 'code': 0, 'data': [{
        'SystemUpdatesResponse': {
            'release_date': 'Thursday May 19, 2016',
            'id': '573e46218db5d1487ee4bdd8',
            'features': [{
                'Feature': {
                    'cn_title': '关于更新每个产品国际运费的新功能',
                    'body': '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:',
                    'title': 'New Feature About Updating International Shipping Prices Per Product',
                    'link': 'http://merchantfaq.wish.com/hc/en-us/articles/218812008',
                    'cn_body': '尊敬的商户,我们非常荣幸的通知您,您现在可以给每个产品针对不同国家来设置不同运费了。无论您的产品是什么尺寸和重量或者要寄往哪些国家,您总可以根据不同的产品设定邮费。操作方法如下,您可以先使用配送设置页面来设置每个国家的默认运费,再去产品一览页面根据不同的国家更改每个产品的运费,可以手动修改或者上传CSV文件。 如果您想要获取更多信息和具体操作步骤,请访问常见问题:',
                    'cn_link': 'http://merchantfaq.wish.com/hc/zh-cn/articles/218812008'
                }
            }]
        }
    }, {
        'SystemUpdatesResponse': {
            'release_date': 'Monday August 03, 2015',
            'id': '55bfae216daddd41f93512ce',
            'features': [{
                'Feature': {
                    'cn_title': '商户APP(Android)最新上线',
                    'body': '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: ',
                    'title': 'Announcing New Merchant Android App',
                    'link': 'http://merchant.wish.com/mobile',
                    'cn_body': '我们很高兴地宣布:Wish商户APP上线了。该APP会首先在安卓系统上线, 让广大商户在手机上便能查看店铺内的最新数据动态,了解最新的系统更新,并收到更新信息的及时通知。请从Google play,Xiaomi应用商店下载。也可直接点击以下链接下载:',
                    'cn_link': 'http://merchant.wish.com/mobile'
                }
            }]
        }
    }]
}

Infractions

Interface to check infractions

Infractions count

Get the count of infractions of different stages

HTTP Request Type: GET

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

Explore API

Parameters
stage optional One of 1, 2 or 3, default is 1:
  • 1: ACTION_REQUIRED (need attentaion of merchant)
  • 2: AWAITING_WISH (Wish is processing)
  • 3: HISTORY (all other infractions)
The default is 1

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

{
    'message': '', 'code': 0, 'data': {
        'CountInfractionsResponse': {
            'count': '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
start optional 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
limit optional A limit on the number of infractions that can be returned. Limit can range from 1 to 500 items and the default is 50
stage optional One of 1, 2 or 3, default is 1:
  • 1: ACTION_REQUIRED (need attentaion of merchant)
  • 2: AWAITING_WISH (Wish is processing)
  • 3: HISTORY (all other infractions)
The default is 1
since optional 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.
upto optional 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 before the given date or time will be fetched. Default is to fetch all updated products until now.

Returns
Response will contain a InfractionsResponse object that has a list of infraction objects which includes the information of that infraction
Infraction

id Unique identifier for the infraction
link The webpage link of the infraction
created_time The create time of the infraction
last_updated The last updated time of the infraction
state The current state of the infraction. The state may be 'NEW', 'AWAITING_MERCHANT', 'AWAITING_ADMIN' or 'CLOSED'
reason The message about the infraction
fine_amount The fine amount of the infraction
proof The proof list of the infraction, the 'proof_type' may be 'TICKET', 'ORDER', 'PRODUCT' or 'MERCHANT'

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

    {
        "message": "",
        "code": 0,
        "data": {
            "InfractionsResponse": {
                "infractions": [
                    {
                        "Infraction": {
                            "fine_amount": "10.0",
                            "reason": "Inappropriate content detected for product listing",
                            "last_updated": "2018-06-01T23:15:57",
                            "state": "AWAITING_MERCHANT",
                            "created_time": "2018-05-12T05:07:59",
                            "link": "https://merch.corp.contextlogic.com/warning/view/5af67aaf2232612b29f6c5eb",
                            "id": "5af676af22326ssb29f6c5eb",
                            "proof": [
                                {
                                    "InfractionProof": {
                                        "message": "Inappropriate content detected for product listing",
                                        "proof_type": "PRODUCT",
                                        "object_id": "5af4317fb9c68aa5f9f25022"
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        },
        "paging": {
            "next": "https://merch.corp.contextlogic.com/api/v2/get/infractions?access_token=xxx&start=50"
        }
    }

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': ''
}

ProductBoost

All timestamps in ProductBoost API are in timezone PST.

Get a Campaign

Get information on a ProductBoost campaign.

HTTP Request Type: GET

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

Explore API

Parameters
id The ID of your ProductBoost campaign

Returns
Your ProductBoost campaign, including all products in the campaign. The returned campaign will include the following attributes:

campaign_id ID of the campaign.
campaign_name Name of the campaign.
campaign_state One of 'NEW', 'SAVED', 'STARTED', 'STOPPED', 'ENDED', 'CANCELLED', and 'PENDING'.
  • NEW: Campaign has been created and it can still be edited.
  • SAVED: Campaign has been scheduled and is ready to be included in the next promotion.
  • STARTED: Campaign has started. Your products are being promoted now.
  • STOPPED: Campaign has been scheduled to stop.
  • ENDED: Campaign has ended. Campaign feedback data will be collected and fee will be charged to the account.
  • CANCELLED: Campaign has been cancelled.
  • PENDING: Campaign renew failed. Edit the campaign to continue boosting.
start_time Start date of the campaign (PST).
end_time End date of the campaign (PST).
auto_renew If 'auto_renew' is 'True', the campaign will automatically renew itself after the end date.
gmv Total GMV of listed products during this campaign.
sales Total number of sales of the listed products during this campaign.
campaign_max_budget Budget of this campaign.
total_campaign_spend Total expense on this campaign, which is the sum of 'total_impression_fees_charged' and 'total_enrollment_fees_charged'
total_impression_fees_charged Total expense on paid impressions.
total_enrollment_fees_charged The enrollment fees charged for this campaign.
total_impressions Total number of impressions of all listed products in this campaign.
paid_impressions Total number of paid impressions of all listed products in this campaign.
impression_fees_breakdown Impression fees breakdown. Each breakdown section ends on Monday.
can_edit A value of 'False' indicates this campaign can not be edited.
is_automated_campaign A value of 'True' indicates this is an automated campaign, or duplicated from an automated campaign.
products Products listed in this campaign. Each entry contains:
  • 'product_id': the ID of the product
  • 'keywords': a list of up to 30 keywords
  • 'merchant_bid_rate': the amount you bid for the campaign
  • 'actual_charge_rate': the actual cost that you will pay per 1000 impressions
  • 'enrollment fee': an additional amount charged per product upon submitting the campaign

Error responses

20001 Invalid campaign ID: the campaign ID either does not exist, or does not belong to the merchant.

Example

Assume your access token is "an_example_access_token". Say your id is "5ab4e367ae3004ebb12c28ab".

  • access_token = an_example_access_token
  • id = 5ab4e367ae3004ebb12c28ab

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/get?id=5ab4e367ae3004ebb12c28ab&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');
$id = '5ab4e367ae3004ebb12c28ab'
$client->getProductBoostCampaign($id);
<?php

$access_token = urlencode('an_example_access_token');

$id = '5ab4e367ae3004ebb12c28ab'

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/get?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

{
  "message": "",
  "code": 0,
  "data": {
    "Campaign": {
      "campaign_max_budget": "17.89",
      "total_enrollment_fees_charged": "0.0",
      "auto_renew": "False",
      "start_time": "2018-05-19T00:00:00",
      "total_impressions": "0",
      "impression_fees_breakdown": [
        {
          "ImpressionFee": {
            "end_time": "2018-05-21",
            "amount": "0.0",
            "fee_state": "NOT_CHARGED",
            "start_time": "2018-05-14"
          }
        }
      ],
      "campaign_id": "5ad4d3ba6cdcf03e10294812",
      "paid_impressions": "0",
      "sales": "0",
      "total_impression_fees_charged": "0.0",
      "products": [
        {
          "Product": {
            "actual_charge_rate": "3.5",
            "keywords": ["test"],
            "merchant_bid_rate": "3.5",
            "product_id": "521d93e7f2e02888c18c0d6e",
            "enrollment_fee": "0.0"
          }
        }
      ],
      "campaign_name": "my campaign",
      "end_time": "2018-05-20T00:00:00",
      "merchant_id": "577cece8ca00000e8153dffa",
      "total_campaign_spend": "0.0",
      "gmv": "0.0",
      "campaign_state": "NEW",
      "can_edit": "True",
      "is_automated_campaign": "False"
    }
  }
}

Get Multiple Campaigns

Returns a list of ProductBoost campaigns. This API is paginated, so campaigns over a certain limit will not be returned.

HTTP Request Type: GET

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

Explore API

Parameters
startoptional An offset into the list of returned items. Maximum value for start is 10000 and the default is 0. Used for paging.
limitoptional A limit on the number of items that will be returned. Maximum value for limit is 500 and the default is 50. Used for paging.
start_timeoptional Only return campaigns that start on or after start_time (in PST). Acceptable formats: YYYY-MM-DDTHH:MM:SS (the T is required) or YYYY-MM-DD.

Returns
A list of ProductBoost campaigns, sorted in reverse chronological order by start time, adhering to the optional parameters. Each campaign contains the same set of attributes as get-campaign API. If the response requires pagination the "paging" field will contain the URL for the next/previous page of results.

Error responses

1000 Invalid parameters. i.e. 'limit' is out of range

Example

Assume your access token is "an_example_access_token". Say you want to get all campaigns starting in 2018 and after. start_time is then 2018-01-01.

  • access_token = an_example_access_token
  • start_time = 2018-01-01

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/multi-get?start_time=2018-01-01&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$start_time = urlencode('2018-01-01')

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

$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": [
    {
      "Campaign": {
        "campaign_max_budget": "17.89",
        "total_enrollment_fees_charged": "0.0",
        "auto_renew": "False",
        "start_time": "2018-05-19T00:00:00",
        "total_impressions": "0",
        "impression_fees_breakdown": [
          {
            "ImpressionFee": {
              "end_time": "2018-05-21",
              "amount": "0.0",
              "fee_state": "NOT_CHARGED",
              "start_time": "2018-05-14"
            }
          }
        ],
        "campaign_id": "5ce4d3ba6cdcf03e15307766",
        "paid_impressions": "0",
        "sales": "0",
        "total_impression_fees_charged": "0.0",
        "products": [
          {
            "Product": {
              "actual_charge_rate": "3.5",
              "keywords": ["soap"],
              "merchant_bid_rate": "3.5",
              "product_id": "589d93e7f2e02872c18cce3a",
              "enrollment_fee": "0.0"
            }
          },
          ...
        ],
        "campaign_name": "my campaign",
        "end_time": "2018-05-20T00:00:00",
        "merchant_id": "556cece8ee99102e8153dffa",
        "total_campaign_spend": "0.0",
        "gmv": "0.0",
        "campaign_state": "NEW",
        "can_edit": "True",
        "is_automated_campaign": "False"
      }
    },
    ...
  ],
  "paging": {
    "next": "https://merch.corp.contextlogic.com/api/v2/product-boost/campaign/multi-get?access_token=ab12ab40b05c46ec9bf0e507af9517d9&start=4&limit=2",
    "previous": "https://merch.corp.contextlogic.com/api/v2/product-boost/campaign/multi-get?access_token=ab12ab40b05c46ec9bf0e507af9517d9&start=0&limit=2"
  }
}

List Low Budget Campaigns

Returns a list of low-budget ProductBoost campaigns. This API is paginated, so campaigns over a certain limit will not be returned.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product-boost/campaign/list-low-budget

Explore API

Parameters
startoptional An offset into the list of returned items. Maximum value for start is 2000 and the default is 0.
limitoptional A limit on the number of items that will be returned. Maximum value for limit is 100 and the default is 20.

Returns
A list of low-budget ProductBoost campaigns, sorted in descending order by start time. Each campaign contains the same set of attributes as get-campaign API. The "paging" field will contain the URL for the next/previous page of results.

Error responses

20701 Parameter 'start' must be a positive integer
20702 Parameter 'limit' cannot exceed 100

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/product-boost/campaign/list-low-budget?access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/list-low-budget?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

{
  "message": "",
  "code": 0,
  "data": [
    {
      "Campaign": {
        "campaign_max_budget": "10",
        "total_enrollment_fees_charged": "0.0",
        "auto_renew": "False",
        "start_time": "2018-05-19T00:00:00",
        "total_impressions": "0",
        "impression_fees_breakdown": [
          {
            "ImpressionFee": {
              "end_time": "2018-05-21",
              "amount": "0.0",
              "fee_state": "NOT_CHARGED",
              "start_time": "2018-05-14"
            }
          }
        ],
        "campaign_id": "5ce4d3ba6cdcf03e15307766",
        "paid_impressions": "9.99",
        "sales": "0",
        "total_impression_fees_charged": "0.0",
        "products": [
          {
            "Product": {
              "actual_charge_rate": "3.5",
              "keywords": ["soap"],
              "merchant_bid_rate": "3.5",
              "product_id": "589d93e7f2e02872c18cce3a",
              "enrollment_fee": "0.0"
            }
          },
          ...
        ],
        "campaign_name": "my campaign",
        "end_time": "2018-05-20T00:00:00",
        "merchant_id": "556cece8ee99102e8153dffa",
        "total_campaign_spend": "0.0",
        "gmv": "0.0",
        "campaign_state": "NEW",
        "can_edit": "True",
        "is_automated_campaign": "False"
      }
    },
    ...
  ],
  "paging": {
    "next": "https://merch.corp.contextlogic.com/api/v2/product-boost/campaign/list-low-budget?access_token=ab12ab40b05c46ec9bf0e507af9517d9&start=20&limit=20",
    "previous": "https://merch.corp.contextlogic.com/api/v2/product-boost/campaign/list-low-budget?access_token=ab12ab40b05c46ec9bf0e507af9517d9&start=0&limit=20"
  }
}

Create a Campaign

Create a new ProductBoost campaign to promote your products.

Note: you must call this API with the parameters in the HTTP request body.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/campaign/create

Explore API

Request Body
max_budget The maximum amount you are willing to spend on your campaign
auto_renew Whether you want the campaign to auto-renew
campaign_name The name of your campaign
start_date The start date of the campaign
end_date The end date of the campaign. It must be greater than start_date and no more than 4 weeks later than start_date.
products

A JSON array of products to be included in the campaign. Each product must be an object containing the fields "product_id", "bid" and "keywords".

"product_id" is the id of the product. It must not be included in any other ProductBoost campaign in the date range.

"bid" is the maximum amount you are willing to pay for 1000 impressions of that product. Must be at least $0.30 and at most $10.00.

"keywords" is an array of keywords to help customers find your products. Number of keywords can not exceed 200.

See the example for a sample input.

Returns
The ProductBoost campaign you just created.

Error responses

20801 The request body is invalid (i.e. can't be parsed).
20823 Invalid 'campaign_name' parameter.
20821 Invalid 'auto_renew' parameter. 'auto_renew' must be a boolean.
20814 Invalid 'max_budget' parameter. 'max_budget' must be a number.
20815 Invalid 'start_date' parameter. 'start_date' must be of format YYY-MM-DD.
20816 Invalid 'end_date' parameter. 'end_date' must be of format YYY-MM-DD.
20813 Invalid 'products' parameter. One or more attributes under 'products' are invalid. Refer to 'Request Body' section to see requirements of 'products' attribute.
20805 'bid' attribute under 'products' is too low.
20806 'bid' attribute under 'products' is too high.
20820 'keywords' attribute under 'products' has too many words listed.
20808 'keywords' attribute under 'products' has too few words listed.
20807 Invalid 'product_id' attribute under 'products'.
20809 Too many entries under 'products'.
20818 Campaign budget is too low.
20819 Campaign budget exceeds maximum allowed spending.
20810 All products listed under 'products' attribute appear in one or more overlapping campaigns.
20002 The merchant has not joined ProductBoost yet.

Example

Assume your access token is "an_example_access_token". Say you want to create a new campaign without auto renew starting at 2018-05-17 and ending at 2018-05-20, with name "campaign" and maximum budget $200.00. You want to promote one product with product_id "539abb829a188e0bdbe19af9". Your bid is $3.50 and keywords are "a", "b" and "c".

  • access_token = an_example_access_token
  • max_budget = 200
  • auto_renew = false
  • campaign_name = campaign
  • start_date = 2018-05-17
  • end_date = 2018-05-20
  • products = [{"product_id": "539abb829a188e0bdbe19af9", "bid": 3.50, "keywords": ["a", "b", "c"]}]

Example Request

> curl --data '{"max_budget": 200, "auto_renew": false, "campaign_name": "campaign", "start_date": "2018-05-17", "end_date": "2018-05-20", "products": [{"product_id": "539abb829a188e0bdbe19af9", "bid": 3.50, "keywords": ["a", "b", "c"]}]}' "https://merchant.wish.com/api/v2/product-boost/campaign/create?access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$postdata = http_build_query(array(
    'max_budget'    => '200',
    'auto_renew'    => 'false',
    'campaign_name' => 'campaign',
    'start_date'    => '2018-05-17',
    'end_date'      => '2018-05-20',
    'products'      => '[{"product_id": "539abb829a188e0bdbe19af9", "bid": 3.50, "keywords": ["a", "b", "c"]}]'
));

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/create?
access_token=%s", $access_token);
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'ignore_errors' => true,
'content' => $postdata
),
));
// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response


{
    "message": "",
    "code": 0,
    "data": {
        "Campaign": {
            "campaign_max_budget": "200.0",
            "total_enrollment_fees_charged": "0.0",
            "total_campaign_spend": "0.0",
            "start_time": "2018-05-17T00:00:00",
            "will_auto_renew": "False",
            "total_impressions": "0",
            "sales": "0",
            "has_feedback": "False",
            "campaign_id": "5ad1a7e869c96b0c5a8ef7fc",
            "paid_impressions": "0",
            "total_impression_fees_charged": "0.0",
            "products": [
                {
                    "Product": {
                        "actual_charge_rate": "3.5",
                        "keywords": ["a", "c", "b"],
                        "merchant_bid_rate": "3.5",
                        "product_id": "544abb829a188e0dbea19af0",
                        "enrollment_fee": "0.0"
                    }
                }
            ],
            "campaign_name": "my campaign",
            "end_time": "2018-05-20T00:00:00",
            "merchant_id": "514a9a994f69ca276a9ef682",
            "impression_fees_breakdown": [
                {
                    "ImpressionFee": {
                        "end_time": "2018-05-21T00:00:00",
                        "amount": "0.0",
                        "fee_state": "NOT_CREATED",
                        "start_time": "2018-05-14T00:00:00"
                    }
                }
            ],
            "gmv": "0.0",
            "campaign_state": "NEW",
            "can_edit": "True",
            "is_automated_campaign": "False"
        }
    }
}

Update a Campaign

Update an existing ProductBoost campaign. This API does support partial update, meaning you can provide a subset of the campaign's attributes to update. This API can only be used on campaigns with state "NEW" or "PENDING". For "SAVED" and "STARTED" campaigns, use the update-running-campaign API.

Note: you must call this API with the parameters in the HTTP request body.

HTTP Request Type: POST

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

Explore API

Request Body
id ID of the campaign you want to update
max_budget The maximum amount you are willing to spend on your campaign.
auto_renew Whether you want the campaign to auto-renew.
campaign_name The name of your campaign.
start_date The start date of the campaign.
end_date The end date of the campaign. It must be greater than start_date and no more than 4 weeks later than start_date.
products

A JSON array of products to be included in the campaign. Each product must be an object containing the fields "product_id", "bid" and "keywords".

"product_id" is the id of the product. It must not be included in any other ProductBoost campaign in the date range.

"bid" is the maximum amount you are willing to pay for 1000 impressions of that product. Must be at least $0.30 and at most $10.00.

"keywords" is an array of keywords to help customers find your products. Number of keywords can not exceed 200.

See the example for a sample input.

Returns
The ProductBoost campaign you just updated.

Error responses
In addition to error responses listed under create-campaign API, the following errors are also possible:

20811 Invalid campaign ID.
20822 This API can only be used to update "NEW" campaigns. For "SAVED" and "STARTED" campaigns, use the update-running-campaign API.

Example

Assume your access token is "an_example_access_token". Say you want to update a campaign without auto renew starting at 2018-05-17 and ending at 2018-05-20, with name "campaign" and maximum budget $200.00. You want to promote one product with product_id "539abb829a188e0bdbe19af9". Your bid is $3.50 and keywords are "a", "b" and "c".

  • access_token = an_example_access_token
  • max_budget = 200
  • auto_renew = false
  • campaign_name = campaign
  • start_date = 2018-05-17
  • end_date = 2018-05-20
  • products = [{"product_id": "539abb829a188e0bdbe19af9", "bid": 3.50, "keywords": ["a", "b", "c"]}]

Example Request

> curl --data '{"id": "5af5b85532a61f6133520a95","max_budget": 200, "auto_renew": false, "campaign_name": "campaign", "start_date": "2018-05-17", "end_date": "2018-05-20", "products": [{"product_id": "539abb829a188e0bdbe19af9", "bid": 3.50, "keywords": ["a", "b", "c"]}]}' "https://merchant.wish.com/api/v2/product-boost/campaign/update?access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$postdata = http_build_query(array(
    'id'            => '5af5b85532a61f6133520a95'
    'max_budget'    => '200',
    'auto_renew'    => false,
    'campaign_name' => 'campaign',
    'start_date'    => '2018-05-17',
    'end_date'      => '2018-05-20',
    'products'      => '[{"product_id": "539abb829a188e0bdbe19af9", "bid": 3.50, "keywords": ["a", "b", "c"]}]'
));

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

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

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

Example Response


{
    "message": "",
    "code": 0,
    "data": {
        "Campaign": {
            "campaign_max_budget": "200.0",
            "total_enrollment_fees_charged": "0.0",
            "total_campaign_spend": "0.0",
            "start_time": "2018-05-17T00:00:00",
            "auto_renew": "False",
            "total_impressions": "0",
            "sales": "0",
            "has_feedback": "False",
            "campaign_id": "5ad1a7e869c96b0c5a8ef7fc",
            "paid_impressions": "0",
            "total_impression_fees_charged": "0.0",
            "products": [
                {
                    "Product": {
                        "actual_charge_rate": "3.5",
                        "keywords": ["a", "c", "b"],
                        "merchant_bid_rate": "3.5",
                        "product_id": "544abb829a188e0dbea19af0",
                        "enrollment_fee": "0.0"
                    }
                }
            ],
            "campaign_name": "my campaign",
            "end_time": "2018-05-20T00:00:00",
            "merchant_id": "514a9a994f69ca276a9ef682",
            "impression_fees_breakdown": [
                {
                    "ImpressionFee": {
                        "end_time": "2018-05-20T00:00:00",
                        "amount": "0.0",
                        "fee_state": "NOT_CHARGED",
                        "start_time": "2018-05-17T00:00:00"
                    }
                }
            ],
            "gmv": "0.0",
            "campaign_state": "NEW",
            "can_edit": "True",
            "is_automated_campaign": "False"
        }
    }
}

Update a Running Campaign

Update an existing "SAVED" or "STARTED" ProductBoost campaign. This API does support partial update, meaning you can provide a subset of the campaign's attributes to update. This API can only be used on "SAVED" and "STARTED" campaigns. For "NEW" and "PENDING" campaigns, please use the update-campaign API.

Note: you must call this API with the parameters in the HTTP request body.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/campaign/update-running

Explore API

Request Body
id ID of the campaign you want to update
max_budget The maximum amount you are willing to spend on your campaign. It can only be increased.
auto_renew Whether you want the campaign to auto-renew.
end_date The end date of the campaign. It must be greater than start_date and no more than 4 weeks later than start_date. 'end_date' cannot be changed for auto-renew campaigns whose state is SAVED or STARTED.
products

A JSON array of products to be included in the campaign. Each product must be an object containing the fields "product_id", and "keywords".

"product_id" is the id of the product. It must not be included in any other ProductBoost campaign in the date range.

"keywords" is an array of keywords to help customers find your products. Number of keywords can not exceed 200.

See the example for a sample input.

Returns
The ProductBoost campaign you just updated.

Error responses
In addition to error responses listed under update-campaign API, the following errors are also possible:

20825 Unallowed modification on "SAVED" or "STARTED" campaigns. Cannot add new products on these campaigns.

Example

Assume your access token is "an_example_access_token". Say you want to change the end date of a running campaign to 2018-05-20, and maximum budget to $200.00. And you want to change the keywords of a product with product_id "539abb829a188e0bdbe19af9" to "a", "b" and "c".

  • access_token = an_example_access_token
  • max_budget = 200
  • auto_renew = true
  • end_date = 2018-05-20
  • products = [{"product_id": "539abb829a188e0bdbe19af9", "keywords": ["a", "b", "c"]}]

Example Request

> curl --data '{"id": "5af5b85532a61f6133520a95","max_budget": 200, "auto_renew": true, "end_date": "2018-05-20", "products": [{"product_id": "539abb829a188e0bdbe19af9", "keywords": ["a", "b", "c"]}]}' "https://merchant.wish.com/api/v2/product-boost/campaign/update-running?access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$postdata = http_build_query(array(
    'id'            => '5af5b85532a61f6133520a95'
    'max_budget'    => '200',
    'auto_renew'    => true,
    'end_date'      => '2018-05-20',
    'products'      => '[{"product_id": "539abb829a188e0bdbe19af9", "keywords": ["a", "b", "c"]}]'
));

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/update-running?
    access_token=%s", $access_token);

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

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

Example Response


{
    "message": "",
    "code": 0,
    "data": {
        "Campaign": {
            "campaign_max_budget": "200.0",
            "total_enrollment_fees_charged": "0.0",
            "total_campaign_spend": "0.0",
            "start_time": "2018-05-17T00:00:00",
            "auto_renew": "True",
            "total_impressions": "0",
            "sales": "0",
            "has_feedback": "False",
            "campaign_id": "5ad1a7e869c96b0c5a8ef7fc",
            "paid_impressions": "0",
            "total_impression_fees_charged": "0.0",
            "products": [
                {
                    "Product": {
                        "actual_charge_rate": "3.5",
                        "keywords": ["a", "c", "b"],
                        "merchant_bid_rate": "3.5",
                        "product_id": "544abb829a188e0dbea19af0",
                        "enrollment_fee": "0.0"
                    }
                }
            ],
            "campaign_name": "my campaign",
            "end_time": "2018-05-20T00:00:00",
            "merchant_id": "514a9a994f69ca276a9ef682",
            "impression_fees_breakdown": [
                {
                    "ImpressionFee": {
                        "end_time": "2018-05-20T00:00:00",
                        "amount": "0.0",
                        "fee_state": "NOT CHARGED",
                        "start_time": "2018-05-17T00:00:00"
                    }
                }
            ],
            "gmv": "0.0",
            "campaign_state": "STARTED",
            "can_edit": "True",
            "is_automated_campaign": "False"
        }
    }
}

Add Budget to a Campaign

Add budget to a campaign whose state is "NEW", "SAVED", "STARTED", or "PENDING".

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/campaign/add-budget

Explore API

Parameters
id ID of the campaign you want to add budget
amount The extra amount you want to add to the campaign. For instance, if current budget of the campaign is $5.00 and amount = 2.00, the new budget would be 5.00 + 2.00 = 7.00.

Returns
The ProductBoost campaign you just updated.

Error responses

21101 Cannot set budget for campaigns whose state is not in ['NEW', 'SAVED', 'STARTED', 'PENDING']
21102 Parameter 'amount' must be at least 0.01
21103 ProductBoost campaign was already ended.

Example

Assume your access token is "an_example_access_token". Say you want to add extra $2.00 to a campaign with id 5af5b85532a61f6133520a95.

Example Request

> curl -X Post "https://merchant.wish.com/api/v2/product-boost/campaign/add-budget?access_token=an_example_access_token" -d '{"id": "5af5b85532a61f6133520a95", "amount": 2.0}'
Not available
<?php

$access_token = urlencode('an_example_access_token');

$postdata = http_build_query(array(
    'id'      => '5af5b85532a61f6133520a95'
    'amount'  => '2.0',
));

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/add-budget?
    access_token=%s", $access_token);

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

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

Example Response


{
    "message": "",
    "code": 0,
    "data": {
        "Campaign": {
            "campaign_max_budget": "7.0",
            "total_enrollment_fees_charged": "0.0",
            "total_campaign_spend": "0.0",
            "start_time": "2018-05-17T00:00:00",
            "will_auto_renew": "False",
            "total_impressions": "0",
            "sales": "0",
            "has_feedback": "False",
            "campaign_id": "5ad1a7e869c96b0c5a8ef7fc",
            "paid_impressions": "0",
            "total_impression_fees_charged": "0.0",
            "products": [
                {
                    "Product": {
                        "actual_charge_rate": "3.5",
                        "keywords": ["a", "c", "b"],
                        "merchant_bid_rate": "3.5",
                        "product_id": "544abb829a188e0dbea19af0",
                        "enrollment_fee": "0.0"
                    }
                }
            ],
            "campaign_name": "my campaign",
            "end_time": "2018-05-20T00:00:00",
            "merchant_id": "514a9a994f69ca276a9ef682",
            "impression_fees_breakdown": [
                {
                    "ImpressionFee": {
                        "end_time": "2018-05-20T00:00:00",
                        "amount": "0.0",
                        "fee_state": "NOT_CHARGED",
                        "start_time": "2018-05-17T00:00:00"
                    }
                }
            ],
            "gmv": "0.0",
            "campaign_state": "NEW",
            "can_edit": "True",
            "is_automated_campaign": "False"
        }
    }
}

Stop a Campaign

Stop a currently running ProductBoost campaign.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/campaign/stop

Explore API

Parameters
id The ID of your ProductBoost campaign

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

Error responses
In addition to error responses listed under create-campaign API, the following errors are also possible:

20001 Invalid campaign ID: the campaign ID either does not exist, or does not belong to the merchant.
20202 Cannot stop a campaign whose state is not 'STARTED'.

Example

Assume your access token is "an_example_access_token". Say your id is "5ab4e367ae3004ebb12c28ab".

  • access_token = an_example_access_token
  • id = 5ab4e367ae3004ebb12c28ab

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/stop?id=5ab4e367ae3004ebb12c28ab&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$id = '5ab4e367ae3004ebb12c28ab'

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/stop?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

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

Cancel a Campaign

Cancel a new ProductBoost campaign.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/campaign/cancel

Explore API

Parameters
id The ID of your ProductBoost campaign

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

Error responses

20001 Invalid campaign ID: the campaign ID either does not exist, or does not belong to the merchant.
20302 Cannot cancel a campaign whose state is not in ['NEW', 'PENDING'].

Example

Assume your access token is "an_example_access_token". Say your id is "5ab4e367ae3004ebb12c28ab".

  • access_token = an_example_access_token
  • id = 5ab4e367ae3004ebb12c28ab

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/cancel?id=5ab4e367ae3004ebb12c28ab&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$id = '5ab4e367ae3004ebb12c28ab'

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/cancel?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

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

Get Campaign Performance

Get the performance of your ProductBoost campaign day by day. Date range is one week before campaign starts to one week after campaign ends. Response includes all days for which data is available.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product-boost/campaign/get-performance

Explore API

Parameters
id The ID of your ProductBoost campaign

Returns
Performance data by day, split into "before_campaign", "campaign" and "after_campaign". All dates are in PST.
"paid_impressions" in "campaign" are from the current ProductBoost campaign. If there are campaigns running on the current campaign's products before the start date or after the end date, paid impressions from those campaigns will be returned in "paid_impressions" in "before" and "after".

Error responses

20001 Invalid campaign ID: the campaign ID either does not exist, or does not belong to the merchant.
20900 Cannot get performance of a cancelled campaign.

Example

Assume your access token is "an_example_access_token". Say your id is "5ab4e367ae3004ebb12c28ab".

  • access_token = an_example_access_token
  • id = 5ab4e367ae3004ebb12c28ab

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/get-performance?id=5ab4e367ae3004ebb12c28ab&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('5ab4e367ae3004ebb12c28ab')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/
    get-performance?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

{
  "message": "",
  "code": 0,
  "data": {
    "Statistics": {
      "before_campaign": [
        {
          "PerformanceData": {
            "date": "2018-03-11",
            "impressions": "0",
            "gmv": "0.0",
            "sales": "0"
          }
        },
        ...
      ],
      "campaign": [
        {
          "PerformanceData": {
            "impressions": "150950",
            "paid_impressions": "34788",
            "date": "2018-03-18",
            "gmv": "25.49",
            "sales": "1"
          }
        },
        ...
      ],
      "after_campaign": [
        {
          "PerformanceData": {
            "impressions": "114868",
            "paid_impressions": "42559",
            "date": "2018-03-25",
            "gmv": "47.6",
            "sales": "1"
          }
        },
        ...
      ]
    }
  }
}

Get Campaign Product Stats

Get statistics on each product in a ProductBoost campaign. Note that campaign data can be delayed by at most a day.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product-boost/campaign/get-product-stats

Explore API

Parameters
id The ID of your ProductBoost campaign

Returns
The response contains performance statistics for all products in the campaign. The performance data will include the following attributes:

product_idID of product.
product_nameName of the product.
keywordsKeywords associated with the product.
merchant_bidThe maximum cost per 1000 impressions.
spendTotal cost of paid impressions.
salesNumber of products sold during the campaign.
paid_impressionsTotal number of paid impressions during the campaign.
gmvTotal GMV of this product during the campaign.
feedback_type(optional) Only availalbe when a product receives lower than expected number of paid impressions. The value will be one of 'PRODUCT_REJECTED', 'PRODUCT_OUT_OF_STOCK', 'PRODUCT_DISABLED', 'PRODUCT_LOW_RATING', 'LOW_BID'.
feedback_msg(optional) A detailed message to explain why the product receives lower tha expected number of paid impressions.
last_updated_timeThe time (in PST) when performance statistics were last updated.

Error responses

20001 Invalid campaign ID: the campaign ID either does not exist, or does not belong to the merchant.
21001 Cannot get product performance of a cancelled campaign.

Example

Assume your access token is "an_example_access_token". Say your id is "5ab4e367ae3004ebb12c28ab".

  • access_token = an_example_access_token
  • id = 5ab4e367ae3004ebb12c28ab

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/get-product-stats?id=5ab4e367ae3004ebb12c28ab&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$id = urlencode('5ab4e367ae3004ebb12c28ab')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/
    get-product-stats?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

{
  "message": "",
  "code": 0,
  "data": [
    {
      "ProductStat": {
        "product_id": "595d4710e6ba0d032129e4dd",
        "keywords": ["toys", "cars"],
        "product_name": "kid car toy",
        "spend": "0.0",
        "merchant_bid": "2.5",
        "sales": "0",
        "paid_impressions": "0",
        "gmv": "0.0",
        "last_updated_time": "2018-03-29T00:00:00"
      }
    },
    ...
  ]
}

Get Product Daily Stats

Get daily performance statistics of a product in a campaign. Note that campaign data can be delayed by at most a day.

HTTP Request Type: GET

Definition
GET https://merchant.wish.com/api/v2/product-boost/campaign/get-product-daily-stats

Explore API

Parameters
campaign_id ID of the campaign
product_id ID of the product

Returns
Performance statistics for each product in the campaign, including the following attributes:
"date": date of the performance statistics
"sales": number of products sold
"spend": how much is spent on this campaign at this date
"gmv": total gmv of this product at this date
"total_impressions": total impressions (paid and non-paid) given to this product
"paid_impressions": paid impressions given to this product

Sample error

20001 Invalid campaign ID: the campaign ID either does not exist, or does not belong to the merchant.
20601 Product ID is not listed in the campaign.
20602 Cannot get product daily performance of a cancelled campaign.

Example

Assume your access token is "an_example_access_token", campaign id is "5ab4e367ae3004ebb12c28ab", and product id is "5aa21a9347d3ae59c11ac151".

  • access_token = an_example_access_token
  • campaign_id = 5ab4e367ae3004ebb12c28ab
  • product_id = 5aa21a9347d3ae59c11ac151

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/get-product-daily-stats?campaign_id=5ab4e367ae3004ebb12c28ab&product_id=5aa21a9347d3ae59c11ac151&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$campaign_id = urlencode('5ab4e367ae3004ebb12c28ab')

$product_id = urlencode('5aa21a9347d3ae59c11ac151')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/
    get-product-daily-stats?access_token=%s&campaign_id=%s&product_id=%s", $access_token, $campaign_id, $product_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

{
  "message": "",
  "code": 0,
  "data": {
    "Statistics": {
      "before_campaign": [
        {
          "ProductDailyStatistics": {
            "date": "2018-05-01",
            "sales": "5",
            "total_impressions": "31185",
            "spend": "0.0",
            "paid_impressions": "3235",
            "gmv": "67.15"
          }
        },
        ...
      ],
      "campaign": [
        {
          "ProductDailyStatistics": {
            "date": "2018-05-08",
            "sales": "7",
            "total_impressions": "25471",
            "spend": "10.3885",
            "paid_impressions": "20777",
            "gmv": "94.35"
          }
        },
        ...
      ],
      "after_campaign": [
        {
          "ProductDailyStatistics": {
            "date": "2018-05-15",
            "sales": "4",
            "total_impressions": "32284",
            "spend": "0.0",
            "paid_impressions": "23701",
            "gmv": "52.7"
          }
        },
        ...
      ]
    }
  }
}

Get Keywords

Get bidding information for the given keywords.

HTTP Request Type: GET

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

Explore API

Parameters
keywordsA comma-separated list of keywords. i.e. “toys,car,harry potter”. Maximum 50 keywords allowed.

Returns
A list of bidding information for the given keywords.
min_bid: minimum bid for this keyword
max_bid: maximum bid for this keyword
recommended_bi: suggested bid for this keyword
hotness: one of ‘VERY_LOW’, ‘LOW’, ‘MEDIUM’, ‘HIGH’, ‘VERY_HIGH’

Error responses

20501 Invalid 'keywords' parameter.

Example

Assume your access token is "an_example_access_token". You want to promote your product with keywords "phone", "iphone", "case", "cover" and "accessories".

  • access_token = an_example_access_token
  • keywords = "phone,iphone,case,cover,accessories"

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/keyword/multi-get?keywords=phone,iphone,case,cover,accessories&access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$keywords = urlencode('phone,iphone,case,cover,accessories')

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

$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": [
        {
            "Keyword": {
                "recommended_bid": "1.5",
                "hotness": "VERY_HIGH",
                "min_bid": "0.3",
                "keyword": "iphone",
                "max_bid": "10.0"
            }
        },
        {
            "Keyword": {
                "recommended_bid": "1.1",
                "hotness": "HIGH",
                "min_bid": "0.3",
                "keyword": "phone",
                "max_bid": "10.0"
            }
        },
        {
            "Keyword": {
                "recommended_bid": "1.0",
                "hotness": "HIGH",
                "min_bid": "0.3",
                "keyword": "case",
                "max_bid": "10.0"
            }
        },
        {
            "Keyword": {
                "recommended_bid": "0.9",
                "hotness": "MEDIUM",
                "min_bid": "0.3",
                "keyword": "cover",
                "max_bid": "10.0"
            }
        },
        {
            "Keyword": {
                "recommended_bid": "0.7",
                "hotness": "MEDIUM",
                "min_bid": "0.3",
                "keyword": "accessories",
                "max_bid": "10.0"
            }
        }
    ]
}

Search Keywords

Search bidding information of related keywords.

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/keyword/search

Explore API

Request Body
keyword The keyword to search for
exclude_keywordsoptional A JSON array of keywords to exclude from results. Maximum 30 keywords allowed.
limitoptional Limit number of keywords returned. Default to 0; allowed range: [0, 10]

Returns
Bidding information of related keywords.
"min_bid" is the minimum bid for this keyword.
"max_bid" is the maximum bid for this keyword.
"recommended_bid" is the suggested bid for this keyword.
"hotness" is one of ‘VERY_LOW’, ‘LOW’, ‘MEDIUM’, ‘HIGH’, ‘VERY_HIGH’.

Error responses

20401 Invalid request body (i.e. cannot parse request body).
20402 Invalid 'keyword' parameter.
20403 Invalid 'exclude_keywords' parameter. At most 30 entries allowed.
20404 Invalid 'limit' parameter. 'limit' must be a positive integer, within range [1, 50]

Example

Assume your access token is "an_example_access_token".

  • access_token = an_example_access_token

Example Request

> curl -X Post "https://merchant.wish.com/api/v2/product-boost/keyword/search?access_token=an_example_access_token" -d '{"keyword": "arry", "exclude_keywords": ["harry", "test", "harry potter"], "limit": 10}'
Not available
<?php

$access_token = urlencode('an_example_access_token');

$postdata = http_build_query(array(
    'keyword' => 'arry'
))

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

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

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

Example Response

{
  "message": "",
  "code": 0,
  "data": [
      {
        "Keyword": {
          "recommended_bid": "2.45",
          "min_bid": "0.3",
          "max_bid": "10.0",
          "keyword": "harry potter wand",
          "hotness": "HIGH"
        }
      },
      {
        "Keyword": {
          "recommended_bid": "0.59",
          "min_bid": "0.3",
          "max_bid": "10.0",
          "keyword": "harry potter clothes",
          "keyword": "MEDIUM"
        }
      },
    ...
  ]
}

Get Budget

Get campaign budget.

HTTP Request Type: GET

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

Explore API

Returns
The maximum budget available.

Sample error
4000 - No access token found or the app does not exist.

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/budget?access_token=an_example_access_token"
Not available
<?php

$access_token = urlencode('an_example_access_token');

$keywords = urlencode('["phone", "iphone", "case", "cover", "accessories"]')

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/budget?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": {
    "Budget": {
      "max_budget": "96699.33"
    }
  }
}

Validate Campaign Bids

Validate bids

HTTP Request Type: POST

Definition
POST https://merchant.wish.com/api/v2/product-boost/campaign/validate-bids

Explore API

Request Body
campaign_id(Optional) ID of the campaign
campaign_start_time Desired start date of the campaign, in format YYYY-MM-DD.
campaign_end_time Desired end date of the campaign, in format YYYY-MM-DD.
bids A JSON array of your bidding, which includes 'product_id', 'bid', and 'keywords'. i.e.
[
  {
    "product_id": "59a6e05eb882e13c174946d4",
    "bid": 10,
    "keywords": ["test"]
      },
  {
    "product_id": "595d93e7f2e02872c18c0d6a",
    "bid": 0.3,
    "keywords": ["test"]
  }
]

Returns
A list of feedback in the same order as the 'bids' array. Each feedback will contain 'status' ('OK' means it's a valid bid; 'FAIL' means the bidding is not valid), 'error_code' and 'error_msg' to explain why the bid is not valid.

Feedback

22001 The request body is invalid (i.e. can't be parsed).
22002 Too many keywords provided.
22003 Too few keywords provided.
22004 Bid is too low for the given keyword(s).
22005 Bid is too high for the given keyword(s).
22006 'product_id' is invalid.
22007 The product appears in an overlapping campaign.

Example

Assume your access token is "an_example_access_token". You want to validate bid of $0.5 on keywords "car", "car toys", and "boy toys" to help promote your product with ID "YOUR_PRODUCT_ID", with campaign whose start date is 2018-05-12 and end date 2018-05-19

  • access_token = an_example_access_token
  • request body = {"campaign_start_time": "2018-05-12","campaign_end_time": "2018-05-19", "bids": [{"product_id": "YOUR_PRODUCT_ID","bid": 0.5, "keywords": ["car", "car toys", "boy toys"]}]}

Example Request

> curl "https://merchant.wish.com/api/v2/product-boost/campaign/validate-bids?access_token=an_example_access_token" --data '{"campaign_start_time": "2018-05-12","campaign_end_time": "2018-05-19", "bids": [{"product_id": "YOUR_PRODUCT_ID","bid": 0.5, "keywords": ["car", "car toys", "boy toys"]}]}'
Not available
<?php

$access_token = urlencode('an_example_access_token');

$postdata = http_build_query(array(
    'campaign_start_time' => '2018-05-12',
    'campaign_end_time' => '2018-05-19',
    'bids' => [{"product_id": "YOUR_PRODUCT_ID","bid": 0.5, "keywords": ["car", "car toys", "boy toys"]}]
));

$url = sprintf(
    "https://merchant.wish.com/api/v2/product-boost/campaign/
validate-bids?access_token=%s", $access_token);
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'ignore_errors' => true,
'content' => $postdata
),
));
// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";
?>

Example Response

{
  "message": "",
  "code": 0,
  "data": [
    {
      "Feedback": {
        "status": "OK",
        "product_id": "59d9c05eb882e99c174946d4"
      }
    }
  ]
}

Fine

Interface to check Fine details

Get a Fine

Get information of a Fine.

HTTP Request Type: GET

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

Explore API

Parameters
id The ID of the Fine you want to check

Returns
The Fine details:

id ID of the fine.
amount The fine amount.
payment_deduction_amount The amount deducted from payment.
timestamp Time of the fine.
status One of 0, 1 and 2.
  • 0: PENDING
  • 1: DEDUCTED
  • 2: CANCELLED
status_text One of 'PENDING', 'DEDUCTED' and 'CANCELLED'.
  • 0: This fine is pending.
  • 1: This fine is deducted from payment.
  • 2: This fine is cancelled(deducted then reversed).
fine_type One of the integer value from 0 to 20.
  • 0: ONEOFF
  • 1: INFRACTION
  • 2: LOGISTIC_FEE
  • 3: ONEOFF_FEE
  • 4: FBW_FEE
  • 5: PROMOTION_FEE
  • 6: RETURN_LABEL_FEE
  • 7: PAID_PLACEMENT_ENROLLMENT_FEE
  • 8: PAID_PLACEMENT_IMPRESSION_FEE
  • 9: LEGAL_SETTLEMENT
  • 10: MERCHANT_INCENTIVE
  • 11: LATE_CONFIRMED_FULFILLMENT
  • 12: QUALITY_REFUND_FINE
  • 13: PROHIBITED_PRODUCT_FINE
  • 14: MISLEADING_LISTING
  • 15: SE_CASH_BACK
  • 16: REPEAT_IP_INFRINGEMENT
  • 17: IP_INFRINGEMENT
  • 18: WISH_EXPRESS_VIOLATION
  • 19: FAKE_TRACKING
  • 20: UNFULFILLED_ORDER
fine_type_text One of the belowing string.
  • ONEOFF
  • INFRACTION
  • LOGISTIC_FEE
  • ONEOFF_FEE
  • FBW_FEE
  • PROMOTION_FEE
  • RETURN_LABEL_FEE
  • PAID_PLACEMENT_ENROLLMENT_FEE
  • PAID_PLACEMENT_IMPRESSION_FEE
  • LEGAL_SETTLEMENT
  • MERCHANT_INCENTIVE
  • LATE_CONFIRMED_FULFILLMENT
  • QUALITY_REFUND_FINE
  • PROHIBITED_PRODUCT_FINE
  • MISLEADING_LISTING
  • SE_CASH_BACK
  • REPEAT_IP_INFRINGEMENT
  • IP_INFRINGEMENT
  • WISH_EXPRESS_VIOLATION
  • FAKE_TRACKING
  • UNFULFILLED_ORDER
is_reversed If the fine is reversed or not.
cancelled_time Time of the fine being cancelled.
cancelled_reason_text The reason of this fine being cancelled.

Error responses

2231 Fine ID not found: the fine ID does not exist.

Example

Assume your access token is "an_example_access_token". Say your id is "5ab4e367ae3004ebb12c28ab".

  • access_token = an_example_access_token
  • id = 5ab4e367ae3004ebb12c28ab

Example Request

> curl "https://merchant.wish.com/api/v2/fine?id=5ab4e367ae3004ebb12c28ab&access_token=an_example_access_token"
<?php

$access_token = urlencode('an_example_access_token');

$id = '5ab4e367ae3004ebb12c28ab'

$url = sprintf(
    "https://merchant.wish.com/api/v2/fine?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

{
  "message": "",
  "code": 0,
  "data": {
    "Fine":{
      "status":"1",
      "amount":"3.0",
      "fine_type":"1",
      "payment_deduction_amount":"3.0",
      "timestamp":"2014-09-01T00:00:00",
      "is_reversed":"False",
      "status_text":"DEDUCTED",
      "id":"5ab4e367ae3004ebb12c28ab",
      "fine_type_text":"INFRACTION"
    }
  }
}

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:

APCLogistics
AirpakExpress
Aramex
AsendiaGermany
AsendiaHK
AsendiaUK
AsendiaUSA
AuPostChina
AustraliaPost
AustrianPost
AustrianPostRegistered
BPost
BPostInternational
BRTBartolini
Belpost
BlueCareExpress
BrazilCorreios
Bring
CanadaPost
CeskaPosta
Chukou1
ColisPrive
Colissimo
CorreosChile
CorreosCostaRica
CorreosDeEspana
CorreosDeMexico
CorreosExpress
CroatianPost
CyprusPost
DBSchenkerSweden
DHL
DHL2MannHandling
DHLBenelux
DHLFreightSweden
DHLGermany
DHLGlobalMail
DHLGlobalMailAsia
DHLLTL
DHLNetherlands
DHLParcelNL
DHLPoland
DHLSpainDomestic
DPD
DPDFrance
DPDGermany
DPDIreland
DPDPoland
DPDUK
DPEXChina
DanmarkPost
DeutschePost
DirectLink
EFS
ELTAHellenicPost
EMPSExpress
EMS
EPostG
Envialia
EquickChina
Estes
FastwayAustralia
FastwayIreland
FedEx
FedExApex
FedExUK
FlytExpress
Freipost
GLS
GLSItaly
GLSNetherlands
GlobegisticsInc
Hermes
HermesGermany
HongKongPost
IndiaPost
IndiaPostInternational
IndonesiaPost
IsraelPost
ItalySDA
JapanPost
KoreaPost
LaPosteColissimo
LandmarkGlobal
LaserShip
LatviaPost
LithuaniaPost
MagyarPosta
MalaysiaPost
MalaysiaPostPosDaftar
MyHermesUK
NewZealandPost
Nexive
OnTrac
OneWorldExpress
PTTPosta
ParcelForce
Pilot
PocztaPolska
PortugalCTT
PostNL
PostNLInternational
PostNLInternational3S
PosteItaliane
RRDonnelley
RussianPost
SFCService
SFExpress
SFInternational
SimplyPost
SingaporePost
SingaporeSpeedpost
Sinotrans
Spring
SprintPack
SwedenPosten
SwissPost
TNT
TNTAustralia
TNTClickItaly
TNTFrance
TNTItaly
TNTPostItaly
TNTUK
TaiwanPost
Test_Delhivery
Test_WishPostAnJun
Test_WishPostAnzhe
Test_WishPostBuyLogic
Test_WishPostDHL
Test_WishPostEQuick
Test_WishPostEQuickUnreg
Test_WishPostEtotal
Test_WishPostFedEx
Test_WishPostGYang
Test_WishPostGYangUnreg
Test_WishPostHuaHan
Test_WishPostLTian
Test_WishPostSFC
Test_WishPostSFCUnreg
Test_WishPostSinoair
Test_WishPostTNT
Test_WishPostTongDa
Test_WishPostUPS
Test_WishPostYiYou
Test_WishPostYunDa
TollIPEC
TollPriority
TrakPak
TransMission
TurkishPost
UDS
UKMail
UPS
UPSFreight
UPSMailInnovations
UPSSurePost
USPS
UkrPoshta
VietnamPost
VietnamPostEMS
Wanb
WishPost
XPO
YDH
YODEL
Yamato
YodelInternational

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",
                            "AnjunExpress",
                            "Aramex",
                            "AsendiaGermany",
                            "AsendiaUK",
                            "AsendiaUSA",
                            "AuPostChina",
                            "AustraliaPost",
                            "AustrianPost",
                            "AustrianPostRegistered",
                            "BPost",
                            "BPostInternational",
                            "Belpost",
                            "CNEExpress",
                            "CanadaPost",
                            "ChinaAirPost",
                            "Chukou1",
                            "ColisPrive",
                            "Colissimo",
                            "CorreosDeEspana",
                            "CorreosExpress",
                            "CroatianPost",
                            "DHL",
                            "DHL2MannHandling",
                            "DHLBenelux",
                            "DHLExpress",
                            "DHLGermany",
                            "DHLGlobalMail",
                            "DHLGlobalMailAsia",
                            "DHLNetherlands",
                            "DHLParcelNL",
                            "DHLPoland",
                            "DHLSpainDomestic",
                            "DPD",
                            "DPDFrance",
                            "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",
                            "IsraelPost",
                            "ItalySDA",
                            "JapanPost",
                            "KoreaPost",
                            "LandmarkGlobal",
                            "LaoPost",
                            "LaPosteColissimo",
                            "LithuaniaPost",
                            "MagyarPosta",
                            "MalaysiaPost",
                            "MalaysiaPostPosDaftar",
                            "NewZealandPost",
                            "Nexive",
                            "OnTrac",
                            "OneWorldExpress",
                            "ParcelForce",
                            "PTTPosta",
                            "PocztaPolska",
                            "PosteItaliane",
                            "PostNL",
                            "PostNLInternational",
                            "PostNLInternational3S",
                            "RoyalMail",
                            "RussianPost",
                            "SFCService",
                            "SFExpress",
                            "SFInternational",
                            "SimplyPost",
                            "SingaporePost",
                            "SingaporeSpeedpost",
                            "Sinotrans",
                            "SwedenPosten",
                            "SwissPost",
                            "TNT",
                            "TNTAustralia",
                            "TNTClickItaly",
                            "TNTFrance",
                            "TNTItaly",
                            "TNTPostItaly",
                            "TNTUK",
                            "TaiwanPost",
                            "ThailandThaiPost",
                            "TollIPEC",
                            "TollPriority",
                            "TrakPak",
                            "TransMission",
                            "TurkishPost",
                            "UBISmartParcel",
                            "UKMail",
                            "UPS",
                            "UPSFreight",
                            "UPSMailInnovations",
                            "USPS",
                            "VietnamPost",
                            "VietnamPostEMS",
                            "Wanb",
                            "WeDoLogisitics",
                            "WishPost",
                            "YODEL",
                            "Yanwen",
                            "YodelInternational",
                            "YunExpress"
                            ]
    }
}

Shippable Countries

AE United Arab Emirates
AL Albania
AR Argentina
AT Austria
AU Australia
BA Bosnia and Herzegovina
BB Barbados
BE Belgium
BG Bulgaria
BM Bermuda
BR Brazil
CA Canada
CH Switzerland
CL Chile
CO Colombia
CR Costa Rica
CY Cyprus
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
HN Honduras
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
MD Moldova
MK Macedonia
MX Mexico
MY Malaysia
NL Netherlands
NO Norway
NZ New Zealand
PE Peru
PH Philippines
PK Pakistan
PL Poland
PR Puerto Rico
PT Portugal
QA Qatar
RO Romania
RS Serbia
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