API Reference
Examples
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.
API Base Url
- https://merchant.wish.com/api/v2/
API Base Url For China
- https://china-merchant.wish.com/api/v2/
List of Endpoints
- /auth_test
- /product
- /product/multi-get
- /product/update
- /product/enable
- /product/disable
- /product/add
- /product/create-download-job
- /product/get-download-job-status
- /product/cancel-download-job
- /variant
- /variant/multi-get
- /variant/update
- /variant/enable
- /variant/disable
- /variant/update-inventory
- /variant/add
- /order
- /order/multi-get
- /order/get-fulfill
- /order/fulfill-one
- /order/modify-tracking
- /order/create-download-job
- /order/get-download-job-status
- /order/cancel-download-job
- /order/get-confirmed-delivery-countries
- /order/get-confirmed-delivery-shipping-carriers-for-country
Authentication
Wish uses the OAuth 2.0 specification to authenticate your requests. For a detailed guide on how to authenticate, click here.
Every request will need to be authenticated with an access token. When making requests, provide the access token as a GET or POST request parameter:
Parameter | Type | Example |
---|---|---|
access_token | String | 1qaz2wsx3edc4rfv5tgb |
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.
AttributesCode | Contains the status code for the request, 0 means success and any other number implies a failure. |
---|---|
Data | This attribute will store the response data that was requested. |
Message | Sometimes will store a human readable status message to aid in debugging. It is generally used only for errors. |
Paging | If 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.
Parameter | Type | Example | Required |
---|---|---|---|
format | String | '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.
AttributesCode | A unique number which represents the error that has occurred, example: 4001. |
---|---|
Type | A unique human readable representation of the error, example: not_found |
Message | A message describing the error that happened, example: "We could not find a product for id: 'aaa'" |
Data | For most errors this will be empty. |
Example Request
> curl https://sandbox.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'
Parameterslocale | optional 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
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789009876543211234') $main_image = urlencode('xxx'); $locale = urlencode('en'); $url = sprintf( "https://sandbox.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://sandbox.merchant.wish.com/api/v2/product/multi-get?start=20&limit=10, prev:https://sandbox.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.
Steps to create sandbox user:
-
Go to the
sandbox
:
-
Sign up with your information
-
To generate test transactions for api testing, click on Orders -> Action Required
-
Click the generate transactions button
Assuming your access token is "an_example_access_token"
Examples
> curl "https://sandbox.merchant.wish.com/api/v3/oauth/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/v3/oauth/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://sandbox.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 USPSExample Request 2
Example Response 2
{ 'code': 0, 'data': {'success': True}, 'message': 'Your order is been processed right now!' }
Request ID
Each API request is associated with a unique identifier. You can find this value in response headers, under Wish-Request-ID.
When you need to contact us about a specific request, please provide this ID to ensure the fastest possible reply.
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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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://sandbox.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. For instructions on how to do this visit this guide.
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $client = new WishClient($access_token,'prod'); echo $client->authTest(); ?>
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.
Attributesid | The Wish Id of the product, a 24 character string |
---|---|
name | The name which you have given the product, example: 'Blue Shoe' |
parent_sku | Your unique identifier for the product |
num_sold | Number of sales this product has received |
num_saves | Number of times this product has been added to users' wishlists |
review_status | Our review status of the product. Can be 'approved', 'rejected' or 'pending' |
removed_by_merchant | Whether the product has been completely removed by the merchant, these products cannot be edited |
country_shipping | A list of CountryShipping objects. Each CountryShipping object contains attributes country_code, price, localized_price, and localized_currency_code, which represent the shipping price for that country The price value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_price instead. |
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. This value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_default_shipping_price instead. |
localized_default_shipping_price | The localized default shipping price for the product, in the merchant's local currency. Once set, the localized default shipping price will automatically apply as the shipping price for any new or unset countries. |
tags | Comma separated list of tags which are applied to the product |
description | A blurb of text uploaded as the description to the product |
variants | A list of Product Variation entities |
requested_product_brand_id | Brand ID of your product |
landing_page_url | URL on your website containing the product details |
upc | 12-digit Universal Product Codes (UPC)-contains no letters or other characters |
main_image | URL of the main image of the product |
extra_images | URL of all extra images of the product, separated by the character '|' |
clean_image | Wish URL of the selected clean image of the product |
enabled | If true, this product is eligible for sale. |
is_promoted | If true, this product is promoted. |
original_image_url | URL of the original image when product was created. |
date_uploaded | Date when product was created. |
last_updated | Time when product was last updated (%m-%d-%YT%H:%M:%S). |
wish_express_country_codes | If 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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/add
name | Name of the product as shown to users on Wish |
---|---|
description | Description of the product. Should not contain HTML. If you want a new line use "\n". |
tags | optional Comma separated list of strings that describe the product. Only 10 are allowed. Any tags past 10 will be ignored. |
sku | The unique identifier that your system uses to recognize this product |
color | optional The color of the product. Example: red, blue, green |
size | optional The size of the product. Example: Large, Medium, Small, 5, 6, 7.5 (For custom size, the length of the characters must be less than 50 ) |
inventory | The physical quantities you have for this product, max 500,000 |
price | The price of the variation when the user purchases one, max 100,000 |
localized_price | optional The price of the variation in the merchant's local currency. This is required for non-USD merchants. |
shipping | The 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. |
localized_shipping | optional The shipping of the product when the user purchases one in the merchant's local currency, max 1000. Note that this will be the product localized_default shipping price and will be used as the localized shipping price for countries where localized shipping price is not provided when the product is created. This is required for non-USD merchants. |
localized_currency_code | optional The merchant's localized currency code. This must be provided in order to set localized pricing fields. This is required for non-USD merchants. |
country_shipping_prices | optional 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, "LOCAL_CA":29.94}. Only countries you ship to are allowed. Any country you don't ship to is ignored. Use LOCAL_CC to set the localized price for the country. |
msrp | optional Listings include a field for a comparison or reference price (“MSRP Field”). Merchants are not required to provide a value for the MSRP Field. If Merchants choose to provide a value for the MSRP Field (a “Reference Price”), each Reference Price must comply with the Product Reference Price Policy. Learn More. |
shipping_time | optional (DEPRECATED/UNUSED) 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. Example: 15-20 |
main_image | 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. It may take up to 1 hour for the image to be uploaded. |
parent_sku | optional 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. |
requested_product_brand_id | optional Brand ID of your product |
landing_page_url | optional URL on your website containing the product details |
upc | optional 12-digit Universal Product Codes (UPC)-contains no letters or other characters |
extra_images | optional 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. It may take up to 1 hour for the images to be uploaded. |
clean_image | optional URL of the clean image of your product. Must the same URL as the main_image_url or one of the extra_image_urls. Products with clean image selected may receive increased impressions and sales. It may take up to 1 hour for the image to be set. Learn more. |
max_quantity | optional 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)
|
width |
optional The width of your product that will be packaged to ship to customer (Units in cm)
|
height |
optional The height of your product that will be packaged to ship to customer (Units in cm)
|
weight |
optional The weight of your product that will be packaged to ship to customer (Units in g)
|
declared_name |
optional Product name for logistics declaration
|
declared_local_name |
optional Product name written in local language for logistics declaration
|
pieces |
optional The amount of pieces associated with this item
|
declared_value |
optional The price of your product that will be declared to custom.
|
hscode |
optional Harmonization System Code used for custom declaration.
|
origin_country |
optional country where product is manufactured. Country code should follow ISO 3166 Alpha-2 code. Example:CN, US
|
has_powder |
optional Whether product contains powder. Example: true, false.
|
has_liquid |
optional Whether product contains liquid. Example: true, false.
|
has_battery |
optional Whether product contains battery. Example: true, false.
|
has_metal |
optional Whether product contains metal. Example: true, false.
|
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
- localized_price = 600
- shipping = 10
- localized_shipping = 60
- country_shipping_prices = {"US":3.99,"CA":4.99,"LOCAL_US":24.0}
- 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,"LOCAL_US":24.0}' 'tags'=>'red,shoe,cool', 'description'=>'a cool shoe', 'inventory'=>'100', 'price'=>'100', 'localized_price'=>'600', 'shipping'=>'10', 'localized_shipping'=>'60', 'localized_currency_code'=>'CNY' ); $prod_res = $client->createProduct($product); print_r($prod_res); ?>
<?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'); $localized_price = urlencode('600'); $localized_shipping = urlencode('60'); $localized_currency_code = urlencode('CNY'); $country_shipping_prices = urlencode('{"US":3.99,"CA":4.99,"LOCAL_US":24.0}') $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://sandbox.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&localized_price=%s&localized_shipping=%s&localized_currency_code=%s&extra_images=%s&parent_sku=%s", $access_token, $main_image, $name, $description, $tags, $sku, $inventory, $price, $shipping, $localized_price, $localized_shipping, $localized_currency_code, $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', 'removed_by_merchant': False, 'tags': [{'Tag': {'id': 'red', 'name': 'red'}}, {'Tag': {'id': 'cool', 'name': 'cool'}}, {'Tag': {'id': 'shoe', 'name': 'shoe'}}], 'country_shippings': [{'CountryShipping': {'price': '4.99', 'localized_price': '30.0', 'localized_currency_code': 'CNY', 'country_code': 'CA'}}, {'CountryShipping': {'price': '3.99', 'localized_price': '24.0', 'localized_currency_code': 'CNY', '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' 'localized_price': '600.0', 'localized_shipping': '60.0' 'localized_currency_code': 'CNY'}]}}, '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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product
id | Must provide either id or parent_sku The unique wish identifier for this product |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku for this product |
warehouse_name | optional 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
<?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://sandbox.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', 'removed_by_merchant': False, 'tags': [{'Tag': {'id': 'Dress', 'name': 'Dress'}}, ], 'default_shipping_price': '5.0', 'country_shippings': [{'CountryShipping': {'price': '4.99', 'localized_price': '30', 'localized_currency_code': 'CNY', 'country_code': 'CA'}}, {'CountryShipping': {'price': '3.99', 'localized_price': '24', 'localized_currency_code': 'CNY', 'country_code': 'US'}}], 'variants': [{'Variant': {'enabled': 'True', 'id': '51e0a2c67d41a236cfffe3a2', 'product_id': '51e0a2c47d41a236cfffe3a0', 'inventory': '10000', 'msrp': '20000.0', 'price': '10000.0', 'shipping': '101.0', 'localized_price': '60000.0', 'localized_shipping': '606.0', 'localized_currency_code': 'CNY', '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', 'localized_price': '30', 'localized_currency_code': 'CNY', 'country_code': 'CA'}}, {'CountryShipping': {'price': '3.99', 'localized_price': '24' 'localized_currency_code': 'CNY', '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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/update
id | Must provide either id or parent_sku Wish's unique identifier for the product you would like to update |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku for the product you would like to update |
name | optional Name of the product as shown to users |
description | optional Description of the product. If you want a new line use "\n". |
tags | optional Comma separated list of strings. The tags passed into this parameter will completely replace the tags that are currently on the product |
requested_product_brand_id | optional Brand ID of your product |
landing_page_url | optional URL on your website containing the product detail and buy button for the applicable product. |
upc | optional 12-digit Universal Product Codes (UPC)-contains no letters or other characters |
main_image | optional 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. It may take up to 1 hour for the image to be updated. |
extra_images | optional 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 order of the urls will be the order of the images displayed on product page. To update existing images or add new images, you need to provide all extra image URLs, including the ones that remain the same. If none of the extra image URLs is provided, no update will be done. The total number of extra images plus the number of variation images must not exceed 20. It may take up to 1 hour for the images to be updated |
clean_image | optional URL of a clean image of your product. Update a product’s clean image with a Wish URL from an existing Wish main_image_url, Wish extra_image_url on the product, or an image added in this call. For example: this image. If the clean image URL is not an image for the product the clean image will not be set. Products with a clean image selected may receive increased impressions and sales. It may take up to 1 for the image to be updated. Learn more. |
max_quantity | optional The maximum quantity of 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
<?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://sandbox.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': '' }
Change Product Parent SKU
Change a product's parent SKUs, the new identifier must also be unique within all products' parent SKUs of the merchant and also has to be unique within all variation's SKUs
HTTP Request Type: POST
Scope: products:write
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/change-sku
id | Must provide either id or parent_sku The unique wish identifier for this product |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku for this product |
new_parent_sku | The new unique parent sku for the product 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 parent SKU 'ML-SZ52019' and you would like to change it to 'ML-SZ520190' your parameters would be:
- parent_sku = ML-SZ52019
- new_parent_sku = ML-SZ520190
- 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'); $client->changeProductVariationSKU('blue-shoe-11', 'blue-shoe-12');
<?php $access_token = urlencode('an_example_access_token'); $parent_sku = urlencode('ML-SZ52019'); $new_parent_sku = urlencode('ML-SZ520190'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/change-sku?access_token=%s&parent_sku=%s&new_parent_sku=%s", $access_token, $parent_sku, $new_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': {}, 'message': '' }
Enable a Product
Enable a product and all of its product variations. This marks the product available for sale.
HTTP Request Type: POST
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/enable
id | Must provide either id or parent_sku Wish's unique identifier for the product you would like to update |
---|---|
parent_sku | Must 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
<?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://sandbox.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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/disable
id | Must provide either id or parent_sku Wish's unique identifier for the product you would like to update |
---|---|
parent_sku | Must 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
<?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://sandbox.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': '' }
Remove Product
Call this to permanently remove a product from the store. This action cannot be undone, and will hide the product completely on Wish. Also note that the SKUs of the product will be modified to allow reusing them.
HTTP Request Type: POST
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/remove
id | Must provide either id or parent_sku Wish's unique identifier for the product you would like to update |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku supplied when product was uploaded |
Returns
This will return 200 if the product was removed successfully.
Example
Assume your access token is "an_example_access_token" . Suppose you want to remove your product with product_id = "57bb5803ba2a1f181de31b01":
- id = 57bb5803ba2a1f181de31b01
- 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'); $id = '57bb5803ba2a1f181de31b01'; $client->removeProduct('098765432112345678901234',$id);
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('57bb5803ba2a1f181de31b01'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/remove?access_token=%s&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': '' }
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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/multi-get
start | optional 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 |
---|---|
limit | optional A limit on the number of products that can be returned. Limit can range from 1 to 250 items and the default is 50 |
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. |
show_rejected | optional If specified to 'true', this API will return all products including those inappropriate products that were rejected during review. |
warehouse_name | optional 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.
By default, product objects are sorted in descending order by last update time and product id.
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
<?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://sandbox.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', 'removed_by_merchant': False, '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', 'localized_price': '660.0', 'localized_shipping': '63.0', 'localized_currency_code': 'CNY', 'sku': 'AA1'}}, {'Variant': {'color': 'blue', 'enabled': 'True', 'id': '5284e19qqqbaba49d5bbbbbb', 'product_id': '5284e18fb5baba49d5xxxxxx', 'inventory': '100', 'msrp': '19.9', 'price': '15.9', 'shipping': '10.5', 'localized_price': '90.0', 'localized_shipping': '63.0', 'localized_currency_code': 'CNY', 'sku': 'ZZ1'}}]}}, {'Product': {'description': 'Example Description', 'id': '5284efafb5bab119d1zzzzzz', 'name': 'Fairisle Scarf', 'number_saves': '0', 'number_sold': '0', 'parent_sku': 'Fairisle Scarf', 'review_status': 'rejected', 'removed_by_merchant': False, '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', 'localized_price': '120.0', 'localized_shipping': '60.0', 'localized_currency_code': 'CNY', 'sku': 'AA4'}}, {'Variant': {'color': 'red', 'enabled': 'True', 'id': '5284efbaaababa49d1eiwqdf', 'product_id': '5284efafb5bab119d1zzzzzz', 'inventory': '1100', 'msrp': '21.99', 'price': '21.91', 'shipping': '11.0', 'localized_price': '120.0', 'localized_shipping': '66.0', 'localized_currency_code': 'CNY', 'sku': 'AAB'}}]}}], 'country_shippings': [{'CountryShipping': {'price': '4.99', 'localized_price': '30.0', 'localized_currency_code': 'CNY', 'country_code': 'CA'}}, {'CountryShipping': {'price': '3.99', 'localized_price': '24.0', 'localized_currency_code': 'CNY', 'country_code': 'US'}}], 'message': '', 'paging': {'next': 'https://sandbox.merchant.wish.com/api/v2/product/multi-get?start=22&limit=2&since=2014-10-15&access_token=an_example_access_token', 'previous': 'https://sandbox.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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/remove-extra-images
id | Must provide either id or parent_sku The unique Wish identifier for this product |
---|---|
parent_sku | Must 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
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789009876543211234'); $url = sprintf( "https://sandbox.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.
HTTP Request Type: POST
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/update-shipping
id | Must provide either id or parent_sku The unique Wish identifier for this product |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku for this product |
country | Required The 2 letter country code. See Shippable Countries for a list of supported countries. Choose one from: AD, AE, AG, AI, AL, AM, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BG, BH, BM, BO, BR, BS, BT, BW, BZ, CA, CH, CL, CO, CR, CY, CZ, DE, DK, DM, DO, DZ, EC, EE, EG, ES, FI, FJ, FR, GA, GB, GD, GE, GH, GI, GR, GT, GY, HN, HR, HU, ID, IE, IL, IN, IS, IT, JE, JM, JO, JP, KE, KG, KH, KR, KW, KY, KZ, LC, LI, LK, LT, LU, LV, MA, MC, MD, ME, MK, MM, MN, MS, MT, MU, MV, MX, MY, NA, NG, NI, NL, NO, NP, NU, NZ, OM, PA, PE, PH, PK, PL, PR, PT, PY, QA, RE, RO, RS, RU, SA, SC, SE, SG, SH, SI, SK, SM, SR, SV, SZ, TH, TN, TO, TR, TT, TW, UA, US, UY, UZ, VE, VG, VI, VN, ZA, ZM, For regions, enter 2 leter country code + '_' + 2 or 3 letter regional code. E.g. "US_HI" for Hawaii, United States. See Customizable Regions for a list of supported regions. |
price |
The shipping price (in USD) of this product to this country, max 1000. |
localized_price | optional The price of the variation in the merchant's local currency. This is required for non-USD merchants. |
localized_currency_code | optional The merchant's localized currency code. This must be provided in order to set localized pricing fields. This is required for non-USD merchants. |
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. |
localized_default_shipping_price | optional The localized default shipping price for the productin the merchant's local currency. Once set, the localized default shipping price will automatically apply as the localized shipping price for any new or unset countries. This is required for non-USD merchants if the default_shipping_price is being updated. |
use_country_shipping | A boolean value which determines if the product is using country shipping price for the given region. This is used by regional shipping only. Setting to True will override the price field. |
warehouse_name | The name of the warehouse on which the action will be performed. If warehouse name is not specified, and country level shipping price is 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. If warehouse name is not specified, and regional level shipping price is specified, the effect of enabled will apply to standard warehouse only. wish_express will have no effect. |
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
- localized_price = 18
- localized_currency_code = CNY
- wish_express = true
- default_shipping_price = 3.99
- localized_default_shipping_price = 24
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789009876543211234'); $country = urlencode('CA'); $price = urlencode('2.99'); $localized_price = urlencode('18.0'); $loclaized_currency_code = urlencode('CNY'); $wish_express = urlencode('true'); $default_shipping_price = urlencode('3.99'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/update-shipping?access_token=%s&id=%s&country=%s&price=%s&localized_price=%s&localized_currency_code=%s&localized_default_shipping_price=%s&wish_express=%s&default_shipping_price=%s", $access_token, $id, $country, $price, $localized_price, $localized_currency_code, $localized_default_shipping_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.
This country must be enabled in merchant's Shipping Settings 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.
HTTP Request Type: POST
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/update-multi-shipping
id | Required The unique Wish identifier for this product |
---|---|
AD, AE, AG, AI, AL, AM, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BG, BH, BM, BO, BR, BS, BT, BW, BZ, CA, CH, CL, CO, CR, CY, CZ, DE, DK, DM, DO, DZ, EC, EE, EG, ES, FI, FJ, FR, GA, GB, GD, GE, GH, GI, GR, GT, GY, HN, HR, HU, ID, IE, IL, IN, IS, IT, JE, JM, JO, JP, KE, KG, KH, KR, KW, KY, KZ, LC, LI, LK, LT, LU, LV, MA, MC, MD, ME, MK, MM, MN, MS, MT, MU, MV, MX, MY, NA, NG, NI, NL, NO, NP, NU, NZ, OM, PA, PE, PH, PK, PL, PR, PT, PY, QA, RE, RO, RS, RU, SA, SC, SE, SG, SH, SI, SK, SM, SR, SV, SZ, TH, TN, TO, TR, TT, TW, UA, US, UY, UZ, VE, VG, VI, VN, ZA, ZM, | Each value is the localized shipping price in the merchant's local currency of this product to the country. See Shippable Countries for a list of supported countries. Use the format localized_CC where CC is a valid country code. This sets the localized shipping price for the country within the warehouse specified in warehouse_name parameter, and meanwhile the country will be enabled in that warehouse. If localized_CC is provided and the country is included in wish_express_add_countries, and warehouse_name is not specified, the provided shipping price will be copied to the Wish Express shipping. Maximum is $1000 USD, or what's equivalent in local currency. |
localized_CC | This is required for non-USD merchants. If the country code (CC) is being updated, the localized_CC field must be provided as well. Each value is the localized shipping price in the merchant's local currency of this product to the country. See Shippable Countries for a list of supported countries. Use the format localized_CC where CC is a valid country code. This sets the localized shipping price for the country within the warehouse specified in warehouse_name parameter, and meanwhile the country will be enabled in that warehouse. If localized_CC is provided and the country is included in wish_express_add_countries, and warehouse_name is not specified, the provided shipping price will be copied to the Wish Express shipping. Maximum is $1000 USD, or what's equivalent in local currency. |
localized_currency_code | The merchant's local currency code. This is required for non-USD merchants. This can be retrieved in Merchant Currency Code API. |
AU_ACT, AU_JBT, AU_NSW, AU_NT, AU_QLD, AU_SA, AU_TAS, AU_VIC, AU_WA, BR_BAC, BR_BAI, BR_MGC, BR_MGI, BR_PRC, BR_PRI, BR_RJC, BR_RJI, BR_RSC, BR_SFB, BR_SPC, BR_SPI, DK_GL, ES_CN, FR_GF, FR_GP, FR_MF, FR_MQ, FR_NC, FR_PF, FR_PM, FR_RE, FR_WF, FR_YT, US_AA, US_AE, US_AK, US_AL, US_AP, US_AR, US_AS, US_AZ, US_CA, US_CO, US_CT, US_DC, US_DE, US_FL, US_GA, US_GU, US_HI, US_IA, US_ID, US_IL, US_IN, US_KS, US_KY, US_LA, US_MA, US_MD, US_ME, US_MI, US_MN, US_MO, US_MP, US_MS, US_MT, US_NC, US_ND, US_NE, US_NH, US_NJ, US_NM, US_NV, US_NY, US_OH, US_OK, US_OR, US_PA, US_RI, US_SC, US_SD, US_TN, US_TX, US_UT, US_VA, US_VT, US_WA, US_WI, US_WV, US_WY, | Use the format CC_RC where CC is a valid country code and RC is a valid region code inside the country. Each value is the shipping price (in USD) of this product to the region/state. The maximum value is 2 times the country shipping price. Updating shipping will enable the region automatically. See Customizable Regions for a list of supported regions. |
localized_CC_RC | This is required for non-USD merchants. If the field (CC_RC)'s is being updated, the localized_CC_RC field must be provided as well. Use the format localized_CC_RC where CC is a valid country code and RC is a valid region code inside the country. Each value is the shipping price in the merchant's local currency of this product to the region/state. The maximum value is 2 times the country shipping price. Updating shipping will enable the region automatically. See Customizable Regions for a list of supported regions. |
disabled_countries | A string that consists of country codes or region codes separated by comma. For example, 'AU,CA,US,US_HI,FR_RE'. Users in disabled countries or regions cannot see or buy the product. |
enabled_countries | A string that consists of country codes or region codes separated by comma. For example, 'AU,CA,US,US_HI,FR_RE'. Users in enabled countries or regions can 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. If the Wish Express warehouse for the destination country does not exist yet, it will be created with warehouse name "Express-CC" where "CC" is the country code. If country shipping price is provided in localized_CC and CC is in wish_express_add_countries, both STANDARD warehouse and Wish Express warehouse will be enabled with that provided localized shipping price. |
wish_express_remove_countries | A string that consists of country codes separated by comma. For example, 'AU,CA,US'. |
regions_use_country_shipping | A string that consists of country region codes separated by comma. For example, 'FR_RE, US_HI'. This is for regional shipping only. If a region is entered here, it overrides the price. |
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. |
localized_default_shipping_price | The localized default shipping price for the product in the merchant's local currency. Once set, the localized default shipping price will automatically apply as the localized 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; |
The four variables - disabled_countries, enabled_countries, wish_express_remove_countries, and wish_express_add_countries - have the following priority.
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
- localized_CA = 18
- AU = 1.99
- localized_AU = 12
- localized_currency_code = CNY
- disabled_countries = 'MX,BR'
- wish_express_add_countries = 'FR,ES'
- wish_express_remove_countries = 'US,CA'
- default_shipping_price = 3.99
- localized_default_shipping_price = 24
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789009876543211234'); $CA = urlencode('2.99'); $localized_CA = urlencode('18'); $AU = urlencode('1.99'); $localized_AU = urlencode('18'); $localized_currency_code = urlencode('CNY'); $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'); $localized_default_shipping_price = urlencode('24'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/update-multi-shipping?access_token=%s&id=%s&CA=%s&AU=%s&localized_CA=%s&localized_AU=%s&localized_currency_code=%s&disabled_countries=%s&wish_express_add_countries=%s&wish_express_remove_countries=%s&default_shipping_price=%s&localized_default_shipping_price=%s", $access_token, $id, $CA, $AU, $localized_CA, $localized_AU, $localized_currency_code, $disabled_countries, $wish_express_add_countries, $wish_express_remove_countries, $default_shipping_price, $localized_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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/get-shipping
id | Must provide either id or parent_sku The unique Wish identifier for this product |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku for this product |
country | Required The 2 letter country code. See Shippable Countries for a list of supported countries. Choose one from: AD, AE, AG, AI, AL, AM, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BG, BH, BM, BO, BR, BS, BT, BW, BZ, CA, CH, CL, CO, CR, CY, CZ, DE, DK, DM, DO, DZ, EC, EE, EG, ES, FI, FJ, FR, GA, GB, GD, GE, GH, GI, GR, GT, GY, HN, HR, HU, ID, IE, IL, IN, IS, IT, JE, JM, JO, JP, KE, KG, KH, KR, KW, KY, KZ, LC, LI, LK, LT, LU, LV, MA, MC, MD, ME, MK, MM, MN, MS, MT, MU, MV, MX, MY, NA, NG, NI, NL, NO, NP, NU, NZ, OM, PA, PE, PH, PK, PL, PR, PT, PY, QA, RE, RO, RS, RU, SA, SC, SE, SG, SH, SI, SK, SM, SR, SV, SZ, TH, TN, TO, TR, TT, TW, UA, US, UY, UZ, VE, VG, VI, VN, ZA, ZM, |
Response will contain a 'ProductCountryAllShipping' dict. The 'shipping_prices' in the response has been deprecated. Please use DataV2, which contains 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.
Each WarehouseShipping object has the following schema:
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. |
---|---|
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. This value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_shipping_price instead. |
localized_price | The localized shipping price of the product to the country, in the merchant's local currency. This field could be a number to indicate a localized shipping price. It could also be the string "" to indicate that the localized shipping price to this country is determined by the product variations. |
localized_currency_code | The merchant's local currency code. |
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. |
warehouse_name | The name of the warehouse that this WarehouseShipping object is representing |
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
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789009876543211234'); $country = urlencode('CA'); $url = sprintf( "https://sandbox.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", "localized_price": "18.00", "localized_currency_code": "CNY", "warehouse_name": "EXPRESS-CA", "enabled": "True", "use_product_shipping": "False" } }, { "WarehouseShipping": { "price_type": "normal", "price": "None", "localized_price": "", "localized_currency_code": "CNY", "warehouse_name": "STANDARD", "enabled": "False", "use_product_shipping": "True" } } ], "enabled": "True", "id": "123456789009876543211234", "country_code": "CA" } }, "shipping_price": "3.0", "localized_shipping_price": "18.00", "localized_currency_code": "CNY", "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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/get-all-shipping
id | Must provide either id or parent_sku The unique Wish identifier for this product |
---|---|
parent_sku | Must provide either id or parent_sku The parent sku for this product |
Response will contain a 'ProductCountryAllShipping' dict. The 'shipping_prices' in the response has been deprecated. Please use DataV2, which contains 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.
Each WarehouseShipping object has the following schema:
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. |
---|---|
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. This value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_shipping_price instead. |
localized_price | The localized shipping price of the product to the country, in the merchant's local currency. This field could be a number to indicate a localized shipping price. It could also be the string "" to indicate that the localized shipping price to this country is determined by the product variations. |
localized_currency_code | The merchant's local currency code. |
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. |
warehouse_name | The name of the warehouse that this WarehouseShipping object is representing |
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
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789009876543211234'); $url = sprintf( "https://sandbox.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": { "id": "123456789009876543211234", "DataV2": { "ProductCountryWarehouseAllShipping": { "id": "123456789009876543211234", "countries": [ { "ProductCountryWarehouseShipping": { "wish_express": "False", "warehouses": [ { "WarehouseShipping": { "price_type": "normal", "price": "4.0", "localized_shipping_price": "24.0", "localized_currency_code": "CNY", "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", "localized_shipping_price": "24.0", "localized_currency_code": "CNY", "warehouse_name": "EXPRESS-US", "enabled": "True", "use_product_shipping": "True", "regional_shippings": [ { "RegionalShipping": { "state": "California", "use_country_shipping": "True", "localized_currency_code": "USD", "price": "None", "enabled": "False", "localized_price": "None", "state_code": "CA" }, ] } }, { "WarehouseShipping": { "price_type": "normal", "price": "None", "localized_shipping_price": "", "localized_currency_code": "CNY", "warehouse_name": "STANDARD", "enabled": "False", "use_product_shipping": "True", "regional_shippings": [ { "RegionalShipping": { "state": "Hawaii", "use_country_shipping": "False", "localized_currency_code": "USD", "price": "5.0", "enabled": "True", "localized_price": "5.0" "state_code": "HI" }, ] } } ], "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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/get-products-shipping
ids | Required List of product IDs separated by ','. At most 50 product IDs. |
---|
Response will contain a list of 'ProductCountryAllShipping'. The 'shipping_prices' in the response has been deprecated. Please use DataV2, which contains 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.
Each WarehouseShipping object has the following schema:
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. |
---|---|
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. This value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_shipping_price instead. |
localized_price | The localized shipping price of the product to the country, in the merchant's local currency. This field could be a number to indicate a localized shipping price. It could also be the string "" to indicate that the localized shipping price to this country is determined by the product variations. |
localized_currency_code | The merchant's local currency code. |
enabled | 'True'/'False'. If 'True' then the product is available for sale in this country. If 'False' then the product is not available for sale in this country. |
wish_express | 'True'/'False'. If 'True' then the product is part of the Wish Express program and must be shipped to customers within the destination country's delivery deadline. View each country's Wish Express delivery deadline here. |
Example
Assume your access token is "an_example_access_token". If you had a product with id 123456789009876543211234, your parameters would be:
- ids = 123456789009876543211234,111122223333444455556666
- access_token = an_example_access_token
Example Request
<?php $access_token = urlencode('an_example_access_token'); $ids = urlencode('123456789009876543211234,111122223333444455556666'); $url = sprintf( "https://sandbox.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": { "id": "123456789009876543211234", "DataV2": { "ProductCountryWarehouseAllShipping": { "id": "123456789009876543211234", "countries": [ { "ProductCountryWarehouseShipping": { "wish_express": "False", "warehouses": [ { "WarehouseShipping": { "price_type": "normal", "price": "4.0", "localized_price": "24.0", "localized_currency_code": "CNY", "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", "localized_price": "", "localized_currency_code": "CNY", "warehouse_name": "EXPRESS-US", "enabled": "True", "use_product_shipping": "True", "regional_shippings": [ { "RegionalShipping": { "state": "California", "use_country_shipping": "True", "price": "None", "localized_price": "None", "localized_currency_code": "CNY", "enabled": "False", "state_code": "CA" }, ] } }, { "WarehouseShipping": { "price_type": "normal", "price": "None", "localized_price": "", "localized_currency_code": "CNY", "warehouse_name": "STANDARD", "enabled": "True", "use_product_shipping": "True", "regional_shippings": [ { "RegionalShipping": { "state": "Hawaii", "use_country_shipping": "False", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "enabled": "True", "state_code": "HI" }, ] } } ], "enabled": "True", "id": "123456789009876543211234", "country_code": "US" } } ] } } } }, { "ProductCountryAllShipping": { "id": "111122223333444455556666", "DataV2": { "ProductCountryWarehouseAllShipping": { "id": "111122223333444455556666", "countries": [ { "ProductCountryWarehouseShipping": { "wish_express": "False", "warehouses": [ { "WarehouseShipping": { "price_type": "normal", "price": "7.0", "localized_price": "42.0", "localized_currency_code": "CNY", "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", "localized_price": "18.0", "localized_currency_code": "CNY", "warehouse_name": "EXPRESS-US", "enabled": "True", "use_product_shipping": "False", "regional_shippings": [ { "RegionalShipping": { "state": "Alaska", "use_country_shipping": "False", "price": "None", "localized_price": "None", "localized_currency_code": "CNY", "enabled": "False", "state_code": "AK" }, ] } }, { "WarehouseShipping": { "price_type": "normal", "price": "None", "localized_price": "", "localized_currency_code": "CNY", "warehouse_name": "STANDARD", "enabled": "True", "use_product_shipping": "True", "regional_shippings": [ { "RegionalShipping": { "state": "Hawaii", "use_country_shipping": "False", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "enabled": "True", "state_code": "HI" }, ] } } ], "enabled": "True", "id": "111122223333444455556666", "country_code": "US" } } ] } } } } ] }
Get Merchant Shipping Settings
Retrieve merchant's shipping settings
HTTP Request Type: GET
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/get-shipping-setting
No parameters for this API
ResponseResponse 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. |
currency_code | The currency the shipping_price is in, if the shipping price is a number. |
Example
Assume your access token is "an_example_access_token". your parameters would be:
- access_token = an_example_access_token
Example Request
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.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', 'currency_code': 'USD'}}, {'CountryShippingSetting': {'country_code': 'CA', 'shipping_price': '2.00', 'use_product_shipping': 'False', 'currency_code': 'USD'}}, {'CountryShippingSetting': {'country_code': 'GB', 'shipping_price': '3.00', 'use_product_shipping': 'False', 'currency_code': 'USD'}}, {'CountryShippingSetting': {'country_code': 'US', 'shipping_price': 'Use Product Shipping Price', 'use_product_shipping': 'True', 'currency_code': 'N/A'}}], }}, 'message': ''}
Start a Batch Product Download
Call this to begin downloading a CSV file of your Products.
HTTP Request Type: POST
Scope: products:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/create-download-job
since | optional 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. |
---|---|
limit | optional A limit on the number of Products that can be returned. |
sort | optional The way the Products are sorted. By default, Products are sorted in descending order by product ID.
Accepted values: asc, desc |
show_rejected | optional If specified to 'true', this API will return all products including those inappropriate products that were rejected during review. |
warehouse_name | optional 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
Example #2
Suppose you want to download a batch of Products with the following constraints:
- since = 2016-07-01
Example Request
<?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://sandbox.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
Scope: products:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/get-download-job-status
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
<?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://sandbox.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
Scope: products:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/product/cancel-download-job
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
<?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://sandbox.merchant.wish.com/api/v2/product/cancel-download-job?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.
Attributesid | The Wish Id of the product variation, a string of 24 characters |
---|---|
Product id | The Wish Id of the product this product variation belongs to, a 24 character string |
sku | The unique identifier that your system uses to recognize this variant |
color | Wish's unique color identifier stored for the variant |
color_name | The human readable name of the color shown to customers when purchasing the variant |
size | The size of the variation |
inventory | The physical quantities you have for this variation, max 500,000 |
price | The price of the variation when the user purchases one. The price value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_price instead. |
localized_price | The price of the variation when the user purchases one. In your localized currency. |
shipping | The shipping of the variation when the user purchases one. The shipping value will be returned as 999999 if you receive payments in a non-USD currency. Please use localized_shipping instead. |
localized_shipping | The shipping of the variation when the user purchases one. In your localized currency. |
localized_currency_code | Your localized currency code. |
msrp | Listings include a field for a comparison or reference price (“MSRP Field”). Merchants are not required to provide a value for the MSRP Field. If Merchants choose to provide a value for the MSRP Field (a “Reference Price”), each Reference Price must comply with the Product Reference Price Policy. Learn More. |
enabled | Whether or not this product variation is enabled for purchase |
removed_by_wish | The product variation has been removed / disabled by Wish because they have violated our Wish Merchant policies. These variations cannot be re-enabled. |
shipping_time | (DEPRECATED/UNUSED) The amount of time it takes for the shipment to reach the buyer |
all_images | Url of all images of the product this product variation belongs to, separated by the character '|' |
main_image | The variant image which defaults to product.main_image if not set and will not be shown in the response of api/v2/product under Variant. |
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 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. The number of variations of a product must not exceed 400.
HTTP Request Type: POST
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/add
parent_sku | The 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 |
---|---|
sku | The 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. |
inventory | The physical quantities you have for this variation, max 500,000 |
price | The price of the variation when the user purchases one, max 100,000 |
localized_price | optional The price of the variation in the merchant's local currency. |
localized_currency_code | optional The merchant's localized currency code. This must be provided in order to set localized pricing fields. |
msrp | optional Listings include a field for a comparison or reference price (“MSRP Field”). Merchants are not required to provide a value for the MSRP Field. If Merchants choose to provide a value for the MSRP Field (a “Reference Price”), each Reference Price must comply with the Product Reference Price Policy. Learn More. |
shipping_time | optional (DEPRECATED/UNUSED) 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. Example: 15-20 |
main_image | optional URL of a photo for this product variation. Provide this when you have different pictures for different variations of the product. If left out, the variation will 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. It may take up to 1 hour for the image to be updated. |
length |
optional The length of your product that will be packaged to ship to customer (Units in cm)
|
width |
optional The width of your product that will be packaged to ship to customer (Units in cm)
|
height |
optional The height of your product that will be packaged to ship to customer (Units in cm)
|
weight |
optional The weight of your product that will be packaged to ship to customer (Units in g)
|
declared_name |
optional Product name for logistics declaration
|
declared_local_name |
optional Product name written in local language for logistics declaration
|
pieces |
optional The amount of pieces associated with this item
|
declared_value |
optional The price of your product that will be declared to custom.
|
hscode |
optional Harmonization System Code used for custom declaration.
|
origin_country |
optional country where product is manufactured. Country code should follow ISO 3166 Alpha-2 code. Example:CN, US
|
has_powder |
optional Whether product contains powder. Example: true, false.
|
has_liquid |
optional Whether product contains liquid. Example: true, false.
|
has_battery |
optional Whether product contains battery. Example: true, false.
|
has_metal |
optional Whether product contains metal. Example: true, false.
|
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
- localized_price = 60
- localized_currency_code = CNY
- access_token = an_example_access_token
- size = 12
Example Request
<?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, 'localized_price'=>60, 'localized_shipping'=>18, ); $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'); $localized_price = urlencode('60'), $localized_shipping = urlencode('18'), $size = urlencode('12'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/variant/add?access_token=%s&sku=%s&inventory=%s&price=%s&shipping=%s&localized_price=%s&localized_shipping=%s&size=%s&parent_sku=%s", $access_token, $sku, $inventory, $price, $shipping, $localized_cost, $localized_shipping_cost , $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', 'localized_price': '60', 'localized_shipping': '18' 'localized_currency_code': 'CNY' }} '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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/variant
sku | The unique identifier of the item in your system. |
---|---|
warehouse_name | optional 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
<?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://sandbox.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', 'localized_price': '60', 'localized_shipping': '18', 'localized_currency_code': 'CNY', '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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/update
sku | The unique identifier for the variation you would like to update |
---|---|
inventory | optional The physical quantities you have for this variation, max 500,000 |
price | optional The price of the variation when the user purchases one, max 100,000 |
localized_price | optional The price of the variation in the merchant's local currency. This is required for non-USD merchants. If updating price, the localized_price must be provided as well. |
localized_currency_code | optional The merchant's localized currency code. This must be provided in order to set localized pricing fields. |
enabled | optional True if the variation is for sale, False if you need to halt sales. |
size | optional The size of the variation. Example: Large, Medium, Small, 5, 6, 7.5 |
color | optional The color of the variation. Example: red, blue, green |
msrp | optional Listings include a field for a comparison or reference price (“MSRP Field”). Merchants are not required to provide a value for the MSRP Field. If Merchants choose to provide a value for the MSRP Field (a “Reference Price”), each Reference Price must comply with the Product Reference Price Policy. Learn More. |
shipping_time | optional (DEPRECATED/UNUSED) 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. Example: 5-10 |
main_image | optional URL of a photo for this product variation. Provide this when you have different pictures for different variations of the 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. It may take up to 1 hour for the image to be updated. |
update_product_image | optional If True, the main_image you pass will be used to update the product's main image and the images of all other variations that use the product's main image. If False, only this variation's main image will be changed. Default to True if not supplied |
warehouse_name | optional 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)
|
width |
optional The width of your product that will be packaged to ship to customer (Units in cm)
|
height |
optional The height of your product that will be packaged to ship to customer (Units in cm)
|
weight |
optional The weight of your product that will be packaged to ship to customer (Units in g)
|
declared_name |
optional Product name for logistics declaration
|
declared_local_name |
optional Product name written in local language for logistics declaration
|
pieces |
optional The amount of pieces associated with this item
|
declared_value |
optional The price of your product that will be declared to custom.
|
hscode |
optional Harmonization System Code used for custom declaration.
|
origin_country |
optional country where product is manufactured. Country code should follow ISO 3166 Alpha-2 code. Example:CN, US
|
has_powder |
optional Whether product contains powder. Example: true, false.
|
has_liquid |
optional Whether product contains liquid. Example: true, false.
|
has_battery |
optional Whether product contains battery. Example: true, false.
|
has_metal |
optional Whether product contains metal. Example: true, false.
|
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
- localized_price = 60
- localized_currency_code = CNY
- 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
<?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; $var->localized_price = 60; $var->localized_shipping = 60; $var->localized_currency_code = CNY $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://sandbox.merchant.wish.com/api/v2/variant/update?access_token=%s&sku=%s&inventory=%s&price=%s&shipping=%s&localized_price=%s&localized_shipping=%s&localized_currency_code=%s", $access_token, $sku, $inventory, $price, $shipping, $localized_price, $localized_shipping, $localized_currency_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
{ 'code': 0, 'data': {}, 'message': '' }
Change a Product Variation's SKU
Change a variation's unique identifier, the new identifier must also be unique within all SKUs of the merchant
HTTP Request Type: POST
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/change-sku
sku | The unique identifier for the variation you would like to change |
---|---|
new_sku | The 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
<?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://sandbox.merchant.wish.com/api/v2/variant/change-sku?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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/enable
sku | The 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
<?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://sandbox.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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/disable
sku | The 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
<?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://sandbox.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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/update-inventory
sku | The unique identifier for the item you would like to update |
---|---|
inventory | The physical number of items you have, max 500,000 |
warehouse_name | The 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
<?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://sandbox.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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/variant/multi-get
start | optional 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 |
---|---|
limit | A limit on the number of products that can be returned. Limit can range from 1 to 500 items and the default is 50 |
warehouse_name | optional 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
<?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://sandbox.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', 'localized_price': '600.0', 'localized_shipping': '126.0', 'localized_currency_code': 'CNY', 'sku': 'MMM'}}, {'Variant': {'color': 'blue', 'enabled': 'True', 'id': '5214c1111c238837cdiiiiii', 'product_id' : '51e0a2c61111axxxcfffeyyy', 'inventory': '917', 'msrp': '100.0', 'price': '50.0', 'shipping': '9.81', 'localized_price': '300.0', 'localized_shipping': '60.0', 'localized_currency_code': 'CNY', 'sku': 'DD1111'}}], 'message': '', 'paging': {'next': 'https://sandbox.merchant.wish.com/api/v2/variant/multi-get?start=22&limit=2&access_token=an_example_access_token', 'previous': 'https://sandbox.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
Scope: products:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/variant/bulk-sku-update
updates | A 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. |
---|---|
warehouse_name | The warehouse to apply the inventory updates to. If not provided, the inventory change will apply to the STANDARD warehouse. The enabled attributes above will be applied to all warehouses; this parameter will only impact inventory updates. |
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
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://sandbox.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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/variant/get-bulk-update-job-status
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
Not supported in SDK yet.
<?php $access_token = urlencode('an_example_access_token'); $job_id = urlencode('59e00339b2d5b8367ac3e8bd'); $url = sprintf( "https://sandbox.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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/variant/get-bulk-update-job-successes
job_id | The unique identifier you received from bulk update production variations (/variant/bulk-sku-update) |
---|---|
start | optional 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 |
limit | optional 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
Not supported in SDK yet.
<?php $access_token = urlencode('an_example_access_token'); $job_id = urlencode('59e00339b2d5b8367ac3e8bd'); $limit = urlencode('5'); $url = sprintf( "https://sandbox.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
Scope: products:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/variant/get-bulk-update-job-failures
job_id | The unique identifier you received from bulk update production variations (/variant/bulk-sku-update) |
---|---|
start | optional 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 |
limit | optional 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
Not supported in SDK yet.
<?php $access_token = urlencode('an_example_access_token'); $job_id = urlencode('59e00339b2d5b8367ac3e8bd'); $limit = urlencode('3'); $url = sprintf( "https://sandbox.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 StateOrders 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 Attributesorder_id | Wish's unique identifier for the order |
---|---|
transaction_id | Orders can be grouped under unique identifiers if the user makes several purchases at once |
product_id | Wish's unique identifier for the Product being ordered |
variant_id | Wish's unique identifier for the Product Variation that was ordered |
quantity | The number of units that the user has purchased |
sku | The unique identifier of the variant in your system |
size | The size of the item that was ordered (if applicable) |
color | The 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_provider | This is the courier that has been used to ship the package |
tracking_number | This is the number a user can use to track their package with your carrier |
shipped_date | The date the the order was marked as shipped |
ship_note | A 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_total | The total amount you will receive from Wish for this order |
days_to_fulfill | Number of days left to fulfill this order. If the order is not fulfilled in time it will be automatically refunded. |
hours_to_fulfill | Number of hours left to fulfill this order. If the order is not fulfilled in time it will be automatically refunded. |
expected_ship_date | Date 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. |
price | The price of the item when the user purchases one |
cost | The amount of money that Wish pays you for the product (per unit) |
shipping | The amount of money user pays for shipping for the product(per unit) |
shipping_cost | The amount of money that Wish pays you for shipping the product (per unit) |
currency_code | The currency in which the order's total cost is paid to the merchant |
product_name | The name of the product |
product_image_url | The image of the product |
order_time (UTC) | The date and time of when the order is available for fulfillment by merchant, also the start time for calculating fulfillment policy deadlines. |
released_to_merchant_time (UTC) | The date and time of when the order is available for fulfillment by merchant, also the start time for calculating fulfillment policy deadlines. |
shipping_details | Container for all the details about how to ship the order to its destination |
refunded_by | A description of who refunded the order |
refunded_time (UTC) | The time when the order was refunded |
refunds | A list of containers containing refund related information such as the refund amount and reason for refunds associated with the order |
is_wish_express | True if the order is a Wish Express order |
we_required_delivery_date | The 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_confirmed | Whether tracking is confirmed or not |
tracking_confirmed_date | The 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. |
premiumcarrier_upgraded | This is True when it is a Premium Shipping Carrier Upgrade BETA order, and False when it is not. Premium Shipping Carrier Upgrade BETA order must be fulfilled via WishPost with one of the Premium Carrier BETA channels. Wish will provide subsidized shipping rates for upgrading to premium shipping carriers. The upgrade is required for merchants. |
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 |
confirmed_delivery | Whether the order is confirmed delivery. This value can be 'Yes' or 'No' |
date_shipping_carrier_confirmed_delivery | The day of confirmed delivery |
advanced_logistics | True means the order is included in Advanced Logistics Program |
optional_advanced_logistics | True means the order can be shipped via either Advanced Logistics Program or 3PL |
china_post_subsidy_amount | The China Post subsidy amount will be paid or have already paid for this order |
pay_customer_vat_required | True when it is a Pay Customer VAT "PC-VAT" required order, and False when it is not. |
is_fbs_order | True means the order is a Fulfillment By Store (FBS) order |
is_ltl_order | True means the order is a Less-truck-load (LTL) order |
name | The name of the person who this order is being shipped to |
---|---|
street_address1 | The street address the order is to be shipped to |
street_address2 | Extra street address information about the package's destination |
city | The city name of where the order should be delivered |
state | The state/region where the order should be delivered |
country | The country where the order should be delivered |
zipcode | The zipcode/postal code of the address where the order is to be delivered |
phone_number | The phone number for the carrier to call in the case of missed deliveries |
merchant_warehouse_id | The ID of the merchant warehouse where the order was shipped from |
---|---|
merchant_warehouse_name | The name of the merchant warehouse where the order was shipped from |
merchant_warehouse_type | The type of the merchant warehouse where the order was shipped from, type can be Primary or Secondary |
authority_currency_code | Local currency code of the tax authority, to whom the taxes are owed. |
---|---|
transaction_tax | Sales tax is collected from the customer when an order is placed, converted to your payment currency |
tax_refunded | When one or multiple products in an order are refunded, the associated tax will be refunded to the customer. This value is in your payment currency |
tax_paid_to_merchant | Indicates whether the collected tax will be paid to the merchant. |
transaction_tax_in_authority_currency | Sales tax in the tax authority's currency |
tax_refunded_in_authority_currency | Tax refunded in the tax authority's currency. |
refund_time (UTC) | The time when the order was refunded. Example: Jan 20th, 2019 20:10:20 is 2019-01-20T20:10:20. |
---|---|
refund_reason | The reason the order was refunded |
merchant_responsible_amount | The refund amount for which the merchant is responsible |
refund_amount | The total amount refunded |
currency_code | The currency of the refund_amount and merchant_responsible_amount |
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
Scope: orders:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/order
id | Wish's unique identifier for the order (order_id in the Order object) |
---|---|
show_original_shipping_detail | optionalTrue 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
<?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://sandbox.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": { "is_fbw": "False", "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", "currency_code": "USD", "is_wish_express": "False", "requires_delivery_confirmation": "False", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5abfd8801ab08a1da66447ad-normal.jpg?cache_buster=4b66fc88f4ad4c7c3176cd07fbfab237", "size": "One Size", "sku": "aa2620a43d9844313509e019-light brown-One Size", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d9844313509e020", "merchant_warehouse_name": "STANDARD", "merchant_warehouse_type": "Primary" }, "shipping_provider": "WishPost", "order_total": "1.7", "product_id": "aabfd8801ab08a1da66447ad", "tracking_confirmed": "True", "state": "SHIPPED", "shipping": "1.0", "pay_customer_vat_required": "False", "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", "is_fbs_order": "False", "is_ltl_order": "False", "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"], "confirmed_delivery": "Yes", "date_shipping_carrier_confirmed_delivery": "2018-08-28", "advanced_logistics": "False", "china_post_subsidy_amount": "0.15", "TaxDetail": { "transaction_tax": "2.00", "tax_refunded": "1.00", "transaction_tax_in_authority_currency": 8.0, "tax_paid_to_merchant": "True" }, "refunds": [ { "RefundsInfo": { "refund_time": "2019-07-30T23:35:13", "refund_reason": "SHIPPING_TAKING_TOO_LONG", "merchant_responsible_amount": "9.33", "refund_amount": "10.5", "currency_code" : "USD" } } ] } } }
Retrieve Recently Changed Orders
Please use the batch download API to download all Orders.
Starting on September 2, 2019, this API will no longer support FBW orders. Please switch to the Retrieve Recently Changed FBW Orders to fetch recently changed FBW Orders. 'fbw_included' will be removed from this API's parameters
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
Scope: orders:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/order/multi-get
start | optional 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. Maximum allowed value is 25000 |
---|---|
limit | optional A limit on the number of orders that can be returned. Limit can range from 1 to 500 items and the default is 50 |
since | optional 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_only | optional If set to True, the API will only return Wish Express orders |
show_original_shipping_detail | optionalTrue 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.
By default, orders are sorted in descending order by last updated time and order id.
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
<?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://sandbox.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": { "is_fbw": "False", "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", "currency_code": "USD", "is_wish_express": "False", "requires_delivery_confirmation": "True", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f", "size": "7(EUR37)", "sku": "aaf3106_7_White", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d9844313509e020", "merchant_warehouse_name": "STANDARD", "merchant_warehouse_type": "Primary" }, "shipping_provider": "EMS", "order_total": "11.9", "product_id": "aa4a42ffd20e930b10742434", "tracking_confirmed": "True", "state": "SHIPPED", "shipping": "6.0", "pay_customer_vat_required": "False", "order_id": "aad3cce86cb7a067f1680a92", "tracking_number": "LY113628433CN", "released_to_merchant_time": "2018-04-16T06:20:21", "is_combined_order": "False", "is_fbs_order": "False", "is_ltl_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"], "advanced_logistics": "False" "china_post_subsidy_amount": "0.15", "TaxDetail": { "transaction_tax": "2.00", "transaction_tax_in_authority_currency": "8.0", "tax_refunded": "1.00", "tax_paid_to_merchant": "True" } } }, { "Order": { "is_fbw": "False", "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", "currency_code": "USD", "is_wish_express": "False", "requires_delivery_confirmation": "True", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f", "size": "6(EUR35)", "sku": "aaf31048_6_Rose", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d9844313509e020", "merchant_warehouse_name": "STANDARD", "merchant_warehouse_type": "Primary" }, "shipping_provider": "WishPost", "order_total": "11.9", "product_id": "aa4a42ffd20e930b10742434", "tracking_confirmed": "True", "state": "SHIPPED", "shipping": "6.0", "pay_customer_vat_required": "False", "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", "is_fbs_order": "False", "is_ltl_order": "False", "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": [], "advanced_logistics": "False", "china_post_subsidy_amount": "0.15", "TaxDetail": { "transaction_tax": "2.00", "transaction_tax_in_authority_currency": "8.0", "tax_paid_to_merchant": "True" }, "refunds": [ { "RefundsInfo": { "refund_time": "2019-07-30T23:35:13", "refund_reason": "SHIPPING_TAKING_TOO_LONG", "merchant_responsible_amount": "9.33", "refund_amount": "10.5", "currency_code" : "USD" } } ] } } ], "paging": { "next": "https://merchant.wish.com/api/v2/order/multi-get?show_original_shipping_detail=True&start=121&limit=20&access_token=8f937c7c6cea4f8c89f6428444edb178&since=2018-04-20", "previous": "https://merchant.wish.com/api/v2/order/multi-get?show_original_shipping_detail=True&start=81&limit=20&access_token=8f937c7c6cea4f8c89f6428444edb178&since=2018-04-20" } }
Retrieve Recently Changed FBW Orders
Returns all Fulfilled by Wish 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 FBW orders that were updated since this time.
HTTP Request Type: GET
Scope: orders:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/order/multi-get-fbw
start | optional 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 |
---|---|
limit | optional A limit on the number of orders that can be returned. Limit can range from 1 to 500 items and the default is 50 |
since | optional Collect all FBW orders that have been updated since the time value passed into this parameter (UTC). Fetches from two weeks before current 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. The maximum difference between 'since' and 'upto' is two weeks. |
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_only | optional If set to True, the API will only return Wish Express FBW orders |
show_original_shipping_detail | optionalTrue or False. When it is set to True, if the order is an EPC order and it is confirmed 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 FBW 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 FBW orders since May 1, 2013 and start is 100, while limit is 50, this API will return the 100th order to the 149th order.
By default, orders are sorted in descending order by last updated time and order id.
Example
Assume your access token is "an_example_access_token" . If you use this API to sync FBW orders into your order tracking software and you need all the orders that have changed since April 10, 2018 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 = 2018-04-10
- access_token = an_example_access_token
- show_original_shipping_detail = True
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $client = new WishClient($access_token,'prod'); $orders = $client->getAllChangedFbwOrdersSince('2018-04-10'); echo "You have ".count($orders)." changed FBW orders since 2018-04-10\n";
<?php $access_token = urlencode('an_example_access_token'); $start = urlencode('200'); $limit = urlencode('100'); $since = urlencode('2018-04-10'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/order/multi-get-fbw?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": { "is_fbw": "True", "premiumcarrier_upgraded": "False", "last_updated": "2018-04-20T09:58:20", "order_time": "2018-04-15T22:06:32", "color": "white", "price": "8.0", "variant_id": "aa4a4305227c624cbe00698c", "wish_express_tier": "", "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": "True", "requires_delivery_confirmation": "True", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f", "size": "7(EUR37)", "sku": "aaf3106_7_White", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d98443135091119", "merchant_warehouse_name": "US", "merchant_warehouse_type": "Secondary" }, "shipping_provider": "EMS", "order_total": "11.9", "product_id": "aa4a42ffd20e930b10742434", "we_required_delivery_date": "2018-04-30T23:59:59", "tracking_confirmed": "True", "lot_info": [ { "LotInfo": { "lot_id": "WIZAAAAA000000", "quantity": "1" } } ], "state": "SHIPPED", "shipping": "6.0", "pay_customer_vat_required": "False", "fbw_fees": [ { "FBWFee": { "currency": "USD", "amount": "4.3", "fee_name": "Order Shipping Fee", "fee_type_text": "ORDER_SHIPPING_FEE", "fee_type": "110" } }, { "FBWFee": { "currency": "USD", "amount": "0.0", "fee_name": "Order Handling Fee", "fee_type_text": "ORDER_HANDLING_FEE", "fee_type": "111" } }, { "FBWFee": { "currency": "USD", "amount": "1.0", "fee_name": "Order Repackaging Fee", "fee_type_text": "ORDER_REPACKAGING_FEE", "fee_type": "112" } } ], "order_id": "aad3cce86cb7a067f1680a92", "tracking_number": "LY113628433CN", "released_to_merchant_time": "2018-04-16T06:20:21", "is_combined_order": "False", "is_fbs_order": "False", "is_ltl_order": "False", "tracking_confirmed_date": "2018-04-24T12:15:48", "fbw_warehouse_code": "LAX", "quantity": "1", "product_name": "Fashion Womens Sneakers Breathable Mesh Running Sports Shoes", "transaction_id": "aad3cce5d130801451d77758", "fine_ids": ["5ab4e367ae3004ebb12c28ab"], "advanced_logistics": "False" "china_post_subsidy_amount": "0.15", "TaxDetail": { "transaction_tax": "2.00", "transaction_tax_in_authority_currency": "8.0", "tax_refunded": "1.00", "tax_paid_to_merchant": "True" } } }, { "Order": { "is_fbw": "True", "premiumcarrier_upgraded": "False", "last_updated": "2018-04-20T07:09:09", "order_time": "2018-03-12T20:23:25", "color": "rose", "price": "8.0", "variant_id": "aa4a433695f79f3bc9f0c381", "wish_express_tier": "", "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", "currency_code": "USD", "is_wish_express": "True", "requires_delivery_confirmation": "True", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f", "size": "6(EUR35)", "sku": "aaf31048_6_Rose", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d98443135091119", "merchant_warehouse_name": "US", "merchant_warehouse_type": "Secondary" }, "shipping_provider": "WishPost", "order_total": "11.9", "product_id": "aa4a42ffd20e930b10742434", "we_required_delivery_date": "2018-04-30T23:59:59", "tracking_confirmed": "True", "lot_info": [ { "LotInfo": { "lot_id": "WIZAAAAA000001", "quantity": "1" } } ], "state": "SHIPPED", "shipping": "6.0", "pay_customer_vat_required": "False", "fbw_fees": [ { "FBWFee": { "currency": "USD", "amount": "4.3", "fee_name": "Order Shipping Fee", "fee_type_text": "ORDER_SHIPPING_FEE", "fee_type": "110" } }, { "FBWFee": { "currency": "USD", "amount": "0.0", "fee_name": "Order Handling Fee", "fee_type_text": "ORDER_HANDLING_FEE", "fee_type": "111" } }, { "FBWFee": { "currency": "USD", "amount": "1.0", "fee_name": "Order Repackaging Fee", "fee_type_text": "ORDER_REPACKAGING_FEE", "fee_type": "112" } } ], "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", "is_fbs_order": "False", "is_ltl_order": "False", "tracking_confirmed_date": "2018-03-15T15:54:24", "fbw_warehouse_code": "LAX", "quantity": "1", "product_name": "Fashion Womens Sneakers Breathable Mesh Running Sports Shoes", "transaction_id": "aaa6e1bcb40365735be165a9", "fine_ids": [], "advanced_logistics": "False", "china_post_subsidy_amount": "0.15", "TaxDetail": { "transaction_tax": "2.00", "transaction_tax_in_authority_currency": "8.0", "tax_paid_to_merchant": "True" }, "refunds": [ { "RefundsInfo": { "refund_time": "2019-07-30T23:35:13", "refund_reason": "SHIPPING_TAKING_TOO_LONG", "merchant_responsible_amount": "9.33", "refund_amount": "10.5", "currency_code" : "USD" } } ] } } ], "paging": { "next": "https://merchant.wish.com/api/v2/order/multi-get-fbw?show_original_shipping_detail=True&start=121&limit=20&access_token=8f937c7c6cea4f8c89f6428444edb178&since=2018-04-20", "previous": "https://merchant.wish.com/api/v2/order/multi-get-fbw?show_original_shipping_detail=True&start=81&limit=20&access_token=8f937c7c6cea4f8c89f6428444edb178&since=2018-04-20" } }
Retrieve Recently Changed FBS Orders
Returns all Fulfilled by Store 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 'updated_since' and 'updated_upto' and returns all FBS orders that were updated between and including these times.
HTTP Request Type: GET
Scope: orders:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/order/multi-get-fbs
limit | optional A limit on the number of orders that can be returned. Limit can range from 1 to 500 items and the default is 50 |
---|---|
sort | optional The order in which the results are sorted by 'last_update'. Sort can be either 'asc' or 'desc', and it is defaulted to 'desc' |
updated_since | optional Collect all FBS orders that have been updated on or since the time value passed into this parameter (UTC). The datetime string must be in the format 'YYYY-MM-DDTHH:MM:SS'. This will be defaulted to show your first FBS order. |
updated_upto | optional Collect all FBS orders that have been updated on or upto the time value passed into this parameter (UTC). The datetime string must be in the format 'YYYY-MM-DDTHH:MM:SS'. This will be defaulted to the current time. |
Returns
This API returns all FBS orders that have been updated between and including the 'updated_since' and 'updated_upto' parameters (UTC), up to the 'limit' parameter orders.
To get all FBS orders between a certain time range, continue to follow the 'paging.next' field in the response until there is no longer a next page.
By default, orders are sorted in descending order by last updated time and order id.
Example
Assume your access token is "an_example_access_token". If you use this API to sync FBS orders into your order tracking software and you need all the orders that have changed between November 10, 2019 and February 1, 2020 and you would like them in pages of 100:
- limit = 100
- updated_since = 2019-11-10T00:00:00
- updated_upto = 2020-02-01T00:00:00
- access_token = an_example_access_token
- sort = asc
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $client = new WishClient($access_token,'prod'); $orders = $client->getAllChangedFbsOrdersSince('2019-11-10T00:00:00'); echo "You have ".count($orders)." changed FBW orders since 2019-11-10\n";
<?php $access_token = urlencode('an_example_access_token'); $limit = urlencode('100'); $updated_since = urlencode('2019-11-10T00:00:00'); $updated_upto = urlencode('2020-02-01T00:00:00'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/order/multi-get-fbw?access_token=%s&limit=%s&updated_since=%s&updated_upto=%s", $access_token, $limit, $updated_since, $updated_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
{ "message": "", "code": 0, "data": [ { "Order": { "is_fbw": "False", "premiumcarrier_upgraded": "False", "last_updated": "2019-11-11T22:00:54", "order_time": "2019-11-11T22:00:49", "order_id": "3d20ccf818a947abbab8f5ab", "price": "1.0", "variant_id": "be3d954a1e9a4c3c934f1d02", "fine_ids": [], "wish_express_tier": "", "ShippingDetail": { "phone_number": "7181234567", "city": "Brooklyn", "state": "New York", "name": "John Doe", "country": "US", "zipcode": "11234", "street_address1": "1234 east 48th st" }, "shipped_date": "2019-11-11", "cost": "0.85", "shipping_cost": "3.81", "is_wish_express": "False", "requires_delivery_confirmation": "False", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f", "size": "1pcs", "sku": "1d0da8e6a7d049e5ae362059", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d9844313509e020", "merchant_warehouse_name": "STANDARD", "merchant_warehouse_type": "Primary" }, "tracking_confirmed": "False", "order_total": "4.66", "product_id": "d740ddc433f0423493b4eb61", "china_post_subsidy_amount": "0", "pay_customer_vat_required": "False", "is_norway_vat_order": "False", "advanced_logistics": "False", "shipping": "4.48", "TaxDetail": { "tax_paid_to_merchant": "False" }, "state": "SHIPPED", "confirmed_delivery": "No", "transaction_id": "0e2d783f05aa4fb29b348ae5", "is_combined_order": "False", "is_fbs_order": "False", "is_ltl_order": "False", "product_name": "Example Prouduct 1", "currency_code": "USD", "quantity": "1" } }, { "Order": { "is_fbw": "False", "premiumcarrier_upgraded": "False", "last_updated": "2019-11-19T21:04:19", "order_time": "2019-11-19T21:04:15", "order_id": "d83435478ecb487b85d00806", "price": "1.0", "variant_id": "886312a6e82b42b7ad61c437", "fine_ids": [], "wish_express_tier": "", "ShippingDetail": { "phone_number": "3471234567", "city": "Brooklyn", "state": "New York", "name": "Jane Doe", "country": "US", "street_address2": "10", "street_address1": "123 Benford St apt 10", "zipcode": "11212" }, "shipped_date": "2019-11-19", "released_to_merchant_time": "2019-11-19T21:04:13", "shipping_cost": "3.81", "is_wish_express": "False", "requires_delivery_confirmation": "False", "product_image_url": "https://canary.contestimg.wish.com/api/webimage/5a4a42ffd20e930b10742434-normal.jpg?cache_buster=60a9f08ac10fba8a58d571996f336a3f", "size": "1pcs", "sku": "a299333df5734c8fb211704e", "MerchantWarehouseDetails": { "merchant_warehouse_id": "aa2620a43d9844313509e020", "merchant_warehouse_name": "STANDARD", "merchant_warehouse_type": "Primary" }, "tracking_confirmed": "False", "order_total": "4.66", "product_id": "43bf70ecc77849889bd9b7dd", "china_post_subsidy_amount": "0", "pay_customer_vat_required": "False", "is_norway_vat_order": "False", "advanced_logistics": "False", "shipping": "4.48", "TaxDetail": { "tax_paid_to_merchant": "False" }, "state": "SHIPPED", "cost": "0.85", "confirmed_delivery": "No", "transaction_id": "764cfe24ce7f45d5a6ea99a1", "is_combined_order": "False", "is_fbs_order": "False", "is_ltl_order": "False", "product_name": "Example Product 2", "currency_code": "USD", "quantity": "1" } } ], "paging": { "next": "https://merch.corp.contextlogic.com/api/v2/order/multi-get-fbs?sort=asc&access_token=f6f50b09fe314481a6b64061c0c587b8&updated_since=2019-11-19T21%3A04%3A19&limit=2&updated_upto=2020-02-01T00%3A00%3A00&last_id=d83435478ecb487b85d00806" } }
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
Scope: orders:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/order/get-fulfill
start | optional 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 |
---|---|
limit | optional A limit on the number of products that can be returned. Limit can range from 1 to 500 items and the default is 50 |
since | optional 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_only | optional 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
<?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://sandbox.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': [] "advanced_logistics": "False", "china_post_subsidy_amount": "0", "pay_customer_vat_required": "False", }}, {'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', 'currency_code': 'USD', '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': [] "advanced_logistics": "False", "china_post_subsidy_amount": "0", "pay_customer_vat_required": "False", }}], 'message': '', 'paging': {'next': 'https://sandbox.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.
Click here to view the list of Confirmed Delivery carriers.
Click here to view the list of Confirmed Delivery countries.
Click here to view the list of accepted carriers when shipping to Sweden.
HTTP Request Type: POST
Scope: orders:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/fulfill-one
id | Wish's unique identifier for the order, or 'order_id' in the Order object |
---|---|
tracking_provider | The carrier that will be shipping your package to its destination |
tracking_number | optional 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. This will not be optional for LTL orders. |
origin_country_code | The country where the package is shipping from. Country code should follow ISO 3166 Alpha-2 code. Example: CN, US |
ship_note | optional 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
<?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://sandbox.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
Scope: orders:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/refund
id | Wish's unique identifier for the order, or 'order_id' in the Order object |
---|---|
reason_code | An integer representing the reason for the refund. Check the tables below for accepted reason codes |
reason_note | optional A note to the user explaining reason for the refund. |
1 | Store is unable to fulfill order, unable to ship |
---|
25 | Item is damaged |
---|---|
32 | Item was returned to sender |
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
<?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://sandbox.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.
Click here to view the list of Confirmed Delivery carriers.
Click here to view the list of Confirmed Delivery countries.
HTTP Request Type: POST
Scope: orders:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/modify-tracking
id | Wish's unique identifier for the order, or 'order_id' in the Order object |
---|---|
tracking_provider | The carrier that will be shipping your package to its destination |
tracking_number | optional 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_code | The country where the package is shipping from. Country code should follow ISO 3166 Alpha-2 code. Example: CN, US |
ship_note | optional 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
<?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://sandbox.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
Scope: orders:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/change-shipping
id | Wish'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_address2 | optional The second line of the customer's street address |
city | The city of the customer's new shipping address |
state | optional The state of the shipping address, e.g. CA, LA, NY and etc... |
zipcode | The zipcode or equivalent for country of the shipping address |
phone_number | optional 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
<?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://sandbox.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
Scope: orders:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/create-download-job
start | optional 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. |
---|---|
end | optional 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. |
limit | optional A limit on the number of orders that can be returned. |
sort | optional 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
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
<?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://sandbox.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
Scope: orders:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/get-download-job-status
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
<?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://sandbox.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
Scope: orders:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/cancel-download-job
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
<?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://sandbox.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
Scope: orders:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/get-confirmed-delivery-countries
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
<?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://sandbox.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
Scope: orders:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/get-confirmed-delivery-shipping-carriers-for-country
country_code | The 2-letter country code you want to ship to. For a full list of these country codes, click here. |
---|
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
<?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://sandbox.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', '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': '' }
Upload Delivery Confirmation
Upload delivery confirmation for shipped orders. Currently, this API is only available for less-than-truckload orders which are not confirmed fulfilled by carrier tracking within 2 days after the merchant marks the LTL order as shipped.
Merchants will have a max of 90 calendar days since mark “ship” to upload delivery confirmation.
HTTP Request Type: POST
Scope: orders:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/order/upload-delivery-confirmation
id | Wish's unique identifier for the order, or 'order_id' in the Order object |
---|---|
date_delivered | The delivery date as it appears on the delivery or tracking link (%m-%d-%YT%H:%M:%S) |
tracking_url | optional Carrier tracking link (optional if uploading receipt) |
delivery_receipt_file_url | optional Delivery receipt file URL (Optional if entering carrier tracking link) |
Returns
If the less-than-truckload order is without being confirmed fulfilled via carrier tracking from our system, the API will upload the delivery confirmation and return a HTTP status code of 200.
Example
Assume your access token is "an_example_access_token". Suppose you want to upload delivery confirmation for your shipped Less-than-truckload order:
- id = 098765432112345678901234
- date_delivered = 2020-10-10
- tracking_url = https://tools.usps.com/go/TrackConfirmAction
- delivery_receipt_file_url = http://i.receiptur.com/Q1a32kD.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'); $date_delivered = '2020-10-10' $tracking_url = 'www.abc.com' $delivery_receipt_file_url = 'www.def.com' $client->orderUploadDeliveryConfirmation('098765432112345678901234',$date_delivered, $tracking_url, $delivery_receipt_file_url);
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('098765432112345678901234') $date_delivered = urlencode('2020-10-10') $tracking_url = urlencode('www.abc.com') $delivery_receipt_file_url = urlencode('www.def.com') $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/order/upload-delivery-confirmation?access_token=%s&id=%s&date_delivered=%s&tracking_url=%s&delivery_receipt_file_url=%s", $access_token, $id, $date_delivered, $tracking_url, $delivery_receipt_file_url); $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': '' }
Warehouse
The Warehouse object represents separate Warehouses and shipping options you provide. With this API, you can fetch a list of your warehouses.
Attributesid | Wish's unique identifier for the warehouse |
---|---|
warehouse_unit_id | The human readable ID for the warehouse, this is the ID to use for other API calls |
destination_countries | The 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_type | The type of shipping the Warehouse provides, 1 for Standard Shipping, 2 for Wish Express |
warehouse_type_name | Human 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://sandbox.merchant.wish.com/api/v2/warehouse/get-all
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
<?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://sandbox.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.
Attributesid | Wish's unique identifier for the ticket |
---|---|
transaction_id | The transaction the ticket is related to. Each ticket relates to at most one transaction |
merchant_id | The merchant the ticket is for |
buyer_info | The information of the user who created the ticket |
subject | The subject for the ticket |
state | The state of the ticket can be: "Awaiting your response", "Awaiting buyer response", and "Awaiting store response" |
label | Wish's label for the ticket |
sublabel | Wish's sublabel for the ticket |
default_refund_reason | The default reason the order will be refunded for, depends on the label of the ticket |
photo_proof | Whether 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_by | Who closed the ticket, can be: user, merchant, wish support, wish automated support |
items | A list of all items affected by the ticket, each item is an Order object |
replies | A list of all replies to the ticket |
id | Wish's indentifier of the user |
---|---|
name | The name of the user |
joined_date | The date the user joined wish |
locale | The language preference of the user |
date | When the reply was sent |
---|---|
message | Contents of the reply |
sender | Who sent the reply, can be: user, merchant, wish support, wish automated support |
image_urls | Urls of the images provided in the reply |
translated_message | An automatic translation to English |
translated_message_zh | An 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
Scope: tickets:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/ticket
id | Wish'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
<?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://sandbox.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', 'currency_code': 'USD', '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', 'pay_customer_vat_required': 'False', '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
Scope: tickets:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/ticket/get-action-required
start | optional 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 |
---|---|
limit | optional A limit on the number of tickets that can be returned. Limit can range from 1 to 500 items and the default is 50 |
ticket_type |
optional
Parameter used to choose which type of tickets to retrieve. Choices of ticket_types are: post_purchase_tickets, post_customer_support_questions, pre_purchase_questions. Default to post_purchase_tickets if not supplied. |
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
<?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://sandbox.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', 'currency_code': 'USD', '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://canary.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', 'pay_customer_vat_required': 'False', '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', 'currency_code': 'USD', '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://canary.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', 'pay_customer_vat_required': 'False', '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://sandbox.merchant.wish.com/api/v2/ticket/get-action-required?start=2&limit=2&access_token=an_example_access_token'}}
Announcements
Attributes
id | Wish's unique identifier for the announcement |
---|---|
title | The title of the announcement |
message | The message content of the announcement |
perma_link | The permanent link to the announcement |
Fetch Account Manager Announcements
Returns the most recent announcement that your Account Manager sends you about existing features, merchant training opportunities, merchant meetup events, items that need your attention, and more.
HTTP Request Type: GET
Scope: notifications:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fetch-bd-announcement
Returns
Response will contain a GetBDAnnouncementResponse 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
<?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://sandbox.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': { 'GetBDAnnouncementResponse': { 'title': '关于下调XXXXXXXXXXXXXXXXXXX', 'created': 'Apr 01, 2016', 'bd_id': '55781a50d29XXXXXXXXXX', 'bd_name': 'TraXX XXXX', 'message': '感谢大家XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'viewed': 'False' } } }
Fetch System Updates
Returns all System Updates from Wish (located here on Merchant Dashboard). System updates are announcements about new features, policies, and programs Wish rolls out to merchants.
HTTP Request Type: GET
Scope: notifications:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fetch-sys-updates-noti
Returns
Response will contain a list of SystemUpdatesResponse
objects which contains the details of each update. Each
field in the SystemUpdatesResponse object is explained in
the following table:
title | string The title of the system update (in English) |
---|---|
body | string The body of the message (in English) |
link | string The associated URL link for more information (in English) |
cn_title | string The title of the system update (in Chinese) |
cn_body | string The body of the message (in Chinese) |
cn_link | string The associated URL link for more information (in Chinese) |
categories | array List of categories that the system update is tagged with (up to three). Category values may be: ACCOUNT_SETTINGS, API, INSIGHTS, IP, LOCAL_CURRENCY, LOGISTICS, LOGISTICS_PRICING, ORDERS, PAYMENTS, POLICIES_AND_TERMS, PRODUCTS, SHIPPING_CARRIERS, TAX. |
program | string Name of the program that the system update is referring to. Note: ‘None’ means that there is no program associated with this system-update. |
important | boolean This value is True when the announcement requires merchant to take action before or after a specific date deadline and/or when there is an API update. |
cta_text | string The specific Call To Action (action required) for the announcement (in English). |
cta_text_cn | string The specific Call To Action (action required) for the announcement (in Chinese). |
cta_effective_date | string The date and time related to the specific Call To Action (action required) for the announcement. This value is in UTC timezone. |
Example
Assume your access token is "an_example_access_token" and if you would like to get the system update
- 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'); $count = $client->getSystemUpdatesNotifications();
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.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', 'categories': ['LOGISTICS_PRICING', 'ORDERS', 'PRODUCTS'], 'program': 'ADVANCED_LOGISTICS', 'important': 'False', 'cta_text_en': '', 'cta_text_cn': '', 'cta_effective_date': '' } }] } }, { 'SystemUpdatesResponse': { 'release_date': 'Wednesday, December 11 2019', 'id': '55bfae216daddd41f93512ce', 'features': [{ 'Feature': { 'cn_title': '针对2020年1月中旬至2月初消费者对更快速发货的Wish产品需求的增加,请商户们及时准备充足的Wish Express库存', 'body': 'Based on historical data analysis, Wish products that offer fast-shipping options such as those with Wish Express enabled will likely experience an increased demand from customers between mid January and early February, 2020.\n\nIn anticipation of this potentially increased demand and sales for Wish Express products overall, Wish Express merchants are strongly encouraged to prepare for sufficient inventory now. Please plan for the inventory to arrive at your Wish Express warehouses by January 10, 2020.\n\nTo add more products to your Wish Express warehouse(s) now, please visit the link below:', 'title': 'Prepare sufficient Wish Express inventory in anticipation of increased demand for faster shipping Wish products mid January to early February 2020', 'link': 'https://merchant.wish.com/add-products', 'cn_body': '根据历史数据分析,提供快速配送选择的Wish产品(如启用Wish Express的产品)可能在2020年1月中旬至2月初期间会经历消费者需求增加的情况。\n\n由于预计在此期间Wish Express产品的消费者需求和销售整体上可能会增加,我们强烈鼓励Wish Express商户们现在就准备充足的库存。请为您的库存计划在2020年1月10日前到达您的Wish Express仓库。\n\n若需立即向您的Wish Express仓库添加更多产品,请访问以下链接:', 'cn_link': 'https://merchant.wish.com/add-products', 'categories': ['LOGISTICS', 'PRODUCTS'], 'program': 'None', 'important': True, 'cta_text_en': 'Please plan for your Wish Express inventory to arrive at Wish Express warehouses by January 10, 2020', 'cta_text_cn': '请为您的Wish Express库存计划在2020年1月10日前到达Wish Express仓库。', 'cta_effective_date': 'January 10, 2020 12:00 PM UTC' } }] } }] }
Notifications
Attributes
id | Wish's unique identifier for the notification |
---|---|
title | The title of the notification |
message | The message content of the notification |
perma_link | The permanent link to the notification |
Fetch Notifications
Returns a list of all unviewed notifications (located
here
on Merchant Dashboard). Notifications are general messages
Wish sends you about various updates, such as announcements,
policy warnings, payments, new refunds, new infractions,
and more.
If there is a large number of unviewed notifications in your
account, 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
Scope: notifications:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/noti/fetch-unviewed
start | optional 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 |
---|---|
limit | optional 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
<?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://sandbox.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
Scope: notifications:write
Definition
GET https://sandbox.merchant.wish.com/api/v2/noti/mark-as-viewed
noti_id | Unique identifier for the notification |
---|
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
<?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://sandbox.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
Scope: notifications:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/noti/get-unviewed-count
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
<?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://sandbox.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': '' }
Infractions
Interface to check infractions
Infractions count
Get the count of infractions of different stages
HTTP Request Type: GET
Scope: infractions:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/count/infractions
stage | optional
One of 1, 2 or 3, 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
<?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://sandbox.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
Scope: infractions:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/get/infractions
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:
|
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 infraction message |
fine_amount | The fine amount of the infraction |
fine_currency | The fine currency of the infraction |
proof | The proof list of the infraction, the 'proof_type' may be 'TICKET', 'ORDER', 'PRODUCT', 'MERCHANT', 'RATING', or 'VARIATION' |
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
<?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://sandbox.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", "fine_currency": "USD", "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://merchant.wish.com/warning/view/5af67aaf2232612b29f6c5eb", "extra_reason": "Weapon", "id": "5af676af22326ssb29f6c5eb", "proof": [ { "InfractionProof": { "message": "Inappropriate content detected for product listing", "proof_type": "PRODUCT", "object_id": "5af4317fb9c68aa5f9f25022" } } ] } } ] } }, "paging": { "next": "https://merchant.wish.com/api/v2/get/infractions?access_token=xxx&start=50" } }
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
Scope: tickets:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/ticket/close
id | Wish'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
<?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://sandbox.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
Scope: tickets:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/ticket/appeal-to-wish-support
id | Wish'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
<?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://sandbox.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
Scope: tickets:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/ticket/re-open
id | Wish's unique identifier for the ticket, or 'id' in the Ticket object |
---|---|
reply | The 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
<?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://sandbox.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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/get
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', 'ENDED', and 'PENDING'.
|
start_time | Start time of this campaign(PST). |
end_time | End time of this 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 the campaign period. |
sales | Total number of sales of the listed products during the campaign period. |
campaign_max_budget | Actual budget used for this campaign. |
campaign_merchant_budget | Budget set by merchant for this campaign. |
campaign_bonus_budget | Bonus budget rewarded by Wish. Merchant won't get charged for spend used towards bonus budget. For example, if campaign_merchant_budget = $10, campaign_max_budget = $11, campaign_bonus_budget will be $1. If total_campaign_spend is $10.5, merchant will pay $10.5 * (10/11) = $9.54 and the rest will be reimbursed by Wish. |
total_campaign_spend | Total expense on this campaign, which is the sum of 'total_impression_fees_charged' and 'total_enrollment_fees_charged' |
campaign_bonus_budget_spend | Expense used towards Bonus budget, this amount will be reimbursed by Wish. For example, if campaign_merchant_budget = $10, campaign_max_budget = $11, campaign_bonus_budget will be $1. If total_campaign_spend is $10.5, merchant will pay $10.5 * (10/11) = $9.55 and the rest will be reimbursed by Wish. bonus_budget_spend will be $10.5 * (1/11) = $0.95 |
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. Not applicable to SimpleBoost campaigns. |
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:
|
is_simple_boost | A value of 'True' indicates this campaign is a Simple Boost campaign. |
discount_ratio | A ratio between 0 and 1 representing the discount. 0 means the campaign has no discount, and 1 means the campaign has 100% discount. |
last_updated_time | The last update time of this campaign(PST). |
scheduled_add_budget_enabled | A value of 'True' indicates budget will be automatically added to this campaign on a regular schedule. |
scheduled_add_budget_days | A JSON array of integers ranging from 0 to 6 representing the days of the week when budget will be automatically added to this campaign. 0 means Monday and 6 means Sunday. |
scheduled_add_budget_amount | The amount of budget automatically added to the campaign on the scheduled days. |
localized_currency_code | The currency of all return values. |
min_spend | The minimum amount that will be charged for the campaign. |
intense_boost | IntenseBoost allows campaigns to receive premium impressions faster. If 'intense_boost' is 'True', the campaign is IntenseBoost enabled. |
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
<?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://sandbox.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": "37.89", "campaign_merchant_budget": "37.89", "total_enrollment_fees_charged": "0.0", "auto_renew": "False", "localized_currency_code": "USD", "scheduled_add_budget_amount": "0.2", "start_time": "2018-05-14T00:00:00", "total_impressions": "0", "impression_fees_breakdown": [], "campaign_id": "5ad4d3ba6cdcf03e10294812", "paid_impressions": "0", "sales": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "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-22T00:00:00", "merchant_id": "577cece8ca00000e8153dffa", "total_campaign_spend": "0.0", "scheduled_add_budget_days": [ "0", "1", "4" ], "gmv": "0.0", "campaign_state": "NEW", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "discount_ratio": 0, "last_updated_time": "2018-05-12T00:00:00", "min_spend": 0.0, "intense_boost": False } } }
Get Multiple Campaigns
Returns a list of ProductBoost campaigns.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/multi-get
limit | optional 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_time | 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. |
since_id | optional Restrict results to include campaigns whose 'campaign_id' is greater than the specified ID. Once specified, campaigns will be returned in increasing order of 'campaign_id'. Use '000000000000000000000000' to represent the smallest campaign ID. |
campaign_state | optional Only return campaigns with the given state. Acceptable states are: 'NEW', 'SAVED', 'STARTED', 'ENDED', 'PENDING' |
auto_renew | optional Only return campaigns that will or will not auto-renew upon completion. Acceptable formats: 'true' or 'false'. |
campaign_type | optional Only return campaigns with the given type. Acceptable formats: 'CLASSIC_BOOST' or 'SIMPLE_BOOST'. |
automated_campaign | optional Only return campaigns that are or are not automated campaigns, or duplicated from automated campaigns. Acceptable formats: 'true' or 'false'. |
last_updated_time | optional Only return campaigns whose attribute are updated on or after this time(PST). |
Returns
A list of ProductBoost campaigns, adhering to the optional parameters.
Each campaign contains the same set of attributes as get-campaign API.
If 'since_id' is provided, campaigns will be returned in increasing order based on 'campaign_id';
otherwise, campaigns will be returned in reverse chronological order by start time and the "paging" field will contain the URL for the next/previous page of results.
Error responses
1000 | Invalid 'auto_renew' parameters. It must be a boolean. |
---|---|
22201 | Invalid 'campaign_state' parameter. It must be one of 'NEW', 'SAVED', 'STARTED', 'ENDED', 'PENDING'. |
22202 | Invalid 'start_time' parameter. It must be of the form 'YYYY-MM-DDTHH:MM:SS' (the T is required) or 'YYYY-MM-DD'. |
22203 | Invalid 'limit' parameter. It must be a positive integer less than or equal to 500. |
22205 | Invalid 'campaign_type' parameter. It must be one of 'CLASSIC_BOOST' or 'SIMPLE_BOOST'. |
Example
Assume your access token is "an_example_access_token". Say you want to get all 'NEW' Simple Boost campaigns starting on or after 2018-01-01, that do not auto renew upon completion, and are not automated campaigns.
- access_token = an_example_access_token
- start_time = 2018-01-01
- campaign_state = NEW
- auto_renew = false
- campaign_type = SIMPLE_BOOST
- automated_campaign = false
Example Request
Not available
<?php $access_token = urlencode('an_example_access_token'); $start_time = urlencode('2018-01-01') $campaign_state = urlencode('NEW') $auto_renew = urlencode('false') $campaign_type = urlencode('SIMPLE_BOOST') $automated_campaign = urlencode('false') $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/multi-get?access_token=%s&start_time=%s&campaign_state=%s&auto_renew=%s&campaign_type=%s&automated_campaign=%s", $access_token, $start_time, $campaign_state, $auto_renew, $campaign_type, $automated_campaign); $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": "37.89", "campaign_merchant_budget": "37.89", "total_enrollment_fees_charged": "0.0", "auto_renew": "False", "localized_currency_code": "USD", "scheduled_add_budget_amount": "0.2", "start_time": "2018-05-14T00:00:00", "total_impressions": "0", "impression_fees_breakdown": [], "campaign_id": "5ce4d3ba6cdcf03e15307766", "paid_impressions": "0", "sales": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "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-22T00:00:00", "merchant_id": "556cece8ee99102e8153dffa", "total_campaign_spend": "0.0", "scheduled_add_budget_days": [ "0", "1", "4" ], "gmv": "0.0", "campaign_state": "NEW", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "discount_ratio": 0, "last_updated_time": "2018-05-12T00:00:00", "min_spend": 0.0, "intense_boost": "False" } }, ... ], "paging": { "next": "https://merchant.wish.com/api/v2/product-boost/campaign/multi-get?access_token=ab12ab40b05c46ec9bf0e507af9517d9&start=4&limit=2", "previous": "https://merchant.wish.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.
This API will be deprecated on March 31st, 2021.
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/list-low-budget
start | optional An offset into the list of returned items. Maximum value for start is 2000 and the default is 0. |
---|---|
limit | optional 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
Not available
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.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", "campaign_merchant_budget": "10", "total_enrollment_fees_charged": "0.0", "auto_renew": "False", "localized_currency_code": "USD", "scheduled_add_budget_amount": "0.2", "start_time": "2018-05-14T00:00:00", "total_impressions": "0", "impression_fees_breakdown": [ { "ImpressionFee": { "end_time": "2018-05-21", "amount": "0.0", "fee_state": "CHARGED", "start_time": "2018-05-14" } } ], "campaign_id": "5ce4d3ba6cdcf03e15307766", "paid_impressions": "9.99", "sales": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "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-22T00:00:00", "merchant_id": "556cece8ee99102e8153dffa", "total_campaign_spend": "0.0", "scheduled_add_budget_days": [ "0", "1", "4" ], "gmv": "0.0", "campaign_state": "STARTED", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "discount_ratio": 0, "min_spend": 0.0 } }, ... ], "paging": { "next": "https://merchant.wish.com/api/v2/product-boost/campaign/list-low-budget?access_token=ab12ab40b05c46ec9bf0e507af9517d9&start=20&limit=20", "previous": "https://merchant.wish.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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
Note: you must call this API with the parameters in the HTTP request body.
HTTP Request Type: POST
Scope: product_boost:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/create
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 field "product_id". Field "keywords" is optional. "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 cannot exceed 30. See the example for a sample input. |
scheduled_add_budget_enabled | A value of 'True' indicates budget will be automatically added to this campaign on a regular schedule. |
scheduled_add_budget_days | A JSON array of integers ranging from 0 to 6 representing the days of the week budget will be automatically added to this campaign. 0 means Monday and 6 means Sunday. |
scheduled_add_budget_amount | The amount of budget that will be automatically added to the campaign on the scheduled days. Amount must be between US$1.00 and US$10,000.00 or equivalent values in localized currency. |
intense_boost | A value of 'True' indicates campaign will be enabled with IntenseBoost. IntenseBoost allows campaigns to receive premium impressions faster. |
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 YYYY-MM-DD. |
20816 | Invalid 'end_date' parameter. 'end_date' must be of format YYYY-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. |
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. |
20812 | The keyword cannot be empty. |
20826 | The keyword is too long. |
20827 | Invalid 'scheduled_add_budget_enabled' parameter. 'scheduled_add_budget_enabled' must be a boolean. |
20828 | Invalid 'scheduled_add_budget_days' parameter. 'scheduled_add_budget_days' must be a JSON array with values ranging from 0 to 6 inclusively. |
20829 | Invalid 'scheduled_add_budget_amount' parameter. 'scheduled_add_budget_amount' must be a number representing a value in localized currency ranging from US$1.00 to US$10000.00 inclusively. |
20831 | Invalid 'intense_boost' parameter. 'intense_boost' must be a boolean. |
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". In addition, you wish to add $1.50 to the campaign's budget every Monday and Friday.
- access_token = an_example_access_token
- max_budget = 200
- auto_renew = false
- campaign_name = campaign
- start_date = 2018-05-14
- end_date = 2018-05-22
- products = [{"product_id": "539abb829a188e0bdbe19af9" }]
- scheduled_add_budget_enabled = true
- scheduled_add_budget_days = [0,4]
- scheduled_add_budget_amount = 1.5
- intense_boost = false
Example Request
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-14', 'end_date' => '2018-05-22', 'products' => '[{"product_id": "539abb829a188e0bdbe19af9"}]', 'scheduled_add_budget_enabled' => 'true', 'scheduled_add_budget_days' => '[0,4]', 'scheduled_add_budget_amount' => '1.5', 'intense_boost' => false )); $url = sprintf( "https://sandbox.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", "campaign_merchant_budget": "200.0", "total_enrollment_fees_charged": "0.0", "total_campaign_spend": "0.0", "start_time": "2018-05-14T00:00:00", "auto_renew": "False", "localized_currency_code": "USD", "scheduled_add_budget_amount": "1.5", "total_impressions": "0", "sales": "0", "has_feedback": "False", "campaign_id": "5ad1a7e869c96b0c5a8ef7fc", "paid_impressions": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "products": [ { "Product": { "keywords": ["a", "c", "b"], "product_id": "544abb829a188e0dbea19af0", "enrollment_fee": "0.0" } } ], "campaign_name": "my campaign", "end_time": "2018-05-22T00:00:00", "merchant_id": "514a9a994f69ca276a9ef682", "impression_fees_breakdown": [], "gmv": "0.0", "campaign_state": "NEW", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "scheduled_add_budget_days": [ "0", "4" ], "discount_ratio": 0, "min_spend": 0.0, "intense_boost": "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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
Note: you must call this API with the parameters in the HTTP request body.
Note: you can enable "PENDING" campaigns through this api. Only "start_date" is allowed to be changed for automated campaigns.
HTTP Request Type: POST
Scope: product_boost:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/update
id | ID of the campaign you want to update |
---|---|
max_budget | The maximum amount you are willing to spend on your campaign. Not valid if the campaign is an automated campaign. |
auto_renew | Whether you want the campaign to auto-renew. Not valid if the campaign is an automated campaign. |
campaign_name | The name of your campaign. Not valid if the campaign is an automated 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. Not valid if the campaign is an automated campaign. |
products |
A JSON array of products to be included in the campaign. Each product must be an object containing the field "product_id". Field "keywords" is optional. "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 30. Not valid if the campaign is an automated campaign. See the example for a sample input. |
scheduled_add_budget_enabled | A value of 'True' indicates budget will be automatically added to this campaign on a regular schedule. |
scheduled_add_budget_days | A JSON array of integers ranging from 0 to 6 representing the days of the week budget will be automatically added to this campaign. 0 means Monday and 6 means Sunday. |
scheduled_add_budget_amount | The amount of budget that will be automatically added to the campaign on the scheduled days. Amount must be between US$1.00 and US$10,000.00 or equivalent values in localized currency. |
intense_boost | A value of 'True' indicates campaign will be enabled with IntenseBoost. IntenseBoost allows campaigns to receive premium impressions faster. |
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" or "PENDING" 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". In addition, you wish to add 1.50 to the campaign's budget every Monday and Friday.
- 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" }]
- scheduled_add_budget_enabled = true
- scheduled_add_budget_days = [0,4]
- scheduled_add_budget_amount = 1.5
- intense_boost = false
Example Request
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"}]', 'scheduled_add_budget_enabled' => 'true', 'scheduled_add_budget_days' => '[0,4]', 'scheduled_add_budget_amount' => '1.5', 'intense_boost' => false )); $url = sprintf( "https://sandbox.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", "campaign_merchant_budget": "200.0", "total_enrollment_fees_charged": "0.0", "total_campaign_spend": "0.0", "start_time": "2018-05-17T00:00:00", "auto_renew": "False", "localized_currency_code": "USD", "scheduled_add_budget_amount": "1.5", "total_impressions": "0", "sales": "0", "has_feedback": "False", "campaign_id": "5ad1a7e869c96b0c5a8ef7fc", "paid_impressions": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "products": [ { "Product": { "keywords": ["a", "c", "b"], "product_id": "544abb829a188e0dbea19af0", "enrollment_fee": "0.0" } } ], "campaign_name": "my campaign", "end_time": "2018-05-20T00:00:00", "merchant_id": "514a9a994f69ca276a9ef682", "impression_fees_breakdown": [], "gmv": "0.0", "campaign_state": "NEW", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "scheduled_add_budget_days": [ "0", "4" ], "discount_ratio": 0, "min_spend": 0.0, "intense_boost": "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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
Note: you must call this API with the parameters in the HTTP request body.
HTTP Request Type: POST
Scope: product_boost:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/update-running
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. Not valid if the campaign is an automated 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. '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 field "product_id". Field "keywords" is optional. "product_id" is the id of the product. No new product can be added or deleted from the "SAVED" or "STARTED" campaigns. "keywords" is an array of keywords to help customers find your products. Number of keywords can not exceed 30. See the example for a sample input. |
scheduled_add_budget_enabled | A value of 'True' indicates budget will be automatically added to this campaign on a regular schedule. |
scheduled_add_budget_days | A JSON array of integers ranging from 0 to 6 representing the days of the week budget will be automatically added to this campaign. 0 means Monday and 6 means Sunday. |
scheduled_add_budget_amount | The amount of budget that will be automatically added to the campaign on the scheduled days. Amount must be between US$1.00 and US$10,000.00 or equivalent values in localized currency. |
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. In addition, you wish to add 1.50 to the campaign's budget every Monday and Friday.
- access_token = an_example_access_token
- max_budget = 200
- auto_renew = true
- end_date = 2018-05-20
- scheduled_add_budget_enabled = true
- scheduled_add_budget_days = [0,4]
- scheduled_add_budget_amount = 1.5
- intense_boost = false
Example Request
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', 'scheduled_add_budget_enabled' => 'true', 'scheduled_add_budget_days' => '[0,4]', 'scheduled_add_budget_amount' => '1.5', 'intense_boost' => false )); $url = sprintf( "https://sandbox.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", "campaign_merchant_budget": "200.0", "total_enrollment_fees_charged": "0.0", "total_campaign_spend": "0.0", "start_time": "2018-05-17T00:00:00", "auto_renew": "True", "localized_currency_code": "USD", "scheduled_add_budget_amount": "1.5", "total_impressions": "0", "sales": "0", "has_feedback": "False", "campaign_id": "5ad1a7e869c96b0c5a8ef7fc", "paid_impressions": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "products": [ { "Product": { "keywords": ["a", "c", "b"], "product_id": "544abb829a188e0dbea19af0", "enrollment_fee": "0.0" } } ], "campaign_name": "my campaign", "end_time": "2018-05-20T00:00:00", "merchant_id": "514a9a994f69ca276a9ef682", "impression_fees_breakdown": [], "gmv": "0.0", "campaign_state": "STARTED", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "scheduled_add_budget_days": [ "0", "4" ], "discount_ratio": 0, "min_spend": 0.0, "intense_boost": "False" } } }
Add Budget to a Campaign
Add budget to a campaign whose state is "NEW", "SAVED", "STARTED", or "PENDING".
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: POST
Scope: product_boost:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/add-budget
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 is 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 US$1.00 or equivalent value in localized currency. |
21103 | ProductBoost campaign was already ended. |
21104 | Cannot update budget of automated campaigns created by Wish. |
Example
Assume your access token is "an_example_access_token". Say you want to add an extra 2.00 to a campaign with id 5af5b85532a61f6133520a95.
Example Request
Not available
<?php $access_token = urlencode('an_example_access_token'); $postdata = http_build_query(array( 'id' => '5af5b85532a61f6133520a95' 'amount' => '2.0', )); $url = sprintf( "https://sandbox.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", "campaign_merchant_budget": "7.0", "total_enrollment_fees_charged": "0.0", "total_campaign_spend": "0.0", "start_time": "2018-05-17T00:00:00", "auto_renew": "False", "localized_currency_code": "USD", "scheduled_add_budget_amount": "0.2", "total_impressions": "0", "sales": "0", "has_feedback": "False", "campaign_id": "5ad1a7e869c96b0c5a8ef7fc", "paid_impressions": "0", "total_impression_fees_charged": "0.0", "scheduled_add_budget_enabled": "True", "products": [ { "Product": { "keywords": ["a", "c", "b"], "product_id": "544abb829a188e0dbea19af0", "enrollment_fee": "0.0" } } ], "campaign_name": "my campaign", "end_time": "2018-05-20T00:00:00", "merchant_id": "514a9a994f69ca276a9ef682", "impression_fees_breakdown": [], "gmv": "0.0", "campaign_state": "NEW", "can_edit": "True", "is_automated_campaign": "False", "is_simple_boost": "True", "scheduled_add_budget_days": [ "0", "1", "4" ], "discount_ratio": 0, "min_spend": 0.0, "intense_boost": "False" } } }
Stop a Campaign
Stop a currently running ProductBoost campaign. The campaign's state will be updated to 'ENDED'.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: POST
Scope: product_boost:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/stop
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'. |
20203 | Campaign state changed on server during the stop process. |
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
Not available
<?php $access_token = urlencode('an_example_access_token'); $id = '5ab4e367ae3004ebb12c28ab' $url = sprintf( "https://sandbox.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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: POST
Scope: product_boost:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/cancel
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. |
---|---|
20301 | The campaign is already cancelled. |
20302 | Cannot cancel a campaign whose state is not in ['NEW', 'PENDING']. |
20304 | State of the campaign does not match the state on server. |
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
Not available
<?php $access_token = urlencode('an_example_access_token'); $id = '5ab4e367ae3004ebb12c28ab' $url = sprintf( "https://sandbox.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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/get-performance
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".
date | Date of the data. |
---|---|
impressions | Total impressions of the campaign -- the sum of paid and non-paid impressions on this date. |
paid_impressions | Paid impressions of the campaign on this date. Not applicable to SimpleBoost campaigns. |
gmv | Total GMV of the campaign on this date. |
sales | Total sales of all products on this date. |
spend | Total spend of paid impressions on this date. |
localized_currency_code | The currency of which all values are. |
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
Not available
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('5ab4e367ae3004ebb12c28ab') $url = sprintf( "https://sandbox.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", "localized_currency_code": "USD", "sales": "0" } }, ... ], "campaign": [ { "PerformanceData": { "impressions": "150950", "paid_impressions": "34788", "date": "2018-03-18", "gmv": "25.49", "localized_currency_code": "USD", "sales": "1" } }, ... ], "after_campaign": [ { "PerformanceData": { "impressions": "114868", "paid_impressions": "42559", "date": "2018-03-25", "gmv": "47.6", "localized_currency_code": "USD", "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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/get-product-stats
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_id | ID of product. |
---|---|
product_name | Name of the product. |
keywords | Keywords associated with the product. |
merchant_bid | The maximum cost per 1000 impressions. |
spend | Total cost of paid impressions. |
sales | Number of products sold during the campaign. |
paid_impressions | Total number of paid impressions during the campaign. Not applicable to SimpleBoost campaigns. |
gmv | Total GMV of this product during the campaign. |
feedback_type | (optional) Only available 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_time | The time (in PST) when performance statistics were last updated. |
localized_currency_code | The currency code of the return values. |
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
Not available
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('5ab4e367ae3004ebb12c28ab') $url = sprintf( "https://sandbox.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": { "localized_currency_code": "USD", "product_id": "595d4710e6ba0d032129e4dd", "last_updated_time": "2018-03-29T00:00:00", "keywords": [ "toys", "cars" ], "product_name": "kid car toy", "spend": "0.0", "merchant_bid": "2.5", "sales": "0", "paid_impressions": "0", "gmv": "0.0", } }, ... ] }
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.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/get-product-daily-stats
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 data. |
---|---|
impressions | Total impressions of the campaign -- the sum of paid and non-paid impressions on this date. |
paid_impressions | Paid impressions of the campaign on this date. Not applicable to SimpleBoost campaigns. |
gmv | Total GMV of the campaign on this date. |
sales | Total sales of all products on this date. |
spend | Total spend of paid impressions on this date. |
localized_currency_code | The currency code of the return values. |
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
Not available
<?php $access_token = urlencode('an_example_access_token'); $campaign_id = urlencode('5ab4e367ae3004ebb12c28ab') $product_id = urlencode('5aa21a9347d3ae59c11ac151') $url = sprintf( "https://sandbox.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", "localized_currency_code": "USD", "total_impressions": "31185", "spend": "0.0", "paid_impressions": "3235", "gmv": "67.15" } }, ... ], "campaign": [ { "ProductDailyStatistics": { "date": "2018-05-08", "sales": "7", "localized_currency_code": "USD", "total_impressions": "25471", "spend": "10.3885", "paid_impressions": "20777", "gmv": "94.35" } }, ... ], "after_campaign": [ { "ProductDailyStatistics": { "date": "2018-05-15", "sales": "4", "localized_currency_code": "USD", "total_impressions": "32284", "spend": "0.0", "paid_impressions": "23701", "gmv": "52.7" } }, ... ] } } }
Get Keywords
Get information for the given keywords.
This API will be deprecated on March 31st, 2021.
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/keyword/multi-get
keywords | A comma-separated list of keywords. i.e. “toys,car,harry potter”. Maximum 50 keywords allowed. |
---|
Returns
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
Not available
<?php $access_token = urlencode('an_example_access_token'); $keywords = urlencode('phone,iphone,case,cover,accessories') $url = sprintf( "https://sandbox.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": { "hotness": "VERY_HIGH", "keyword": "iphone" } }, { "Keyword": { "hotness": "HIGH", "keyword": "phone" } }, { "Keyword": { "hotness": "HIGH", "keyword": "case" } }, { "Keyword": { "hotness": "MEDIUM", "keyword": "cover" } }, { "Keyword": { "hotness": "MEDIUM", "keyword": "accessories" } } ] }
Search Keywords
Search information of related keywords.
This API will be deprecated on March 31st, 2021.
HTTP Request Type: POST
Scope: product_boost:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/keyword/search
keyword | The keyword you want to search |
---|---|
exclude_keywords | optional A JSON array of keywords to exclude from results. Maximum 30 keywords allowed. |
limit | optional Limit number of keywords returned. Default to 0; allowed range: [0, 10] |
Returns
Information of related keywords.
"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
Not available
<?php $access_token = urlencode('an_example_access_token'); $postdata = http_build_query(array( 'keyword' => 'arry' )) $url = sprintf( "https://sandbox.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": { "keyword": "harry potter wand", "hotness": "HIGH" } }, { "Keyword": { "keyword": "harry potter clothes", "keyword": "MEDIUM" } }, ... ] }
Get Campaign Budget
Get available budget and the budget for a specific campaign.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/budget
campaign_id | Optional: The ID of your ProductBoost campaign. If provided, then returns the budget for that specific campaign. |
---|
Returns
The total available budget with breakdown. Here's an explanation for the breakdown:
max_budget | The total available budget, which is equal to 'product_boost_bonus' + 'product_boost_balance' + 'product_boost_credit' + 'merchant_account_balance' + 'product_boost_loan' - 'product_boost_unpaid_balance'. |
---|---|
product_boost_bonus | A sign-on bonus for new ProductBoost merchant |
product_boost_loan | ProductBoost might lend you a small amount to help you create a campaign. This amount is not guaranteed and will be deducted from merchant's account later. |
product_boost_balance | Current ProductBoost account balance |
product_boost_credit | Total issued ProductBoost free credits |
merchant_account_balance | Current amount of the merchant account balance at Wish |
product_boost_unpaid_balance | Total amount of unpaid ProductBoost campaign charges |
localized_currency_code | The currency code of the return values. |
Error responses
4000 | No access token found or the app does not exist. |
---|
Example
Assume your access token is "an_example_access_token". Say your campaign id is "5ab4e367ae3004ebb12c28ab".
- access_token = an_example_access_token
- campaign_id = 5ab4e367ae3004ebb12c28ab
Example Request
Not available
<?php $access_token = urlencode('an_example_access_token'); $campaign_id = '5ab4e367ae3004ebb12c28ab' $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product-boost/budget?access_token=%s&campaign_id=%s", $access_token, $campaign_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": { "Budget": { "max_budget": "7.1", "product_boost_bonus": "1.0", "product_boost_balance": "7.0", "localized_currency_code": "USD", "product_boost_credit": "2.0", "product_boost_loan": "0.0", "merchant_account_balance": "2.1", "product_boost_unpaid_balance": "5.0" } } }
List ProductBoost Balance Records
List charging and withdraw activities on ProductBoost account balance.
This API will be deprecated on March 31st, 2021. We recommend to use our new endpoint .
HTTP Request Type: GET
Scope: product_boost:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product-boost/balance/history
start | optional An offset into the list of returned items. Maximum value for start is 10000 and the default is 0. Used for paging. |
---|---|
limit | optional 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. |
Returns
A list of ProductBoost account balance records. Here's the explanation for each attribute:
id | ID of the record. |
---|---|
time | The PST time of when a record is generated, in format of %Y-%m-%dT%H:%M:%S |
amount | The amount of the transaction. |
record_type | Type of the transaction: one of 'DEPOSIT' or 'WITHDRAW'. 'DEPOSIT' means user adds credits to his balance; 'WITHDRAW' means Wish deducts from his balance. |
campaign_id (optional) | If record_type is 'WITHDRAW', a campaign ID will be provided to indicate which campaign the transaction is associated with. |
charge_type (optional) | If record_type is 'WITHDRAW', charge_type will be provided to indicate the charging category: ENROLLMENT_FEE, IMPRESSION_FEE, or OTHER |
localized_currency_code | Currency code of the amount. |
Error responses
4000 | No access token found or the app does not exist. |
---|
Example Request
Not available
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product-boost/balance/history?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": [ { "AccountBalanceRecord": { "record_type": "DEPOSIT", "amount": "100.17", "id": "5bca0fac32dec527acfcd539", "localized_currency_code": "USD", "time": "2018-10-19T10:09:00" } }, { "AccountBalanceRecord": { "charge_type": "IMPRESSION_FEE", "record_type": "WITHDRAW", "amount": "13.76", "localized_currency_code": "USD", "time": "2018-09-17T07:43:10", "campaign_id": "5b7e81685348a6207797ca7b", "id": "5a9fbd7e8a21621612dded82" } }, { "AccountBalanceRecord": { "charge_type": "ENROLLMENT_FEE", "record_type": "WITHDRAW", "amount": "1.06", "localized_currency_code": "USD", "time": "2018-09-17T07:43:06", "campaign_id": "5b7e81685348a6207797ca7b", "id": "5b8fbd7a25187215e8c019cd" } }, ], "paging": { "next": "https://merchant.wish.com/api/v2/product-boost/balance/history?access_token=d75be8edc1fb4d7083134b3022527771&start=50&is_api_explorer=true&format=json" } }
Validate Campaign Params
Validate bids
This API will be deprecated on March 31st, 2021.
HTTP Request Type: POST
Scope: product_boost:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/product-boost/campaign/validate-bids
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 product param, which includes 'product_id' and 'keywords'. i.e.
[ { "product_id": "59a6e05eb882e13c174946d4", "keywords": ["test"] }, { "product_id": "595d93e7f2e02872c18c0d6a", "keywords": ["test"] } ]Note: 'keywords' is optional. |
Returns
A list of feedback on each product. Each feedback will contain
'product_id' to indicate which product the feedback is associated with,
'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.
Error responses
22001 | The request body is invalid (i.e. can't be parsed). |
---|---|
22008 | Invalid 'bids'. |
22006 | Invalid 'product_id'. |
22009 | Invalid 'campaign_id'. |
22010 | Invalid 'campaign_start_time' or 'campaign_end_time'. |
22012 | Invalid 'keywords'. |
Feedback
22002 | Too many keywords provided. |
---|---|
22003 | Too few keywords provided. |
22006 | 'product_id' is invalid. |
22007 | The product appears in an overlapping campaign. |
22013 | Keyword cannot be empty. |
22014 | Keyword is too long. |
Example
Assume your access token is "an_example_access_token". You want to validate 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", "keywords": ["car", "car toys", "boy toys"]}]}
Example Request
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", "keywords": ["car", "car toys", "boy toys"]}] )); $url = sprintf( "https://sandbox.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" } } ] }
FBW
ShippingPlan Attributesid | Wish's unique identifier for FBW shipping plan |
---|---|
state | The state of Shipping plan |
state_text | Shipping plan state description |
skus | A list of ShippingPlanSKU objects. Skus in the shipping plan. |
warehouse_code | Warehouse_code of FBW warehouse that shipping plan is sent to. |
delivery_address | Delivery address of shipping plan. |
last_updated | Time when shipping plan was last updated (%Y-%m-%dT%H:%M:%S). |
manifest_file_id | File id of Shipping plan's manifest. |
manifest_file_url | Download url of Shipping plan's manifest. access_token should be attached in url. |
case_label_file_id | File id of Shipping plan's case label. |
case_label_file_url | Download url of Shipping plan's case label. access_token should be attached in url. |
num_boxes | The number of boxes for loading products. This attribute will be deprecated in future. |
tracking_numbers | Tracking info of shipping plan. |
fbw_shipping_id | A fixed size/shorter FBW shipping plan ID. |
Shipping Plan State Rules
state | state name | state_text | Description |
---|---|---|---|
4 | PRINT_LABELS | Print Labels |
|
5 | PREPARE_SHIPMENT_BOX_COUNT | Prepare Boxes |
|
6 | SUBMIT | Ready to submit |
|
7 | SUBMITTED | Ready to ship |
|
8 | SHIPPED | Shipped |
|
10 | DELIVERED | Delivered |
|
11 | DELIVERY_CONFIRMED | Delivery Confirmed |
|
12 | DELIVERY_MISMATCH | Delivery Mismatch |
|
13 | COMPLETE | Complete | All done. |
14 | CANCELLED | Cancelled | Shipping plan is cancelled. |
15 | EXPIRED | Expired | Shipping plan acquires action and hasn't been updated for 30 days. Shipping plan will be cancelled automatically. |
16 | SCHEDULE_PICKUP | Schedule Pickup | Shipping plan of this state can be cancelled or edited on UI page. |
17 | PROCESSING | Processing | Waiting to be SUBMITTED. |
18 | PREPARE_SHIPMENT_CASE_LABEL | Prepare Case Labels | Shipping plan of this state can be cancelled or edited on UI page. |
Get FBW Recommended SKUs
HTTP Request Type: POST
Scope: fbw:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/recommended-skus
- Get recommended skus.
No parameters for this API
Returns
If the request is successful, a list of skus and their info is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to create FBW shipping plans.
- access_token = an_example_access_token
Example Request
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/inventory-distribution?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": [ { "sku": "111", "color": "pink", "product_id": "123456789012345678901234", "size": "1" }, { "sku": "222", "color": "pink", "product_id": "123456789012345678901234", "size": "2" }, { "sku": "333", "color": "pink", "product_id": "123456789012345678901234", "size": "3" }, ] }
Get FBW Inventory Distribution
HTTP Request Type: POST
Scope: fbw:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/inventory-distribution
- Get inventory distribution for all warehouses in warehouse_regions.
- Some sku will be temporarily ineligible to certain warehouse by relevancy service of platform.
Parameters
warehouse_regions | List of FBW warehouse regions. For example: 'US', 'EU_BONDED', 'EU_UNBONDED'. EU_UNBONDED is not released for now. |
---|---|
skus | A JSON array of objects. Sku info of this plan. The max number of skus is 200. |
sku:sku | sku of variant |
sku:total_quantity | The total quantity of sku in shipping plans. It must be a positive integer larger than 4. |
Returns
If the request is successful, inventory distribution is returned in the response.
If sku "blacklisted" is True, a "blacklisted_reason" will be returned in response.
Example
Assume your access token is "an_example_access_token". You want to create FBW shipping plans.
- access_token = an_example_access_token
- warehouse_regions = ["US"]
- skus=[{"sku": "test_Brown","total_quantity": 10},{"sku": "0123456789abcdefghi","total_quantity": 77}]
Example Request
<?php $access_token = urlencode('an_example_access_token'); $warehouse_regions = urlencode('["US"]'); $skus = urlencode('[{"sku": "test_Brown","total_quantity": 10},{"sku": "0123456789abcdefghi","total_quantity": 77}]'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/inventory-distribution?access_token=%s&warehouse_regions=%s&skus=%s", $access_token, $warehouse_regions, &skus); $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": { "ORD": [ { "sku": "abc", "blacklisted": false, "quantity": 10 }, { "sku": "edf", "blacklisted": false, "quantity": 29 } ], "LAX": [ { "sku": "abc", "blacklisted_reason": "price too low", "blacklisted": true, "quantity": 0 }, { "sku": "edf", "blacklisted": false, "quantity": 48 } ] } }
Create FBW Shipping Plan V2
HTTP Request Type: POST
Scope: fbw:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/multi-create-and-submit
- Shipping plan state is "Ready to ship"(7) after it is created.
- If distributed inventory of a sku is 0, sku won't be included in shipping plan.
- Created shipping plan can be delivered but cannot be updated or cancelled.
Parameters
warehouse_regions | List of FBW warehouse regions. For example: 'US', 'EU_BONDED', 'EU_UNBONDED'(not released for now). |
---|---|
skus | A JSON array of objects. Sku info of this plan. The max number of skus is 200. |
sku:sku | sku of variant |
sku:total_quantity | The total quantity of sku in shipping plans. It must be a positive integer larger than 4. Platform will distribute quantity into warehouses of warehouse_regions. Distribution can be obtained from /api/v2/fbw/inventory-distribution |
Returns
If the request is successful, new shipping plans are created and a list of ShippingPlan objects is returned in the response.
If some sku is blocked to all selected warehouses by relevancy service of platform, an error will return.
Example
Assume your access token is "an_example_access_token". You want to create FBW shipping plans.
- access_token = an_example_access_token
- warehouse_regions = ["US"]
- skus=[{"sku": "test_Brown","total_quantity": 10},{"sku": "0123456789abcdefghi","total_quantity": 77}]
Example Request
<?php $access_token = urlencode('an_example_access_token'); $warehouse_regions = urlencode('["US"]'); $skus = urlencode('[{"sku": "test_Brown","total_quantity": 10},{"sku": "0123456789abcdefghi","total_quantity": 77}]'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/multi-create-and-submit?access_token=%s&warehouse_regions=%s&skus=%s", $access_token, $warehouse_regions, &skus); $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": [ { "ShippingPlan": { "manifest_file_id": "123456789012345678901234", "last_updated": "2018-09-18T02:09:48", "num_boxes": "1", "state": "17", "tracking_numbers": [], "warehouse_code": "LAX", "case_label_file_id": "123456789012345678901234", "Address": { "city": "City of Industry", "state": "CA", "zipcode": "91789", "street_address1": "20275 Business Parkway", "country": "US" }, "fbw_shipping_id": "WISWKETD000000", "id": "123456789012345678901234", "skus": [ { "ShippingPlanSKU": { "sku": "abc", "datetime_delivered": "09-18-2018T14:30:42", "height_cm": "20.0", "label_single_file_id": "123456789012345678901234", "weight_g": "10.0", "quantity_delivered": "48", "fbw_sku_id": "WISWKETD000000", "label_file_id": "123456789012345678901234", "length_cm": "20.0", "width_cm": "20.0", "quantity": "48" } } ], "state_text": "Processing" } }, { "ShippingPlan": { "manifest_file_id": "123456789012345678901234", "last_updated": "2018-09-18T02:09:48", "num_boxes": "1", "state": "17", "tracking_numbers": [], "warehouse_code": "CVG", "case_label_file_id": "123456789012345678901234", "Address": { "city": "Erlanger", "state": "Kentucky", "zipcode": "41018", "street_address1": "3300 Turfway Rd", "country": "US" }, "fbw_shipping_id": "WISWKETD000000", "id": "123456789012345678901234", "skus": [ { "ShippingPlanSKU": { "sku": "abc", "datetime_delivered": "09-18-2018T14:30:42", "height_cm": "20.0", "label_single_file_id": "123456789012345678901234", "weight_g": "10.0", "quantity_delivered": "48", "fbw_sku_id": "WISWKETD000000", "label_file_id": "123456789012345678901234", "length_cm": "20.0", "width_cm": "20.0", "quantity": "10" } }, { "ShippingPlanSKU": { "sku": "abc", "datetime_delivered": "09-18-2018T14:30:42", "height_cm": "20.0", "label_single_file_id": "123456789012345678901234", "weight_g": "10.0", "quantity_delivered": "48", "fbw_sku_id": "WISWKETD000000", "label_file_id": "123456789012345678901234", "length_cm": "20.0", "width_cm": "20.0", "quantity": "29" } } ], "state_text": "Processing" } } ] }
Deliver FBW Shipping Plan
HTTP Request Type: POST
Scope: fbw:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/deliver
- Only state="Ready to ship"(7) shipping plan can be delivered (new created shipping plan will be processed by Merchant-BE, after that, the state will become submitted)
- Shipping plan state will be set as "Shipped"(8) except HZC warehouse.
- Shipping plan state will be set as "Delivered"(10) for HZC warehouse.
Parameters
id | Shipping plan id |
---|---|
tracking_numbers | optional An array of objects. Shipping plans in HZC and TLL don't need to update tracking_numbers. |
tracking_numbers:tracking_provider | The carrier that will be shipping your package to its destination |
tracking_numbers:tracking_number | 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. |
Returns
If the request is successful, a ShippingPlan object is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to deliver an FBW shipping plan with id "098765432112345678901234". There is only one tracking number. The carrier will be DHL and the package tracking number is "12345".
- access_token = an_example_access_token
- id = 098765432112345678901234
- tracking_numbers = [{"tracking_provider": "DHL", "tracking_number":"12345"}]
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('098765432112345678901234'); $tracking_numbers = urlencode('[{"tracking_provider": "DHL", "tracking_number":"12345"}]'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/deliver?access_token=%s&id=%s&tracking_numbers=%s", $access_token, $id, &tracking_numbers); $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": { "ShippingPlan": { "manifest_file_id": "0987654321123456789012ab", "last_updated": "2018-09-26T04:01:22", "num_boxes": "1", "state": "10", "tracking_numbers": [ { "ShippingPlanTrackingNumber": { "tracking_number": "125", "tracking_provider": "DHL" } } ], "warehouse_code": "HZC", "case_label_file_id": "0987654321123456789012cd", "Address": { "city": "Hangzhou", "state": "Zhejiang", "zipcode": "123456", "street_address1": "000 Some Street", "country": "CN" }, "fbw_shipping_id": "WISWKETD000000", "id": "0987654321123456789012efg", "skus": [ { "ShippingPlanSKU": { "sku": "test_silver", "weight_g": "110.0", "quantity_delivered": "0", "label_file_id": "0987654321123456789012hi", "fbw_sku_id": "WISWKETD000000", "height_cm": "2.0", "length_cm": "14.0", "width_cm": "16.0", "label_single_file_id": "0987654321123456789012jk", "quantity": "10" } } ], "state_text": "Delivered" } } }
Update FBW Shipping Plan Logistics
HTTP Request Type: POST
Scope: fbw:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/update-logistics-info
- Update tracking_numbers. Only state="Shipped"(8) shipping plan can be updated.
- The former tracking_numbers of shipping plan will be replaced by new ones.
Parameters
id | Shipping plan id |
---|---|
tracking_numbers | optional An array of objects. Shipping plans in HZC and TLL don't need to update tracking_numbers. It is required for other warehouses. |
tracking_numbers:tracking_provider | The carrier that will be shipping your package to its destination |
tracking_numbers:tracking_number | 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. |
Returns
If the request is successful, a ShippingPlan object is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to update FBW shipping plan logistics with id "5b07e24e9e554361304da0d8". There will be two tracking numbers. For one, the carrier is USPS and the package tracking number is "345". For the other, the carrier is DHL and the package tracking number is "34455".
- access_token = an_example_access_token
- id = 098765432112345678901234
- tracking_numbers = [{"tracking_provider": "USPS", "tracking_number":"345"},{"tracking_provider": "DHL", "tracking_number":"34455"}]
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('098765432112345678901234'); $tracking_numbers = urlencode('[{"tracking_provider": "USPS", "tracking_number":"345"},{"tracking_provider": "DHL", "tracking_number":"34455"}]'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/update?access_token=%s&id=%s&tracking_numbers=%s", $access_token, $id, &tracking_numbers); $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": { "ShippingPlan": { "manifest_file_id": "", "state": "8", "case_label_file_id": "", "last_updated": "05-25-2018T10:15:42", "warehouse_code": "LAX", "Address": { "city": "City of Industry", "state": "CA", "zipcode": "12345", "street_address1": "000 Some Street", "country": "US" }, "tracking_numbers": [ { "ShippingPlanTrackingNumber": { "tracking_number": "345", "tracking_provider": "USPS" } }, { "ShippingPlanTrackingNumber": { "tracking_number": "34455", "tracking_provider": "DHL" } } ], "num_boxes": "1", "id": "0987654321123456789012ab", "skus": [ { "ShippingPlanSKU": { "sku": "test_Grey", "weight_g": "50.0", "quantity_delivered": "0", "label_file_id": "098765432112345678901234", "label_single_file_id": "098765432112345678901235", "height_cm": "20.0", "length_cm": "20.0", "width_cm": "20.0", "quantity": "700" } }, { "ShippingPlanSKU": { "sku": "abc", "weight_g": "50.0", "quantity_delivered": "0", "label_file_id": "098765432112345678901236", "label_single_file_id": "098765432112345678901237", "height_cm": "20.0", "length_cm": "20.0", "width_cm": "20.0", "quantity": "77" } } ], "state_text": "Shipped" } } }
Get Shipping Plan by ID
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan
Parameters
id | Shipping plan id |
---|
Returns
If the request is successful, a ShippingPlan object is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to get a shipping plan with id "098765432112345678901234".
- access_token = an_example_access_token
- id = 098765432112345678901234
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('098765432112345678901234'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan?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": { "ShippingPlan": { "manifest_file_id": "098765432112345678901239", "state": "5", "case_label_file_id": "09876543211234567890123a", "last_updated": "05-03-2018T08:27:04", "warehouse_code": "LAX", "manifest_file_url": "https://merchant.wish.com/file?file_id=09876543211234567890123a", "case_label_file_url": "https://merchant.wish.com/file?file_id=09876543211234567890123a", "Address": { "city": "Hangzhou", "state": "Zhejiang", "zipcode": "123456", "street_address1": "000 Some Street", "country": "CN" }, "tracking_numbers": [], "num_boxes": "2", "id": "098765432112345678901234", "skus": [ { "ShippingPlanSKU": { "sku": "test", "weight_g": "200.0", "quantity_delivered": "0", "label_file_url": "https://merchant.wish.com/file?file_id=09876543211234567890123a", "label_file_id": "098765432112345678901235", "label_single_file_url": "https://merchant.wish.com/file?file_id=09876543211234567890123a", "label_single_file_id": "098765432112345678901236", "height_cm": "23.0", "length_cm": "25.0", "width_cm": "24.0", "quantity": "20" } } ], "state_text": "Prepare Boxes" } } }
Get Shipping Plan List
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/multi-get
Parameters
since | optional A date/time(PDT) string in the format YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS. If a date or time is provided, only shipping plans updated since the given date or time will be fetched. Default is to fetch all. |
---|---|
start | optional 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. |
limit | optional A limit on the number of shipping plans that can be returned. Limit can range from 1 to 500 items and the default is 50. |
Returns
If the request is successful, a list of ShippingPlan objects is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to get 10 shipping plans since 2016-03-04 with offset 1.
- access_token = an_example_access_token
- limit = 10
- since = 2016-03-04
- start = 1
Example Request
<?php $access_token = urlencode('an_example_access_token'); $limit = urlencode('10'); $since = urlencode('2016-03-04'); $start = urlencode('1'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-plan/multi-get?access_token=%s&limit=%s&since=%s&start=%s", $access_token, $limit, $since, $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": [ { "ShippingPlan": { "manifest_file_id": "098765432112345678901234", "state": "13", "case_label_file_id": "098765432112345678901234", "last_updated": "01-14-2018T14:54:59", "warehouse_code": "TLL", "Address": { "city": "Tallinn", "state": "Tallinn", "zipcode": "12345", "street_address1": "000 Some Street", "country": "EE" }, "tracking_numbers": [], "num_boxes": "6", "id": "098765432112345678901234", "skus": [ { "ShippingPlanSKU": { "sku": "test", "weight_g": "186.0", "datetime_delivered": "01-24-2018T09:30:19", "label_file_id": "098765432112345678901234", "height_cm": "1.0", "label_single_file_id": "098765432112345678901234", "quantity_delivered": "495", "length_cm": "14.0", "width_cm": "7.8", "quantity": "495" } } ], "state_text": "Complete" } }, { "ShippingPlan": { "manifest_file_id": "098765432112345678901234", "state": "13", "case_label_file_id": "098765432112345678901234", "last_updated": "01-14-2018T14:53:54", "warehouse_code": "TLL", "Address": { "city": "Tallinn", "state": "Tallinn", "zipcode": "12345", "street_address1": "000 Some Street", "country": "EE" }, "tracking_numbers": [], "num_boxes": "3", "id": "098765432112345678901234", "skus": [ { "ShippingPlanSKU": { "sku": "test", "weight_g": "120.0", "datetime_delivered": "01-19-2018T14:30:29", "label_file_id": "098765432112345678901234", "height_cm": "5.0", "label_single_file_id": "098765432112345678901234", "quantity_delivered": "50", "length_cm": "12.0", "width_cm": "16.0", "quantity": "50" } }, { "ShippingPlanSKU": { "sku": "test", "weight_g": "120.0", "datetime_delivered": "01-19-2018T14:30:30", "label_file_id": "098765432112345678901234", "height_cm": "5.0", "label_single_file_id": "098765432112345678901234", "quantity_delivered": "50", "length_cm": "12.0", "width_cm": "16.0", "quantity": "50" } }, { "ShippingPlanSKU": { "sku": "test", "weight_g": "120.0", "datetime_delivered": "01-19-2018T14:30:30", "label_file_id": "098765432112345678901234", "height_cm": "5.0", "label_single_file_id": "098765432112345678901234", "quantity_delivered": "50", "length_cm": "12.0", "width_cm": "16.0", "quantity": "50" } } ], "state_text": "Complete" } } ] }
Get ALL Available FBW Warehouses
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fbw/warehouse/get-available
Parameters
allow_shipping_plan_submission | optional Indicates whether to show just warehouses for shipping plan. Default is True. |
---|---|
warehouse_region | optional FBW warehouse region. For example: 'US', 'EU_BONDED', 'EU_UNBONDED'(not released for now). If it is empty, list all warehouses. |
Returns
If the request is successful, a list of FBWWarehouse objects is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to get all available FBW warehouses.
- access_token = an_example_access_token
Example Request
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/warehouse/get-available?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": [ { "FBWWarehouse": { "phone_number": "86-20-2985-7994", "estimated_fulfill_time": "1", "warehouse_code": "TLL", "country_code": "EE", "delivery_options": [ { "WarehouseDeliveryOption": { "pickup_note": "test", "pickup_contact_phone": "12-34-567-890", "pickup_contact_name": "Someone", "Address": { "city": "Tallinn", "state": "Tallinn", "zipcode": "12345", "street_address1": "000 Some Street", "country": "EE" }, "pickup_contact_email": "1234@abc.com", "method": "PICK_UP" } } ], "contact_name": "SF Express", "warehouse_name": "FBW-EU-TLL", "enabled": "True", "region": "EU_BONDED", "country_ship_to": [ "DE", "DK", "EE", "FR", "NL", "PL", "NO", "GB", "IE", "LV", "IT", "CH", "ES", "HU", "BE" ] } }, { "FBWWarehouse": { "phone_number": "1-909-610-2279", "estimated_fulfill_time": "1", "warehouse_code": "LAX", "country_code": "US", "delivery_options": [ { "WarehouseDeliveryOption": { "method": "SHIP_BULK", "Address": { "city": "City of Industry", "state": "CA", "zipcode": "12345", "street_address1": "000 Some Street", "country": "US" } } } ], "contact_name": "FBW-US-LAX", "warehouse_name": "FBW-US-LAX", "enabled": "True", "region": "US", "country_ship_to": [ "US" ] } } ] }
Get FBW Warehouse By warehouse_code
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fbw/warehouse
Parameters
warehouse_code | Warehouse_code of an FBW warehouse. For example: 'TLL', 'LAX', 'HZC'. |
---|
Returns
If the request is successful, an FBWWarehouse object is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to search an FEB warehouse with code LAX.
- access_token = an_example_access_token
- warehouse_code = LAX
Example Request
<?php $access_token = urlencode('an_example_access_token'); $warehouse_code = urlencode('LAX'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/warehouse?access_token=%s&warehouse_code=%s", $access_token, $warehouse_code); $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": { "FBWWarehouse": { "phone_number": "1-909-610-2279", "estimated_fulfill_time": "1", "warehouse_code": "LAX", "country_code": "US", "delivery_options": [ { "WarehouseDeliveryOption": { "method": "SHIP_BULK", "Address": { "city": "City of Industry", "state": "CA", "zipcode": "12345", "street_address1": "000 Some Street", "country": "US" } } } ], "contact_name": "FBW-US-LAX", "warehouse_name": "FBW-US-LAX", "enabled": "True", "region": "US", "country_ship_to" :[ "US" ] } } }
Get FBW Inventory by ID/SKU
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/fbw-inventory
- Inventory data won't be returned for some warehouse if merchant never uses this warehouse.
- Must one of provide id, parent_sku and sku.
- Should be consistent with FBW Inventory Page
Parameters
id | Must provide id, parent_sku or sku The unique Wish identifier for this product |
---|---|
parent_sku | Must provide id, parent_sku or sku The parent sku for this product |
sku | Must provide id, parent_sku or sku Sku for a variant |
warehouse_code | optional Indicate inventories of which warehouse will be listed. Warehouse_code of an FBW warehouse. For example: 'TLL', 'LAX', 'HZC'. List inventories of all available warehouse if warehouse_code is None. |
Returns
If the request is successful, an FBWInventory object is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to get FBW inventory of product with ID 098765432112345678901234.
- access_token = an_example_access_token
- id = 098765432112345678901234
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('098765432112345678901234'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/fbw-inventory?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": { "FBWInventory": { "variants": [ { "Variant": { "sku": "test_red", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "TLL", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "TLL", "inventory": "0" } }, { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "52" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "CVG", "inventory": "15" } } ] } }, { "Variant": { "sku": "test-black", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "TLL", "inventory": "7" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "TLL", "inventory": "0" } }, { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "46" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "CVG", "inventory": "7" } } ] } }, { "Variant": { "sku": "test-blue", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "TLL", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "TLL", "inventory": "0" } }, { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "35" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "CVG", "inventory": "6" } } ] } } ], "removed": "True" } } }
Get FBW Inventory List
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/fbw-inventory/multi-get
- List FBW product inventories of some FBW warehouses.
- Should be consistent with FBW Inventory Page
Parameters
warehouse_code | optional Indicate inventories of which warehouse will be listed. Warehouse_code of an FBW warehouse. For example: 'TLL', 'LAX', 'HZC'. List inventories of all available warehouse if warehouse_code is None. |
---|---|
start | optional 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. |
limit | optional A limit on the number of FBWInventory that can be returned. Limit can range from 1 to 500 items and the default is 50. |
Returns
If the request is successful, a list of FBWInventory objects is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to get FBW inventory of 2 products with offset 2.
- access_token = an_example_access_token
- start = 2
- limit = 2
Example Request
<?php $access_token = urlencode('an_example_access_token'); $limit = urlencode('2'); $start = urlencode('2'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/fbw-inventory/multi-get?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": [ { "FBWInventory": { "variants": [ { "Variant": { "sku": "123456789012345678901234-black", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-blue", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-bronze", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-gold", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "HZC", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "HZC", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-pink", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-purple", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-rose gold", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-silver", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "HZC", "inventory": "0" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "HZC", "inventory": "0" } } ] } } ], "removed": "False" } }, { "FBWInventory": { "variants": [ { "Variant": { "sku": "123456789012345678901234-S-Black", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "9" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-S-army green", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "8" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-M-Black", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "8" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-M-army green", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "6" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-L-army green", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "9" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-XL-Black", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "9" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-XL-army green", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "10" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } }, { "Variant": { "sku": "123456789012345678901234-XXL-Black", "inventories": [] } }, { "Variant": { "sku": "123456789012345678901234-XXL-army green", "inventories": [ { "SKUInventory": { "state": "active", "warehouse_code": "LAX", "inventory": "10" } }, { "SKUInventory": { "state": "pending", "warehouse_code": "LAX", "inventory": "0" } } ] } } ], "removed": "False" } } ] }
Get Shipping Price of FBW Product
Get shipping price of some specified product or sku in fbw warehouse.
HTTP Request Type: POST
Scope: fbw:read
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/shipping-price
Parameters
product_id | Must provide either product_id or sku The unique Wish identifier for this product |
---|---|
sku | Must provide either product_id or sku The unique Wish identifier for this variation |
warehouse_code | Warehouse_code of an FBW warehouse. For example: 'TLL', 'LAX', 'HZC'. |
Returns
If the request is successful, a list of FBWShippingPrice objects is returned in the response.
FBWShippingPrice model has: price, country_code, source.
Price priority: sku price for specified country > sku default price > 
product price for specified country > product default price
price item displays the most prior value.
price will be empty if neither of specified prices nor default prices is set.
localized_price The price in the local currency of the merchant.
localized_currency_code The local currency code of the merchant.
country_code represents country for the price and "D" represents default.
source represents where price sources:
    1: sku specified price
    2: sku default price
    3: product specified price
    4: product default price
    0: none of above(should not happen)
