Introduction
Platform
The MySale Marketplace platform is a universal e-commerce platform. It allows merchants to upload and manage stock for sale on all MySale sites presenting e-shops in different countries.
*All of the above steps can be easily done in our user friendly Marketplace portal or API
API
Marketplace provides all necessary API methods to merchants to upload their stock, start sales, receive and process orders and handle customer issues.
The REST API lets you interact with Marketplace from any site that can operate with HTTP requests. Marketplace REST API allows you easily create your Marketplace client software written in any programming language and deployed on any platform anywhere across the World.
This site provides documentation for integrating to MySale Marketplace API. This API gives a programmable alternative to the UI version of MySale Marketplace platform.
How To
You have to register in MySale Marketplace prior to start using MySale Marketplace Portal or start developing your own Marketplace client software. Please refer to our Merchant Welcome Page to apply if you haven’t yet registered on MySale Marketplace.
The Security issues are described in details in the “Authentication” chapter.
If you have any difficulties in developing Marketplace client software by yourself, please let us know and we shall help you.
Marketplace Glossary
Products vs SKUs
To start selling in Marketplace you should upload your stock first. Marketplace manages your stock as list of SKUs grouped by Products.
A Product is a named item, containing a number of SKUs.
SKUs (Stock-keeping units) describe different variants of the same Product, e.g. by sizes, colors etc.
A Product may have its own images. If not, then it takes images from its last updated SKU.
If you don’t want your SKU to be opened for sale immediately after upload, please use the enable / disable flag.
Please refer to Taxonomy chapter to have a detailed instruction about how to use MySale Marketplace categories of Products.
Sales vs Retails
Marketplace may sell your stock in Retail mode as well as by Sales. A Marketplace Sale is a Flash Sale in general. That means that the Sale begins and ends at predefined time and that stock is limited to a specific amount.
To make you able starting your own Sales, Marketplace provides a separate API. Using it you easily describe your Sale, select MySale shops (sites) where to sell your stock, select Products and/or SKUs to be sold there. Moreover you can make different Sale descriptions and banners for different sites presented in different countries for better sales.
Orders, Shipments and Refunds
Order is a set of Order items with a unique ID provided by Marketplace. Each Order item describes SKU and corresponding Qty. You should confirm the Order before Order expiration date.
Each Order leads to either Shipment or Refund. Both refer to an original Order. Refund may be done on one or more Order Items.
Authentication
Marketplace uses API keys to provide access to API. You can register a new Marketplace API key contacting our staff. Please keep your API key secured and don’t share it with others.
SKUs
Upload or Update SKU
curl "/v1/merchant-skus/{merchant_sku_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X PUT -d "{json data, see sample below}"
Example Request body:
{
"name": "Musky Newbies Rib 3/4 Sleeve T-Shirt",
"description": "Musky Newbies Rib 3/4 Sleeve T-Shirt",
"country_of_origin": "Australia",
"size": "0 (6-12) Months",
"weight":
{
"value": 200,
"unit": "g"
},
"volume":
{
"height": 343,
"width": 200,
"length": 343,
"unit": "cm"
},
"standard_product_codes":
[{
"code": "3495984357288",
"type": "EAN"
}],
"barcodes": ["3495984357288"],
"brand": "Nike",
"taxonomy_id": "EB45D097-B7DB-4977-A58B-F7D2758F2466"
}
Example Response:
{
"merchant_sku_id": "B756N-36B-Musky-Pink-0(6-12)Months",
"sku_id": "AD6739D7-2EFC-4BFA-B62F-0F4D87EA73E8",
"name": "Musky Newbies Rib 3/4 Sleeve T-Shirt",
"description": "Musky Newbies Rib 3/4 Sleeve T-Shirt",
"country_of_origin": "Australia",
"size": "0 (6-12) Months",
"weight":
{
"value": 200,
"unit": "g"
},
"volume":
{
"height": 343,
"width": 200,
"length": 343,
"unit": "cm"
},
"standard_product_codes":
[{
"code": "3495984357288",
"type": "EAN"
}],
"barcodes": ["3495984357288"],
"brand": "Nike",
"taxonomy_id": "EB45D097-B7DB-4977-A58B-F7D2758F2466",
"enabled": false
}
This endpoint creates new SKU or updates existing one.
HTTP Request
put/v1/merchant-skus/{merchant_sku_id}/
Request body
SKU
Field | Type | Description |
---|---|---|
merchant_sku_id | string * | The SKU ID provided by Merchant (Max 50) |
sku_id | GUID ** | The unique MySale SKU ID |
name | string * | SKU Name |
description | string * | SKU Description. May contain HTML |
country_of_origin | string * | Country of origin of SKU |
size | string | SKU Size |
weight | Weight * | Weight of SKU |
volume | Volume | Volume of SKU - composite object containing Height, Width and Length |
standard_product_codes | Array of StandardProductCodes | List of Standard product codes |
barcodes | Array of strings | Barcodes of SKU |
brand | string | Brand name of SKU |
taxonomy_id | GUID * | Internal ID of SKU Taxonomy |
enabled | bool | If true then SKU is published for sales on sites (read-only) |
Weight
Field | Type | Description |
---|---|---|
value | decimal * | Value of SKU weight |
unit | string | Measurement Unit, g by default |
Volume
Field | Type | Description |
---|---|---|
height | decimal | Height of SKU |
width | decimal | Width of SKU |
length | decimal | Length of SKU |
unit | string | Measurement Unit, cm by default |
StandardProductCode
Field | Type | Description |
---|---|---|
code | string | Product code |
type | enum | Allowed values: EAN, UPC, ISBN_10, ISBN_13, GTIN_14 |
** - The field is generated by MySale Marketplace
* - The field should be filled to pass the validation that predcess the publishig of the SKU for sale.
Please keep in mind that SKU should be provided with Images and Prices to pass the Validation.
Response body
Returns created or updated SKU. For structure of returned SKU see Request body.
Retrieve All SKUs
curl "/v1/merchant-skus/?offset={offset}&limit={limit}"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"SKUs":
[
{
"merchant_sku_id": "B756N-36B-Musky-Pink-0(6-12)Months",
"sku_id": "AD6739D7-2EFC-4BFA-B62F-0F4D87EA73E8"
},
{
"merchant_sku_id": "BBA2-RZNE1A-YU7-PurWhiStr-0(6-12)Months",
"sku_id": "EB45D097-B7DB-4977-A58B-F7D2758F2466"
}
]
}
This endpoint retrieves all SKUs.
HTTP Request
get/v1/merchant-skus/?offset={offset}&limit={limit}
Query Parameters
Parameter | Default | Description |
---|---|---|
offset | 0 | The result will skip SKU’s with number less than specified. |
limit | 50 | The result will return maximum of specified items. |
Response body
Field | Type | Description |
---|---|---|
merchant_sku_id | string | The SKU ID provided by Merchant |
sku_id | GUID | The unique MySale SKU ID |
Retrieve a Specific SKU
curl "/v1/merchant-skus/{merchant_sku_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"merchant_sku_id": "B756N-36B-Musky-Pink-0(6-12)Months",
"sku_id": "AD6739D7-2EFC-4BFA-B62F-0F4D87EA73E8",
"name": "Musky Newbies Rib 3/4 Sleeve T-Shirt",
"description": "Musky Newbies Rib 3/4 Sleeve T-Shirt",
"country_of_origin": "Australia",
"size": "0 (6-12) Months",
"weight":
{
"value": 200,
"unit": "g"
},
"volume":
{
"height": 343,
"width": 200,
"length": 343,
"unit": "cm3"
},
"standard_product_codes":
[{
"code": "2-266-11156-6",
"type": "isbn-10"
}],
"barcodes": ["3495984357288"],
"brand": "Nike",
"taxonomy_id": "EB45D097-B7DB-4977-A58B-F7D2758F2466",
"enabled": true
}
Retrieves the details of an existing SKU.
HTTP Request
get/v1/merchant-skus/{merchant_sku_id}/
Query Parameters
Parameter | Default | Description |
---|---|---|
merchant_sku_id | - | The previously created ID you will use to track and update your SKU |
Response body
SKU
Field | Type | Description |
---|---|---|
merchant_sku_id | string | The SKU ID provided by Merchant (Max 50) |
sku_id | GUID | The unique MySale SKU ID |
name | string | SKU Name |
description | string | SKU Description. May contain HTML |
country_of_origin | string | Country of origin of SKU |
size | string | SKU Size |
weight | Weight | Weight of SKU |
volume | Volume | Volume of SKU - composite object containing Height, Width and Length |
standard_product_codes | Array of StandardProductCodes | List of Standard product codes |
barcodes | Array of strings | Barcodes of SKU |
brand | string | Brand name of SKU |
taxonomy_id | GUID | Internal ID of SKU Taxonomy |
enabled | bool | If true then SKU is published for sales on sites |
Weight
Field | Type | Description |
---|---|---|
value | decimal | Value of SKU weight |
unit | string | Measurement Unit, g by default |
Volume
Field | Type | Description |
---|---|---|
height | decimal | Height of SKU |
width | decimal | Width of SKU |
length | decimal | Length of SKU |
unit | string | Measurement Unit, cm by default |
StandardProductCode
Field | Type | Description |
---|---|---|
code | string | Product code |
type | enum | Allowed values: EAN, UPC, ISBN_10, ISBN_13, GTIN_14 |
Enable SKU for sale
curl "/v1/merchant-skus/{merchant_sku_id}:enable/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X POST "{json data, see sample below}"
Enables SKU for Sale. If SKU is enabled for sale it can be added to sales and can be sold. If SKU is disabled for sales - it can not be sold.
HTTP Request
post/v1/merchant-skus/{merchant_sku_id}:enable/
Query Parameters
Parameter | Default | Description |
---|---|---|
merchant_sku_id | - | The previously created ID you will use to track and update your SKU |
Disable SKU for sale
curl "/v1/merchant-skus/{merchant_sku_id}:disable/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X POST "{json data, see sample below}"
Disables SKU for Sale. If SKU is disabled for sale it can be added to sales but it can not be sold.
HTTP Request
post/v1/merchant-skus/{merchant_sku_id}:disable/
Query Parameters
Parameter | Default | Description |
---|---|---|
merchant_sku_id | - | The previously created ID you will use to track and update your SKU |
Upload SKU images
curl "/v1/merchant-skus/{merchant_sku_id}/images/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X PUT -d "{json data, see sample below}"
Example Request body:
{
"images": [
{
"merchant_url": "https://supplier.com/mySKU01-a.jpg"
},
{
"merchant_url": "https://supplier.com/mySKU01-b.jpg"
},
{
"merchant_url": "https://supplier.com/mySKU01-c.jpg"
}]
}
Example Response:
{
"images": [
{
"merchant_url": "https://supplier.com/not-existing-image.jpg",
"error": "404. Failed to load"
},
{
"merchant_url": "https://supplier.com/mySKU01-b.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mySKU01-b.jpg"
},
{
"merchant_url": "https://supplier.com/mySKU01-c.jpg"
}]
}
This endpoint uploads images for existing SKU. Please do not set the “url” field manually - the image will never be uploaded then.
HTTP Request
put/v1/merchant-skus/{merchant_sku_id}/images/
Request body
ImagesModel
Field | Type | Description |
---|---|---|
Images | Array of ImageModels | List of objects which contain information about images to upload |
ImageModel
Field | Type | Description |
---|---|---|
merchant_url | string | Original Merchant URL of image to upload |
url | string | URL of image at MySale Marketplace CDN (read-only) |
error | string | Displays a reason if an image failed to load to MySale Marketplace CDN |
Response body
Returns uploaded SKU images.
ImagesModel
Field | Type | Description |
---|---|---|
Images | Array of ImageModel | List of objects which contain information about images to upload |
ImageModel
Field | Type | Description |
---|---|---|
merchant_url | string | Original Merchant URL of image to upload |
url | string | URL of image at MySale Marketplace CDN (read-only) |
Retrieve SKU images
curl "/v1/merchant-skus/{merchant_sku_id}/images/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"images": [
{
"merchant_url": "https://supplier.com/mysku01-a.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mysku01-a.jpg"
},
{
"merchant_url": "https://supplier.com/mysku01-b.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mysku01-b.jpg"
},
{
"merchant_url": "https://supplier.com/mysku01-c.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mysku01-c.jpg"
}]
}
This endpoint images for existing SKU.
HTTP Request
get/v1/merchant-skus/{merchant_sku_id}/images/
Response body
Returns uploaded SKU images.
ImagesModel
Field | Type | Description |
---|---|---|
Images | Array of ImageModel | List of objects which contain information about images to upload |
ImageModel
Field | Type | Description |
---|---|---|
merchant_url | string | Original Merchant URL of image to upload |
url | string | URL of image at MySale Marketplace CDN (read-only) |
error | string | Displays a reason if an image failed to load to MySale Marketplace CDN |
Upload SKU prices
curl "/v1/merchant-skus/{merchant_sku_id}/prices/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X PUT -d "{json data, see sample below}"
Example Request body:
{
"prices": {
"cost": {
"currency": "AUD",
"value": "40"
},
"sell": {
"currency": "AUD",
"value": "100"
},
"rrp": {
"currency": "AUD",
"value": "200"
}
}
}
Example Response:
{
"prices": {
"cost": {
"currency": "AUD",
"value": "40"
},
"sell": {
"currency": "AUD",
"value": "100"
},
"rrp": {
"currency": "AUD",
"value": "200"
}
}
}
This endpoint uploads prices for existing SKU.
HTTP Request
put/v1/merchant-skus/{merchant_sku_id}/prices/
Request body
PricesModel
Field | Type | Description |
---|---|---|
Prices | Array of PricesListModel | List of objects which contain information about images to upload |
PricesListModel
Field | Type | Description |
---|---|---|
cost | PriceValueModel | Cost price |
sell | PriceValueModel | Sell price |
rrp | PriceValueModel | Rrp price |
PriceValueModel
Field | Type | Description |
---|---|---|
currency | string | Price currency |
value | decimal | Price value |
Response body
Returns SKU prices. For structure of returned prices see Request body.
Retrieve SKU prices
curl "/v1/merchant-skus/{merchant_sku_id}/prices/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"prices": {
"cost": {
"currency": "AUD",
"value": "40"
},
"sell": {
"currency": "AUD",
"value": "100"
},
"rrp": {
"currency": "AUD",
"value": "200"
}
}
}
This endpoint prices for existing SKU.
HTTP Request
get/v1/merchant-skus/{merchant_sku_id}/prices/
Response body
Returns uploaded SKU prices.
PricesModel
Field | Type | Description |
---|---|---|
Prices | Array of PricesListModel | List of objects which contain information about images to upload |
PricesListModel
Field | Type | Description |
---|---|---|
cost | PriceValueModel | Cost price |
sell | PriceValueModel | Sell price |
rrp | PriceValueModel | Rrp price |
PriceValueModel
Field | Type | Description |
---|---|---|
currency | string | Price currency |
value | decimal | Price value |
Upload SKU inventory
curl "/v1/merchant-skus/{merchant_sku_id}/inventory/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-P PUT -d "{json data, see sample below"}
Example Request body:
{
"inventory": [
{
"location": "Australia Warehouse",
"quantity": "50"
},
{
"location": "United Kingdom Warehouse",
"quantity": "100"
}]
}
Example Response:
{
"inventory": [
{
"location": "Australia Warehouse",
"quantity": "50"
},
{
"location": "United Kingdom Warehouse",
"quantity": "100"
}]
}
This endpoint uploads inventory for existing SKU.
HTTP Request
put/v1/merchant-skus/{merchant_sku_id}/inventory/
Request body
InventoryModel
Field | Type | Description |
---|---|---|
SKU | string | Merchant SKU ID |
LocationQuantities | Array of LocationQuantityModel | List of Inventory records |
LocationQuantityModel
Field | Type | Description |
---|---|---|
LocationId | string | SKU location |
Quantity | int | Number of SKUs available on location |
Response body
Returns SKU inventory. For structure of returned inventory see Request body.
Retrieve SKU inventory
curl "/v1/merchant-skus/{merchant_sku_id}/inventory/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"inventory": [
{
"location": "Australia Warehouse",
"quantity": "50"
},
{
"location": "United Kingdom Warehouse",
"quantity": "100"
}]
}
This endpoint returns inventory for existing SKU.
HTTP Request
get/v1/merchant-skus/{merchant_sku_id}/inventory/
Response body
Returns current SKU inventory state.
InventoryModel
Field | Type | Description |
---|---|---|
SKU | string | Merchant SKU Id |
LocationQuantities | Array of LocationQuantityModel | List of Inventory records |
LocationQuantityModel
Field | Type | Description |
---|---|---|
LocationId | string | SKU location |
Quantity | int | Number of SKUs available on location |
Products
Upload or Update Product
curl "/v1/merchant-products/{merchant_product_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X PUT -d "{json data, see sample below}"
Example Request body:
{
"name": "Phantom Vision Academy DF Mens SG Football Boots",
"description": "<h2>Nike Phantom Vision Academy DF Mens SG Football Boots</h2><br/>These Nike Phantom Vision Academy DF Mens SG Football Boots have been crafted with a Dynamic Fit collar which helps supply a streamlined feel as well as locking your foot in place for zero distraction on the pitch. The boots also benefit from having webbing that integrates with the laces for a secure fit, whilst the soft ground studs ensure you get maximum traction. <br/><br/>> Mens Football Boots<br/>> Full lace fastening<br/>> Cushioned insole<br/>> Dynamic Fit collar<br/>> Targeted texturing <br/>> Soft ground studs<br/>> PhantomVSN detailing<br/>> Nike Swoosh branding<br/>> Upper: Synthetic <br/>> Inner: Textile <br/>> Sole: Synthetic<br><br><a href = \"https://c2.mysalec.com/sizechart/sdsizecharts.html\" target = \"_blank\" class=\"textLinkTopBottom\">Size Guide</a><br>",
"skus": [
{
"merchant_sku_id": "44719303511"
},
{
"merchant_sku_id": "44719303512"
},
{
"merchant_sku_id": "44719303513"
}]
}
Example Response:
{
"product_id": "3C2A6CE4-1F55-4696-B895-4B23EDE915EA",
"merchant_product_id": "19101402320",
"name": "Phantom Vision Academy DF Mens SG Football Boots",
"description": "<h2>Nike Phantom Vision Academy DF Mens SG Football Boots</h2><br/>These Nike Phantom Vision Academy DF Mens SG Football Boots have been crafted with a Dynamic Fit collar which helps supply a streamlined feel as well as locking your foot in place for zero distraction on the pitch. The boots also benefit from having webbing that integrates with the laces for a secure fit, whilst the soft ground studs ensure you get maximum traction. <br/><br/>> Mens Football Boots<br/>> Full lace fastening<br/>> Cushioned insole<br/>> Dynamic Fit collar<br/>> Targeted texturing <br/>> Soft ground studs<br/>> PhantomVSN detailing<br/>> Nike Swoosh branding<br/>> Upper: Synthetic <br/>> Inner: Textile <br/>> Sole: Synthetic<br><br><a href = \"https://c2.mysalec.com/sizechart/sdsizecharts.html\" target = \"_blank\" class=\"textLinkTopBottom\">Size Guide</a><br>",
"skus": [
{
"merchant_sku_id": "44719303511"
},
{
"merchant_sku_id": "44719303512"
},
{
"merchant_sku_id": "44719303513"
}]
}
This endpoint uploads or updates Product
HTTP Request
put/v1/merchant-products/{merchant_product_id}/
Request body
ProductModel
Field | Type | Description |
---|---|---|
merchant_product_id | string | ID of the Product provided by Merchant |
product_id | Guid | The unique MySale Product identifier |
name | string | Name of Product |
description | string | Description of Product |
skus | Array of Sku | Attached SKUs |
Sku
Field | Type | Description |
---|---|---|
merchant_sku_id | string | ID of the SKU provided by Merchant |
sku_id | guid | The unique MySale SKU identifier |
Response body
Returns created or updated Product. For structure of returned Product see Request body.
Retrieve All Products
curl "/v1/merchant-products/?offset={offset}&limit={limit}"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"products": [
{
"product_id": "ef084dc7-c22d-40f6-9b16-456cc8ec9d46",
"merchant_product_id": "19101402320"
},
{
"product_id": "3C2A6CE4-1F55-4696-B895-4B23EDE915EA",
"merchant_product_id": "19101402322"
}]
}
This endpoint retrieves all Products.
HTTP Request
get/v1/merchant-products/?offset={offset}&limit={limit}
Query Parameters
Parameter | Default | Description |
---|---|---|
offset | 0 | The result will skip Product’s with number less than specified. |
limit | 50 | The result will return maximum of specified items. |
Response body
Field | Type | Description |
---|---|---|
merchant_product_id | string | ID of the Product provided by Merchant |
product_id | guid | The unique Product identifier |
Retrieve a Specific Product
curl "/v1/merchant-products/{merchant_product_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"product_id": "3C2A6CE4-1F55-4696-B895-4B23EDE915EA",
"merchant_product_id": "19101402320",
"name": "Super Nike product",
"description": "This is a terrific product",
"skus": [
{
"merchant_sku_id": "44719303511",
"sku_id": "AD6739D7-2EFC-4BFA-B62F-0F4D87EA73E8"
},
{
"merchant_sku_id": "44719303512",
"sku_id": "16D8EC73-634D-44DB-BBF4-202C0048513C"
},
{
"merchant_sku_id": "44719303513",
"sku_id": "C10FD09E-D388-4CED-9693-CACB9CBB45CA"
}]
}
Retrieves the details of an existing Product.
HTTP Request
get/v1/merchant-products/{merchant_product_id}/
Response body
ProductModel
Field | Type | Description |
---|---|---|
merchant_product_id | strinmerchant_product_id | string |
product_id | guid | The unique Product identifier |
name | string | Name of Product |
description | string | Description of Product |
skus | Array of Sku | Attached Skus |
Sku
Field | Type | Description |
---|---|---|
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | guid | The unique MySale SKU ID |
Retrieve Product images
curl "/v1/merchant-products/{merchant_product_id}/images/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"images": [
{
"merchant_url": "https://supplier.com/mysku01-a.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mysku01-a.jpg"
},
{
"merchant_url": "https://supplier.com/mysku01-b.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mysku01-b.jpg"
},
{
"merchant_url": "https://supplier.com/mysku01-c.jpg",
"url": "https://cdn.mysalemarketplace.com/C10FD09ECA/mysku01-c.jpg"
}]
}
This endpoint retrieves images for existing Product.
HTTP Request
get/v1/merchant-products/{merchant_product_id}/images/
Response body
Returns Product images.
ImagesModel
Field | Type | Description |
---|---|---|
images | Array of ImageModel | List of objects which contain information about images to upload |
ImageModel
Field | Type | Description |
---|---|---|
merchant_url | string | Original Mercahnt URL of image to upload |
url | string | URLof image at MySale Marketplace CDN |
error | string | Displays a reason if an image failed to load to MySale Marketplace CDN |
How to set Product images
The proper sequence of how to load images to the Product is:
1. Create all SKUs with inventory, prices but without images
2. Create Products combining necessary SKUs
3. Update SKU Images
In this case the product automation background service will fill the Product Images with the Images from the last SKU from each particular Product.
Taxonomy
Retrieve list of Taxonomy branches
curl "/v1/taxonomy/?offset=0&limit=100"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"branches": [
"e7e47671-07b0-4e95-8dee-c0fa5a96a1b7",
"d8ddd5e5-868f-4891-b416-8c92590a29c4",
"4de932b7-a107-49ab-9e8f-cdf0b75f86fd"
]
}
This endpoint retrieves the list of Taxonomy branches
HTTP Request
get/v1/taxonomy/?offset={offset}&limit={limit}
Response body
Returns the list of taxonomy branches’ IDs (GUID).
Retrieve a specific Taxonomy branch
curl "/v1/taxonomy/e7e47671-07b0-4e95-8dee-c0fa5a96a1b7/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
{
"branch_id": "e7e47671-07b0-4e95-8dee-c0fa5a96a1b7",
"parent_id": "d8ddd5e5-868f-4891-b416-8c92590a29c4",
"level": 1,
"name": "Denim",
"keywords": [
"jean",
"jeans",
"denim",
"denims"
],
"is_main_category": true
}
This endpoint returns a taxonomy branch.
HTTP Request
get/v1/taxonomy/{branch_id}/
Query Parameters
Parameter | Description |
---|---|
branch_id | guid |
Response body
Field | Type | Description |
---|---|---|
branch_id | guid | The unique MySale Taxonomy branch identifier |
parent_id | guid | The unique MySale Taxonomy branch porent identifier |
level | int | Level of the Taxonomy branch in the Taxonomy tree |
name | string | Name of the Taxxonomy branch |
keywords | string[] | List of keywords for the Taxonomy branch |
is_main_category | bool | Obsolete |
Orders
Life-cycle
New Order is created by MySale upon selling the Basket to a Customer. The Basket contains a list of Order Items and some other fields. Order Item is a record of SKU + Qty, i.e. how many pieces of this SKU have been ordered. Sum of all Order Item Quantities is an Order Qty. Order Status list:
Status | Meaning | Initiatorv |
---|---|---|
new | The order has been placed and is ready to be processed by the Merchant | MySale |
acknowledged | The order has been accepted by the Merchant and is awaiting fulfillment | Merchant |
inprogress | The order has been partially shipped | Merchant |
completed | The order is completely shipped or cancelled | Merchant |
Status “new” The Order is always created with the “new” Status. Merchant periodically checks the Order tray in MP using the Get Order List method for the “new” Status. Recommended frequency is once an hour. If there are some Orders in “new” Status the method will return first 1000 Ids of Orders in the “new” Status. Merchant should take then the newly created Orders one by one using Get Order method.
Status “acknowledged”
After the new Order is registered in the Merchant’s internal accounting IT system, the Acknowledge method shoudl be called.
The Acknowledge method moves the Order to “acknowledged” Status.
The acknowledged Order will not be returned in the list of new Orders.
- Merchant may optionally set merchant_order_id and merchant_order_item_id using this method.
- This method may be called many times.
- If the Order is in “new” Status, then it will be moved to “Acknowledged” one and disappear from the New Order list.
- If the Order is in “acknowledged” or in “inprogress” Status, it will not change Status. The only reaction possible is a change of newly received merchant_order_id and merchant_order_item_id values, if any.
- If the Order is in “complete” Status, it will return Conflict.
Status “inprogress” vs “complete”
Merchant processes the Order and, then it becomes dispatched, notifies MP about that using the Add New Shipment method. Order may contain several Shipments. For each Shipment Merchant provides a shipment item list and Tracking Number.
In case of inability to ship the Order Merchant can call the Add New Cancellation method and report the reason:
Cancellation Reason | Meaning |
---|---|
no_stock | no_stock |
fraud_high_risk | Fraud High Risk |
fraud_charge_back | Fraud ChargeBack |
fraud_confirmed | Fraud Confirmed |
customer_cancelled_sale_error | Customer Cancelled: Sale Error |
customer_cancelled_delayed | Customer Cancelled: Delayed |
customer_cancelled_change_of_mind | Customer Cancelled: Change of mind |
unfulfillable_address | Unfulfillable address |
other | other |
Sum of all Quantities from all Order Shipments and Order Cancellations is a Processed Order Qty.
The Order moves to “complete” Status only when it receives all necessary Shipments and Cancellations, i.e. Processed Order Qty EQUALS to Order Qty:
- If the Order is Cancelled completely (cancelled in one Cancellation) then the Status changes to “completed”.
- If the Order is Shipped in one Shipment then the Status changes to “completed” too.
- If Processed Order Qty equals to the Order Qty then the Status changes to “completed” too.
In some cases the Order cannot be shipped or cancelled completely at once. In this case Merchant calls consequently the Add New Shipment and Add New Cancellation methods until Processed Order Qty becomes equal to Order Qty.
Partial Shipment or Cancellation should not exactly correspond to an Order Item. It may contain several Order Items or only a part of one Order Item (with quantity less than the Order Item Quantity). Here the Order will be moved to the “inprogress” Status. Imagine we’ve got an Order with 3 Order Items with quantities correspondingly 3, 4 and 5:
- Order Items 1 and 2 can be shipped right now and Order Item 3 is not yet processed. Here we have One Shipment.
- Order Item 1 can be shipped right now and Order Item 2 can be shipped one week later. Order Item 3 is not yet processed. Here we have One Shipment with one Expected delivery date and another - with the date week later.
- Order Item 1 is shipped, Order Item 2 is Cancelled, Order Item 3 is not yet processed. Here we have 1 Shipment and one Cancellation.
- Order Item 1 is shipped (Qty = 3), Order Item 2 is unfulfillable, i.e. Merchant can only deliver 3 of 4 (Qty = 3). Here we have normal Shipment 1 for Order Item 1, partial Shipment 2 for Qty = 3 and partial cancellation of Order Item 3 for Qty = 1.
In case when the Processed Order Qty is not equal to the Order Qty:
- if less, the Order should be in the “inprogress” Status.
- if more, it will return Conflict. In case when newly received Cancellation or Shipment make Total Qty exceeding Order Total Qty.
Retrive Order List
curl "/v1/orders/new/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
curl "/v1/orders/acknowledged/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
curl "/v1/orders/inprogress/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
curl "/v1/orders/completed/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response:
[
{
"order_id": "03c8f4c6-f5d0-44c9-a9b0-a0972dd3fa50",
"merchant_order_id": "2019-08-ORD-AE17439-01"
},
{
"order_id": "8f491c6f-0e4f-4fa5-b458-ccab9b018c24",
"merchant_order_id": "2019-08-ORD-AE17439-02"
},
{
"order_id": "443c14b3-714b-47dc-9d32-8381d9a41fc3",
"merchant_order_id": "2019-08-ORD-AE17439-03"
}
]
Using this endpoint you can access the first 1000 orders in a certain status.
HTTP Request
get/v1/orders/new/
Response body
Field | Type | Description |
---|---|---|
order_id | Guid | The unique order identifier |
merchant_order_id | String | The order identifier given by Merchant, if any |
HTTP Request
get/v1/orders/acknowledged/
Response body
Field | Type | Description |
---|---|---|
order_id | Guid | The unique order identifier |
merchant_order_id | String | The order identifier given by Merchant, if any |
HTTP Request
get/v1/orders/inprogress/
Response body
Field | Type | Description |
---|---|---|
order_id | Guid | The unique order identifier |
merchant_order_id | String | The order identifier given by Merchant, if any |
HTTP Request
get/v1/orders/completed/
Response body
Field | Type | Description |
---|---|---|
order_id | Guid | The unique order identifier |
merchant_order_id | String | The order identifier given by Merchant, if any |
Retrive a Specific Order
curl "/v1/orders/{order_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example of Response for the “new” status:
{
"order_id": "d11ead78-f517-4318-b23e-af6f63ad399a",
"customer_order_reference": "35488395",
"order_date": "2019-06-07T20:12:52.29",
"order_status": "new",
"recipient": {
"name": "Bob Castello",
"email": "bob_castello@yahoo.com",
"phone_number": "+61-0453323833",
"address": {
"country_code": "AU",
"address_line": "28/121 Mcbryde Crescent",
"city": "Wanniassa",
"state": "ACT",
"postcode": "2903",
"authority_to_leave": ""
},
"billing_address": {
"country_code": "AU",
"address_line": "28/121 Mcbryde Crescent",
"city": "Wanniassa",
"state": "ACT",
"postcode": "2903",
"authority_to_leave": ""
}
},
"order_items": [
{
"order_item_id": "5eed6ab8-bc1d-4677-bfb7-33fa79c1c211",
"sku_id": "60fa8875-cbc7-4ede-8253-87203afdbced",
"merchant_sku_id": "44717176511",
"sku_qty": 1,
"item_cost_price": {
"currency": "AUD",
"amount": 50.81
},
"item_sell_price": {
"currency": "AUD",
"amount": 65.55
},
"item_shipping_price": {
"currency": "AUD",
"amount": 0
}
}
]
}
Example of Response for the “completed” status:
{
"order_id": "d8dee79f-4f9e-4837-bf20-59f2c14de04f",
"customer_order_reference": "311765515",
"order_date": "2019-11-04T09:12:18.14",
"order_status": "complete",
"completion_kind": "fullycanceled",
"recipient": {
"name": "Andy Tooly",
"email": "andy.tooly@gmail.com",
"phone_number": "0278983200",
"address": {
"country_code": "NZ",
"address_line": "Beeshop Building, Hokowhitu Campus, CENTENNIAL DRIVE",
"city": "Palmerston North",
"postcode": "4410"
},
"billing_address": {
"country_code": "NZ",
"address_line": "Beeshop Building, Hokowhitu Campus, CENTENNIAL DRIVE",
"city": "Palmerston North",
"postcode": "4410"
}
},
"order_items": [
{
"order_item_id": "b3311d8e-4cd8-4de1-cfd1-cb7a86f5f976",
"sku_id": "b31b4551-cd65-445a-befa-c41171eb02e6",
"merchant_sku_id": "44719303511",
"sku_qty": 1,
"item_cost_price": {
"currency": "NZD",
"amount": 54.2
},
"item_sell_price": {
"currency": "NZD",
"amount": 69.8
},
"item_shipping_price": {
"currency": "NZD",
"amount": 0
}
}
]
}
This endpoint returns an Order by MySale Id.
HTTP Request
get/v1/orders/{order_id}
Response body
Order
Field | Type | Description |
---|---|---|
order_id | Guid | The unique order identifier |
merchant_order_id | string | The order identifier given by Merchant, if any |
customer_order_reference | string | MySale human readable order ID number that may have a small chance of collision overtime. |
order_date | Date | The date the merchant order was placed. |
order_status | string | Current status of the order. Status |
recipient | Recipient | Who is receiving the order |
order_items | OrderItem[] | List of Order items (SKU + QTY) |
Recipient
Field | Type | Description |
---|---|---|
name | string | The name of the person |
Guid | The email for the person above | |
phone_number | string | The phone number for the person above |
address | Address | Where the order is being shipped to |
billing_address | Address | Where the bill to be sent to |
pickup_point | PickupPoint | Optional pickup point identification if ordered to be delivered to pickup point |
Address
Field | Type | Description |
---|---|---|
country_code | string | Alpha-2 ISO country code |
address_line | string | Address info |
city | string | City of the address |
state | string | State of the address |
postcode | string | Post code of the address |
authority_to_leave | string | If filled out, when a carrier has permission to leave a parcel without obtaining a signature in case if recipient is e.g. at work at a time of delivery. |
PickupPoint
Field | Type | Description |
---|---|---|
id | string | Internal pickup point identifier |
carrier | string | Post service name |
name | string | Pickup point name |
address_line | string | Pickup point address line |
city | string | City of the address |
state | string | State of the address |
postcode | string | Post code of the address |
OrderItem
Field | Type | Description |
---|---|---|
order_item_id | Guid | MySale unique ID for a given Merchant order item |
merchant_order_item_id | string | Optional Merchant supplied order item ID. |
sku_id | Guid | MySale unique ID for SKU |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_qty | int | Quantity of this SKU |
item_cost_price | Price | Price the Merchant sets |
item_sell_price | Price | Price the customer pays |
item_shipping_price | Price | Price of delivery |
Price
Field | Type | Description |
---|---|---|
currency | string | Alpha-3 ISO currency code |
amount | decimal | Cost amount |
Acknowledge Order
curl "/v1/orderd/{order_id}/acknowledge/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X PUT -d "{json data, see sample below}"
Example Request body:
{
"merchant_order_id": "2019-08-ORD-AE17439-01",
"order_items": [
{
"order_item_id": "83589b6c-2b96-4b5e-b4a9-b65ce8a861a9",
"merchant_order_item_id": "MYORDERITEMID1"
},
{
"order_item_id": "8f1d9e54-a8d1-4989-b9b8-c579b499f999",
"merchant_order_item_id": "MYORDERITEMID1"
}
]
}
This endpoint acknowledges Order
HTTP Request
put/v1/orders/{order_id}/acknowledge/
Request body
Acknowledgment
Field | Type | Description |
---|---|---|
merchant_order_id | string. Maximum of 100 chars | Optional Merchant supplied order ID. |
order_items | AcknowledgementOrderItem | List of Order items (SKU + QTY) |
AcknowledgementOrderItem
Field | Type | Description |
---|---|---|
order_item_id | Guid | MySale unique ID for a given Merchant order item |
merchant_order_item_id | string | Optional Merchant supplied order item ID |
Upload Shipment
curl "/v1/orderd/{order_id}/shipments/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X POST -d "{json data, see sample below}"
Example Request body:
{
"merchant_order_id": "2019-08-ORD-AE17439-01",
"merchant_shipment_id": "2019-08-SH-AE17439-01",
"tracking_number": "W3P5009591",
"delivery_option": "pickup_point",
"carrier": "Auspost",
"carrier_shipment_method": "Express",
"dispatch_date": "2019-06-15T12:35:22.0000000-07:00",
"expected_delivery_date": "2019-06-16T12:35:22.0000000-07:00",
"shipment_items": [
{
"merchant_shipment_item_id": "2019-08-SH-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "7B798536-B9B7-4613-B0C7-996BACE854E7",
"sku_qty": 1
}]
}
Example Response:
"3764e178-ae78-4996-8eef-40dbe9f543ef"
This endpoint adds Shipment to the Order
HTTP Request
post/v1/orders/{order_id}/shipments/
Request body
Shipment
Field | Type | Description |
---|---|---|
shipment_id | Guid | MySale unique ID for Shipment |
merchant_shipment_id | string | Shipment ID privided by Merchant |
tracking_number | string | Merchant tracking number |
delivery_option | string | Delivery option |
carrier | string | Post service name |
carrier_shipment_method | string | Post service option |
dispatch_date | Date | Date/Time that a given shipment was shipped. |
expected_delivery_date | Date | Date/Time that a given shipment is expected to be delivered. This needs to be after order_date. |
shipment_items | ShipmentItem | List of items to be shipped |
ShipmentItem
Field | Type | Description |
---|---|---|
merchant_shipment_item_id | Guid | Shipment Item ID privided by Merchant |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | string | Quantity of this SKU to be shipped |
Response body
Returns created Shippment Id (Guid)
Update Shipment
curl "/v1/orderd/{order_id}/shipments/{shipment_id}"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X PUT -d "{json data, see sample below}"
Example Request body:
{
"merchant_shipment_id": "2019-08-SH-AE17439-01",
"tracking_number": "W3P5009591",
"delivery_option": "pickup_point",
"carrier": "Auspost",
"carrier_shipment_method": "Express",
"dispatch_date": "2019-06-15T19:35:22+00:00",
"expected_delivery_date": "2019-06-16T19:35:22+00:00",
"shipment_items": [
{
"merchant_shipment_item_id": "2019-08-SH-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "ee06f701-e403-4dd9-82fc-927209d18dd1",
"sku_qty": 1
}
]
}
This endpoint Updates Shipment of the Order
HTTP Request
put/v1/orders/{order_id}/shipments/{shipment_id}
Request body
Shipment
Field | Type | Description |
---|---|---|
merchant_shipment_id | string | Shipment ID privided by Merchant |
tracking_number | string | Merchant tracking number |
delivery_option | string | Delivery option |
carrier | string | Post service name |
carrier_shipment_method | string | Post service option |
expected_delivery_date | Date | Date/Time that a given shipment is expected to be delivered. This needs to be after order_date. |
shipment_items | ShipmentItem | List of items to be shipped |
ShipmentItem
Field | Type | Description |
---|---|---|
merchant_shipment_item_id | Guid | Shipment Item ID privided by Merchant |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | string | Quantity of this SKU to be shipped |
Response body
Returns NoContent
Retrive all Shipments
curl "/v1/orderd/{order_id}/shipments/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response body:
{
"shipments": [
{
"shipment_id": "3764e178-ae78-4996-8eef-40dbe9f543ef",
"merchant_shipment_id": "2019-08-SH-AE17439-01",
"tracking_number": "W3P5009591",
"delivery_option": "pickup_point",
"carrier": "Auspost",
"carrier_shipment_method": "Express",
"dispatch_date": "2019-06-02T13:55:14.2851813+00:00",
"expected_delivery_date": "2019-06-16T19:35:22+00:00",
"shipment_items": [
{
"merchant_shipment_item_id": "2019-08-SH-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "ee06f701-e403-4dd9-82fc-927209d18dd1",
"sku_qty": 1
}
]
}
]
}
This endpoint Retrives all Shipments of the Order
HTTP Request
get/v1/orders/{order_id}/shipments/
Response body
Shipment
Field | Type | Description |
---|---|---|
shipment_id | Guid | MySale unique ID for Shipment |
merchant_shipment_id | string | Shipment ID privided by Merchant |
tracking_number | string | Merchant tracking number |
delivery_option | string | Delivery option |
carrier | string | Post service name |
carrier_shipment_method | string | Post service option |
dispatch_date | Date | Date/Time that a given shipment was shipped. |
expected_delivery_date | Date | Date/Time that a given shipment is expected to be delivered. This needs to be after order_date. |
shipment_items | ShipmentItem | List of items to be shipped |
ShipmentItem
Field | Type | Description |
---|---|---|
merchant_shipment_item_id | Guid | Shipment Item ID privided by Merchant |
merchant_sku_id | string | SKU Id provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | string | Quantity of this SKU to be shipped |
Retrive a Specific Shipment
curl "/v1/orderd/{order_id}/shipments/{shipment_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Response body:
{
"merchant_shipment_id": "2019-08-SH-AE17439-01",
"tracking_number": "W3P5009591",
"delivery_option": "pickup_point",
"carrier": "Auspost",
"carrier_shipment_method": "Express",
"dispatch_date": "2019-06-15T19:35:22+00:00",
"expected_delivery_date": "2019-06-16T19:35:22+00:00",
"shipment_items": [
{
"merchant_shipment_item_id": "2019-08-SH-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "ee06f701-e403-4dd9-82fc-927209d18dd1",
"sku_qty": 1
}
]
}
This endpoint Retrives Shipment of the Order
HTTP Request
get/v1/orders/{order_id}/shipments/{shipment_id}/
Response body
Shipment
Field | Type | Description |
---|---|---|
shipment_id | Guid | MySale unique ID for Shipment |
merchant_shipment_id | string | Shipment ID privided by Merchant |
tracking_number | string | Merchant tracking number |
delivery_option | string | Delivery option |
carrier | string | Post service name |
carrier_shipment_method | string | Post service option |
dispatch_date | Date | Date/Time that a given shipment was shipped. |
expected_delivery_date | Date | Date/Time that a given shipment is expected to be delivered. This needs to be after order_date. |
shipment_items | ShipmentItem | List of items to be shipped |
ShipmentItem
Field | Type | Description |
---|---|---|
merchant_shipment_item_id | Guid | Shipment Item ID privided by Merchant |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | string | Quantity of this SKU to be shipped |
Upload Cancellation
curl "/v1/orderd/{order_id}/cancellations/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
-X POST -d "{json data, see sample below}"
Example Request body:
{
"cancelled_items": [
{
"merchant_cancel_item_id": "2019-08-CN-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "7b798536-b9b7-4613-b0c7-996bace854e8",
"sku_qty": 2,
"cancellation_reason": "no_stock"
},
{
"merchant_cancel_item_id": "2019-08-CN-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "7b798536-b9b7-4613-b0c7-996bace854e8",
"sku_qty": 1,
"cancellation_reason": "no_stock"
}
]
}
Example Response:
"3764e178-ae78-4996-8eef-40dbe9f543ef"
This endpoint adds Cancellation to the Order
HTTP Request
post/v1/orders/{order_id}/cancellations/
Request body
Cancellation
Field | Type | Description |
---|---|---|
cancellation_id | Guid | MySale unique ID for Cancellation |
cancelled_items | CancelledItem | List of items to be cancelled |
CancelledItem
Field | Type | Description |
---|---|---|
merchant_cancel_item_id | string | ID of Cancellation Item provided by Merchant |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | int | Quantity of this SKU to be cancalled |
cancellation_reason | string Status descriptions: no_stock, fraud_high_risk, fraud_charge_back, fraud_confirmed, customer_cancelled_sale_error, customer_cancelled_delayed, customer_cancelled_change_of_mind, unfulfillable_address, other |
Reason of cancellation |
Response body
Returns the created Cancellation ID (Guid)
Retrive All Cancellations
curl "/v1/orderd/{order_id}/cancellations/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Request body:
{
"cancellations": [
{
"cancellation_id": "1c8720df-d785-4eff-bb7d-59492acc35a8",
"cancelled_items": [
{
"merchant_cancel_item_id": "2019-08-CN-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "ee06f701-e403-4dd9-82fc-927209d18dd1",
"sku_qty": 2,
"cancellation_reason": "no_stock"
}
]
}
]
}
Example Response:
"3764e178-ae78-4996-8eef-40dbe9f543ef"
This endpoint gets all Cancellations of the Order
HTTP Request
get/v1/orders/{order_id}/cancellations/
Response body
Cancellation
Field | Type | Description |
---|---|---|
cancellation_id | Guid | MySale unique ID for Cancellation |
cancelled_items | CancelledItem | List of items to be cancelled |
CancelledItem
Field | Type | Description |
---|---|---|
merchant_cancel_item_id | string | Identification of Cancellation Item given by Merchant |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | int | Quantity of this SKU to be cancelled |
cancellation_reason | string Status descriptions: no_stock, fraud_high_risk, fraud_charge_back, fraud_confirmed, customer_cancelled_sale_error, customer_cancelled_delayed, customer_cancelled_change_of_mind, unfulfillable_address, other |
Reason of cancellation |
Retrive a Specific Cancellation
curl "/v1/orderd/{order_id}/cancellations/{cancellation_id}/"
-H "Authorization: Bearer XyZAlexYustasu::NeSHarit00Etot42klyuch"
Example Request body:
{
"cancelled_items": [
{
"merchant_cancel_item_id": "2019-08-CN-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "7b798536-b9b7-4613-b0c7-996bace854e8",
"sku_qty": 2,
"cancellation_reason": "no_stock"
},
{
"merchant_cancel_item_id": "2019-08-CN-AE17439-01/1",
"merchant_sku_id": "44719303511",
"sku_id": "7b798536-b9b7-4613-b0c7-996bace854e8",
"sku_qty": 1,
"cancellation_reason": "no_stock"
}
]
}
Example Response:
"3764e178-ae78-4996-8eef-40dbe9f543ef"
This endpoint adds Cancellation to the Order
HTTP Request
get/v1/orders/{order_id}/cancellations/{cancellation_id}/
Response body
Cancellation
Field | Type | Description |
---|---|---|
cancellation_id | Guid | MySale unique ID for Cancellation |
cancelled_items | CancelledItem | List of items to be cancelled |
CancelledItem
Field | Type | Description |
---|---|---|
merchant_cancel_item_id | string | ID of Cancellation Item provided by Merchant |
merchant_sku_id | string | SKU ID provided by Merchant |
sku_id | Guid | MySale unique ID for SKU |
sku_qty | int | Quantity of this SKU to be cancalled |
cancellation_reason | string Status descriptions: no_stock, fraud_high_risk, fraud_charge_back, fraud_confirmed, customer_cancelled_sale_error, customer_cancelled_delayed, customer_cancelled_change_of_mind, unfulfillable_address, other |
Reason of cancellation |
Errors
The Marketplace Merchant API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request – Bad request. See details in response content |
401 | Unauthorized – Invalid authorization header |
404 | Not Found – The specified entity doesn’t exist or could not be found |
405 | Method Not Allowed – You tried to access an entity with an invalid method |
406 | Not Acceptable – You requested a format that isn’t json |
409 | Conflict – The request could not be completed due to a conflict with the current state of the target resource |
429 | Too Many Requests – You’re requesting too often |
500 | Internal Server Error – We had a problem with our server. Try again later. |
503 | Service Unavailable – We’re temporarially offline for maintanance. Please try again later. |