Service

https://api.crocodealer.com

Product fields and filters

Request

POST /v2/products/fields

{
"app":" →  Application IDstring","category":" →  Category IDstring","field":" →  Filter namestring","stock":" →  '1' - Output only options for products in stockinteger","language":" →  ISO 2 Letter Language Codesstring"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","fields": [  →  Field arrayarray{"field": {  →  Field objectobject"name":" →  Field namestring","title":" →  Field titlestring","parent":" →  Parent field namestring","type":" →  Field type link|checkbox|radio|range|select|text|textarea|datestring","basic":" →  1 - if the field belongs to a basic field setinteger","params": {  →  Field params for according field typesobject"link": [  →  Link field type parametersobject
],
"checkbox": [  →  Checkbox field parametersobject
],
"range": {  →  Range field type parametersobject"min":" →  Range min valuestring","max":" →  Range max valuestring","step":" →  Range stepstring"
},
"select": [  →  Select field parametersobject
],
"text": [  →  Text field parametersobject
],
"textarea": [  →  Textarea field parametersobject
],
"date": [  →  Date field parametersobject
]
},
"categories": [  →  An array of categories to which the field is relevantarray
]
},
"options": [  →  Available checkbox|radio|select filter type optionsarray{"id":" →  Option IDstring","parent":" →  Option parent IDstring","title":" →  Option titlestring","link":" →  The link of an option of a 'link' field typestring"}
]
}
]
}

Product list

Request

POST /v2/products

{
"app":" →  Application IDstring","min_price":" →  Minimum price in the samplestring","max_price":" →  Maximum price in the samplestring","coordinates":" →  Current user coordinates as 'latitude,longitude' string","distance":" →  To show only products within specified radius in metersint","include":" →  sample type: 1 - only new items, 2 - only discounted productsstring","orderby":" →  sorting type: 1 - newest first, 2 - old first, 3 - cheapest first, 4 - expensive first, 5 - popular firststring","option":" →  [4432,432,453] set of filter valuesstring","start":" →  Start output positionstring","limit":" →  Оutput list lengthinteger","search":" →  Search stringstring","promotion":" →  Filter products by promotion IDstring","products":" →  Iclude only certain product IDsarray","user":" →  User profile IDstring","token":" →  User tokenstring","visitor":" →  Visitor IDstring"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","user": {  →  General user data objectobject"id":" →  User IDstring","name":" →  User namestring","created":" →  User registration datestring","paths": {  →  File pathsobject"images": {  →  Image pathsobject"s":" →  Small imageobject","m":" →  Medium imageobject","l":" →  Large imageobject"
}
},
"files":" →  An array with user filesarray"
},
"paths": {  →  File pathsobject"images": {  →  Image pathsobject"s":" →  Small imageobject","m":" →  Medium imageobject","l":" →  Large imageobject"
}
},
"params": {  → object"options": [  → array{"id":" →  filter idstring","mode":" →  single/plural filter modestring","name":" →  filter namestring","stock":" →  is a sign of accounting for goods 1/0string","view":" →  tree display viewstring","type":" →  select/link filter typestring","actual":" →  filter status 1/0string","values": [  → array{"id":" →  value id (int)string","name":" →  name (string)string","image":" →  link to icon (string)string","rest":" →  remainder (bool)string","total":" →  total (int)string","checked":" →  value selected (bool)string","link":" →  reference (string)string"}
]
}
],
"orderby": [  → array{"id":" →  id of sort parameter (int)string","name":" →  name (string)string","checked":" →  value selected (bool)string"}
],
"include": [  → array{"id":" →  select parameter id (int)string","name":" →  name (string)string","checked":" →  value selected (bool)string"}
]
},
"products": [  →  Product listarray{"id":" →  product idstring","sku":" →  item numberstring","link":" →  product linkstring","name":" →  product namestring","description":" →  product descriptionstring","price":" →  price of goodsstring","sale":" →  discount pricestring","promo":" →  stock pricestring","discount":" →  percentage discountstring","new":" →  is the product new 1 - yes, 0 - nostring","published":" →  Product publishing datestring","files":" →  Product file arrayarray","fields": [  →  Product field arrayarray{"id":" →  filter idstring","name":" →  filter namestring","values": [  → array{"id":" →  filter value idstring","name":" →  filter namestring","quantity":" →  quantity in stockstring"}
],
"stock":" →  is a sign of accounting for goods 1/0string"}
]
}
]
}

Product cart

Request

POST /v2/products/product

{
"app":" →  Application IDstring","product":" →  Product IDstring!"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","user": {  →  General user data objectobject"id":" →  User IDstring","name":" →  User namestring","created":" →  User registration datestring","paths": {  →  File pathsobject"images": {  →  Image pathsobject"s":" →  Small imageobject","m":" →  Medium imageobject","l":" →  Large imageobject"
}
},
"files":" →  An array with user filesarray"
},
"paths": {  →  File pathsobject"images": {  →  Image pathsobject"s":" →  Small imageobject","m":" →  Medium imageobject","l":" →  Large imageobject"
}
},
"product": {  →  Product objectobject"id":" →  product idstring","sku":" →  articlestring","name":" →  Product namestring","description":" →  Product descriptionstring","available":" →  Is product vailable in stock or for pre-orderstring","new":" →  Is product noveltystring","files":" →  An array with user filesarray","price":" →  Product pricestring","sale":" →  Product sale pricestring","promotions": [  →  Product promotionsarray{"expiration":" →  (unixtime) promo price ending timestring","timezone":" →  Server time zone in secondsstring","price":" →  Promotion product pricestring"}
],
"calc":" →  Product best pricestring"
},
"relatives": [  → array{"id":" →  similar product idstring","color":" →  color of like productstring"}
],
"options": [  → array{"id":" →  filter idstring","name":" →  filter namestring","values": [  → array{"id":" →  filter value idstring","name":" →  filter namestring","quantity":" →  quantity in stockstring"}
],
"stock":" →  is a sign of goods accounting (bool)string"}
]
}

