NAV Navbar
Logo
python shell ruby javascript php

CrescoData API

Welcome to our API integration page.

Use the CrescoData Commerce Connect Platform to integrate to over 50 commerce channels.

The available endpoints are on the left. Code examples in different languages are shown on the right. If you can’t find what you are looking for please email support@crescodata.com

Errors

Error Code Meaning
200 OK
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
308 Permanent Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
418 I’m a teapot (RFC 2324)
420 Enhance Your Calm (Twitter)
422 Unprocessable Entity (WebDAV)
423 Locked (WebDAV)
424 Failed Dependency (WebDAV)
425 Reserved for WebDAV
426 Upgrade Required
428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
444 No Response (Nginx)
449 Retry With (Microsoft)
450 Blocked by Windows Parental Controls (Microsoft)
451 Unavailable For Legal Reasons
499 Client Closed Request (Nginx)
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates (Experimental)
507 Insufficient Storage (WebDAV)
508 Loop Detected (WebDAV)
509 Bandwidth Limit Exceeded (Apache)
510 Not Extended
511 Network Authentication Required
598 Network read timeout error
599 Network connect timeout error

Attribute settings

setting description
required attribute is required when submitting data
readonly the value cannot be changed
direct the attribute is available as a separate endpoint e.g. product/id/attribute_name

Agencies

The customers cresco has

Agency object

The following attributes are defined.

sample

{
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "name": "11111111-2222-3333-4444-555555555555",
    "country": "SG"
}
name type description settings
agencyId string The id of the customer required
country string The country this customer is based in, if relevant
createdAt string The date the customer was created
logo string The url to the system thumbnail logo
name string The name of the customer required

add

import requests

requests.post('https://api.crescodata.com/v3/customers')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/customers
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('customers')


HTTP Request

POST https://api.crescodata.com/v3/customers

delete

import requests

