NAV
shell

Introduction

Graas Developer Experience

Manage multiple channel selling with Graas robust APIs. Open the door for multiple marketplaces such as eBay, Amazon, Lazada, Qoo10...

Welcome to the Graas API! You can use our API to access Graas API endpoints, which can get information on inventory and orders that are present on our system.

We have language bindings in Shell, Ruby, and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

This API documentation page was created by Graas Team. Feel free to send feedback to developer@graas.ai for any query.

Authentication

To authorize, use this code:

require 'kittn'

api = Kittn::APIClient.authorize!('meowmeowmeow')
import kittn

api = kittn.authorize('meowmeowmeow')
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"

Make sure to replace secret with your APP key.

Graas uses APP keys to allow access to the developer APIs. To register your applicaion with us, please send an email to developer@graas.ai .

Graas expects APP key and seller account number to be included in all API requests to the server in the header that looks like the following:

accountNumber: <seller account number >

appKey: <Application key given to you >

Fields

Amount

All amount fields in SiA is using the below format amount

Field Meaning
amount Example if the amount is 10.99 it will be demoted as 1099
Currency code Example SGD, IDR, INR, USD ...

Create account

Kartrocket

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.inventory.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.inventory.get(2)
                
            

curl "https://api./v1/accounts/channels/kartrocket"
  -H "Content-Type: application/json"
  -H "appKey: 2121212121"

Request payload:

            
{
  "SELLinALLId": "testkartrocket@gmail.com",
  "name": "user name",
  "phoneNumber": "+915464645423",
  "kartrocket": {
    "kartrocketApiKey": "1f0e3dad99908345f7439f8ffabdffc4",
    "kartrocketWebUrl": "http://testaccount.kartrocket.co"
  }
}
            
            

Response payload:

                           
{
  "accountNumber": "5a4e44b3a67a6d000489e5a8",
  "status": "success",
  "url": "https://dev.sellonall.com/Dashboard/signup/index.html?userId=5a4e44b4e4b0b058034e7975&accountNumber=5a4e44b3a67a6d000489e5a8&isTrusted=true",
  "responseMessage": "Your account creation request has been successful. Fill the password and complete the registration."
}
            
            

Create Graas account and add kartrocket account

HTTP Request

POST https://api./v1/accounts/channels/kartrocket

Error message

Error message Meaning
failure The request might not be in correct format.

Request parameters

Field Type Description
SELLinALLId String User email ID
name String User name
phoneNumber int Phone number
pricingCategory String T - Trial account, P - Premium account
kartrocket Object
"kartrocket": {
  "kartrocketApiKey": "1f0e3dad99908345f7439f8ffabdffc4",
  "kartrocketWebUrl": "http://testaccount.kartrocket.co"
}
  • kartrocketApiKey :The kartrocket API KEY
  • kartrocketWebUrl :The kartrocket web URL

Lazada

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.inventory.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.inventory.get(2)
                
            

curl "https://api./v1/accounts/channels/lazada"
  -H "Content-Type: application/json"
  -H "appKey: 2121212121"

Request payload:

            
{
  "GraasId": "testlazada@gmail.com",
  "name": "new account112",
  "phoneNumber": "+915464645423",
  "pricingCategory":"T",
  "lazada": {
    "userID": "abc",
    "apikey": "abcdef",
    "countryCode":"SG"
  }
}
            
            

Response payload:

                           
{
  "accountNumber": "5a4e46e7a67a6d000489e5ae",
  "status": "success",
  "url": "https://dev.sellonall.com/Dashboard/signup/index.html?userId=5a4e46e7e4b0b058034e7978&accountNumber=5a4e46e7a67a6d000489e5ae&isTrusted=true",
  "responseMessage": "Your account creation request has been successful. Fill the password and complete the registration."
}
            
            

Create Graas account and add lazada account

HTTP Request

POST https://api./v1/accounts/channels/lazada

Error message

Error message Meaning
failure The request might not be in correct format.

Request parameters

Field Type Description
SELLinALLId String User email ID
name String User name
phoneNumber int Phone number
pricingCategory String T - Trial account, P - Premium account
lazada Object
"lazada": {
  "userID": "abc",
  "apikey": "abcdef"
  "countryCode": "SG"
}
  • userID: The user id given by lazada
  • apikey: The apikey given by lazada
  • countryCode: The accepted country codes are SG, ID, MY, PH, TH.

Product Master

Create

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.inventory.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.inventory.get(2)
                
            

curl "https://api./v1/productMaster/item"
  -H "Content-Type: application/json"
  -H "appKey: 4c6a4356-345c-4d85-b0cf-ba74ba6hg9d4a"
  -H "accountNumber: 12121212121212121"

Request payload:

            
{
  "sellerSKU": "abcd",
  "productID": "Inventory01",
  "itemTitle": "100% Pure Cotton Baby Boy Girl Romper Summer Short Sleeved Cartoon Jumpsuit",
  "shortDescription": "short description",
  "itemDescription": "item description",
  "itemTitle_thTH": "ผ้าฝ้ายแท้ 100% เด็กทารกสาว Romper ฤดูร้อนการ์ตูน Jumpsuit แขนสั้น",
  "shortDescription_thTH": "คำอธิบายสั้น",
  "itemDescription_thTH": "รายละเอียดสินค้า",
  "imageURLs": [
    "https://images.grass.ai/uploads/FMT/Shinmudra-U-FMT0002470/3.jpeg",
    "https://images.graas.ai/uploads/FMT/Shinmudra-U-FMT0002470/3.jpeg"
  ],
  "sizeChartImageURL": "https://images.graas.ai/uploads/FMT/Shinmudra-U-FMT0002470/3.jpeg",
  "quantities": [
    {
      "warehouseID": "satsaco-1",
      "quantity": 30
    },
    {
      "warehouseID": "infor-1",
      "quantity": 25
    }
  ],
  "price": [
    {
      "currencyCode": "SGD",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "SGD"
      },
      "salePrice": {
        "amount": 10000,
        "currencyCode": "SGD"
      }
    },
    {
      "currencyCode": "USD",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "USD"
      },
      "salePrice": {
        "amount": 11000,
        "currencyCode": "USD"
      }
    },
    {
      "currencyCode": "MYR",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "MYR"
      },
      "salePrice": {
        "amount": 11000,
        "currencyCode": "MYR"
      }
    }
  ],
  "variantAttributes": [
    {
      "key": "color-family",
      "value": "blue"
    },
    {
      "key": "Size",
      "value": "XL"
    },
    {
      "key_thTH": "สีของครอบครัว",
      "value_thTH": "สีน้ำเงิน"
    },
    {
      "key_thTH": "ขนาด",
      "value_thTH": "XL"
    }
  ],
  "otherAttributes": [
    {
      "key": "gender",
      "values": [
        "Male"
      ]
    },
    {
      "key": "brand",
      "values": [
        "PUMA"
      ]
    },
    {
      "key": "tags",
      "values": [
        "mobile",
        "back case"
      ]
    },
    {
      "key_thTH": "เพศ",
      "values_thTH": [
        "ชาย"
      ]
    },
    {
      "key_thTH": "ยี่ห้อ",
      "values_thTH": [
        "PUMA"
      ]
    },
    {
      "key_thTH": "แท็ก",
      "values_thTH": [
        "โทรศัพท์มือถือ",
        "กรณีหลัง"
      ]
    }
  ],
  "packageLengthInCM": 10,
  "packageWidthInCM": 10,
  "packageHeightInCM": 10,
  "packageWeightInKG": 1
}
            
            