Manage product

Request

POST /v2/products/manage

{
"app":" →  Application IDstring","target":" →  Editing target product|stockstring!","action":" →  Action create|copy|updatestring!","session":" →  User session tokenstring!","product": {  → object!"id":" →  Product IDinteger!","sku":" →  Product SKUstring!","name":" →  Product namdstring!","cost":" →  Product cost pricestring!","price":" →  Product pricestring!","sale":" →  Product sale pricestring!","link":" →  Product linkstring!","terms":" →  Product promotion termsobject!","published":" →  Product publishing datedate!","status":" →  Product status 1 - published, 0 - not publishedinteger","supplier":" →  Supplier IDstring!","renew":" →  Automatic review 1=yes,0=nointeger!","description":" →  Product text descriptionstring!","coordinates":" →  Product coordinatesstring!","storage":" →  Product storage IDstring!","files": [  →  An array with user filesarray{"name":" →  File namestring","action":" →  File action; 'update' to apply changes, 'insert' to upload a new file, 'delete' to delete filestring","order":" →  A file ordernal number. If this parameter is not set, the array index will be used as the ordernal number. Instead of the file array, an object may also be used where the keys are file ordernal numbersstring"}
],
"fields": [  →  Field value arrayarray{"id":" →  File value IDstring","field":" →  Field namestring","value":" →  Field valuestring","action":" →  Action insert|update|deletestring","markup":" →  Value markupstring","title":" →  Value titlestring","inventory":" →  1 - If the value is inventory, 0 - if notinteger","description":" →  Field value descriptionstring","analogs":" →  Value analog IDsarray","available":" →  Available for pre-orderinteger"}
]
},
"metadata": {  → object!"id":" →  Metadata record IDstring","name":" →  Mamestring","title":" →  Titlestring","h1":" →  H1 tag contentstring","keywords":" →  Keywordsstring","description":" →  Meta descriptionstring"
}
}

Search predictions

Request

POST /v2/products/search

{
"app":" →  Application IDstring","query":" →  Query stringstring","limit":" →  Max list lengthinteger","start":" →  List start positioninteger","visitor":" →  Visitor IDstring","token":" →  User tokenstring"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","results": [  →  Search resultsarray{"query":" →  Search querystring","times":" →  Request quantitystring"}
]
}

Application settings

Request

POST /v2/applications/configuration

{
"app":" →  Application IDstring"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","id":" →  Application IDstring","title":" →  Application namestring","hostname":" →  Application hostnamestring","language":" →  Default languagestring","timezone":" →  Time zonestring","country": {  →  Country parametersobject"id":" →  Country IDinteger","name":" →  Country namestring","phone":" →  Country phone code with maskstring","domain":" →  Country top level domainstring","currency":" →  Country currency codestring"
},
"location": {  →  Loction parametersobject"name":" →  Location namestring"
},
"products": {  →  Product parametersobject"total": {  →  Product quantityobject"all":" →  Total product quantitystring","new":" →  New products quantitystring"
}
},
"crm": {  →  CRM parametersstring"ip":" →  IP addressstring"
},
"modules": [  →  Module settingsarray{"component":" →  Componentstring","views": [  →  Viewsarray{"name":" →  View namestring","cache":" →  Cache timestring","layout":" →  Layout namestring","position":" →  Html ontainer name, where the module should be placedstring","inclide": {  →  Module output by specified parameters onlyobject"vars":" →  Output module by specified variable valuesarray","urls":" →  Output module by specified urls onlyarray"
},
"exclude": {  →  Limit module output by specified parametersobject"vars":" →  Limit module output by specified variable valuesarray","urls":" →  Limit module output for specified urlsarray"
}
}
]
}
],
"options": [  →  Product option listarray{"id":" →  Product option IDstring","title":" →  Product option titlestring","field":" →  Product option field namestring","stock":" →  Is an option cart 1 or 0string","values": [  →  Value listarray{"id":" →  Value IDstring","title":" →  Value titlestring","total":" →  Product quantity with this parameterstring","order":" →  Parameter orderstring","parent":" →  Parent IDstring"}
]
}
]
}

Banners

Request

POST /v2/contents/banners

{
"app":" →  Application IDstring","group":" →  Filter by banner groupstring","current":" →  Display only unexpired bannersbool"
}
Response
{
"status":" →  Status '1' - success or '0' - errorstring","message":" →  Request result messagestring","banners": [  →  banner listarray{"id":" →  Banner IDstring","group":" →  Banner groupstring","file":" →  File namestring","title":" →  Banner titlestring","link":" →  Link to a contentstring","content":" →  Text or html contentstring","since":" →  Display start datestring","until":" →  Display end datestring","status":" →  Banner statusstring"}
]
}