requests.delete('https://api.crescodata.com/v3/customers/<__agencyId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/customers/<__agencyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('customers/<__agencyId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/customers/<agencyId>

get

import requests

requests.get('https://api.crescodata.com/v3/customers/<__agencyId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/customers/<__agencyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('customers/<__agencyId__>')


HTTP Request

GET https://api.crescodata.com/v3/customers/<agencyId>

list

import requests

requests.get('https://api.crescodata.com/v3/customers')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/customers
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('customers')


HTTP Request

GET https://api.crescodata.com/v3/customers

replace

import requests

requests.put('https://api.crescodata.com/v3/customers/<__agencyId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/customers/<__agencyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('customers/<__agencyId__>')


HTTP Request

PUT https://api.crescodata.com/v3/customers/<agencyId>

update

import requests

requests.patch('https://api.crescodata.com/v3/customers/<__agencyId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/customers/<__agencyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('customers/<__agencyId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/customers/<agencyId>

Companies

Stores company data

Company object

The following attributes are defined.

sample

{
    "companyId": "11111111-2222-3333-4444-555555555555",
    "name": "Cresco Data",
    "country": "SG",
    "createdAt": "2018-03-07T08:52:17+00:00",
    "updatedAt": "2018-03-07T08:52:17+00:00",
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "agencyData": {
        "anything": 123
    }
}
name type description settings
agencyData object Any data related to this customer
agencyId string The agency ID for this merchant. required
companyId string The id of the company
country string The country of the company required
createdAt string When the company was subscribed
logo string The url to the system thumbnail logo
name string The name of the company required
updatedAt string When the company details were last updated

add

import requests

requests.post('https://api.crescodata.com/v3/companies')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/companies
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('companies')


HTTP Request

POST https://api.crescodata.com/v3/companies

delete

import requests

requests.delete('https://api.crescodata.com/v3/companies/<__companyId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/companies/<__companyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('companies/<__companyId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/companies/<companyId>

get

import requests

requests.get('https://api.crescodata.com/v3/companies/<__companyId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/companies/<__companyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('companies/<__companyId__>')


HTTP Request

GET https://api.crescodata.com/v3/companies/<companyId>

list

import requests

requests.get('https://api.crescodata.com/v3/companies')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/companies
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('companies')


HTTP Request

GET https://api.crescodata.com/v3/companies

replace

import requests

requests.put('https://api.crescodata.com/v3/companies/<__companyId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/companies/<__companyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('companies/<__companyId__>')


HTTP Request

PUT https://api.crescodata.com/v3/companies/<companyId>

update

import requests

requests.patch('https://api.crescodata.com/v3/companies/<__companyId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/companies/<__companyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('companies/<__companyId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/companies/<companyId>

Groups

A grouping of systems by a unique name

Group object

The following attributes are defined.

sample

{
    "name": "lazada",
    "systemIds": [
        "11111111-2222-3333-4444-555555555555",
        "21111111-2222-3333-4444-555555555555"
    ]
}
name type description settings
name string The unique name of the group required
systemIds array A list of system IDs that belong to this group required

add

import requests

requests.post('https://api.crescodata.com/v3/systems/groups')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/groups
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('systems/groups')


HTTP Request

POST https://api.crescodata.com/v3/systems/groups

delete

import requests

requests.delete('https://api.crescodata.com/v3/systems/groups/<__groupId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/groups/<__groupId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('systems/groups/<__groupId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/systems/groups/<groupId>

get

import requests

requests.get('https://api.crescodata.com/v3/systems/groups/<__groupId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/groups/<__groupId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/groups/<__groupId__>')


HTTP Request

GET https://api.crescodata.com/v3/systems/groups/<groupId>

list

import requests

requests.get('https://api.crescodata.com/v3/systems/groups')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/groups
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/groups')


HTTP Request

GET https://api.crescodata.com/v3/systems/groups

replace

import requests

requests.put('https://api.crescodata.com/v3/systems/groups/<__groupId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/groups/<__groupId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('systems/groups/<__groupId__>')


HTTP Request

PUT https://api.crescodata.com/v3/systems/groups/<groupId>

update

import requests

requests.patch('https://api.crescodata.com/v3/systems/groups/<__groupId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/groups/<__groupId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('systems/groups/<__groupId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/systems/groups/<groupId>

Links

Links between companies and foreign systems that require authentication beyond locally storedlogin details

The following attributes are defined.

sample

{
    "id": "11111111-2222-3333-4444-555555555555",
    "companyId": "11111111-2222-3333-4444-555555555555",
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "systemId": "11111111-2222-3333-4444-555555555555",
    "data": {},
    "redirectUrl": "https://crescodata.com",
    "systemUserId": "email@test.com"
}
name type description settings
agencyId string The id of the agency this link is set up for required
companyId string The id of the company that the link is setup for required
data object Any data relevant for this link
expiresAt string The time at which the token expires
id string The id of the link between the company and the system
redirectUrl string The url to redirect to after authorization
systemId string The id of the system that is being linked to required
systemUserId string The identifier for the user for this system, if available from the authorization.

add

import requests

requests.post('https://api.crescodata.com/v3/auth/links')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/auth/links
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('auth/links')


HTTP Request

POST https://api.crescodata.com/v3/auth/links

delete

import requests

requests.delete('https://api.crescodata.com/v3/auth/links/<__linkId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/auth/links/<__linkId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('auth/links/<__linkId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/auth/links/<linkId>

get

import requests

requests.get('https://api.crescodata.com/v3/auth/links/<__linkId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/auth/links/<__linkId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('auth/links/<__linkId__>')


HTTP Request

GET https://api.crescodata.com/v3/auth/links/<linkId>

list

import requests

requests.get('https://api.crescodata.com/v3/auth/links')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/auth/links
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('auth/links')


HTTP Request

GET https://api.crescodata.com/v3/auth/links

replace

import requests

requests.put('https://api.crescodata.com/v3/auth/links/<__linkId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/auth/links/<__linkId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('auth/links/<__linkId__>')


HTTP Request

PUT https://api.crescodata.com/v3/auth/links/<linkId>

update

import requests

requests.patch('https://api.crescodata.com/v3/auth/links/<__linkId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/auth/links/<__linkId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('auth/links/<__linkId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/auth/links/<linkId>

Maps

A list of mapped skus to foreign IDs

Map object

The following attributes are defined.

sample

{
    "systemId": "11111111-2222-3333-4444-555555555555",
    "companyId": "11111111-2222-3333-4444-555555555555",
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "syncType": "price",
    "localId": "abcdefg",
    "foreignId": "abcdefg"
}
name type description settings
agencyId string The id of the merchant’s agency required
companyId string The id of the merchant that this map is transferred for required
foreignId string The foreign id of the object required
localId string The local id of the object, usually the product SKU required
syncType string The type of the mapping. Could be category, products, price, etc. required
systemId string The id of the system that this map is transferred for required

add

import requests

requests.post('https://api.crescodata.com/v3/systems/mappings')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/mappings
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('systems/mappings')


HTTP Request

POST https://api.crescodata.com/v3/systems/mappings

delete

import requests

requests.delete('https://api.crescodata.com/v3/systems/mappings/<__mapId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/mappings/<__mapId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('systems/mappings/<__mapId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/systems/mappings/<mapId>

get

import requests

requests.get('https://api.crescodata.com/v3/systems/mappings/<__mapId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/mappings/<__mapId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/mappings/<__mapId__>')


HTTP Request

GET https://api.crescodata.com/v3/systems/mappings/<mapId>

list

import requests

requests.get('https://api.crescodata.com/v3/systems/mappings')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/mappings
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/mappings')


HTTP Request

GET https://api.crescodata.com/v3/systems/mappings

replace

import requests

requests.put('https://api.crescodata.com/v3/systems/mappings/<__mapId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/mappings/<__mapId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('systems/mappings/<__mapId__>')


HTTP Request

PUT https://api.crescodata.com/v3/systems/mappings/<mapId>

update

import requests

requests.patch('https://api.crescodata.com/v3/systems/mappings/<__mapId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/mappings/<__mapId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('systems/mappings/<__mapId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/systems/mappings/<mapId>

Others

ParentSyncs

A sync setup for a certain system

ParentSync object

The following attributes are defined.

sample

{
    "parentId": "11111111-2222-3333-4444-555555555555",
    "syncType": "order",
    "fetch": true,
    "templateIn": "whatever",
    "templateOut": "whatever"
}
name type description settings
fetch boolean Whether regular fetches are needed to retrieve data for this sync
parentId string The id of the system required
syncType string The type of the sync required
templateIn string The CML template to use to translate incoming data into the Cresco format
templateOut string The Mako template to use to translate outgoing data into the foreign system format

add

import requests

requests.post('https://api.crescodata.com/v3/systems/parents/syncs')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/syncs
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('systems/parents/syncs')


HTTP Request

POST https://api.crescodata.com/v3/systems/parents/syncs

delete

import requests

requests.delete('https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('systems/parents/syncs/<__parentsyncId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/systems/parents/syncs/<parentsyncId>

get

import requests

requests.get('https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/parents/syncs/<__parentsyncId__>')


HTTP Request

GET https://api.crescodata.com/v3/systems/parents/syncs/<parentsyncId>

list

import requests

requests.get('https://api.crescodata.com/v3/systems/parents/syncs')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/syncs
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/parents/syncs')


HTTP Request

GET https://api.crescodata.com/v3/systems/parents/syncs

replace

import requests

requests.put('https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('systems/parents/syncs/<__parentsyncId__>')


HTTP Request

PUT https://api.crescodata.com/v3/systems/parents/syncs/<parentsyncId>

update

import requests

requests.patch('https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/syncs/<__parentsyncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('systems/parents/syncs/<__parentsyncId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/systems/parents/syncs/<parentsyncId>

Parents

Cresco’s supported systems parent

Parent object

The following attributes are defined.

sample

{
    "parentId": "11111111-2222-3333-4444-555555555555",
    "backend": "sonrai-systems-lazada",
    "name": "Lazada",
    "settings": {},
    "logo": "https://route-to-image.jpeg",
    "type": "marketplace"
}
name type description settings
backend string The backend to be used for communication with this system required
country string The country this system runs in
currency string The currency used the system
language string The language used by this system
logo string The url to the system thumbnail logo
name string The name of the system required
parentId string The id of this parent system
settings object Any system specific settings required
type string The type of this system required

add

import requests

requests.post('https://api.crescodata.com/v3/systems/parents')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('systems/parents')


HTTP Request

POST https://api.crescodata.com/v3/systems/parents

delete

import requests

requests.delete('https://api.crescodata.com/v3/systems/parents/<__parentId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/<__parentId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('systems/parents/<__parentId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/systems/parents/<parentId>

get

import requests

requests.get('https://api.crescodata.com/v3/systems/parents/<__parentId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/<__parentId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/parents/<__parentId__>')


HTTP Request

GET https://api.crescodata.com/v3/systems/parents/<parentId>

list

import requests

requests.get('https://api.crescodata.com/v3/systems/parents')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/parents')


HTTP Request

GET https://api.crescodata.com/v3/systems/parents

replace

import requests

requests.put('https://api.crescodata.com/v3/systems/parents/<__parentId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/<__parentId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('systems/parents/<__parentId__>')


HTTP Request

PUT https://api.crescodata.com/v3/systems/parents/<parentId>

update

import requests

requests.patch('https://api.crescodata.com/v3/systems/parents/<__parentId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/parents/<__parentId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('systems/parents/<__parentId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/systems/parents/<parentId>

Subscriptions

Subscriptions to Cresco sync type action events

Subscription object

The following attributes are defined.

sample

{
    "id": "11111111-2222-3333-4444-555555555555",
    "type": "orders",
    "action": "add",
    "reportingEndPoint": "events/orders/received/revenue/paid",
    "template": "whatever",
    "direction": "out"
}
name type description settings
action string The name of the action that is supported for this sync required
direction string To determine if the endpoint is for reporting items we get from the system or publish to the system required
id string The id of the subscription
reportingEndPoint string The api path to use to communicate with the reporting module required
template string The CML template to use to extract the relevant data from the Cresco record
type string The type of the sync required

add

import requests

requests.post('https://api.crescodata.com/v3/syncs/subscriptions')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/syncs/subscriptions
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('syncs/subscriptions')


HTTP Request

POST https://api.crescodata.com/v3/syncs/subscriptions

delete

import requests

requests.delete('https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('syncs/subscriptions/<__subscriptionId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/syncs/subscriptions/<subscriptionId>

get

import requests

requests.get('https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('syncs/subscriptions/<__subscriptionId__>')


HTTP Request

GET https://api.crescodata.com/v3/syncs/subscriptions/<subscriptionId>

list

import requests

requests.get('https://api.crescodata.com/v3/syncs/subscriptions')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/syncs/subscriptions
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('syncs/subscriptions')


HTTP Request

GET https://api.crescodata.com/v3/syncs/subscriptions

replace

import requests

requests.put('https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('syncs/subscriptions/<__subscriptionId__>')


HTTP Request

PUT https://api.crescodata.com/v3/syncs/subscriptions/<subscriptionId>

update

import requests

requests.patch('https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/syncs/subscriptions/<__subscriptionId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('syncs/subscriptions/<__subscriptionId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/syncs/subscriptions/<subscriptionId>

Syncs

A sync setup for a certain system

Sync object

The following attributes are defined.

sample

{
    "systemId": "11111111-2222-3333-4444-555555555555",
    "syncType": "order",
    "fetch": true,
    "templateIn": "whatever",
    "templateOut": "whatever"
}
name type description settings
fetch boolean Whether regular fetches are needed to retrieve data for this sync
syncType string The type of the sync required
systemId string The id of the system required
templateIn string The CML template to use to translate incoming data into the Cresco format
templateOut string The Mako template to use to translate outgoing data into the foreign system format

add

import requests

requests.post('https://api.crescodata.com/v3/systems/syncs')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/syncs
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('systems/syncs')


HTTP Request

POST https://api.crescodata.com/v3/systems/syncs

delete

import requests

requests.delete('https://api.crescodata.com/v3/systems/syncs/<__syncId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/syncs/<__syncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('systems/syncs/<__syncId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/systems/syncs/<syncId>

get

import requests

requests.get('https://api.crescodata.com/v3/systems/syncs/<__syncId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/syncs/<__syncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/syncs/<__syncId__>')


HTTP Request

GET https://api.crescodata.com/v3/systems/syncs/<syncId>

list

import requests

requests.get('https://api.crescodata.com/v3/systems/syncs')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/syncs
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/syncs')


HTTP Request

GET https://api.crescodata.com/v3/systems/syncs

replace

import requests

requests.put('https://api.crescodata.com/v3/systems/syncs/<__syncId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/syncs/<__syncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('systems/syncs/<__syncId__>')


HTTP Request

PUT https://api.crescodata.com/v3/systems/syncs/<syncId>

update

import requests

requests.patch('https://api.crescodata.com/v3/systems/syncs/<__syncId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/syncs/<__syncId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('systems/syncs/<__syncId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/systems/syncs/<syncId>

Systems

Cresco’s supported systems

System object

The following attributes are defined.

sample

{
    "systemId": "11111111-2222-3333-4444-555555555555",
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "parentId": "11111111-2222-3333-4444-555555555555",
    "type": "marketplace",
    "name": "Lazada",
    "country": "SG",
    "currency": "SGD",
    "settings": {
        "productsGetSize": 100
    },
    "logo": "https://route-to-image.jpeg"
}
name type description settings
agencyId string The agency this system belongs to required
backend string The backend to be used for communication with this system
country string The country this system runs in
currency string The currency used the system
isDestination boolean Whether this system is a destination channel for this agency
isSource boolean Whether this system is a source for this agency
language string The language used by this system
logo string The url to the system thumbnail logo
name string The name of the system
parentId string The id of this parent system required
settings object Any system specific settings
systemId string The id of the system
type string The type of this system

add

import requests

requests.post('https://api.crescodata.com/v3/systems')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('systems')


HTTP Request

POST https://api.crescodata.com/v3/systems

delete

import requests

requests.delete('https://api.crescodata.com/v3/systems/<__systemId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/<__systemId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('systems/<__systemId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/systems/<systemId>

get

import requests

requests.get('https://api.crescodata.com/v3/systems/<__systemId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/<__systemId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems/<__systemId__>')


HTTP Request

GET https://api.crescodata.com/v3/systems/<systemId>

list

import requests

requests.get('https://api.crescodata.com/v3/systems')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('systems')


HTTP Request

GET https://api.crescodata.com/v3/systems

replace

import requests

requests.put('https://api.crescodata.com/v3/systems/<__systemId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/<__systemId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('systems/<__systemId__>')


HTTP Request

PUT https://api.crescodata.com/v3/systems/<systemId>

update

import requests

requests.patch('https://api.crescodata.com/v3/systems/<__systemId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/systems/<__systemId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('systems/<__systemId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/systems/<systemId>

Taxonomies

A list of foreign taxonomies

Taxonomy object

The following attributes are defined.

sample

{
    "id": "11111111-2222-3333-4444-555555555555",
    "name": "Google"
}
name type description settings
id string The internal id of the taxonomy
name string The name of the taxonomy required

add

import requests

requests.post('https://api.crescodata.com/v3/taxonomies')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/taxonomies
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.post('taxonomies')


HTTP Request

POST https://api.crescodata.com/v3/taxonomies

delete

import requests

requests.delete('https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>')
curl -X DELETE -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.delete('taxonomies/<__taxonomyId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/taxonomies/<taxonomyId>

get

import requests

requests.get('https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('taxonomies/<__taxonomyId__>')


HTTP Request

GET https://api.crescodata.com/v3/taxonomies/<taxonomyId>

list

import requests

requests.get('https://api.crescodata.com/v3/taxonomies')
curl -X GET -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/taxonomies
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.get('taxonomies')


HTTP Request

GET https://api.crescodata.com/v3/taxonomies

replace

import requests

requests.put('https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>')
curl -X PUT -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.put('taxonomies/<__taxonomyId__>')


HTTP Request

PUT https://api.crescodata.com/v3/taxonomies/<taxonomyId>

update

import requests

requests.patch('https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>')
curl -X PATCH -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/taxonomies/<__taxonomyId__>
require 'cresco'

cresco = Cresco::Client.create(<CLIENT_ID>, <CLIENT_SECRET>)
cresco.authorize()

cresco.patch('taxonomies/<__taxonomyId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/taxonomies/<taxonomyId>