Response payload:

             
SUCCESS:

HTTP status: 201 CREATED

FAILURE:

HTTP status: 400

{
    "errorMessage": "sellerSku : fxlm already exists"
}

            
            

Create product master

HTTP Request

POST https://api./v1/productMaster/item

Request parameters

Field Type Required Description
sellerSKU String Yes The product SKU (stock keeping unit) is an identifier defined by a seller. This will be assigned to the product while listing to marketplaces
productID String Yes A productID defined by seller for the group for related skus. It is used to group the products while listing as variants.
itemTitle String Yes The title of the product
shortDescription String No Highlights of the product.
itemDescription String Yes Description of the product
itemTitle_thTH String No The title of the product in thai language
  • thTH: Combination of thai language code and Thailand countryCode in ISO standard
  • Language code: Should be in smaller case
  • Country code: Should be in upper case
  • Please refer ISO language codes and country codes
shortDescription_thTH String No Highlights of the product in thai language
itemDescription_thTH String No Description of the product in thai language
imageURLs Array Yes The image URLs of the product
sizeChartImageURL String No The SizeChartImage URL of the product
quantities Array Yes
quantities": [
    {
      "warehouseID": "satsaco-1",
      "quantity": 30
    },
    {
      "warehouseID": "infor-1",
      "quantity": 25
    }
  ]
Quantities based on warehouse
  • warehouseID: Use the warehouseIDs linked to SiA. Default warehouseID value is MyStock-1
price Array Yes
"price": [
    {
      "currencyCode": "SGD",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "SGD"
      },
      "salePrice": {
        "amount": 10000,
        "currencyCode": "SGD"
      }
    },
    {
      "currencyCode": "USD",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "USD"
      },
      "salePrice": {
        "amount": 11000,
        "currencyCode": "USD"
      }
    }
  ]
The price of the product in different currencies.
  • currencyCode: It should be unique in each object in the array. The retailPrice and salePrice is assigned based on the currencyCode in each object.
variantAttributes Array no
"variantAttributes": [
    {
      "key": "color-family",
      "value": "blue"
    },
    {
      "key": "Size",
      "value": "XL"
    },
    {
      "key_thTH": "สีของครอบครัว",
      "value_thTH": "สีน้ำเงิน"
    },
    {
      "key_thTH": "ขนาด",
      "value_thTH": "XL"
    }
  ]
The variant details of the product, this field is required, if the item belongs to variation.
  • key: represents variant name like color, size.
  • value: represent variant value like red, xl.
otherAttributes Array no
"otherAttributes": [
    {
      "key": "gender",
      "values": [
        "Male"
      ]
    },
    {
      "key": "brand",
      "values": [
        "PUMA"
      ]
    },
    {
      "key": "tags",
      "values": [
        "mobile",
        "back case"
      ]
    },
    {
      "key_thTH": "เพศ",
      "values_thTH": [
        "ชาย"
      ]
    },
    {
      "key_thTH": "ยี่ห้อ",
      "values_thTH": [
        "PUMA"
      ]
    },
    {
      "key_thTH": "แท็ก",
      "values_thTH": [
        "โทรศัพท์มือถือ",
        "กรณีหลัง"
      ]
    }
  ]
All common attributes of products.
  • key: It is an attribute name
  • values It must contain atleast one value
packageLenthInCM String Yes Package length. The unit is cm
packageWidthInCM String Yes Package width. The unit is cm
packageHeightInCM String Yes Package height. The unit is cm
packageWeightInKG String Yes Package weight. The unit is kg

Update

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.inventory.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.inventory.get(2)
                
            

curl "https://api./v1/productMaster/item"
  -H "Content-Type: application/json"
  -H "appKey: 4c6a4356-345c-4d85-b0cf-ba74ba6hg9d4a"
  -H "accountNumber: 12121212121212121"

Request payload:

            
Example payload 1:

{
  "sellerSKU": "abcd",
  "itemTitle": "100% Pure Cotton Sleeved Cartoon Jumpsuit",
  "shortDescription": "new short description"
}

Example payload 2:

{
  "sellerSKU": "abcd",
  "quantities": [
    {
      "warehouseID": "satsaco-1",
      "quantity": 5
    },
    {
      "warehouseID": "infor-1",
      "quantity": 4
    }
  ]
}


Example payload 3:

