Introduction
Qubyk Marketplace is a platform to sell your products and to find products available from around the world. It allows retailers or online merchants to upload and manage inventory for sale on qubyk marketplace. Our marketplace is intended to be full-featured so online merchants or retailers can manage their product stock, fulfill orders and handle shoppers requests.
Our API is intended to be a fully functional to automate sellers business, however, it is a work in progress and is constantly being update with new features.
The best way to get started using this API is to read through this section and then visit the Authentication section.
Please note that all dates and times in our API are always in UTC unless otherwise mentioned.
Authentication
Retrieve Access Token
curl --request POST \
--url /account/api/auth/token/merchant/{merchantId} \
--header 'Content-Type: application/json' \
--data '{
"clientId":"a440b2cb0d4cdeaeae57956f7c01cc7d",
"clientSecret":"ef56c373-13cd-478d-b5ec-ec48e9f9884f"
}
The above command returns JSON structured like this:
{
"created": "2020-06-23T04:24:33.331Z",
"name": "ApiSession",
"merchantId": "ba9181ae-f478-4adb-8957-4429f157be81",
"token": "73c7071b-45ef-4952-ad63-d331c8703baa",
"expiry": 43200
}
Replace
merchantId
,clientId
,clientSecret
with your registered merchant account Id and API app credentials from your Merchant Portal.
Qubyk Marketplace uses clientId and clientSecret to generate authorization key. Login to your merchant account click here under API section to register your Client App and access keys.
HTTP Request
POST /account/api/auth/token/merchant/{merchantId}
URL Parameters
Parameter | Required | Description |
---|---|---|
merchantId | Yes | unique id issued by Qubyk Marketplace |
Request Body (Json)
Parameter | Required | Description |
---|---|---|
clientId | Yes | Your registered Client Id |
clientSecret | Yes | Your registered Client Secret |
Rate Limit
There's no limit to the number of requests being sent to our end points, however, we ensure to monitor requests for fair use policy.
Please refer to our Terms & Condtions API usage section.
Products
Add Product
curl --request POST \
--url /merchant-products/api/products/{merchantId} \
--header 'Authorization: your-auth-token' \
--header 'Content-Type: application/json' \
--data '{
"merchantSku": "12345",
"brand": "Gucci",
"name": "T-shirt with two button fly and a pocket",
"description": "This is an awesome T-Shirt",
"productCode": "1298472923",
"tags": ["T-shirt"],
"size":" 12",
"stock": 5,
"location": "AU",
"currency": "AUD",
"price": 4,
"rrp": 6,
"shipTime": 3,
"categoryId": "3200006",
"image":[
"https://hellworld.com/image1.png",
"https://hellworld.com/image2.png"
],
"shipping": [
{
"countryCode":"US",
"shippingFee": 1,
"addFee": 1.5
},
{
"countryCode":"GB",
"shippingFee": 1.5,
"addFee": 1.5
}
],
"meta": [
{
"name": "length",
"value": "10"
},
{
"name": "width",
"value": "14"
},
{
"name": "height",
"value": "8"
}
]
}'
The above command returns JSON structured like this:
{
"id": "2754642c-ed86-4227-9768-2c73fa5fc844",
"created": "2020-06-23T04:30:25.331Z",
"updated": "2020-06-23T04:30:25.331Z",
"merchantSku": "100389",
"brand": "Gucci",
"name": "T-shirt with two button fly and a pocket",
"description": "This is an awesome T-Shirt",
"productCode": "646630007295",
"tags": [
"T-Shirt"
],
"size": "1 item",
"stock": 120,
"location": "AU",
"currency": "AUD",
"price": 8.0,
"rrp": 29.0,
"categoryId": "3200006",
"shipTime": "2",
"shipping": [
{
"countryCode":"US",
"shippingFee": 1,
"addFee": 1.5
},
{
"countryCode":"GB",
"shippingFee": 1.5,
"addFee": 1.5
}
],
"image": [
"https://hellworld.com/image1.png",
"https://hellworld.com/image2.png"
],
"meta": [
{
"name": "length",
"value": "10"
},
{
"name": "width",
"value": "14"
},
{
"name": "height",
"value": "8"
}
]
}
Replace
merchantId
with your registered merchant account Id from your Merchant Portal.
This endpoint creates a new product with given attributes in example request.
HTTP Request
POST /merchant-products/api/products/{merchantId}
URL Parameters
Parameter | Required | Description |
---|---|---|
merchantId | Yes | unique id created entire to qubyk marketplace |
Request Body (Json)
Parameter | Required | Description |
---|---|---|
merchantSku | Yes | The unique identifier that your system uses to recognize this product |
brand | Yes | Brand or manufacturer of your product |
name | Yes | Name of the product as shown to shoppers on qubyk marketplace |
description | Yes | Description of the product. Text shouldn't contain any code or HTML. Add "\n" for a new line use |
productCode | Yes | Valid UPC or EAN code. No text characters are allowed |
tags | Yes | Comma separated list of strings that describe the product. Any tags past 10 will be ignored |
size | Yes | The size of the product |
stock | Yes | The physical quantities you have for this product |
location | Yes | Product location such as Melbourne or Australia |
currency | Yes | Currency type (AUD,USD or GBP) for price, rrp and shipping fees |
price | Yes | The price of the variation when the user purchases one |
rrp | Yes | Manufacturer's Suggested Retail Price |
categoryId | Yes | CategoryId of product by its type. See Get All Categories |
image | Yes | Comma separated list of image urls of a product. Max 15 images allowed per product. |
shipTime | Yes | Minimum no of days requried to dispatch the order and cannot be less than 1 |
shipping | Yes | Comma separated shipping objects with country code and shipping price. See Shipping Entity for parameters list |
meta | No | Comma separated meta objects to add additional information to describe the product such as length, width, origin etc |
Required parameters for Shipping Entity
Parameter | Required | Description |
---|---|---|
countryCode | Yes | Two letter country code |
shippingFee | Yes | Shipping fee for each country |
addFee | Yes | Additional fee for additional quantity of an item |
(Optional) Meta entity can be optional, however, below fields are required in case it sent in add request. If it used the key values will be dynamically generated in our store front.
A maximum of 10 meta objects can be added for each product
Parameter | Required | Description |
---|---|---|
name | Yes | name of the field. Ex: length |
value | Yes | value for the field. Ex: 10m |
Get Product
curl --request GET \
--url /marketplace-products/api/merchant/{merchantId}/{id} \
--header 'Authorization: your-access-token'
The above command returns JSON structured like this:
{
"id": "2754642c-ed86-4227-9768-2c73fa5fc844",
"created": "2020-06-23T04:30:25.331Z",
"updated": "2020-06-23T04:30:27.964Z",
"merchantSku": "100389",
"brand": "Gucci",
"name": "T-shirt with two button fly and a pocket",
"description": "This is an awesome T-Shirt",
"productCode": "1298472923",
"tags": [
"perfume"
],
"size": "12",
"stock": "9",
"location": "AU",
"currency": "AUD",
"price": 1,
"rrp": 3,
"categoryId": "3200006",
"shipTime": "1",
"shipping": [
{
"countryCode": "US",
"shippingFee": 1,
"addFee": 1.5
},
{
"countryCode": "GB",
"shippingFee": 10,
"addFee": 1.0
}
],
"image": [
"https://hellworld.com/image1.jpg",
"https://hellworld.com/image2.jpg"
],
"meta": [
{
"name": "length",
"value": "10"
},
{
"name": "width",
"value": "14"
},
{
"name": "height",
"value": "8"
}
]
}
Replace
merchantId
,id
with your registered merchant account Id and marketplace generated unique product id.
This endpoint is to retrieve a product information.
HTTP Request
GET /marketplace-products/api/merchant/{merchantId}/{id}
URL Parameters
Parameter | Required | Description |
---|---|---|
merchantId | Yes | merchant unique id issued by qubyk marketplace |
id | Yes | unique product id generated by qubyk marketplace |
Update Product
curl --request PUT \
--url /merchant-products/api/products/{merchantId} \
--header 'Authorization: your-access-token' \
--header 'Content-Type: application/json' \
--data '{
"id":"02a6f431-2faf-4933-8af1-719b0dc37a56",
"merchantSku":"988232932",
"brand":"Gucci",
"name":"T-shirt with two button fly and a pocket",
"description":"This is an awesome T-Shirt",
"productCode":"1298472923",
"tags":["perfume"],
"size":"12",
"stock":9,
"location": "AU",
"currency": "USD",
"price":1,
"rrp":3,
"shipTime":1,
"categoryId": "3100013",
"image":[
"https://hellworld.com/image1.jpg"
],
"shipping": [
{
"countryCode":"US",
"shippingFee":1,
"addFee": 1.5
},
{
"countryCode": "DE",
"shippingFee": 13.5,
"addFee": 1.1
}
],
"meta": [
{
"name":"info",
"value": "ss"
}
]
}'
The above command returns a status 204 No Content if request is successful.
This endpoint is to update product information.
HTTP Request
POST /merchant-products/api/products/{merchantId}
Request Body (Json)
Parameter | Required | Description |
---|---|---|
merchantSku | Yes | The unique identifier that your system uses to recognize this product. It cannot be modified or updated |
brand | Yes | Brand or manufacturer of your product |
name | Yes | Name of the product as shown to shoppers on qubyk marketplace |
description | Yes | Description of the product. Text shouldn't contain any code or HTML. Add "\n" for a new line use |
productCode | Yes | Valid UPC or EAN code. No text characters are allowed |
tags | Yes | Comma separated list of strings that describe the product. Any tags past 10 will be ignored |
size | Yes | The size of the product |
stock | Yes | The physical quantities you have for this product |
location | Yes | Product location such as Melbourne or Australia |
currency | Yes | Currency type (AUD,USD or GBP) for price, rrp and shipping fees |
price | Yes | The price of the variation when the user purchases one |
rrp | Yes | Manufacturer's Suggested Retail Price |
categoryId | Yes | CategoryId of product by its type. See link text |
image | Yes | Comma separated list of image urls of a product. Max 15 images allowed per product. |
shipTime | Yes | Minimum no of days requried to dispatch the order and cannot be less than 1 |
shipping | Yes | Comma separated shipping objects with country code and shipping price. See Shipping Entity for parameters list |
meta | No | Comma separated meta objects to add additional information to describe the product such as length, width, origin etc |
Required parameters for Shipping Entity
Parameter | Required | Description |
---|---|---|
countryCode | Yes | Two letter country code |
shippingFee | Yes | Shipping fee for each country |
addFee | Yes | Additional fee for every additional quantity of an item |
(Optional) Meta entity can be optional, however, below fields are required in case it sent in add request. If it used the key values will be dynamically generated in our store front.
A maximum of 10 meta objects can be added for each product
Parameter | Required | Description |
---|---|---|
name | Yes | name of the field. Ex: length |
value | Yes | value for the field. Ex: 10m |
Update Price Stock
curl --request PUT \
--url /merchant-products/api/products/pricestock/{merchantId} \
--header 'Authorization: your-access-token' \
--header 'Content-Type: application/json' \
--data '{
"id": "2754642c-ed86-4227-9768-2c73fa5fc844",
"merchantSku": "100389",
"stock": 0,
"currency": "AUD",
"price": 15,
"rrp": 19
}'
The above command returns HTTP status 204 No Content if request is successful.
This end point is used to update pice and stock levels of a single product.
HTTP Request
PUT /merchant-products/api/products/pricestock/{merchantId}
Request Body (Json)
Parameter | Required | Description |
---|---|---|
id | Yes | unique product id created entire to qubyk marketplace |
merchantSku | Yes | The unique identifier that your system uses to recognize this product. |
stock | Yes | The physical quantities you have for this product |
currency | Yes | Currency type (AUD,USD or GBP) for price, rrp and shipping fees |
price | Yes | The price of the variation when the user purchases one |
rrp | Yes | Manufacturer's Suggested Retail Price |
Update Shipping
curl --request PUT \
--url /merchant-products/api/products/shipping/{merchantId} \
--header 'Authorization: your-access-token' \
--header 'Content-Type: application/json' \
--data '{
"id":"00126df4-5c48-449e-9466-f4d9c3d735fb",
"merchantSku":"23256756",
"shipping":[
{
"countryCode":"AU",
"shippingFee": 40,
"addFee": 5.5
},
{
"countryCode":"US",
"shippingFee": 10,
"addFee": 3.15
}
]
}'
The above command returns HTTP status 204 No Content if request is successful.
This end point is used to update shipping countries and cost. Previously set shipping options or prices will be replaced with current values.
Note: It is assumed the shipping costs are of currency specified in Add Product, Update Product or Update Price Stock requests.
HTTP Request
PUT /merchant-products/api/products/shipping/{merchantId}
Request Body (Json)
Parameter | Required | Description |
---|---|---|
id | Yes | unique product id created entire to qubyk marketplace |
merchantSku | Yes | The unique identifier that your system uses to recognize this product. |
shipping | Yes | Comma separated shipping objects with country code and shipping price. See Shipping Entity for parameters list. Any previous shipping prices will overwrite with current shipping values. |
Required parameters for Shipping Entity
Parameter | Required | Description |
---|---|---|
countryCode | Yes | Two letter country code |
shippingFee | Yes | Shipping fee for each country |
addFee | Yes | Additional fee for every additional quantity of an item |
Delete Product
curl --location --request DELETE '/merchant-products/api/products/{merchantId}/{id}' \
--header 'Authorization: your-access-token'
The above command returns HTTP status 204 No Content if request is successful.
This end point is used to delete a product
HTTP Request
DELETE /merchant-products/api/products/{merchantId}/{id}
Get All Categories
curl --request GET \
--url /store/api/categories \
--header 'Authorization: your-access-token'
The above command returns JSON structured like this:
[
{
"categoryId": 1000001,
"category": "women",
"subCat": "clothing",
"childCat": "dresses-and-jumpsuits",
"isEnabled": true
},
{
"categoryId": 1000002,
"category": "women",
"subCat": "clothing",
"childCat": "tops-and-bodies",
"isEnabled": true
}
]
This endpoint is to retrieve a qubyk marketplace categories list.
HTTP Request
GET /store/api/categories
Product Variations
Add Variation
curl --location --request POST '/merchant-products/api/product-variation/{{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: your-access-token' \
--data-raw '{
"merchantSku": "100074",
"variationSku": "100074-c",
"currency": "usd",
"price": 16.99,
"rrp": 45.04,
"stock": 20,
"attributes": "color:red|size:150ml|perfume:Spray"
}'
The above command returns a status 201 Created if request is successful.
Replace
merchantId
with your registered merchant account Id from your Merchant Portal.
This endpoint creates a new product variation with given attributes in example request.
HTTP Request
POST /merchant-products/api/products/{merchantId}
URL Parameters
Parameter | Required | Description |
---|---|---|
merchantId | Yes | unique id created entire to qubyk marketplace |
Request Body (Json)
Parameter | Required | Description |
---|---|---|
merchantSku | Yes | The unique identifier that your system uses to recognize this product |
variationSku | Yes | Unique identifier for your variation product |
currency | Yes | Currency type (AUD,USD or GBP) for price, rrp and shipping fees |
price | Yes | The price of the variation when the user purchases one |
rrp | Yes | Manufacturer's Suggested Retail Price |
stock | Yes | The physical quantities you have for this product |
attributes | Yes | Variation attributes such as color, size, or perfume type. The order of these attributes should be same for other product variations to enable cascading selections. Up to 5 attributes are allowed for each product. |
Update Product Variation
curl --location --request PUT '/merchant-products/api/product-variation/{merchantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: your-access-token' \
--data-raw '{
"merchantSku": "100074",
"variationSku": "100074-c",
"currency": "usd",
"price": 16.99,
"rrp": 45.04,
"stock": 20,
"attributes": "color:red|size:200ml|perfume:Spray"
}'
The above command returns a status 202 Accepted if request is successful.
This endpoint is to update product variation information.
HTTP Request
PUT /merchant-products/api/product-variation/{merchantId}
Request Body (Json)
Parameter | Required | Description |
---|---|---|
merchantSku | Yes | The unique identifier that your system uses to recognize this product |
variationSku | Yes | Unique identifier for your variation product |
currency | Yes | Currency type (AUD,USD or GBP) for price, rrp and shipping fees |
price | Yes | The price of the variation when the user purchases one |
rrp | Yes | Manufacturer's Suggested Retail Price |
stock | Yes | The physical quantities you have for this product |
attributes | Yes | Variation attributes such as color, size, or perfume type. The order of these attributes should be same for other product variations to enable cascading selections. Up to 5 attributes are allowed for each product. |
Delete Product Variation
curl --location --request DELETE '/merchant-products/api/product-variation/{merchantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: your-access-token' \
--data-raw '{
"merchantSku": "100074",
"variationSku": "100074-c"
}'
The above command returns HTTP status 204 No Content if request is successful.
This end point is used to delete a product variation for a given product.
HTTP Request
DELETE /merchant-products/api/product-variation/{merchantId}
Request Body (Json)
Parameter | Required | Description |
---|---|---|
merchantSku | Yes | The unique identifier that your system uses to recognize this product. |
variationSku | Yes | Unique identifier for your variation product |
Orders
Get Order
curl --request GET \
--url /merchant-orders/orders/{merchantId}/{orderId} \
--header 'Authorization: your-auth-token' \
--header 'Content-Type: application/json'
The above command returns JSON structured like this:
{
"status": "Success",
"data": {
"created": "2020-06-24T00:26:51.3218063Z",
"updated": "2020-06-24T00:26:51.3218074Z",
"id": "23f62af4-d3ac-48f2-a4dc-b9f5b97aafa4",
"merchantId": "ba9181ae-f478-4ddb-8957-7559f157be81",
"email": "[email protected]",
"orderStatus": "Approved",
"shippingAddress": {
"title": "Mr",
"firstName": "John",
"lastName": "Doe",
"street": "Harbour Esp",
"suburb": "Docklands",
"state": "VIC",
"postcode": "3008",
"country": "AU",
"phone": "098765432",
"company": "My company"
},
"billingAddress": {
"title": "Mr",
"firstName": "John",
"lastName": "Doe",
"street": "Harbour Esp",
"suburb": "Docklands",
"state": "VIC",
"postcode": "3008",
"country": "AU",
"phone": "098765432",
"company": "My company"
},
"currency": "aud",
"orderTotal": 23.04,
"shippingCost": 47.43,
"isTrackingConfirmed": false,
"items": [
{
"id": "dfc30675-7962-4cc1-9c1f-54f7989709cb",
"merchantSku": "100818",
"stock": 2,
"currency": "aud",
"price": 6.14,
"rrp": 13.48,
"discount": 0,
"shippingCost": 18.24,
"trackingNo": null,
"courier": null,
"isTrackingConfirmed": false,
"isCancelled": false,
"shipmentDate": null
},
{
"id": "480db69b-871e-46db-b369-1b63219b9726",
"merchantSku": "100963",
"stock": 7,
"currency": "aud",
"price": 16.9,
"rrp": 40.86,
"discount": 0,
"shippingCost": 29.19,
"trackingNo": "DL234523411L1",
"courier": "DHL",
"isTrackingConfirmed": false,
"isCancelled": false,
"shipmentDate": "2020-06-18T02:52:21.3068285Z"
}
]
}
}
Replace
merchantId
with your registered merchant account Id from your Merchant Portal.
This endpoint creates a new product with given attributes in example request.
HTTP Request
GET /merchant-orders/orders/{merchantId}/{orderId}
URL Parameters
Parameter | Required | Description |
---|---|---|
merchantId | Yes | unique merchantId issued by qubyk marketplace |
orderId | Yes | unique order id |
All Orders
curl --location --request POST '/merchant-orders/orders/all' \
--header 'Authorization: your-access-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "{merchantId}",
"startDate": "2020-06-18",
"endDate": "2020-06-19"
}'
The above command returns JSON structured like this:
{
"status": "Success",
"data": [
{
"created": "2020-06-24T00:26:51.3218063Z",
"updated": "2020-06-24T00:26:51.3218074Z",
"id": "23f62af4-d3ac-48f2-a4dc-b9f5b97aafa4",
"merchantId": "ba9181ae-f478-4ddb-8957-7559f157be81",
"email": "[email protected]",
"orderStatus": "Cancelled",
"shippingAddress": {
"title": "Mr",
"firstName": "John",
"lastName": "Doe",
"street": "Harbour Esp",
"suburb": "Docklands",
"state": "VIC",
"postcode": "3008",
"country": "GB",
"phone": "098765432",
"company": "test company"
},
"billingAddress": {
"title": "Mr",
"firstName": "John",
"lastName": "Doe",
"street": "Harbour Esp",
"suburb": "Docklands",
"state": "VIC",
"postcode": "3008",
"country": "GB",
"phone": "098765432",
"company": "test company"
},
"currency": "aud",
"orderTotal": 18.92,
"shippingCost": 33.82,
"isTrackingConfirmed": false,
"items": [
{
"id": "480db69b-871e-46db-b369-1b63219b9726",
"merchantSku": "100963",
"stock": 2,
"currency": "aud",
"price": 16.66,
"rrp": 40.29,
"discount": 0,
"shippingCost": 17.99,
"isTrackingConfirmed": false,
"isCancelled": false
},
{
"id": "303d8bf4-97b0-4b0d-a09c-34dba7ead9d5",
"merchantSku": "100837",
"stock": 1,
"currency": "aud",
"price": 2.26,
"rrp": 16.52,
"discount": 0,
"shippingCost": 15.83,
"isTrackingConfirmed": false,
"isCancelled": false
}
]
},
{
"created": "2020-06-24T00:26:51.3218063Z",
"updated": "2020-06-24T00:26:51.3218074Z",
"id": "23f62af4-d3ac-48f2-a4dc-b9f5b97aafa4",
"merchantId": "ba9181ae-f478-4ddb-8957-7559f157be22",
"email": "[email protected]",
"orderStatus": "Approved",
"shippingAddress": {
"title": "Mr",
"firstName": "John",
"lastName": "Doe",
"street": "Harbour Esp",
"suburb": "Docklands",
"state": "VIC",
"postcode": "3008",
"country": "AU",
"phone": "098765432",
"company": "My company"
},
"billingAddress": {
"title": "Mr",
"firstName": "John",
"lastName": "Doe",
"street": "Harbour Esp",
"suburb": "Docklands",
"state": "VIC",
"postcode": "3008",
"country": "AU",
"phone": "098765432",
"company": "My company"
},
"currency": "aud",
"orderTotal": 23.04,
"shippingCost": 47.43,
"isTrackingConfirmed": false,
"items": [
{
"id": "dfc30675-7962-4cc1-9c1f-54f7989709cb",
"merchantSku": "100818",
"stock": 2,
"currency": "aud",
"price": 6.14,
"rrp": 13.48,
"discount": 0,
"shippingCost": 18.24,
"trackingNo": "DL234523411LO",
"courier": "DHL",
"isTrackingConfirmed": false,
"isCancelled": false,
"shipmentDate": "2020-06-18T02:47:37.4987736Z"
},
{
"id": "480db69b-871e-46db-b369-1b63219b9726",
"merchantSku": "100963",
"stock": 7,
"currency": "aud",
"price": 16.9,
"rrp": 40.86,
"discount": 0,
"shippingCost": 29.19,
"trackingNo": "DL234523411L1",
"courier": "DHL",
"isTrackingConfirmed": false,
"isCancelled": false,
"shipmentDate": "2020-06-18T02:52:21.3068285Z"
}
]
}
]
}
Replace
merchantId
with your registered merchant account Id.
This endpoint is to retrieve all orders within a date range.
HTTP Request
POST /merchant-orders/orders/all
Request Body (Json)
Parameter | Required | Description |
---|---|---|
merchantId | Yes | Unique merchantId issued by qubyk marketplace |
startDate | Yes | Date range format yyyy-MM-dd |
endDate | Yes | Date range format yyyy-MM-dd |
Note: All orders are created based on UTC time
Dispatch Order
curl --request PUT \
--url /merchant-orders/orders/dispatch \
--header 'Authorization: your-access-token' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "aa69d76e-684b-43e0-b799-6ce845d47818",
"merchantId": "ba9181ae-f478-4ddb-8957-7539f157be82",
"merchantSku": "100363",
"variationSku": "100363-a",
"courier": "DHL",
"trackingNo": "DL234523411AU"
}'
The above command returns a status 202 Accepted if request is successful with relevant responses.
On Success
{
"status": "Success"
}
On Error
{
"status": "Failed",
"message": "Cannot updated multiple times"
}
This endpoint is to update product information.
HTTP Request
POST /merchant-orders/orders/dispatch
Request Body (Json)
Parameter | Required | Description |
---|---|---|
orderId | Yes | Order id returned from All Orders request |
merchantId | Yes | Unique merchantId issued by qubyk marketplace |
merchantSku | Yes | The unique identifier that your system uses to recognize your product |
variationSku | No | Unique identifier for your main product variation. Use only when the order item is a variation |
courier | Yes | Courier company name |
trackingNo | Yes | Tracking no issued by your courier company |
Cancel Order
curl --request POST \
--url /merchant-orders/orders/action/cancel \
--header 'Authorization: your-access-token' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "be50a00c-0756-4817-ac65-526627a0dbe4",
"merchantId": "{merchantId}"
}'
The above command returns HTTP status 200 No Content if request is successful.
On Success
{
"status": "Success",
"data": {
"id": "23f62af4-d3ac-48f2-a4dc-b9f5b97aafa4",
"orderStatus": "Cancelled",
"orderTotal": 0,
"shippingCost": 0
}
}
On Error
{
"status": "Failed",
"message": "Invalid request"
}
This end point is used to cancel entire order.
HTTP Request
POST /merchant-orders/orders/action/cancel
Request Body (Json)
Parameter | Required | Description |
---|---|---|
orderId | Yes | Unique order id returned from All Orders request |
merchantId | Yes | Unique merchant Id issued by Qubyk Marketplace |
Errors
The Qubyk Marketplace API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The API requested is hidden for administrators only. |
404 | Not Found -- The specified API could not be found. |
405 | Method Not Allowed -- You tried to access a API with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't json. |
410 | Gone -- The API requested has been removed from our servers. |
418 | I'm a teapot. |
429 | Too Many Requests -- You're requesting too many APIs! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |