Skip to content

Product ​

Marketplace products and installs.

Endpoints ​

EndpointArgumentsReturns
v3.product.createinput: ProductInputobject
v3.product.getproductId: stringobject
v3.product.listfilter?: { public?: boolean, type?: string, types?: string[], cid?: string, uid?: string }, options?: { search?: string, searchMode?: string, reverse?: boolean, sortBy?: string, sortOrder?: string }object
v3.product.removeproductId: stringboolean
v3.product.setPublicproductId: string, isPublic: booleanboolean
v3.product.updateproductId: string, update: Partial<ProductDoc>object

v3.product.create ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, optional):

FieldTypeRequiredDescription
cidWorkspaceIdyesworkspaceId (former networkId)
namestringyesName of the product
descriptionstringnoDescription what this product is doing
typestringyesType of product in Hailer market
targetIdanyno
ctaLabelstringnoCall To Action button label
ctaLinkstringnoPublic URL related to the ctaLabel
iconfileIdyesIcon id for the product
imagesfileId[]yesList of fileIds for showing pictures of the product (at least one)
externalUrlstringnoPublic URL for creator to show more information about the product
gitUrlstringnoOptional git repository URL of the app source code
publisherstringnoAuthor

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.product.create', [
  {
    cid: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
    name: 'string', // Name of the product
    type: 'string', // Type of product in Hailer market
    icon: '507f1f77bcf86cd799439011', // Icon id for the product
    images: ['507f1f77bcf86cd799439011'], // List of fileIds for showing pictures of the product (at least one)
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
_idObjectIdyesproductId
namestringyesName of the product
descriptionstringnoDescription what this product is doing
typestringnoType of product in Hailer market
targetIdanyno
ctaLabelstringnoCall To Action button label
ctaLinkstringnoPublic URL related to the ctaLabel
iconfileIdnoIcon id for the product
imagesfileId[]noList of fileIds for showing pictures of the product
externalUrlstringnoPublic URL for creator to show more information about the product
gitUrlstringnoOptional git repository URL of the app source code
publisherstringnoAuthor
publicbooleanyes
createdtimestampyesTime (milliseconds since 1970-01-01 UTC)
updatedtimestampyesTime (milliseconds since 1970-01-01 UTC)
uiduserIdyesuserId
cidWorkspaceIdnoWorkspace Id

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

v3.product.get ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required): Product Id in Hailer market

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.product.get', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

FieldTypeRequiredDescription
_idObjectIdyesproductId
namestringyesName of the product
descriptionstringnoDescription what this product is doing
typestringnoType of product in Hailer market
targetIdanyno
ctaLabelstringnoCall To Action button label
ctaLinkstringnoPublic URL related to the ctaLabel
iconfileIdnoIcon id for the product
imagesfileId[]noList of fileIds for showing pictures of the product
externalUrlstringnoPublic URL for creator to show more information about the product
gitUrlstringnoOptional git repository URL of the app source code
publisherstringnoAuthor
publicbooleanyes
createdtimestampyesTime (milliseconds since 1970-01-01 UTC)
updatedtimestampyesTime (milliseconds since 1970-01-01 UTC)
uiduserIdyesuserId
cidWorkspaceIdnoWorkspace Id

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

v3.product.list ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, optional):

FieldTypeRequiredDescription
publicbooleanno
typestringnoType of product in Hailer market
typesstring[]no
cidWorkspaceIdnoWorkspace Id
uiduserIdnoUser Id

Argument 2 (object, optional):

FieldTypeRequiredDescription
limitnumberno
skipnumberno
searchstringno
searchModephrase | wordsno
reversebooleanno
sortBystringno
sortOrderstringno

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.product.list', [
  {
    public: false,
    type: 'string', // Type of product in Hailer market
  },
  {
    limit: 0,
    skip: 0,
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
productsobject[]yesSee below.
totalCountnumberyes

products[] (object):

FieldTypeRequiredDescription
_idObjectIdyesproductId
namestringyesName of the product
descriptionstringnoDescription what this product is doing
typestringnoType of product in Hailer market
targetIdanyno
ctaLabelstringnoCall To Action button label
ctaLinkstringnoPublic URL related to the ctaLabel
iconfileIdnoIcon id for the product
imagesfileId[]noList of fileIds for showing pictures of the product
externalUrlstringnoPublic URL for creator to show more information about the product
gitUrlstringnoOptional git repository URL of the app source code
publisherstringnoAuthor
publicbooleanyes
createdtimestampyesTime (milliseconds since 1970-01-01 UTC)
updatedtimestampyesTime (milliseconds since 1970-01-01 UTC)
uiduserIdyesuserId
cidWorkspaceIdnoWorkspace Id
hashanyno

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

v3.product.remove ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required): Product Id in Hailer market

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.product.remove', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

boolean

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

v3.product.setPublic ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required): Product Id in Hailer market

Argument 2 (boolean, required): Visible or not in Hailer market

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.product.setPublic', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  false, // Visible or not in Hailer market (required)
]);
console.log(result);

Returns

boolean

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

v3.product.update ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required): Product Id in Hailer market

Argument 2 (object, required):

FieldTypeRequiredDescription
namestringnoName of the product
descriptionstringnoDescription what this product is doing
iconfileIdnoIcon id for the product
imagesfileId[]noList of fileIds for showing pictures of the product (at least one)
externalUrlstringnoPublic URL for creator to show more information about the product
gitUrlstringnoOptional git repository URL of the app source code
publisherstringnoAuthor
publicbooleanno
typestringnoType of product in Hailer market
ctaLabelstringnoCall To Action button label
ctaLinkstringnoPublic URL related to the ctaLabel

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.product.update', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  {
    name: 'string', // Name of the product
    description: 'string', // Description what this product is doing
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
_idObjectIdyesproductId
namestringyesName of the product
descriptionstringnoDescription what this product is doing
typestringnoType of product in Hailer market
targetIdanyno
ctaLabelstringnoCall To Action button label
ctaLinkstringnoPublic URL related to the ctaLabel
iconfileIdnoIcon id for the product
imagesfileId[]noList of fileIds for showing pictures of the product
externalUrlstringnoPublic URL for creator to show more information about the product
gitUrlstringnoOptional git repository URL of the app source code
publisherstringnoAuthor
publicbooleanyes
createdtimestampyesTime (milliseconds since 1970-01-01 UTC)
updatedtimestampyesTime (milliseconds since 1970-01-01 UTC)
uiduserIdyesuserId
cidWorkspaceIdnoWorkspace Id

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

Hailer Developer Documentation · v1.8.0