{
  "sellerSKU": "abcd",
  "productID": "Inventory01",
  "itemTitle": "100% Pure Cotton Baby Boy Girl Romper Summer Short Sleeved Cartoon Jumpsuit",
  "shortDescription": "short description",
  "itemDescription": "Test product",
  "imageURLs": [
    "https://images.graas.ai/uploads/FMT/Shinmudra-U-FMT0002470/3.jpeg",
    "https://images.graas.ai/uploads/FMT/Shinmudra-U-FMT0002470/3.jpeg"
  ],
  "quantities": [
    {
      "warehouseID": "satsaco-1",
      "quantity": 30
    },
    {
      "warehouseID": "infor-1",
      "quantity": 25
    }
  ],
  "price": [
    {
      "currencyCode": "SGD",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "SGD"
      },
      "salePrice": {
        "amount": 10000,
        "currencyCode": "SGD"
      }
    },
    {
      "currencyCode": "USD",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "USD"
      },
      "salePrice": {
        "amount": 11000,
        "currencyCode": "USD"
      }
    },
    {
      "currencyCode": "MYR",
      "retailPrice": {
        "amount": 12000,
        "currencyCode": "MYR"
      },
      "salePrice": {
        "amount": 11000,
        "currencyCode": "MYR"
      }
    }
  ],
  "variantAttributes": [
    {
      "key": "color-family",
      "value": "blue"
    },
    {
      "key": "Size",
      "value": "XL"
    }
  ],
  "otherAttributes": [
    {
      "key": "gender",
      "values": [
        "Male"
      ]
    },
    {
      "key": "brand",
      "values": [
        "PUMA"
      ]
    },
    {
      "key": "tags",
      "values": [
        "mobile",
        "back case"
      ]
    },
    {
      "key": "sizeChartImage",
      "values": [
        "https://images.graas.ai/uploads/FMT/Shinmudra-U-FMT0002470/3.jpeg"
      ]
    }
  ],
  "packageLengthInCM": 10,
  "packageWidthInCM": 10,
  "packageHeightInCM": 10,
  "packageWeightInKG": 1
}
            
            

Response payload:

                           
SUCCESS:

HTTP status: 200 OK

FAILURE:

HTTP status: 404

{
    "errorMessage": "sellerSku : fxlm not found"
}
            
            

Update product master

HTTP Request

PUT https://api./v1/productMaster/item

Request parameters

Field Type Required Description
sellerSKU String Yes The sellerSKU of product master needs to be updated
Send atleast one of the remaining field while updating product master. Rest of the fields are optional. Please refer example payload.

Bulk quantity update

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.inventory.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.inventory.get(2)
                
            

curl "https://api./v1/productMaster/quantitiesList"
  -H "Content-Type: application/json"
  -H "appKey: 4c6a4356-345c-4d85-b0cf-ba74ba6hg9d4a"
  -H "accountNumber: 5dd3dad95c11180004117c4d1"

Request payload:

            
Example payload:

{
  "data": [
    {
      "sellerSKU": "productmasterA",
      "quantities": [
        {
          "quantity": 30,
          "warehouseID": "satsaco-1"
        },
        {
          "quantity": 31,
          "warehouseID": "MyStock-1"
        }
      ]
    },
    {
      "sellerSKU": "productmasterB",
      "quantities": [
        {
          "quantity": 32,
          "warehouseID": "satsaco-1"
        },
        {
          "quantity": 33,
          "warehouseID": "infor-1"
        }
      ]
    },
    {
      "sellerSKU": "productmasterC",
      "quantities": [
        {
          "quantity": 32,
          "warehouseID": "MyStock-1"
        }
      ]
    }
  ]
}
            
            

Response payload:

                           
{
  "result": [
    {
      "sellerSKU": "productmasterA",
      "status": "success",
      "updatedQuantity": [
        {
          "warehouseID": "satsaco-1",
          "quantity": 30
        },
        {
          "warehouseID": "MyStock-1",
          "quantity": 31
        }
      ],
      "httpCode": 200
    },
    {
      "sellerSKU": "productmasterB",
      "status": "failure",
      "httpCode": 400
    },
    {
      "sellerSKU": "productmasterC",
      "updatedQuantity": [
        {
          "quantity": 32,
          "warehouseID": "MyStock-1"
        }
      ],
      "httpCode": 200
    }
  ]
}
            
            

Bulk quantity update

HTTP Request

PUT https://api./v1/productMaster/quantitiesList

Request parameters

Field Type Required Description
sellerSKU String Yes The sellerSKU of product master needs to be updated
quantities Array Yes
quantities": [
    {
      "warehouseID": "satsaco-1",
      "quantity": 30
    },
    {
      "warehouseID": "infor-1",
      "quantity": 25
    }
  ]
Quantities based on warehouse
  • warehouseID: Use the warehouseIDs linked to SiA. Default warehouseID value is MyStock-1
  • quantity: Quantity to be updated

Bulk quantityDiff update

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.inventory.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.inventory.get(2)
                
            

curl "https://api./v1/productMaster/quantityDiffList"
  -H "Content-Type: application/json"
  -H "appKey: 4c6a4356-345c-4d85-b0cf-ba74ba6hg9d4a"
  -H "accountNumber: 5dd3dad95c11180004117c4d1"

Request payload:

            
Example payload:

{
  "data": [
    {
      "sellerSKU": "productmasterA",
      "quantityDiffs": [
        {
          "quantityDiff": 3,
          "warehouseID": "satsaco-1"
        },
        {
          "quantityDiff": 1,
          "warehouseID": "MyStock-1"
        }
      ]
    },
    {
      "sellerSKU": "productmasterB",
      "quantityDiffs": [
        {
          "quantityDiff": 3,
          "warehouseID": "satsaco-1"
        },
        {
          "quantityDiff": 3,
          "warehouseID": "infor-1"
        }
      ]
    },
    {
      "sellerSKU": "productmasterC",
      "quantityDiffs": [
        {
          "quantityDiff": 2,
          "warehouseID": "MyStock-1"
        }
      ]
    }
  ]
}
            
            

Response payload:

                           
{
  "result": [
    {
      "sellerSKU": "productmasterA",
      "status": "success",
      "updatedQuantity": [
        {
          "warehouseID": "satsaco-1",
          "quantity": 33
        },
        {
          "warehouseID": "MyStock-1",
          "quantity": 32
        }
      ],
      "httpCode": 200
    },
    {
      "sellerSKU": "productmasterB",
      "status": "failure",
      "httpCode": 400
    },
    {
      "sellerSKU": "productmasterC",
      "updatedQuantity": [
        {
          "quantity": 35,
          "warehouseID": "MyStock-1"
        }
      ],
      "httpCode": 200
    }
  ]
}
            
            

Bulk quantity update

HTTP Request

PUT https://api./v1/productMaster/quantityDiffList

Request parameters

Field Type Required Description
sellerSKU String Yes The sellerSKU of product master needs to be updated
quantityDiff Array Yes
quantityDiffs": [
        {
          "quantityDiff": 3,
          "warehouseID": "satsaco-1"
        },
        {
          "quantityDiff": 1,
          "warehouseID": "MyStock-1"
        }
  ]
Quantities based on warehouse
  • warehouseID: Use the warehouseIDs linked to SiA. Default warehouseID value is MyStock-1
  • quantityDiff: Quantity to be added to the existing inventory

Sales Order

