Resources

We break a Resource into two concepts; a resource as a reusable asset and a retail resource that is meant to be sold.

If not specified, an asset resource is created.

Changes since API version2019-02-01

2019-09-18 - `image` type changed to Object

image changed to Image Object.

2019-09-02 - `image_url` Deprecated

We are deprecating the old image_urland replacing it with Image Object.

Asset Resource Object

Attribute

Type

Description

method

string

The resource type. asset or retail.

user

object

User associated with the resource.

name

string

Name of the resource item.

description

string

Description of the resource item.

image

object

Imageobject for this resource.

product

object

Product associated with the resource.

tags

array

An array of tags.

human_id

string

6 character ID.

status

string

Status of the resource. Default is CREATED, other options are listed below.

Retail Resource Object

In addition to the attributes in the asset resource, the retailresource has the following attributes.

Attribute

Type

Description

_sub_products

array

An array with sub-products associated with the resource.

base_price

number

The sum of the product.price and price in all the _sub_products.

retail_price

number

The amount that this resource is sold for.

currency

string

The currency in the main product in the resource.

vat

number

The VAT from the main product in the resource. A decimal value between 0 and 1, e.g. 0.25 = 25%.

Resource Status

Default status for the resource is CREATED. Change the status by updating the resource.

Status

CREATED

PROCESSING

UTILIZED

IDLE

ON_THE_WAY_FROM

ON_THE_WAY_TO

DONE

User Role

Create a new Resource*

Body Parameters

Type

Description

name

string

Name of the resource item.

product

string

Product ID to be associated with the resource.

description

string

Description of the resource item.

status

string

Status of the resource, default is CREATED other options are PROCESSING, UTILIZED, IDLE.

image

string

Image ID for this resource.

reference_id

string

Customizable ID for the resource

Update a Resource*

Path Parameter

Type

Description

resource_id

string

The resource’s ID

Body Parameters

Type

Description

name

string

Name of the resource item.

description

string

Description of the resource item.

user

string

User ID to be associated with a user.

status

string

Status of the resource. Default is CREATED; other options are PROCESSING, UTILIZED or IDLE.

product

string

Product ID to be associated with the resource.

image

string

Image object for this resource.

reference_id

string

Customizable ID for the resource.

Retrieve a Resource by ID*

Path Parameter

Type

Description

resource_id

string

The resource’s ID.

List All Resources*

Query Parameters

Type

Description

include_deleted

boolean

If true, the request also returns deleted resources.

size

number

Number of resources per page. Default is 10.

page

number

Defines which page to retrieve. Default is 0.

from_date

number

Start date, timestamp format. Default is None.

to_date

number

End date, timestamp format. Default is None.

sort

string

Field used to sort results. Default is -created.

status

string

Status of the resource. Default is CREATED; other options are PROCESSING, UTILIZED or IDLE

Search Resources by Keywords*

Search by _id, name, reference_id, description and image_url. Returns an array that matches the query. Filter the query by using pagination.

Query Parameters

Type

Description

query

string

Partial or full string of name, reference_id, description or image_url.

include_deleted

boolean

If true, the request also returns deleted resources.

size

number

Number of resources per page. Default is 10.

page

number

Defines which page to retrieve. Default is 0.

from_date

number

Start date, timestamp format. Default is None.

to_date

number

End date, timestamp format. Default is None.

sort

string

Field used to sort results. Default is created.

Admin Role

*Paths listed above and denoted with a star are accessible to both Users and Admins. Additional Admin Role paths are listed below.

Create new Resources in Bulk

Body Parameters

Type

Description

name

string

Name of the resource item.

description

string

Description of the resource item.

user

string

User ID to be associated with a User.

status

string

Status of the resource _default is CREATED other options are PROCESSING, UTILIZED, IDLE

product

string

Product ID to be associated with the resource.

image

string

Image ID for this resource.

reference_id

string

Customizable ID for the resource.

Delete a Resource

Path Parameters

Type

Description

<resource_id>

string

ID of the resource to be deleted.

Last updated