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
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>

ChannelLinks

A table linking the app’s stores to its publishing systems and auth.

The following attributes are defined.

sample

{
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "storeId": "123",
    "channelId": "900",
    "systemId": "11111111-2222-3333-4444-555555555555",
    "companyId": "11111111-2222-3333-4444-555555555555",
    "meta": {
        "id": "11111111-2222-3333-4444-555555555555"
    }
}
name type description settings
agencyId string The app / agency ID required
channelId string The app’s channel ID required
companyId string The cresco company ID this channel is for required
data object Any additional data for this channel link
meta object The authentication information
storeId string The app’s store ID required
systemId string The cresco destination channel system ID required

add

import requests

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

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

cresco.post('apps/channel_links')


HTTP Request

POST https://api.crescodata.com/v3/apps/channel_links

delete

import requests

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

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

cresco.delete('apps/channel_links/<__channellinkId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/apps/channel_links/<channellinkId>

get

import requests

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

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

cresco.get('apps/channel_links/<__channellinkId__>')


HTTP Request

GET https://api.crescodata.com/v3/apps/channel_links/<channellinkId>

list

import requests

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

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

cresco.get('apps/channel_links')


HTTP Request

GET https://api.crescodata.com/v3/apps/channel_links

replace

import requests

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

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

cresco.put('apps/channel_links/<__channellinkId__>')


HTTP Request

PUT https://api.crescodata.com/v3/apps/channel_links/<channellinkId>

update

import requests

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

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

cresco.patch('apps/channel_links/<__channellinkId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/apps/channel_links/<channellinkId>

Channels

A table linking the app’s channel ID to the app’s store ID, destination system ID and settings.

Channel object

The following attributes are defined.

sample

{
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "channelId": "123",
    "appSystemId": "11111111-2222-3333-4444-555555555555",
    "storeId": "911",
    "systemId": "11111111-2222-3333-4444-555555555555"
}
name type description settings
agencyId string The app / agency ID required
appSystemId string The cresco source system ID required
channelId string The app’s system ID required
settings object The settings provided from after the user installation process, compressed
storeId string The app’s store ID required
systemId string The cresco destination channel system ID required
systemUserId string The user ID that was used to authenticate this channel, if applicable

add

import requests

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

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

cresco.post('apps/channels')


HTTP Request

POST https://api.crescodata.com/v3/apps/channels

delete

import requests

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

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

cresco.delete('apps/channels/<__channelId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/apps/channels/<channelId>

get

import requests

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

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

cresco.get('apps/channels/<__channelId__>')


HTTP Request

GET https://api.crescodata.com/v3/apps/channels/<channelId>

list

import requests

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

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

cresco.get('apps/channels')


HTTP Request

GET https://api.crescodata.com/v3/apps/channels

replace

import requests

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

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

cresco.put('apps/channels/<__channelId__>')


HTTP Request

PUT https://api.crescodata.com/v3/apps/channels/<channelId>

update

import requests

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

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

cresco.patch('apps/channels/<__channelId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/apps/channels/<channelId>

Companies

Stores company data

Company object

The following attributes are defined.

sample

{
    "companyId": "11111111-2222-3333-4444-555555555555",
    "name": "Cresco Data",
    "country": "SG",
    "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
logo string The url to the system thumbnail logo
name string The name of the company required

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>

CompanyStores

A table to get the store ID given a company ID. Note a store can have multiple companies.

CompanyStore object

The following attributes are defined.

sample

{
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "companyId": "11111111-2222-3333-4444-555555555555",
    "storeId": "911"
}
name type description settings
agencyId string The app / agency ID required
companyId string The cresco company ID required
storeId string The app’s store ID required

add

import requests

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

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

cresco.post('apps/stores')


HTTP Request

POST https://api.crescodata.com/v3/apps/stores

delete

import requests

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

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

cresco.delete('apps/stores/<__companystoreId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/apps/stores/<companystoreId>

get

import requests

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

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

cresco.get('apps/stores/<__companystoreId__>')


HTTP Request

GET https://api.crescodata.com/v3/apps/stores/<companystoreId>

list

import requests

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

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

cresco.get('apps/stores')


HTTP Request

GET https://api.crescodata.com/v3/apps/stores

replace

import requests

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

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

cresco.put('apps/stores/<__companystoreId__>')


HTTP Request

PUT https://api.crescodata.com/v3/apps/stores/<companystoreId>

update

import requests

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

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

cresco.patch('apps/stores/<__companystoreId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/apps/stores/<companystoreId>

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/system_mappings')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/system_mappings
require 'cresco'

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

cresco.post('system_mappings')


HTTP Request

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

delete

import requests

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

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

cresco.delete('system_mappings/<__mapId__>')


HTTP Request

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

get

import requests

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

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

cresco.get('system_mappings/<__mapId__>')


HTTP Request

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

list

import requests

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

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

cresco.get('system_mappings')


HTTP Request

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

replace

import requests

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

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

cresco.put('system_mappings/<__mapId__>')


HTTP Request

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

update

import requests

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

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

cresco.patch('system_mappings/<__mapId__>')


HTTP Request

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

Others

ParentTemplates

A sync setup for a certain system

ParentTemplate object

The following attributes are defined.

sample

{
    "parentId": "11111111-2222-3333-4444-555555555555",
    "syncType": "order",
    "templateIn": "whatever",
    "templateOut": "whatever"
}
name type description settings
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/templates/channels')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/templates/channels
require 'cresco'

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

cresco.post('templates/channels')


HTTP Request

POST https://api.crescodata.com/v3/templates/channels

delete

import requests

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

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

cresco.delete('templates/channels/<__parenttemplateId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/templates/channels/<parenttemplateId>

get

import requests

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

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

cresco.get('templates/channels/<__parenttemplateId__>')


HTTP Request

GET https://api.crescodata.com/v3/templates/channels/<parenttemplateId>

list

import requests

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

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

cresco.get('templates/channels')


HTTP Request

GET https://api.crescodata.com/v3/templates/channels

replace

import requests

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

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

cresco.put('templates/channels/<__parenttemplateId__>')


HTTP Request

PUT https://api.crescodata.com/v3/templates/channels/<parenttemplateId>

update

import requests

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

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

cresco.patch('templates/channels/<__parenttemplateId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/templates/channels/<parenttemplateId>

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",
    "authType": "fixed"
}
name type description settings
authType string The type of authentication for this system required
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
taxonomyId string The taxonomy ID
type string The type of this system required

add

import requests

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

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

cresco.post('channels')


HTTP Request

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

delete

import requests

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

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

cresco.delete('channels/<__parentId__>')


HTTP Request

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

get

import requests

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

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

cresco.get('channels/<__parentId__>')


HTTP Request

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

list

import requests

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

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

cresco.get('channels')


HTTP Request

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

replace

import requests

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

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

cresco.put('channels/<__parentId__>')


HTTP Request

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

update

import requests

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

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

cresco.patch('channels/<__parentId__>')


HTTP Request

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

Schedules

A table that stores the merchants we want to run. If empty, we will run integrations for all merchants.

Schedule object

The following attributes are defined.

sample

{
    "attributeName": "companyId",
    "values": [
        "11111111-2222-3333-4444-555555555555"
    ]
}
name type description settings
attributeName string The name of the attribute to filter integrations by required
values array A list of IDs based on the attribute name required

add

import requests

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

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

cresco.post('syncs/schedules')


HTTP Request

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

delete

import requests

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

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

cresco.delete('syncs/schedules/<__scheduleId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/syncs/schedules/<scheduleId>

get

import requests

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

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

cresco.get('syncs/schedules/<__scheduleId__>')


HTTP Request

GET https://api.crescodata.com/v3/syncs/schedules/<scheduleId>

list

import requests

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

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

cresco.get('syncs/schedules')


HTTP Request

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

replace

import requests

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

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

cresco.put('syncs/schedules/<__scheduleId__>')


HTTP Request

PUT https://api.crescodata.com/v3/syncs/schedules/<scheduleId>

update

import requests

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

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

cresco.patch('syncs/schedules/<__scheduleId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/syncs/schedules/<scheduleId>

StoreLinks

A table linking the app’s store ID to the source systems, auth and company. Note a store can have multiple companies, but a store for a system only has 1

The following attributes are defined.

sample

{
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "storeId": "123",
    "systemId": "11111111-2222-3333-4444-555555555555",
    "companyId": "11111111-2222-3333-4444-555555555555",
    "meta": {
        "id": "11111111-2222-3333-4444-555555555555"
    }
}
name type description settings
agencyId string The app / agency ID required
companyId string The cresco company ID this channel is for required
data object Any additional data for this channel link
meta object The authentication information
storeId string The app’s store ID required
systemId string The cresco destination channel or source app system ID required

add

import requests

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

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

cresco.post('apps/store_links')


HTTP Request

POST https://api.crescodata.com/v3/apps/store_links

delete

import requests

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

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

cresco.delete('apps/store_links/<__storelinkId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/apps/store_links/<storelinkId>

get

import requests

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

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

cresco.get('apps/store_links/<__storelinkId__>')


HTTP Request

GET https://api.crescodata.com/v3/apps/store_links/<storelinkId>

list

import requests

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

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

cresco.get('apps/store_links')


HTTP Request

GET https://api.crescodata.com/v3/apps/store_links

replace

import requests

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

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

cresco.put('apps/store_links/<__storelinkId__>')


HTTP Request

PUT https://api.crescodata.com/v3/apps/store_links/<storelinkId>

update

import requests

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

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

cresco.patch('apps/store_links/<__storelinkId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/apps/store_links/<storelinkId>

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>

SystemUsers

A table linking channel user IDs to the channel ID.

SystemUser object

The following attributes are defined.

sample

{
    "agencyId": "11111111-2222-3333-4444-555555555555",
    "systemUserId": "test@something.com",
    "channelId": "900",
    "systemId": "11111111-2222-3333-4444-555555555555"
}
name type description settings
agencyId string The app / agency ID required
channelId string The app’s channel ID required
systemId string The system ID this user ID is for. required
systemUserId string The channel user ID, as given from authorization or credentials information for the system required

add

import requests

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

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

cresco.post('apps/system_users')


HTTP Request

POST https://api.crescodata.com/v3/apps/system_users

delete

import requests

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

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

cresco.delete('apps/system_users/<__systemuserId__>')


HTTP Request

DELETE https://api.crescodata.com/v3/apps/system_users/<systemuserId>

get

import requests

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

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

cresco.get('apps/system_users/<__systemuserId__>')


HTTP Request

GET https://api.crescodata.com/v3/apps/system_users/<systemuserId>

list

import requests

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

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

cresco.get('apps/system_users')


HTTP Request

GET https://api.crescodata.com/v3/apps/system_users

replace

import requests

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

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

cresco.put('apps/system_users/<__systemuserId__>')


HTTP Request

PUT https://api.crescodata.com/v3/apps/system_users/<systemuserId>

update

import requests

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

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

cresco.patch('apps/system_users/<__systemuserId__>')


HTTP Request

PATCH https://api.crescodata.com/v3/apps/system_users/<systemuserId>

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",
    "authType": "oauth"
}
name type description settings
agencyId string The agency this system belongs to required
authType string The type of authentication for this system
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
taxonomyId string The taxonomy ID
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>

Templates

A sync setup for a certain system

Template object

The following attributes are defined.

sample

{
    "systemId": "11111111-2222-3333-4444-555555555555",
    "syncType": "order",
    "templateIn": "whatever",
    "templateOut": "whatever"
}
name type description settings
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/templates/systems')
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <token>" https://api.crescodata.com/v3/templates/systems
require 'cresco'

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

cresco.post('templates/systems')


HTTP Request

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

delete

import requests

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

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

cresco.delete('templates/systems/<__templateId__>')


HTTP Request

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

get

import requests

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

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

cresco.get('templates/systems/<__templateId__>')


HTTP Request

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

list

import requests

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

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

cresco.get('templates/systems')


HTTP Request

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

replace

import requests

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

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

cresco.put('templates/systems/<__templateId__>')


HTTP Request

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

update

import requests

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

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

cresco.patch('templates/systems/<__templateId__>')


HTTP Request

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