Appearance
Product
Marketplace products and installs.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v3.product.create | input: ProductInput | object |
v3.product.get | productId: string | object |
v3.product.list | filter?: { public?: boolean, type?: string, types?: string[], cid?: string, uid?: string }, options?: { search?: string, searchMode?: string, reverse?: boolean, sortBy?: string, sortOrder?: string } | object |
v3.product.remove | productId: string | boolean |
v3.product.setPublic | productId: string, isPublic: boolean | boolean |
v3.product.update | productId: string, update: Partial<ProductDoc> | object |
v3.product.create
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
cid | WorkspaceId | yes | workspaceId (former networkId) |
name | string | yes | Name of the product |
description | string | no | Description what this product is doing |
type | string | yes | Type of product in Hailer market |
targetId | any | no | |
ctaLabel | string | no | Call To Action button label |
ctaLink | string | no | Public URL related to the ctaLabel |
icon | fileId | yes | Icon id for the product |
images | fileId[] | yes | List of fileIds for showing pictures of the product |
externalUrl | string | no | Public URL for creator to show more information about the product |
gitUrl | string | no | Optional git repository URL of the app source code |
publisher | string | no | Author |
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
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | productId |
name | string | yes | Name of the product |
description | string | no | Description what this product is doing |
type | string | no | Type of product in Hailer market |
targetId | any | no | |
ctaLabel | string | no | Call To Action button label |
ctaLink | string | no | Public URL related to the ctaLabel |
icon | fileId | no | Icon id for the product |
images | fileId[] | no | List of fileIds for showing pictures of the product |
externalUrl | string | no | Public URL for creator to show more information about the product |
gitUrl | string | no | Optional git repository URL of the app source code |
publisher | string | no | Author |
public | boolean | yes | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
uid | userId | yes | userId |
cid | WorkspaceId | no | Workspace Id |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
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
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | productId |
name | string | yes | Name of the product |
description | string | no | Description what this product is doing |
type | string | no | Type of product in Hailer market |
targetId | any | no | |
ctaLabel | string | no | Call To Action button label |
ctaLink | string | no | Public URL related to the ctaLabel |
icon | fileId | no | Icon id for the product |
images | fileId[] | no | List of fileIds for showing pictures of the product |
externalUrl | string | no | Public URL for creator to show more information about the product |
gitUrl | string | no | Optional git repository URL of the app source code |
publisher | string | no | Author |
public | boolean | yes | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
uid | userId | yes | userId |
cid | WorkspaceId | no | Workspace Id |
Auth: callable without authentication.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.product.list
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
public | boolean | no | |
type | string | no | Type of product in Hailer market |
types | string[] | no | |
cid | WorkspaceId | no | Workspace Id |
uid | userId | no | User Id |
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | no | |
skip | number | no | |
search | string | no | |
searchMode | phrase | words | no | One of: phrase, words. |
reverse | boolean | no | |
sortBy | string | no | |
sortOrder | string | no |
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
| Field | Type | Required | Description |
|---|---|---|---|
products | object[] | yes | |
totalCount | number | yes |
Auth: callable without authentication.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
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?, debug? }.
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?, debug? }.
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):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | Name of the product |
description | string | no | Description what this product is doing |
icon | fileId | no | Icon id for the product |
images | fileId[] | no | List of fileIds for showing pictures of the product |
externalUrl | string | no | Public URL for creator to show more information about the product |
gitUrl | string | no | Optional git repository URL of the app source code |
publisher | string | no | Author |
public | boolean | no | |
type | string | no | Type of product in Hailer market |
ctaLabel | string | no | Call To Action button label |
ctaLink | string | no | Public 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
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | productId |
name | string | yes | Name of the product |
description | string | no | Description what this product is doing |
type | string | no | Type of product in Hailer market |
targetId | any | no | |
ctaLabel | string | no | Call To Action button label |
ctaLink | string | no | Public URL related to the ctaLabel |
icon | fileId | no | Icon id for the product |
images | fileId[] | no | List of fileIds for showing pictures of the product |
externalUrl | string | no | Public URL for creator to show more information about the product |
gitUrl | string | no | Optional git repository URL of the app source code |
publisher | string | no | Author |
public | boolean | yes | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
uid | userId | yes | userId |
cid | WorkspaceId | no | Workspace Id |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.