Get Orders

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl "https://api./v1/orders?updatedAfter=1433390894&updatedBefore=1433563694&basicUnitCustomSKU=false&groupByCart=true&pageNumber=1&pageSize=200"
  -H "Content-Type: application/json"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"

Response payload:

            
{
  "numberOfPages": 1,
  "numberOfRecords": 3,
  "history": [
    {
      "site": {
        "name": "qoo10",
        "nickNameID": "qoo10-1"
      },
      "orderID": "227973300",
      "buyerDetails": {
        "name": "Hui",
        "email": "ram@graas.ai"
      },
      "orderNumber": "227973300",
      "orderItems": [
        {
          "orderItemID": "227973300",
          "SKU": "AIL0006416-01",
          "quantity": 12,
          "itemAmount": {
            "amount": 355,
            "currencyCode": "SGD"
          },
          "shippingAmount": {
            "amount": 390,
            "currencyCode": "SGD"
          },
          "orderType": "Delivery",
          "itemTitle": "[FNN] CARTON SALES COCOLIFE 100% COCONUT WATER 1L x 12",
          "settlementAmount": {
            "amount": 3962,
            "currencyCode": "SGD"
          },
          "imageURL": "http://images.graas.ai/uploads/AIL/Shinmudra-U-AIL0004892-01/thumbnail/1.jpg",
          "variantDetails": [
            {
              "title": "Type",
              "name": "Cocolife Coconut Water 1L x 12"
            }
          ],
          "customSKU": "8888200702977",
          "isOption": false,
          "categoryName": "Drinks & Sweets/Others/Others ## 300000931",
          "categoryID": "300000931"
        }
      ],
      "orderStatus": "INITIATED",
      "paymentStatus": "NOT_INITIATED",
      "shippingStatus": "NOT_SHIPPED",
      "orderAmount": {
        "amount": 4260,
        "currencyCode": "SGD"
      },
      "shippingDetails": {
        "address": {
          "name": "Hui",
          "street1": "*******airN*******",
          "street2": "Boon Keng",
          "phone": "+65*******1872",
          "postalCode": "32***60",
          "country": "SG"
        },
        "shippingTrackingDetails": {
          "airwayBill": "SGP95722039",
          "courierName": "Store Pickup",
          "remarks": "Get the order between 9 am and 12 pm.",
          "pickupVoucherCode": "1234567891***"
        }
      },
      "timeCreated": 1504588069,
      "timeLastUpdated": 1504588069,
      "timeOrderCreated": 1504587886,
      "shippingAmount": {
        "amount": 390,
        "currencyCode": "SGD"
      },
      "sellerDiscountAmount": {
        "amount": 900,
        "currencyCode": "SGD"
      },
      "channelDiscountAmount": {
        "amount": 0,
        "currencyCode": "SGD"
      },
      "cartNumber": "113054733",
      "invoiceNumber": "INV0000001",
      "documents": {
        "shippingLabelUrl": "https://docs.graas.ai/uploads/shippingLabels/AIL/qoo10-1/20033078YKWU3K.pdf"
      }
    },
    {
      "orderID": "34550403686697",
      "site": {
        "name": "lazada",
        "nickNameID": "lazada-1"
      },
      "buyerDetails": {
        "name": "Mark "
      },
      "channelDiscountAmount": {
        "amount": 0,
        "currencyCode": "SGD"
      },
      "invoiceNumber": "INV00012630",
      "orderAmount": {
        "amount": 5040,
        "currencyCode": "SGD"
      },
      "orderAmountInUSD": {
        "amount": 3622,
        "currencyCode": "USD"
      },
      "orderItems": [
        {
          "orderItemID": "34550403786697",
          "shopId": "Graas Store",
          "SKU": "AIL0000755",
          "shippingAmount": {
            "amount": 75,
            "currencyCode": "SGD"
          },
          "customSKU": "248HT-970S",
          "shopSKU": "OE702HLAA9L5OUSGAMZ-19159282",
          "quantity": 1,
          "itemAmount": {
            "amount": 2520,
            "currencyCode": "SGD"
          },
          "itemTitle": "Hotery Professional Chef's Torch",
          "sellerDiscountAmount": {
            "amount": 0,
            "currencyCode": "SGD"
          },
          "deliveryType": "Dropshipping",
          "shippingProviderType": "standard",
          "timeOrderCreated": 1594212698,
          "paymentStatus": "REFUNDED",
          "orderStatus": "CANCELLED",
          "shippingStatus": "NOT_SHIPPED",
          "imageURL": "http://images.graas.ai/uploads/AIL/Shinmudra-AIL0000755/thumbnail/1.jpeg",
          "isOption": false,
          "categoryName": "Outdoor & Garden:Outdoor:BBQ & Outdoor Dining:BBQ Accessories ## 10000792",
          "categoryID": "10000792",
          "itemSoldAmount": {
            "amount": 2520,
            "currencyCode": "SGD"
          }
        },
        {
          "orderItemID": "34550403886697",
          "shopId": "Graas Store",
          "SKU": "AIL0000755",
          "shippingAmount": {
            "amount": 74,
            "currencyCode": "SGD"
          },
          "customSKU": "248HT-970S",
          "shopSKU": "OE702HLAA9L5OUSGAMZ-19159282",
          "quantity": 1,
          "itemAmount": {
            "amount": 2520,
            "currencyCode": "SGD"
          },
          "itemTitle": "Hotery Professional Chef's Torch",
          "sellerDiscountAmount": {
            "amount": 0,
            "currencyCode": "SGD"
          },
          "deliveryType": "Dropshipping",
          "shippingProviderType": "standard",
          "timeOrderCreated": 1594212698,
          "paymentStatus": "COMPLETED",
          "orderStatus": "PROCESSING",
          "shippingStatus": "READY_TO_SHIP",
          "shippingTrackingDetails": {
            "airwayBill": "NLSGD10778330",
            "courierName": "Pickup: NinjaVanSG, Delivery: NinjaVan"
          },
          "imageURL": "http://images.graas.ai/uploads/AIL/Shinmudra-AIL0000755/thumbnail/1.jpeg",
          "isOption": false,
          "categoryName": "Outdoor & Garden:Outdoor:BBQ & Outdoor Dining:BBQ Accessories ## 10000792",
          "categoryID": "10000792",
          "itemSoldAmount": {
            "amount": 2520,
            "currencyCode": "SGD"
          }
        }
      ],
      "orderNumber": "34550403686697",
      "orderSoldAmount": {
        "amount": 5040,
        "currencyCode": "SGD"
      },
      "orderSoldAmountInUSD": {
        "amount": 3622,
        "currencyCode": "USD"
      },
      "orderStatus": "PROCESSING",
      "orderStatuses": [
        "CANCELLED",
        "PROCESSING"
      ],
      "paymentMethods": [
        "MIXEDCARD"
      ],
      "paymentStatus": "COMPLETED",
      "paymentStatuses": [
        "REFUNDED"
      ],
      "sellerDiscountAmount": {
        "amount": 0,
        "currencyCode": "SGD"
      },
      "shippingAmount": {
        "amount": 149,
        "currencyCode": "SGD"
      },
      "shippingDetails": {
        "address": {
          "name": "Mark",
          "street1": "****cNair********",
          "street2": "Boon Keng",
          "state": "Singapore",
          "city": "Singapore",
          "country": "Singapore",
          "phone": "***15818***",
          "postalCode": "32***60"
        },
        "shippingTrackingDetails": {
          "airwayBill": "NLSGD10778330",
          "courierName": "Pickup: NinjaVanSG, Delivery: NinjaVan"
        },
        "shippingTrackingDetailsList": [
          {
            "courierName": "Pickup: NinjaVanSG, Delivery: NinjaVan",
            "airwayBill": "NLSGD10778330"
          }
        ]
      },
      "shippingStatus": "READY_TO_SHIP",
      "shippingStatuses": [
        "READY_TO_SHIP",
        "NOT_SHIPPED"
      ],
      "documents": {
        "shippingLabelUrl": "https://docs.graas.ai/uploads/shippingLabels/AIL/lazada-1/34550403686697.pdf"
      },
      "timeCancelled": 1594212835,
      "timeCreated": 1594212836,
      "timeLastUpdated": 1594258354,
      "timeOrderCreated": 1594212698,
      "updateStatus": "COMPLETE",
      "updateStartTime": 1594258054
    },
    {
      "orderID": "7446703243474",
      "site": {
        "name": "lazada",
        "nickNameID": "lazada-1"
      },
      "buyerDetails": {
        "name": "Teena Sehgal Chadha"
      },
      "channelDiscountAmount": {
        "amount": 412,
        "currencyCode": "SGD"
      },
      "orderAmount": {
        "amount": 6280,
        "currencyCode": "SGD"
      },
      "orderAmountInUSD": {
        "amount": 4559,
        "currencyCode": "USD"
      },
      "orderItems": [
        {
          "orderItemID": "7446703643474",
          "shopId": "Graas Store",
          "shippingAmount": {
            "amount": 0,
            "currencyCode": "SGD"
          },
          "customSKU": "553256",
          "quantity": 1,
          "itemAmount": {
            "amount": 3490,
            "currencyCode": "SGD"
          },
          "itemTitle": "Jamie Oliver Round Baking Dish (Rustic Red)",
          "sellerDiscountAmount": {
            "amount": 0,
            "currencyCode": "SGD"
          },
          "deliveryType": "Own Warehouse",
          "shippingProviderType": "standard",
          "timeOrderCreated": 1540015389,
          "itemSoldAmount": {
            "amount": 3490,
            "currencyCode": "SGD"
          },
          "orderStatus": "RETURNED",
          "paymentStatus": "REFUNDED",
          "shippingStatus": "RETURNED",
          "shippingTrackingDetails": {
            "airwayBill": "NLRSG-10-9D981E6C6BD"
          }
        },
        {
          "orderItemID": "7446704343474",
          "shopId": "Graas Store",
          "shippingAmount": {
            "amount": 0,
            "currencyCode": "SGD"
          },
          "customSKU": "553228",
          "quantity": 1,
          "itemAmount": {
            "amount": 2790,
            "currencyCode": "SGD"
          },
          "itemTitle": "Jamie Oliver Terracotta Bowl (Rustic Red)",
          "sellerDiscountAmount": {
            "amount": 0,
            "currencyCode": "SGD"
          },
          "deliveryType": "Dropshipping",
          "shippingProviderType": "economy",
          "timeOrderCreated": 1540015389,
          "itemSoldAmount": {
            "amount": 2790,
            "currencyCode": "SGD"
          },
          "orderStatus": "DELIVERED",
          "paymentStatus": "COMPLETED",
          "shippingStatus": "DELIVERED",
          "shippingTrackingDetails": {
            "airwayBill": "NLSGD00782761",
            "courierName": "Pickup: SpeedPost, Delivery: NinjaVan"
          }
        }
      ],
      "orderNumber": "7446703243474",
      "orderSoldAmount": {
        "amount": 6280,
        "currencyCode": "SGD"
      },
      "orderSoldAmountInUSD": {
        "amount": 4559,
        "currencyCode": "USD"
      },
      "orderStatus": "DELIVERED",
      "paymentMethods": [
        "MIXEDCARD"
      ],
      "paymentStatus": "COMPLETED",
      "sellerDiscountAmount": {
        "amount": 0,
        "currencyCode": "SGD"
      },
      "shippingAmount": {
        "amount": 0,
        "currencyCode": "SGD"
      },
      "shippingDetails": {
        "address": {
          "name": "Teena Sehgal Chadha",
          "street1": "************ Nakhoda, Holland G***********",
          "street2": "",
          "city": "Singapore",
          "country": "Singapore",
          "phone": "65******3702",
          "postalCode": "25****2"
        },
        "shippingTrackingDetails": {
          "airwayBill": "NLSGD00782761",
          "courierName": "Pickup: SpeedPost, Delivery: NinjaVan"
        },
        "shippingTrackingDetailsList": [
          {
            "airwayBill": "NLSGD00782761",
            "courierName": "Pickup: SpeedPost, Delivery: NinjaVan"
          },
          {
            "airwayBill": "NLRSG-10-9D981E6C6BD"
          }
        ]
      },
      "documents": {
        "shippingLabelUrl": "https://docs.graas.ai/uploads/shippingLabels/AIL/lazada-1/34550403686697.pdf"
      },
      "shippingStatus": "DELIVERED",
      "timeCreated": 1564724322,
      "timeDelivered": 1564724322,
      "timeLastUpdated": 1564724322,
      "timeOrderCreated": 1540015389,
      "orderStatuses": [
        "DELIVERED",
        "RETURNED"
      ],
      "paymentStatuses": [
        "COMPLETED",
        "REFUNDED"
      ],
      "shippingStatuses": [
        "DELIVERED",
        "RETURNED"
      ]
    }
  ],
  "status": "success"
}
            
            

