Catalog.getProducts

Request

JSON Example

[
    {
        "api":1,
        "method":"auth",
        "params":{
            "username":"...",
            "password":"..."
        },
        "id":1
   },
   {
        "api": 1,
        "method": "Catalog.getProducts",
        "params": {
            "offset": 0,
            "limit": 10,
          	"sellerIds": [11,22,33]
        },
        "id": 1
    }
]

Make sure values are properly encoded in the types specified below, as the Sync Agent client will not do any automatic conversion. Using strings instead of integers (eg.: "42" instead of 42), or integers instead of booleans (1 instead of true) will result in a validation error during sync.

Field name

Type

Mandatory

Description

Notes

offset

unsigned integer

yes

Offset to get products

undefined

limit

unsigned integer

yes

Limit for the number of products

undefined

sellerId

array of int

no

seller IDs for who we are getting products

This parameter will be ignored in presence of "productSetId"

productSetId

array of int

no

product set IDs which we want to retrieve, in case this parameter is set, sellerId will be ignored

This parameter will override "sellerId" in case is present

Pagination Support

In order to properly adapt this call, pagination capabilities should be implemented. Sort results by creation date ascendent, so if there are new rows created during runtime, they will not be skipped.

Response

If result array is empty then no products to import

[  
   {  
      "api":1,
      "result":[
        {
          "sellerId": 12,
          "productSetId": 11,
          "status": "active",
          "name": "Nike Shoes",
          "description": "Nike is awesome",
          "primaryCategoryId": 12,
          "additionalCategoriesIds": [11,99],
          "brandId": 10,
          "attributeSetId": 10,
          "attributes" : [
            {
                "attributeId": 10,
                "value": "10"
            },
            {
                "attributeId": 11,
                "value": "Canon"
            }
          ],
          "taxClassId": 1,
          "shipmentType": "Dropshipping",
          "approvalStatus": "approved",
          "updatedAt": "2014-03-01 00:00:00",
          "listingTypeId": "",
          "countryCityId": "",
          "images": [
                {
                    "imageId": 11,
                    "displayUrl": "/p/lazada-nike-11111.jpg",
                    "updatedAt": "2014-03-01 00:00:00",
                    "position": 1,
                    "isMain": true
                },
                {
                    "imageId": 12,
                    "displayUrl": "/p/lazada-nike-121212.jpg",
                    "updatedAt": "2014-03-01 00:00:00",
                    "position": 2,
                    "isMain": false
                }
            ],
	          "variations": [
            		{
                    "productId": 282,
                    "simpleSku": "LZDSOMETHING-282",
                    "sellerSku": "nike-0001",
          					"productIdentifier": "Zayna PuaKumbu Peach S",
                  	"variation": "XL",
                    "price": 10.11,
                    "specialPrice": 9.01,
                    "specialPriceFromDate": "2014-05-01 00:00:00",
                    "specialPriceToDate":"2014-06-01 00:00:00",
                    "stock": 5
            		},
            		{
                    "productId": 283,
                    "simpleSku": "LZDSOMETHING-283",
                    "sellerSku": "nike-0002",
          					"productIdentifier": "Zayna PuaKumbu Peach S2",
                  	"variation": "XS",
                    "price": 9.11,
                    "specialPrice": 8.01,
                    "specialPriceFromDate": "2014-05-01 00:00:00",
                    "specialPriceToDate":"2014-06-01 00:00:00",
                    "stock": 2
            		}
          	]
        }
      ],
      "id":1
   }
]

Field name

Type

Mandatory

Value

sellerId

integer

ye

undefined

Seller ID in Shop Backend System

productSetId

integer

yes

undefined

Config ID in Shop Backend System

status

enum

yes

active, inactive, deleted

undefined

name

varchar(255)

yes

undefined

product name

description

longtext

yes

undefined

description of the product

primaryCategoryId

integer

yes

undefined

primary category id in your system (e.g Shop Backend System)

additionalCategoriesIds

array[int]

no

Array of ID's of additional categories, Shop ID

brandId

integer

yes

undefined

Shop ID

attributeSetId

integer

yes

undefined

Shop ID

attributes

array of attributes

yes

undefined undefined

taxClassId

integer

yes

undefined

Shop ID

shipmentType

enum

yes

Dropshipping/Cross docking/Local pickup

Local pickup is for Kaymu only

approvalStatus

enum

yes

'pending','approved','rejected'

undefined

images

array of images

yes

undefined undefined

listingTypeId

undefined

no

undefined

venture needs to send us back listing type ID, which is linked to the product

countryCityId

undefined

no

undefined

a venture that needs to link a product with a city will just send us back a value for countryCityId, Shop ID

updatedAt

string

yes

"YYYY-MM-DD hh:mm:ss"

"2013-12-23 00:00:00"

variations

array of product variations

yes

undefined undefined

Attributes

Field name

Type

Mandatory

Value

Description

attributeId

integer

yes

Shop ID of attribute set

value

string

yes

undefined undefined

Images

Field name

Type

Mandatory

Value

Description

imageId

integer

yes

Shop ID of image

displayUrl

varchar(255)

yes

undefined undefined

position

integer

yes

undefined undefined

isMain

boolean

yes

undefined undefined

updatedAt

string

yes

"YYYY-MM-DD hh:mm:ss"

"2013-12-23 00:00:00"

Variations

Field name

Type

Mandatory

Value

undefined

productId

integer

yes

undefined undefined

simpleSku

varchar(255)

yes

undefined undefined

sellerSku

varchar(255)

yes

undefined undefined

productIdentifier

varchar(255)

no

undefined undefined

variation

varchar(255)

no

NULL or varchar(255)

undefined

price

decimal(20,2)

yes

undefined undefined

specialPrice

decimal(20,2)

no

undefined undefined

specialPriceFromDate

string

no

"YYYY-MM-DD hh:mm:ss"

"2013-12-23 00:00:00"

specialPriceToDate

string

no

"YYYY-MM-DD hh:mm:ss"

"2013-12-23 00:00:00"

stock

int(10)

yes

Should be equal or higher than zero

undefined