source is None if price is empty.
Example
Assume your access token is "an_example_access_token". You want to get shipping price of product 098765432112345678901234, sku "test" in warehouse "TLL".
- access_token = an_example_access_token
- product_id = 098765432112345678901234
- sku = test
- warehouse_code = TLL
Example Request
<?php $access_token = urlencode('an_example_access_token'); $product_id = urlencode('098765432112345678901234'); $sku = urlencode('test'); $warehouse_code = urlencode('TLL'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-price?access_token=%s&product_id=%s&sku=%s&warehouse_code=%s", $access_token, $product_id, $sku, $warehouse_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": [ { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "PL" } }, { "FBWShippingPrice": { "source": "3", "price": "15.0", "localized_price": "90.0", "localized_currency_code": "CNY", "country_code": "FR" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "DE" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "DK" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "LV" } }, { "FBWShippingPrice": { "source": "3", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "D" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "NO" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "EE" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "IE" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "GB" } }, { "FBWShippingPrice": { "source": "4", "price": "5.0", "localized_price": "30.0", "localized_currency_code": "CNY", "country_code": "NL" } } ] }
Set Shipping Price of FBW Product
Set shipping price of some specified product or sku in fbw warehouse
HTTP Request Type: POST
Scope: fbw:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/shipping-price/update
Parameters
product_id | Must provide either product_id or sku. The unique Wish identifier for this product. |
---|---|
sku | Must provide either product_id or sku. The unique Wish identifier for this variation. |
localized_currency_code | Must be provided if updating localized shipping price. The local currency code. |
warehouse_code | Warehouse_code of an FBW warehouse. For example: 'TLL', 'LAX', 'HZC'. |
updates | A json dictionary. Key item is a string of country_code. Value item is a string of price. "d" means default price. Nothing is updated if country_code doesn't exist. Remove price if value is ""(empty string). |
Returns
If the request is 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". You want to set shipping price of product 5aa75256b9135c63742fd294, sku 56691e6b3a698c2b36be8c4c-rose red in warehouse "TLL". You want to set the default price 11 and remove price in France.
- access_token = an_example_access_token
- product_id = 098765432112345678901234
- sku = test
- localized_currency_code = USD
- warehouse_code = TLL
- updates = {"d":"11","fr":"","us":"1","local_us":"6"}
Example Request
<?php $access_token = urlencode('an_example_access_token'); $product_id = urlencode('098765432112345678901234'); $sku = urlencode('test'); $warehouse_code = urlencode('TLL'); $updates = urlencode('{"d":"11","fr":"","us":"1","local_us":"6"}'); $localized_currency_code = urlencode('CNY'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/shipping-price/update?access_token=%s&product_id=%s&sku=%s&warehouse_code=%s&updates=%s&localized_currency_code=%s", $access_token, $product_id, $sku, $warehouse_code, $updates, $localized_currency_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
{ 'code': 0, 'data': {}, 'message': '' }
Get Inventory History of FBW Skus
According to input parameters, list the inventory history of FBW sku, which contains FBW shipping plan, transaction and FBW return inventory.
The list is sorted by ascending time.
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/product/fbw-sku-history
Parameters
sku | |
---|---|
history_type | Must be one of three types of sku history type: 'ShippingPlan', 'Transaction' or 'Return'. |
warehouse_code | Warehouse_code of an FBW warehouse. For example: 'TLL', 'LAX', 'HZC'. |
start | optional 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. |
limit | optional A limit on the number of FBWSKUHistory that can be returned. Limit can range from 1 to 500 items and the default is 50. |
Returns
If the request is successful, an FBWSKUHistoryData object is returned in the response. The object is made up of a list of FBWSKUHistory models and the number of sku history for the history type.
SKUHistorySource format:
input: history_type | state | type | id |
---|---|---|---|
'ShippingPlan' | ShippingPlan state | 'shipping_plan' | ShippingPlan id |
'Transaction' | CommerceTransaction state | 'order' | MerchantTransaction id |
'Return' | FBWReturnInventoryRequest state | 'return' | Variation manufacturer_id |
Example
Assume your access token is "an_example_access_token". You want to get 2 pieces (no offset) of Transaction inventory history of sku WT2018030526-Big Vertical Version-Black in warehouse HZC.
- access_token = an_example_access_token
- history_type = Transaction
- sku = test
- warehouse_code = HZC
- limit = 2
- start = 0
Example Request
<?php $access_token = urlencode('an_example_access_token'); $history_type = urlencode('Transaction'); $sku = urlencode('test'); $warehouse_code = urlencode('HZC'); $limit = urlencode('2'); $start = urlencode('0'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/product/fbw-sku-history?access_token=%s&warehouse_code=%s&limit=%s&start=%s&sku=%s&history_type=%s", $access_token, $warehouse_code, $limit, $start, $sku, $history_type); $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": { "FBWSKUHistoryData": { "total_history_count": "2", "fbw_sku_history_list": [ { "FBWSKUHistory": { "SKUHistorySource": { "state": "SHIPPED", "type": "order", "id": "098765432112345678901234" }, "time": "2018-04-26T14:53:20", "quantity": "-1" } }, { "FBWSKUHistory": { "SKUHistorySource": { "state": "SHIPPED", "type": "order", "id": "098765432112345678901234" }, "quantity": "-1" } } ] } } }
Get FBW Fee List
Get all types of FBW fee.
The list is sorted by ascending created time.
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fbw/fee
Parameters
fee_type | optional If not supplied, all types of fee will be returned. If not empty, it must be one of number 1 to 5:
|
---|---|
start | optional 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. |
limit | optional A limit on the number of FBWFee that can be returned. Limit can range from 1 to 500 items and the default is 50. |
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 FBW fee created since the given date or time will be fetched. Default is to fetch all. |
warehouse_code | optional Get Fee from some FBW warehouse. For example: 'TLL', 'LAX'. If not supplied, fee in all warehouses will be returned. |
order_id | optional Get Fee from some specific order. |
Returns
If the request is successful, a list of FBWFee objects is returned in the response.
Example
Assume your access token is "an_example_access_token". You want to get 2 pieces (no offset) of FBW fee generated by order in warehouse LAX.
- access_token = an_example_access_token
- fee_type = 2
- warehouse_code = LAX
- limit = 2
Example Request
<?php $access_token = urlencode('an_example_access_token'); $fee_type = urlencode('2'); $warehouse_code = urlencode('LAX'); $limit = urlencode('2'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/fee?access_token=%s&warehouse_code=%s&limit=%s&fee_type=%s", $access_token, $warehouse_code, $limit, $fee_type); $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": [ { "FBWFee": { "currency": "USD", "amount": "0.38", "invoice_url": "https://merchant.wish.com/fbw/invoice/view/098765432112345678901234", "created_time": "2018-01-14", "shipping_plan_id": "None", "order_id": "098765432112345678901234", "fee_name": "order fee" } }, { "FBWFee": { "currency": "USD", "amount": "2.81", "invoice_url": "https://merchant.wish.com/fbw/invoice/view/098765432112345678901234", "created_time": "2018-01-14", "shipping_plan_id": "None", "order_id": "098765432112345678901234", "fee_name": "shipping fee" } } ] }
Return FBW Inventory
Return FBW inventory from warehouse.
HTTP Request Type: POST
Scope: fbw:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/fbw/inventory/return
Parameters
sku | The unique identifier of the item in your system. |
---|---|
warehouse_code | warehouse_code of FBW warehouse |
inventory | The number of inventory returned from FBW warehouse. It must be larger than 0 and no more than existing inventory. |
firstname | First name of receiver. |
lastname | Last name of receiver. |
street | Street info of receiver's address. |
city | City info of receiver's address. |
state | State info of receiver's address. |
country_code | The country of receiver's address. Country code should follow ISO 3166 Alpha-2 code. Example: CN, US |
zipcode | The zipcode or equivalent for country of address. |
telephone | Telephone number of receiver. |
Returns
If the request is successful, API will return id of return inventory request.
Example
Assume your access token is "an_example_access_token". You want to return 2 items of variants from warehouse LAX.
- access_token = an_example_access_token
- sku = abc
- warehouse_code = LAX
- inventory = 2
- firstname = abc
- lastname = abc
- street = abc
- city = abc
- state = abc
- country_code = cn
- zipcode = 12345
Example Request
<?php $access_token = urlencode('an_example_access_token'); $sku = urlencode('abc'); $warehouse_code = urlencode('LAX'); $inventory = urlencode('2'); $firstname = urlencode('abc'); $lastname = urlencode('abc'); $street = urlencode('abc'); $city = urlencode('abc'); $state = urlencode('abc'); $country_code = urlencode('cn'); $zipcode = urlencode('12345'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/inventory/return?access_token=%s&sku=%s&warehouse_code=%s&inventory=%s&firstname=%s&lastname=%s&street=%s&city=%s&state=%s&country_code=%s&zipcode=%s", $access_token, $sku, $warehouse_code, $inventory, $firstname, $lastname, $street, $city, $state, $country_code, $zipcode); $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": { "request_id": "1234567890123456789012" } }
Get Status of FBW Return Inventory Request
Get status of return inventory request.
HTTP Request Type: GET
Scope: fbw:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/fbw/inventory/return/get
Parameters
id | id of FBW return inventory request. |
---|
Returns
If the request is successful, API will return status of return inventory request.
FBW Return Inventory Request Status
status | description |
---|---|
PENDING | If return request is created successfully, it will be this status. |
COMPLETE | Request is completed. |
SHIPPED | If return order has left warehouse, return request will be this status. |
CANCELLED | Request is cancelled. |
FAILED | Request fails. |
Example
Assume your access token is "an_example_access_token". You want to get status of a return inventory request.
- access_token = an_example_access_token
- id = 1234567890123456789012
Example Request
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('1234567890123456789012'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/fbw/inventory/return?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": { "request_id": "1234567890123456789012" "status": "PENDING" } }
Wish Returns Program
Interface to set up and modify information related to the Wish Returns Program.
Get all Return Warehouses
Get information related to all of your return warehouses.
HTTP Request Type: GET
Scope: returns:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/returns/get-all-warehouses
Returns
Response will contain a MerchantReturnWarehouse object that has the return warehouse name
and address, as well as the state of the address validation.
VALID_USER_ADDRESS | The address shown is valid, and it is the address you entered. |
---|---|
VALID_SUGGESTED_ADDRESS | The address shown is valid, but it is an address we have suggested. |
VALIDATING | We are currently validating your address. |
INVALID | The address you have entered is invalid. Please edit the address using returns/edit-return-warehouse. |
Example
Assume your access token is "an_example_access_token".
- 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'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/get-all-warehouses?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": [ { "MerchantReturnWarehouse": { "city": "Bentonville", "country": "US", "region": "US", "zipcode": "12345", "street_address1": "4123 Example Street", "email": "example@gmail.com", "state": "AR", "ship_to": "Example User", "warehouse_name": "Example Warehouse Name", "id": "59a024d19fbc5131da8917ed", "address_valid_state": "VALID USER ADDRESS" } } ] }
Get the Return Settings for a Product
Get the region(s) for which a product has been enabled for returns, as well as the Warehouse IDs for the associated return warehouses.
HTTP Request Type: GET
Scope: returns:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/returns/get-product-return-settings
id | The unique wish identifier of the product that you are trying to get return settings for. |
---|
Returns
Contains the returns region, warehouse ID, and 'is_active' status.
Example
Assume your access token is "an_example_access_token", and your product has id is "123456789013"
- access_token = an_example_access_token
- id = 123456789013
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $id = '123456789013'; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789013'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/get-product-return-settings?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": [ { "ProductReturnSetting": { "region": "US", "is_active": "True", "warehouse_id": "123456987123" } } ] }
Enroll a Product in Returns Program
Enable returns for a product to a specified region (such as "EU", "MX", or "US"), based on the warehouse region. Requires the product to have dimensions information set. Note that you will only be able to enroll a product for a warehouse if the warehouse's address has been validated.
Note: Requires the product to have logistics information, see Set Product Logistics.
Note: Requires a return warehouse to exist in that region, see Create a Return Warehouse.
HTTP Request Type: POST
Scope: returns:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/returns/enroll-product-in-returns
id | The unique wish identifier of the product that you are trying to enroll in returns. |
---|---|
region | The region (such as "EU", "MX", or "US") in which you want to enable returns for the product. |
warehouse_id | The unique wish identifier of the return warehouse. Can be found through /returns/get-all-warehouses under 'id'. |
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", your warehouse id is "123456789012", your product has id is "123456789013" and your return warehouse has a region "US" Your parameters would be:
- access_token = an_example_access_token
- warehouse_id = 123456789012
- id = 123456789013
- region = "US"
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $warehouse_id = '123456789012'; $id = '123456789013'; $region = 'US'; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $warehouse_id = urlencode('123456789012'); $id = urlencode('123456789013'); $region = urlencode('US'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/enroll-product-in-returns?access_token=%s&warehouse_id=%s&id=%s®ion=%s", $access_token, $warehouse_id, $id, $region ); $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': {}, 'message': '' }
Get Product/Variation Dimensions
Get the dimensions (length, width, height, weight) of a specific product or product variation based on ID.
HTTP Request Type: GET
Scope: returns:read
Definition
GET https://sandbox.merchant.wish.com/api/v2/returns/get-product-variation-dimensions
id | The unique wish identifier of the product you are trying to get dimensions for. |
---|---|
variation_id | Optional The unique wish identifier of the variation you are trying to get dimensions for. Can be found using /get-product-variation under 'id'. |
Returns
Response will contain a ProductVariationLogistics object that has length (cm), width (cm),
height (cm), and weight (g) of the product or variation.
Example
Assume your access token is "an_example_access_token", the id of the product you are trying to modify is "123456789012" and the id of the variation of the product is "123456789013"
- access_token = an_example_access_token
- id = 123456789012
- variation_id = 123456789013
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $id = '123456789012'; $variation_id = '123456789013'; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789012'); $variation_id = urlencode('123456789013'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/get-product-variation-dimensions?access_token=%s&id=%s&variation_id=%s", $access_token, $id, $variation_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": { "ProductVariationLogistics": { "width": "3.0", "length": "3.0", "id": "123456789012", "weight": "3.0", "variation_id": "123456789013", "height": "3.0" } } }
Set Product Logistics
Set the dimensions of a specific product or a variation based on ID.
HTTP Request Type: POST
Scope: returns:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/returns/set-product-logistics
id | The unique wish identifier of the product whose dimensions you are trying to set. |
---|---|
variation_id | Optional The unique wish identifier of the variation whose dimensions you are trying to set. Can be found using /get-product-variation under 'id'. |
height | The height (cm) of the product/variation whose dimensions you are trying to set. |
length | The length (cm) of the product/variation whose dimensions you are trying to set. |
width | The width (cm) of the product/variation whose dimensions you are trying to set. |
weight | The weight (g) of the product/variation whose dimensions you are trying to set. |
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", the id of the product you are trying to modify is "123456789012", the id of the variation of the product is "123456789013", and the height, length, width of your product are all 3cm, and the weight is 3g
- access_token = an_example_access_token
- id = 123456789012
- variation_id = 123456789013
- height = 3
- weight = 3
- length = 3
- width = 3
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $id = '123456789012'; $variation_id = '123456789013'; $height = '3'; $weight = '3'; $length = '3'; $width = '3'; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789012'); $variation_id = urlencode('123456789013'); $height = urlencode('3'); $weight = urlencode('3'); $length = urlencode('3'); $width = urlencode('3'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/set-product-logistics?access_token=%s&id=%s&variation_id=%s&height=%s&weight=%s&length=%s&width=%s", $access_token, $id, $variation_id, $height, $weight, $length, $width); $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": {} }
Create a Return Warehouse
Creates a new return warehouse. Note that we will validate the address. This may take several minutes. You will receive a 200 response if your address passes basic validation, such as formatting checks. To see the status of validation of your address, use returns/get-all-warehouses. You will not be able to enroll a product in returns for this warehouse until the address is validated.
HTTP Request Type: POST
Scope: returns:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/returns/create-return-warehouse
ship_to | The entity that return parcels should be addressed to. This should be a name that helps the carrier successfully identify the return warehouse and deliver return parcels. |
---|---|
warehouse_name | The name of the return warehouse. |
region | The region (such as "EU", "MX", or "US") of the return warehouse. |
phone_number | Optional for US The phone number for the return warehouse. |
Optional for MX & US The email for the return warehouse. | |
city | The city in which of the return warehouse is located. |
state | The state in which of the return warehouse is located. |
country | The country in which of the return warehouse is located. Country code should follow ISO 3166 Alpha-2 code. Example: CN, US. |
zipcode | The zip code/postal code in which the return warehouse is located. |
street_address1 | The primary street address of the return warehouse. |
street_address2 | Optional The secondary street address of the return warehouse. |
Returns
Returns MerchantReturnWarehouse object with warehouse_id of the newly created warehouse.
Example
Assume your access token is "an_example_access_token". Say you wanted to create a warehouse named "new_warehouse", for the "US" region, located at "20 Test Drive" in the city of "TestCity", the state of "TestState", and the country of "US", with a zipcode of "11111".
- access_token = an_example_access_token
- region = "US"
- street_address1 = "20 Test Drive"
- city = "TestCity"
- state = "TestState"
- country = "US"
- zipcode = "11111"
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $region = 'US'; $street_address1 = "20 Test Drive"; $city = "TestCity"; $state = "TestState"; $country = "US"; $zipcode = "11111"; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $region = urlencode('US'); $street_address1 = urlencode("20 Test Drive"); $city = urlencode("TestCity"); $state = urlencode("TestState"); $country = urlencode("US"); $zipcode = urlencode("11111"); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/create-return-warehouse?access_token=%s®ion=%s&street_address_1=%s&city=%s&state=%s&country=%s&zipcode=%s", $access_token, $region, $street_address1, $city, $state, $country, $zipcode ); $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": { "MerchantReturnWarehouse": { "id": "5ceefbc88a259700d38a6b4d" } } }
Edit an Existing Return Warehouse
Edits the details for an existing return warehouse. Note that we will validate the address. This may take several minutes. You will receive a 200 response if your address passes basic validation, such as formatting checks. To see the status of validation of your address, use returns/get-all-warehouses. You will not be able to enroll a product in returns for this warehouse until the address is validated.
HTTP Request Type: POST
Scope: returns:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/returns/edit-return-warehouse
warehouse_id | The unique wish identifier of the warehouse you are trying to edit. Can be found through /returns/get-all-warehouses under 'id'. |
---|---|
warehouse_name | Optional The name of the return warehouse. |
ship_to | Optional The entity that return parcels should be addressed to. This should be a name that helps the carrier successfully identify the return warehouse and deliver return parcels. |
phone_number | Optional The phone number for the return warehouse. |
Optional The email for the return warehouse. | |
city | Optional The state in which the return warehouse is located. |
state | Optional The state of the warehouse that returns will be shipped to |
zipcode | Optional The zip code/postal code in which the return warehouse is located. |
street_address1 | Optional The primary street address of the return warehouse. |
street_address2 | Optional The secondary street address of the return 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". Say the id of the warehouse you want to edit is "123456789012" and you wanted to change the city to "TestCity"
- access_token = an_example_access_token
- warehouse_id = "123456789012"
- city = "TestCity"
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token'; $warehouse_id = '123456789012'; $city = "TestCity"; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $warehouse_id = urlencode('123456789012'); $city = urlencode("TestCity"); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/edit-return-warehouse?access_token=%s&warehouse_id=%s&city=%s", $access_token, $warehouse_id, $city ); $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": {} }
Unenroll a Product from the Returns Program
Disables returns for a product for a specified region (such as "EU", "MX", or "US").
HTTP Request Type: POST
Scope: returns:write
Definition
POST https://sandbox.merchant.wish.com/api/v2/returns/disable-return-setting-for-region
id | The unique wish identifier of the product that you are trying to unenroll from returns. |
---|---|
region | The region (such as "EU", "MX", or "US") for which you want to disable returns for the product. |
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", your product has id is "123456789013" and your return warehouse has a region "US" Your parameters would be:
- access_token = an_example_access_token
- id = 123456789013
- region = "US"
Example Request
<?php require_once 'vendor/autoload.php'; use Wish\WishClient; $access_token = 'an_example_access_token';; $id = '123456789013'; $region = 'US'; $client = new WishClient($access_token,'prod'); $count = $client->getInfractionCount();
<?php $access_token = urlencode('an_example_access_token'); $id = urlencode('123456789013'); $region = urlencode('US'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/returns/disable-return-setting-for-region?access_token=%s&id=%s®ion=%s", $access_token, $id, $region ); $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': {}, 'message': '' }
Upload a Temporary Image
This uploads an image to our servers.
The response will contain the URL of the image that was uploaded.
The image will be removed after 2 weeks.
The maximum size of the image is 5 MB.
HTTP Request Type: POST
Definition
POST https://sandbox.merchant.wish.com/api/v2/image
image | The 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
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://sandbox.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} }
Merchant Currency Code
This returns the merchant's localized currency code used in localized price updates. As well as the currency code that is currently used for payment.
Returns
localized_currency_code: The currency code you must provide to update any localized pricing fields for products and variations.
payment_currency_code: This is the currency code the merchant will be paid in for new transactions. If this is USD the merchant will be able to update USD prices in addition to the localized currency above.
product_boost_currency_code: The currency code for ProductBoost campaigns you create.
HTTP Request Type: GET
Definition
GET https://sandbox.merchant.wish.com/api/v2/get-currency-code
Example
Assume your access token is "an_example_access_token". Your parameters would be:
- access_token = an_example_access_token
Example Request
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.merchant.wish.com/api/v2/get-currency-code?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":{ "localized_currency_code": "CNY", "payment_currency_code": "USD", "product_boost_currency_code": "USD" } }
Accepted Shipping Providers
This fetches all accepted shipping providers.
HTTP Request Type: GET
Definition
GET https://sandbox.merchant.wish.com/api/v2/get-shipping-carriers
Returns
Response will contain an alphabetized list of all accepted shipping providers.
Here is the full list of accepted providers on Wish:
ABFAPCPostalLogistics
AirpakExpress
AmazonMCFUK
AmazonMCFUS
Aramex
AsendiaGermany
AsendiaHK
AsendiaUK
AsendiaUSA
AuPostChina
AustraliaPost
AustrianPost
AustrianPostRegistered
B2CEurope
BPost
BPostInternational
BRTBartolini
Belpost
BlueCareExpress
BrazilCorreios
Bring
Cacesa
CanadaPost
Celeritas
CelloSquare
CeskaPosta
Ceva
ColisPrive
Colissimo
CorreosChile
CorreosCostaRica
CorreosDeEspana
CorreosDeMexico
CorreosExpress
CroatianPost
CyprusPost
DBSchenkerSweden
DHL
DHL2MannHandling
DHLBenelux
DHLFreightSweden
DHLGermany
DHLGlobalMailAsia
DHLLTL
DHLNetherlands
DHLParcelNL
DHLParcelUK
DHLPoland
DHLSpainDomestic
DHLeCommerce
DPD
DPDFrance
DPDGermany
DPDIreland
DPDPoland
DPDUK
DPEXChina
DXDelivery
DanmarkPost
DeutschePost
DirectLink
EFS
ELTAHellenicPost
EMPSExpress
EMS (China)
EPostG
ETOMARS
Envialia
Estafeta
Estes
FastwayAustralia
FastwayIreland
FedEx
FedExApex
FedExUK
Freipost
FreteRapido
GLS
GLSItaly
GLSNetherlands
GlobegisticsInc
Hermes
HermesGermany
HongKongPost
IML
IndiaPost
IndiaPostInternational
IndonesiaPost
Intelipost
IsraelPost
ItalySDA
JanioAsia
JapanPost
KoreaPost
KoreaPostDomestic
LaPosteColissimo
LandmarkGlobal
LaserShip
LatviaPost
LithuaniaPost
LoneStarOvernight
MagyarPosta
MalaysiaPost
MalaysiaPostPosDaftar
MexicoRedpack
MexicoSendaExpress
MyHermesUK
NewZealandPost
Newgistics
Nexive
OnTrac
OneWorldExpress
PTSWorldwideExpress
PTTPosta
Palletways
PaquetExpress
ParcelForce
Pilot
PocztaPolska
PortugalCTT
PostNL
PostNLInternational
PostNLInternational3S
PostNord
PosteItaliane
PostenNorge
Qxpress
RLCarriers
RRDonnelley
RoyalMail
RussianPost
SFExpress
Sagawa
Saia
SekoLogistics
Sending
SequoiaLog
SimplyPost
SingaporeSpeedpost
SoutheasternFreightLines
Spring
SprintPack
SwedenPosten
SwissPost
TNT
TNTAustralia
TNTClickItaly
TNTFrance
TNTItaly
TNTPostItaly
TNTUK
TaiwanPost
Test_Delhivery
Test_WishPostDHL
Test_WishPostFedEx
Test_WishPostTNT
Test_WishPostUPS
TollIPEC
TollPriority
TrakPak
TransMission
TurkishPost
UDS
UPS
UPSFreight
UPSMailInnovations
UPSSurePost
USPS
UkrPoshta
VietnamPostEMS
WishPost
XPO
YODEL
YRC
Yamato
YodelInternational
Zeleris
Zinc
Example
Assume your access token is "an_example_access_token":
- access_token = an_example_access_token
Example Request
<?php $access_token = urlencode('an_example_access_token'); $url = sprintf( "https://sandbox.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", "ABF", "AirpakExpress", "AnjunExpress", "Aramex", "AsendiaGermany", "AsendiaUK", "AsendiaUSA", "AuPostChina", "AustraliaPost", "AustrianPost", "AustrianPostRegistered", "BPost", "BPostInternational", "Belpost", "CNEExpress", "CanadaPost", "ChinaAirPost", "ColisPrive", "Colissimo", "CorreosDeEspana", "CorreosExpress", "CroatianPost", "DHL", "DHL2MannHandling", "DHLBenelux", "DHLGermany", "DHLGlobalMail", "DHLGlobalMailAsia", "DHLNetherlands", "DHLParcelNL", "DHLPoland", "DHLSpainDomestic", "DPD", "DPDFrance", "DPDGermany", "DPDIreland", "DPDPoland", "DPDUK", "DPEXChina", "DanmarkPost", "DeutschePost", "DirectLink", "ECFirstClass", "EMPSExpress", "EMS", "EPacket", "Envialia", "FedEx", "FedExApex", "FedExUK", "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", "SFExpress", "SimplyPost", "SingaporePost", "SingaporeSpeedpost", "SwedenPosten", "SwissPost", "TNT", "TNTAustralia", "TNTClickItaly", "TNTFrance", "TNTItaly", "TNTPostItaly", "TNTUK", "TaiwanPost", "ThailandThaiPost", "TollIPEC", "TollPriority", "TrakPak", "TransMission", "TurkishPost", "UBISmartParcel", "DHLParcelUK", "UPS", "UPSFreight", "UPSMailInnovations", "USPS", "VietnamPostEMS", "WeDoLogisitics", "WishPost", "YODEL", "Yanwen", "YodelInternational", "YRC", "YunExpress" ] } }
Shippable Countries
AD | Andorra |
AE | United Arab Emirates |
AG | Antigua and Barbuda |
AI | Anguilla |
AL | Albania |
AM | Armenia |
AR | Argentina |
AT | Austria |
AU | Australia |
AW | Aruba |
AZ | Azerbaijan |
BA | Bosnia and Herzegovina |
BB | Barbados |
BD | Bangladesh |
BE | Belgium |
BG | Bulgaria |
BH | Bahrain |
BM | Bermuda |
BO | Bolivia |
BR | Brazil |
BS | Bahamas |
BT | Bhutan |
BW | Botswana |
BZ | Belize |
CA | Canada |
CH | Switzerland |
CL | Chile |
CO | Colombia |
CR | Costa Rica |
CY | Cyprus |
CZ | Czech Republic |
DE | Germany |
DK | Denmark |
DM | Dominica |
DO | Dominican Republic |
DZ | Algeria |
EC | Ecuador |
EE | Estonia |
EG | Egypt |
ES | Spain |
FI | Finland |
FJ | Fiji |
FR | France |
GA | Gabon |
GB | United Kingdom (Great Britain) |
GD | Grenada |
GE | Georgia |
GH | Ghana |
GI | Gibraltar |
GR | Greece |
GT | Guatemala |
GY | Guyana |
HN | Honduras |
HR | Croatia |
HU | Hungary |
ID | Indonesia |
IE | Ireland |
IL | Israel |
IN | India |
IS | Iceland |
IT | Italy |
JE | Jersey |
JM | Jamaica |
JO | Jordan |
JP | Japan |
KE | Kenya |
KG | Kyrgyzstan |
KH | Cambodia |
KR | South Korea |
KW | Kuwait |
KY | Cayman Islands |
KZ | Kazakhstan |
LC | Saint Lucia |
LI | Liechtenstein |
LK | Sri Lanka |
LT | Lithuania |
LU | Luxembourg |
LV | Latvia |
MA | Morocco |
MC | Monaco |
MD | Moldova |
ME | Montenegro |
MK | North Macedonia |
MM | Myanmar |
MN | Mongolia |
MS | Montserrat |
MT | Malta |
MU | Mauritius |
MV | Maldives |
MX | Mexico |
MY | Malaysia |
NA | Namibia |
NG | Nigeria |
NI | Nicaragua |
NL | Netherlands |
NO | Norway |
NP | Nepal |
NU | Niue |
NZ | New Zealand |
OM | Oman |
PA | Panama |
PE | Peru |
PH | Philippines |
PK | Pakistan |
PL | Poland |
PR | Puerto Rico |
PT | Portugal |
PY | Paraguay |
QA | Qatar |
RE | Reunion |
RO | Romania |
RS | Serbia |
RU | Russia |
SA | Saudi Arabia |
SC | Seychelles |
SE | Sweden |
SG | Singapore |
SH | Saint Helena |
SI | Slovenia |
SK | Slovakia |
SM | San Marino |
SR | Suriname |
SV | El Salvador |
SZ | Swaziland |
TH | Thailand |
TN | Tunisia |
TO | Tonga |
TR | Turkey |
TT | Trinidad and Tobago |
TW | Taiwan, China |
UA | Ukraine |
US | United States |
UY | Uruguay |
UZ | Uzbekistan |
VE | Venezuela |
VG | Virgin Islands, British |
VI | Virgin Islands, U.S. |
VN | Vietnam |
ZA | South Africa |
ZM | Zambia |
Customizable Regions
Standard warehouse
Region Code | Region Name | Country Code | Enabled by Default |
ES_CN | Canary Islands | ES | True |
FR_GF | French Guiana | FR | True |
FR_GP | Guadeloupe | FR | True |
FR_MF | Saint Martin | FR | True |
FR_MQ | Martinique | FR | True |
FR_NC | New Caledonia | FR | True |
FR_PF | French Polynesia | FR | True |
FR_PM | Saint Pierre and Miquelon | FR | True |
FR_RE | Reunion | FR | True |
FR_WF | Wallis and Futuna | FR | True |
FR_YT | Mayotte | FR | True |
US_AA | AA | US | True |
US_AE | AE | US | True |
US_AK | Alaska | US | True |
US_AP | AP | US | True |
US_AS | American Samoa | US | True |
US_GU | Guam | US | True |
US_HI | Hawaii | US | True |
US_MP | Northern Mariana Islands | US | True |
Wish Express warehouse
Region Code | Region Name | Country Code | Enabled by Default |
AU_ACT | Australian Capital Territory | AU | False |
AU_JBT | Jervis Bay Territory | AU | False |
AU_NSW | New South Wales | AU | False |
AU_NT | Northern Territory | AU | False |
AU_QLD | Queensland | AU | False |
AU_SA | South Australia | AU | False |
AU_TAS | Tasmania | AU | False |
AU_VIC | Victoria | AU | False |
AU_WA | Western Australia | AU | False |
BR_BAC | BA Capital & Metro Area | BR | False |
BR_BAI | BA Interior, SE, & Sede Recife | BR | False |
BR_MGC | MG Capital & Metro Area | BR | False |
BR_MGI | MG Interior | BR | False |
BR_PRC | PR Capital & Metro Area | BR | False |
BR_PRI | PR Interior, SC, & RS Interior | BR | False |
BR_RJC | RJ Capital & Metro Area | BR | False |
BR_RJI | RJ Interior & ES | BR | False |
BR_RSC | RS Capital & Metro Area | BR | False |
BR_SFB | Sede Fortaleza & Sede Brasilia | BR | False |
BR_SPC | SP Capital & Metro Area | BR | False |
BR_SPI | SP Interior | BR | False |
DK_GL | Greenland | DK | True |
ES_CN | Canary Islands | ES | True |
FR_GF | French Guiana | FR | True |
FR_GP | Guadeloupe | FR | True |
FR_MF | Saint Martin | FR | True |
FR_MQ | Martinique | FR | True |
FR_NC | New Caledonia | FR | True |
FR_PF | French Polynesia | FR | True |
FR_PM | Saint Pierre and Miquelon | FR | True |
FR_RE | Reunion | FR | True |
FR_WF | Wallis and Futuna | FR | True |
FR_YT | Mayotte | FR | True |
US_AA | AA | US | True |
US_AE | AE | US | True |
US_AK | Alaska | US | True |
US_AL | Alabama | US | False |
US_AP | AP | US | True |
US_AR | Arkansas | US | False |
US_AS | American Samoa | US | False |
US_AZ | Arizona | US | False |
US_CA | California | US | False |
US_CO | Colorado | US | False |
US_CT | Connecticut | US | False |
US_DC | District of Columbia | US | False |
US_DE | Delaware | US | False |
US_FL | Florida | US | False |
US_GA | Georgia | US | False |
US_GU | Guam | US | True |
US_HI | Hawaii | US | True |
US_IA | Iowa | US | False |
US_ID | Idaho | US | False |
US_IL | Illinois | US | False |
US_IN | Indiana | US | False |
US_KS | Kansas | US | False |
US_KY | Kentucky | US | False |
US_LA | Louisiana | US | False |
US_MA | Massachusetts | US | False |
US_MD | Maryland | US | False |
US_ME | Maine | US | False |
US_MI | Michigan | US | False |
US_MN | Minnesota | US | False |
US_MO | Missouri | US | False |
US_MP | Northern Mariana Islands | US | False |
US_MS | Mississippi | US | False |
US_MT | Montana | US | False |
US_NC | North Carolina | US | False |
US_ND | North Dakota | US | False |
US_NE | Nebraska | US | False |
US_NH | New Hampshire | US | False |
US_NJ | New Jersey | US | False |
US_NM | New Mexico | US | False |
US_NV | Nevada | US | False |
US_NY | New York | US | False |
US_OH | Ohio | US | False |
US_OK | Oklahoma | US | False |
US_OR | Oregon | US | False |
US_PA | Pennsylvania | US | False |
US_RI | Rhode Island | US | False |
US_SC | South Carolina | US | False |
US_SD | South Dakota | US | False |
US_TN | Tennessee | US | False |
US_TX | Texas | US | False |
US_UT | Utah | US | False |
US_VA | Virginia | US | False |
US_VT | Vermont | US | False |
US_WA | Washington | US | False |
US_WI | Wisconsin | US | False |
US_WV | West Virginia | US | False |
US_WY | Wyoming | US | False |