This endpoint retrieves orders, updated between the defined time intervals.

HTTP Request

GET https://api./v1/orders?updatedAfter=1433390894&updatedBefore=1433563694&basicUnitCustomSKU=false&groupByCart=true&pageNumber=1&pageSize=200

URL Parameters

Query Parameter Description
updatedAfter The start time(Unix time) for fetching updated orders
updatedBefore The end time(Unix time) to stop fetching updated orders
basicUnitCustomSKU (optional) True if you want the quantity of the items to be in basic unit.
groupByCart (optional) Group the orders based on cartNumber.
pageNumber (optional) The page number to return.
pageSize (optional) The number of orders to be returned per page.

Error message

Error message Meaning
Time Range is mandatory The time range, updatedAfter and updatedBefore might not be given in the request.

Order properties

Field Type Description
numberOfPages Integer
Total number of pages
numberOfRecords Integer
Total number of order records
history Array
List of orders
site Object
"site":{  
  "name":"qoo10",
  "nickNameID":"qoo10-1"
}    
  • name - Market place name
  • nickNameID - unique identifier of the market place for the seller
orderID String
"orderID": "227973300"
Unique identifier of an order
orderNumber String
"orderNumber": "227973300"
Unique identifier of an order
buyerDetails Object
"buyerDetails":{
  "name": "Victoria",
  "email": "victoryas7@live.com.sg"
}
  • name - Buyer name
  • email - Buyer email address.
orderItems Array
"orderItems": [
{
  "orderItemID": "227973300",
  "SKU": "BBB0006416-01",
  "quantity": 12,
  "itemAmount": {
    "amount": 355,
    "currencyCode": "SGD"
  },
  "shippingAmount": {
    "amount": 390,
    "currencyCode": "SGD"
  },
  "orderType": "Delivery",
  "itemTitle": "[FNN] CARTON SALES COCOLIFE 100% COCONUT WATER 1L x 12",
  "settlementAmount": {
    "amount": 3962,
    "currencyCode": "SGD"
  },
  "imageURL": "http://images.graas.ai/uploads/BBB/Shinmudra-U-BBB0004892-01/thumbnail/1.jpg",
  "variantDetails": [
    {
      "title": "Type",
      "name": "Cocolife Coconut Water 1L x 12"
    }
  ],
  "customSKU": "8888200702977",
  "isOption": false,
  "categoryName": "Drinks & Sweets/Others/Others ## 300000931",
  "categoryID": "300000931"
}
]
  • orderItemID : Id of the product that were purchased.
  • SKU : - Unique identifier for the product in SELLinALL.
  • quantity : The number of items that were purchased.
  • itemAmount : Purchased products price.
  • orderType : The valid values are Delivery and Pickup
    Note: qoo10 only has orderType
  • itemTitle : Title of the product.
  • shippingAmount :shipping price the products.
  • imageURL : Image URL of the product
  • categoryName : The name of category
  • categoryID : The identifier of category
  • Note: orderItems will have imageURL,categoryName,categoryID if the inventory exists in Graas.
  • settlementAmount : The amount payable by the marketplace to the seller.
    Note: Qoo10 and lazada only has settlementAmount.
  • orderStatus : Partial order status for the item. This field only applicable for lazada.
  • paymentStatus : Partial payment status for the item. This field only applicable for lazada.
  • shippingStatus : Partial shipping status for the item. This field only applicable for lazada.
orderStatus String
"orderStatus": "PROCESSING"
Valid values are:
  • INITIATED : New order is initiated by the buyer
  • ACCEPTED : Order is accepted by the seller
  • PROCESSING :Order is being processed by the seller
  • DISPATCHED :Order has been shipped
  • DELIVERED :Order has been delivered
  • CANCELLED :Order has been cancelled
  • RETURNED :Order has been returned
  • CANCEL_PENDING :Order cancellation is pending
  • CANCEL_REQUESTED :Order requested for cancellation
  • RETURN_REQUESTED :Order requested for return
  • RETURN_SHIPPED :Order has been return shipped
  • RETURN_REJECTED :Order has been return rejected
  • DELIVERY_FAILED :Order has been delivery failed
paymentStatus String
"paymentStatus": "NOT_INITIATED"
Valid values are:
  • NOT_INITIATED: Payment is pending.
  • AUTHORIZED: Payment has been authorized
  • COMPLETED: Payments has been completed.
  • REFUNDED: Payments has been refunded
shippingStatus String
"shippingStatus": "NOT_SHIPPED"
Valid values are:
  • NOT_SHIPPED: Order has not been shipped.
  • SHIPPED: Order has been shipped.
  • READY_TO_SHIP: Order is ready for the shipment.
orderAmount Object
"orderAmount": {
  "amount": 4260,
  "currencyCode": "SGD"
}
Total price of an order
shippingAmount Object
"shippingAmount": {
  "amount": 390,
  "currencyCode": "SGD"
}
Total shipping amount of an order.
sellerDiscountAmount Object
 "sellerDiscountAmount": {
  "amount": 900,
  "currencyCode": "SGD"
}
Discount price offered by the seller for the buyer.
channelDiscountAmount Object
 "channelDiscountAmount": {
  "amount": 0,
  "currencyCode": "SGD"
}
Discount price offered by the marketplace for the buyer.
cartNumber String
"cartNumber": "113054733"
id of combined orders
Note: qoo10 and 11street only has cartNumber
invoiceNumber String
"invoiceNumber": "INV0000001"
Unique invoice sequence number generated by Graas
shippingDetails Object
"shippingDetails": {
  "address": {
    "name": "Hui",
    "street1": "BISHAN VIEW 105 BISHAN STREET 12",
    "street2": "Block 105, Unit 06-234, Lift Lobby",
    "phone": "+6590287540",
    "postalCode": "570105",
    "country": "SG"
  },
  "shippingTrackingDetails": {
    "airwayBill": "SGP95722039",
    "courierName": "Store Pickup",
    "remarks": "Get the order between 9 am and 12 pm.",
    "pickupVoucherCode": "1234567891***"
  }
}
  • address :Buyer address.
  • airwayBill : Tracking number of an order.
  • courierName : The name of the company that ships an order.
  • remarks : Textual comment that explains, clarifies, or justifies the order info specified in CommentType.
  • pickupVoucherCode : The secret code to pick the order up from store, when courierName is "Store Pickup".
documents Object
"documents" : {
"shippingLabelUrl" : "https://docs.graas.ai/uploads/shippingLabels/AIL/qoo10-1/20033078YKWU3K.pdf"
}
  • shippingLabelUrl :Shipping label URL.
  • Note: File formats are marketplace specific. For an instance png, html, pdf and so on.
timeCreated long
The unix time when the order synced in Graas
timeLastUpdated long
The unix time when the order was last updated in Graas
timeOrderCreated long
The unix time when the order was created in marketplace.

Get a Specific Order

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl "https://api./v1/order/lazada-1/1514262635"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"


            

Response payload:


{
  "site": {
    "name": "lazada",
    "nickNameID": "lazada-1"
  },
  "orderID": "1514262635",
  "orderNumber": "1514262635",
  "buyerDetails": {
    "name": "abs",
    "email": "abc@gmail.com"
  },
  "paymentMethods": "VISA/MasterCard",
  "orderStatus": "INITIATED",
  "paymentStatus": "COMPLETED",
  "shippingStatus": "NOT_SHIPPED",
  "shippingDetails": {
    "address": {
      "name": "abc",
      "street1": "abc",
      "street2": "abcd",
      "phone": 213123,
      "postalCode": 1212,
      "country": "Singapore"
    },
    "shippingTrackingDetails": {
      "airwayBill": "WNTTABZWECABYRXKXH28",
      "courierName": "Delivery"
    }
  },
  "shippingAmount": {
    "amount": 1521,
    "currencyCode": "SGD"
  },
  "sellerDiscountAmount": {
    "amount": 900,
    "currencyCode": "SGD"
  },
  "channelDiscountAmount": {
    "amount": 0,
    "currencyCode": "SGD"
  },
  "timeCreated": 1505889671,
  "timeLastUpdated": 1505889671,
  "timeOrderCreated": 1505889671,
  "orderItems": [
    {
      "itemTitle": "Export Drones Drones DJI  DJI Spark FLY More Combo (UK)",
      "itemAmount": {
        "amount": 18000,
        "currencyCode": "SGD"
      },
      "customSKU": "EXPDRONE",
      "variantDetails": [
        {
          "title": "Colour",
          "name": "Sunrise Yellow"
        }
      ],
      "quantity": 1,
      "settlementAmount": {
        "amount": 0,
        "currencyCode": "SGD"
      },
      "imageURL": ""
    }
  ],
  "orderAmount": {
    "amount": 18000,
    "currencyCode": "SGD"
  },
  "documents" : {
        "shippingLabelUrl" : "https://docs.graas.ai/uploads/shippingLabels/AIL/lazada-1/20033078YKWU3K.pdf"
  },
  "status": "success"
}

            

This endpoint retrieves a specific request.

HTTP Request

GET https://api./v1/order/<nickNameID>/<orderID>

URL Parameters

Parameter Description
orderID Unique identifier of an order
nickNameID Channel specific ID

Update Shipping Tracking Details

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl "https://api./v1/orders"
  -H "Content-Type: application/json"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"

            

Request payload :


{
  "data": [
    {
      "orderID": "31659500092762",
      "orderStatus": "ACCEPTED",
      "site": {
        "name": "lazada",
        "nickNameID": "lazada-1"
      },
      "orderItems": [
        {
          "orderItemID": "31685600492762",
          "sellerSKU": "testSKU1"
        },
        {
          "orderItemID": "31685600592734",
          "sellerSKU": "testSKU2"
        }
       ]
    },
    {
      "orderID": "152121",
      "orderStatus": "ACCEPTED",
      "site": {
        "name": "lazada",
        "nickNameID": "lazada-1"
      },
      "shippingTrackingDetails": {
        "courierName": "Singpost Registered Mail",
        "airwayBill": "22"
      }
    }
  ]
}
            

Response payload:

            
{
  "result": [
    {
      "response": {
        "orderID": "31659500092762",
        "orderStatus": "ACCEPTED",
        "site": {
          "name": "lazada",
          "nickNameID": "lazada-1"
        },
        "orderItems": [
        {
          "orderItemID": "31685600492762",
          "sellerSKU": "testSKU1"
        },
        {
          "orderItemID": "31685600592734",
          "sellerSKU": "testSKU2"
        }
       ]
      },
      "httpCode": 202
    },
    {
      "errorMessage": "Record Not Found",
      "response": {
        "orderID": "152121",
        "orderStatus": "ACCEPTED",
        "site": {
          "name": "lazada",
          "nickNameID": "lazada-1"
        },
        "shippingTrackingDetails": {
          "courierName": "Singpost Registered Mail",
          "airwayBill": "22"
        }
      },
      "httpCode": 404
    }
  ]
}
            
            

This endpoint updates, shipping tracking details of orders.

HTTP Request

PUT https://api./v1/orders

Error message

Error message Meaning
Record Not Found The requested orderId does not exist.
Field Type Description
orderID String The shipping details will be updated to this orderId.This API will fail, if the orderId does not exist.
orderStatus String status of the order.
site Object
"site":{
  "name": "lazada",
  "nickNameID": "lazada-1"
}
  • name: Marketplace name.
  • nickNameID: Graas unique Marketplace ID.
shippingTrackingDetails Object
"shippingTrackingDetails": {
  "courierName": "Singpost Registered Mail",
  "airwayBill": "22"
}
  • courierName: The name of the shipping company.
  • airwayBill: The tracking number for an order.
  • This field is optional. Applicable only for seller own fleet orders.
orderItems List
"orderItems": [
        {
          "orderItemID": "31685600492762",
          "sellerSKU": "testSKU1"
        },
        {
          "orderItemID": "31685600592734",
          "sellerSKU": "testSKU2"
        }
       ]
  • orderItems: This field is only applicable for partial order processing, which is supported only for Lazada.
  • orderItemID: Marketplace order item reference id. This is the unique id for the order item
  • sellerSKU: The product SKU (stock keeping unit) is an identifier defined by a seller. This will be assigned to the product while listing to marketplaces

Cancel order

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl "https://api./v1/orders"
  -H "Content-Type: application/json"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"

            

Request payload :


{
  "data": [
    {
      "orderID": "33615180083893",
      "orderStatus": "CANCELLED",
      "site": {
        "name": "lazada",
        "nickNameID": "lazada-1"
      },
      "needToUpdateOrder": true,
      "cancelDetails": {
        "cancelReason": "OUT_OF_STOCK"
      },
      "orderItems": [
        {
          "orderItemID": "3168533454934",
          "sellerSKU": "testSKU3"
        }
      ]
    }
  ]
}
            

Response payload:

            
{
  "result": [
    {
      "response": {
        "orderID": "33615180083893",
        "orderStatus": "CANCELLED",
        "site": {
          "name": "lazada",
          "nickNameID": "lazada-1"
        },
        "needToUpdateOrder": true,
        "cancelDetails": {
          "cancelReason": "OUT_OF_STOCK"
        },
        "orderItems": [
          {
            "orderItemID": "3168533454934",
            "sellerSKU": "testSKU3"
          }
        ]
      },
      "httpCode": 202
    }
  ]
}
            
            

This endpoint used to cancel the orders.

HTTP Request

PUT https://api./v1/orders

Error message

Error message Meaning
Record Not Found The requested orderId does not exist.
Field Type Description
orderID String OrderID for the order that needs to be cancelled.
orderStatus String The order status. It should be CANCELLED
site Object
"site":{
  "name": "lazada",
  "nickNameID": "lazada-1"
}
  • name: Marketplace name.
  • nickNameID: Graas unique Marketplace ID.
cancelDetails Object
"cancelDetails": {
  "cancelReason": "OUT_OF_STOCK",
}
  • cancelReason: The reason for the cancel order.
orderItems List
"orderItems": [
        {
          "orderItemID": "3168533454934",
          "sellerSKU": "testSKU3"
        }
       ]
  • orderItems: This field is only applicable for partial order processing, which is supported only for Lazada.
  • orderItemID: Marketplace order item reference id. This is the unique id for the order item
  • sellerSKU: The product SKU (stock keeping unit) is an identifier defined by a seller. This will be assigned to the product while listing to marketplaces

Purchase Order

Create ASN

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl "https://api./v1/asn"
  -H "Content-Type: application/json"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"

            

Request payload :


{
  "warehouseID":"odoo-1",
  "supplierID":1,
  "supplierRef":"123456789",
  "date":1627309834,
  "orderItems": [
    {
      "sellerSKU": "testSKU1",
      "description": "Milk powder brand name",
      "quantity": 2,
      "uom": 1,
      "itemAmount": {
        "amount" : 1200,
        "currencyCode" : "SGD"
      }
    },
    {
      "sellerSKU": "testSKU2",
      "description": "Hybrid apple watch",
      "quantity": 1,
      "uom": 1,
      "itemAmount": {
        "amount" : 1550,
        "currencyCode" : "SGD"
      }
    }
   ]
}
            

Response payload:

            
SUCCESS:

HTTP status: 200 OK

{
    "asnID": 24
}

FAILURE:

HTTP status: 400

{
    "errorMessage": "supplierID is missing"
}
            
            

This endpoint used to create ASN.

HTTP Request

POST https://api./v1/asn

Field Type Description
warehouseID String Unique identifier of a wms account.
supplierID Int Unique identification for the supplier in the SiAWMS; a list of supplierIDs will be provided by the team.
supplierRef String This information can be used to refer a supplier.
date Int The unix time when the order synced.
sellerSKU String The product SKU (stock keeping unit) is an identifier assigned to a product by a Seller.
description String Description of the product.
quantity Int Quantities based on warehouse.
itemAmount Object
"itemAmount": {
  "amount": 2300,
  "currencyCode": "SGD"
}
  • amount :The price of the product. amount value should be multiple of 100
  • currencyCode :SGD should be the default currency code value, but it can be altered as necessary.
uom Int Unit of Measure (UoM) is an alternative unit that is defined by default as 1 (units). It will be updated as required.

Get a Specific ASN

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl https://api./v1/asn/15?warehouseID=odoo-1
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"
  


            

Response payload:


SUCCESS:

HTTP status: 200 OK

{
  "asnID":15,
  "supplierID":1,
  "supplierRef":"123456789",
  "date":1627309834,
  "status":"draft",
  "orderItems": [
    {
      "sellerSKU": "testSKU1",
      "description": "Milk powder brand name",
      "quantity": 2,
      "receivedQuantity": 2,
      "uom": 1,
      "itemAmount": {
        "amount" : 1200,
        "currencyCode" : "SGD"
      },
      "status":"draft"
    },
    {
      "sellerSKU": "testSKU2",
      "description": "Hybrid apple watch",
      "quantity": 1,
      "receivedQuantity": 1,
      "uom": 1,
      "itemAmount": {
        "amount" : 1550,
        "currencyCode" : "SGD"
      },
      "status":"draft"
    }
   ]
}

FAILURE:

HTTP status: 400

{
    "errorMessage": "asnID is missing"
}

            

This endpoint retrieves a specific request.

HTTP Request

GET https://api./v1/asn/<asnID>?warehouseID=<warehouseID>

URL Parameters

Parameter Description
warehouseID Unique identifier of a wms account
asnID Unique identifier of an purchase order

Get ASN IDs

require 'kittn'
                api = Kittn::APIClient.authorize!('meowmeowmeow')
                api.orders.get(2)
                
            
import kittn
                api = kittn.authorize('meowmeowmeow')
                api.orders.get(2)
                
            

curl "https://api./v1/asn?warehouseID=odoo-1&supplierID=1&supplierRef=abc12345"
  -H "Content-Type: application/json"
  -H "accountNumber: 12121212121212121"   
  -H "appKey: 2121212121"

Response payload:

            
SUCCESS:

HTTP status: 200 OK

{
    "asnIDs":[2, 15]
}

FAILURE:

HTTP status: 400

{
    "errorMessage": "supplierID and supplierRef is missing"
}
            
            

This endpoint retrieves orders, updated between the defined time intervals.

HTTP Request

GET https://api./v1/asn?warehouseID=<warehouseID>&supplierID=<supplierID>&supplierRef=<supplierRef>

URL Parameters

Query Parameter Description
warehouseID (mandatory) Unique identifier of a wms account.
supplierID (mandatory) Unique identification for the supplier in the SiAWMS.
supplierRef (mandatory) This information can be used to refer a supplier.

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request sucks
401 Unauthorized – Your API key is wrong
403 Forbidden – The request requested is hidden for administrators only
404 Not Found – The specified request could not be found
405 Method Not Allowed – You tried to access a request with an invalid method
406 Not Acceptable – You requested a format that isn’t json
410 Gone – The request requested has been removed from our servers
418 I’m a teapot
429 Too Many Requests – You’re requesting too many orders! Slow down!
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.