Skip to main content

Design Builder API v2

Quick Startโ€‹

# List available operations
epilot design

# Call an operation
epilot design getAllDesigns

Common Flagsโ€‹

FlagDescription
-p key=valueSet a named parameter
-d '{...}'Request body JSON
-H 'Key: Value'Custom header
-t, --token <token>Bearer token for authentication
--profile <name>Use a named profile
-s, --server <url>Override server base URL
-i, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operationsโ€‹

design-builder

  • getAllDesigns โ€” Scan all designs linked to a organization, based in orgId attribute from JWT auth token
  • addDesign โ€” Create a brand new design linked to a organization, based in orgId attribute from JWT auth token
  • getDesign โ€” Search for a especific design owned by user organization
  • updateDesign โ€” Update a especific design owned by user organization
  • deleteDesign โ€” Search and delete for a especific design owned by user organization
  • getThemeFromDesign โ€” Search for a especific design owned by user organization and parse them to a new or old theme
  • getFiles โ€” List all files for the user organization bucket
  • uploadFile โ€” Upload a new file for the user organization bucket
  • getConsumerDesign โ€” Search for a especific design owned by user organization
  • addConsumer โ€” Add a consumer that uses a specific design
  • removeConsumer โ€” Remove a consumer that uses a specific design

getAllDesignsโ€‹

Scan all designs linked to a organization, based in orgId attribute from JWT auth token

GET /v1/designs

Sample Call

epilot design getAllDesigns

With JSONata filter:

epilot design getAllDesigns --jsonata '$'
Sample Response
[
{
"designs": [
{}
]
}
]

addDesignโ€‹

Create a brand new design linked to a organization, based in orgId attribute from JWT auth token

POST /v1/designs

Request Body (required)

Sample Call

epilot design addDesign

With request body:

epilot design addDesign \
-d '{
"design": {
"brand_id": "string",
"brand_name": "string",
"user": {
"emailaddress": "string",
"fullname": "string",
"name": "string",
"userid": "string"
},
"style_name": "string",
"style": {
"logo": {
"main": {
"name": "string",
"display_name": "string",
"file_type": "LOGO",
"s3_object_key": "string",
"url": "string"
}
},
"palette": {
"primary": "string",
"secondary": "string",
"error": "string",
"background": "string",
"paper": "string",
"navbar": "string",
"portal_login_background": "string"
},
"typography": {
"font": {
"font_id": "string",
"font_name": "string",
"font_family": "string",
"font_weight_regular": "string",
"font_weight_medium": "string",
"font_weight_bold": "string",
"urls": [
{
"type": "WOFF2",
"url": "string"
}
]
},
"primary": "string",
"secondary": "string"
},
"shape": {
"border_radius": 0
},
"consumer": {
"widgets": [
{
"id": "string",
"name": "string"
}
],
"customer_portals": [
{
"id": "string",
"name": "string"
}
]
}
},
"is_default": true,
"custom_theme": "string",
"use_custom_theme": true,
"design_tokens": {
"coupon": "string",
"cashback": "string",
"custom_css": "string"
}
}
}'

Using stdin pipe:

cat body.json | epilot design addDesign

With JSONata filter:

epilot design addDesign --jsonata 'design'
Sample Response
{
"design": {
"id": "string",
"created_at": "2021-01-30T08:30:00Z",
"created_by": "string",
"edited": true,
"last_modified_at": "string",
"brand_id": "string",
"brand_name": "string",
"user": {
"emailaddress": "string",
"fullname": "string",
"name": "string",
"userid": "string"
},
"style_name": "string",
"style": {
"logo": {},
"palette": {},
"typography": {},
"shape": {},
"consumer": {}
},
"is_default": true,
"custom_theme": "string",
"use_custom_theme": true,
"design_tokens": {
"coupon": "string",
"cashback": "string",
"custom_css": "string"
}
}
}

getDesignโ€‹

Search for a especific design owned by user organization

GET /v1/designs/{designId}

Parameters

NameInTypeRequiredDescription
designIdpathstringYesId of the design

Sample Call

epilot design getDesign \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a

Using positional args for path parameters:

epilot design getDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a

With JSONata filter:

epilot design getDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a --jsonata 'design'
Sample Response
{
"design": {
"id": "string",
"created_at": "2021-01-30T08:30:00Z",
"created_by": "string",
"edited": true,
"last_modified_at": "string",
"brand_id": "string",
"brand_name": "string",
"user": {
"emailaddress": "string",
"fullname": "string",
"name": "string",
"userid": "string"
},
"style_name": "string",
"style": {
"logo": {},
"palette": {},
"typography": {},
"shape": {},
"consumer": {}
},
"is_default": true,
"custom_theme": "string",
"use_custom_theme": true,
"design_tokens": {
"coupon": "string",
"cashback": "string",
"custom_css": "string"
}
}
}

updateDesignโ€‹

Update a especific design owned by user organization

PUT /v1/designs/{designId}

Parameters

NameInTypeRequiredDescription
designIdpathstringYesId of the design

Request Body (required)

Sample Call

epilot design updateDesign \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a

With request body:

epilot design updateDesign \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \
-d '{
"design": {
"brand_id": "string",
"brand_name": "string",
"user": {
"emailaddress": "string",
"fullname": "string",
"name": "string",
"userid": "string"
},
"style_name": "string",
"style": {
"logo": {
"main": {
"name": "string",
"display_name": "string",
"file_type": "LOGO",
"s3_object_key": "string",
"url": "string"
}
},
"palette": {
"primary": "string",
"secondary": "string",
"error": "string",
"background": "string",
"paper": "string",
"navbar": "string",
"portal_login_background": "string"
},
"typography": {
"font": {
"font_id": "string",
"font_name": "string",
"font_family": "string",
"font_weight_regular": "string",
"font_weight_medium": "string",
"font_weight_bold": "string",
"urls": [
{
"type": "WOFF2",
"url": "string"
}
]
},
"primary": "string",
"secondary": "string"
},
"shape": {
"border_radius": 0
},
"consumer": {
"widgets": [
{
"id": "string",
"name": "string"
}
],
"customer_portals": [
{
"id": "string",
"name": "string"
}
]
}
},
"is_default": true,
"custom_theme": "string",
"use_custom_theme": true,
"design_tokens": {
"coupon": "string",
"cashback": "string",
"custom_css": "string"
}
}
}'

Using positional args for path parameters:

epilot design updateDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a

Using stdin pipe:

cat body.json | epilot design updateDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a

With JSONata filter:

epilot design updateDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a --jsonata '$'

deleteDesignโ€‹

Search and delete for a especific design owned by user organization

DELETE /v1/designs/{designId}

Parameters

NameInTypeRequiredDescription
designIdpathstringYesId of the design

Sample Call

epilot design deleteDesign \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a

Using positional args for path parameters:

epilot design deleteDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a

With JSONata filter:

epilot design deleteDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a --jsonata '$'

getThemeFromDesignโ€‹

Search for a especific design owned by user organization and parse them to a new or old theme

GET /v1/designs/{designId}/parse

Parameters

NameInTypeRequiredDescription
designIdpathstringYesId of the design
orgIdquerystringNoOrganization id of the user
themequery"NEW" | "OLD"YesType of theme to be parsed and returned

Sample Call

epilot design getThemeFromDesign \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \
-p theme=NEW

Using positional args for path parameters:

epilot design getThemeFromDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a

With JSONata filter:

epilot design getThemeFromDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p theme=NEW --jsonata '$'
Sample Response
{}

getFilesโ€‹

List all files for the user organization bucket

GET /v1/designs/files

Parameters

NameInTypeRequiredDescription
typequery"LOGO" | "FONT"NoType of files to be returned

Sample Call

epilot design getFiles

With JSONata filter:

epilot design getFiles --jsonata '$'
Sample Response
[
{
"name": "string",
"display_name": "string",
"file_type": "LOGO",
"s3_object_key": "string",
"url": "string"
}
]

uploadFileโ€‹

Upload a new file for the user organization bucket

POST /v1/designs/files

Sample Call

epilot design uploadFile

With JSONata filter:

epilot design uploadFile --jsonata '$'
Sample Response
{
"name": "string",
"display_name": "string",
"file_type": "LOGO",
"s3_object_key": "string",
"url": "string"
}

getConsumerDesignโ€‹

Search for a especific design owned by user organization

GET /v1/designs/consumer/{application}/{consumerId}

Parameters

NameInTypeRequiredDescription
consumerIdpathstringYesId of the design
applicationpathstringYesType of application that uses the design

Sample Call

epilot design getConsumerDesign \
-p consumerId=4a062990-a6a3-11eb-9828-4f3da7d4935a \
-p application=journey

Using positional args for path parameters:

epilot design getConsumerDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a journey

With JSONata filter:

epilot design getConsumerDesign -p consumerId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey --jsonata 'design'
Sample Response
{
"design": {
"id": "string",
"created_at": "2021-01-30T08:30:00Z",
"created_by": "string",
"edited": true,
"last_modified_at": "string",
"brand_id": "string",
"brand_name": "string",
"user": {
"emailaddress": "string",
"fullname": "string",
"name": "string",
"userid": "string"
},
"style_name": "string",
"style": {
"logo": {},
"palette": {},
"typography": {},
"shape": {},
"consumer": {}
},
"is_default": true,
"custom_theme": "string",
"use_custom_theme": true,
"design_tokens": {
"coupon": "string",
"cashback": "string",
"custom_css": "string"
}
}
}

addConsumerโ€‹

Add a consumer that uses a specific design

PUT /v1/designs/addConsumer/{application}/{designId}

Parameters

NameInTypeRequiredDescription
designIdpathstringYesId of the design
applicationpathstringYesType of application that uses the design

Request Body (required)

Sample Call

epilot design addConsumer \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \
-p application=journey \
-d '{"consumer_id":"string","consumer_name":"string","should_delete":"string"}'

Using positional args for path parameters:

epilot design addConsumer 4a062990-a6a3-11eb-9828-4f3da7d4935a journey

Using stdin pipe:

cat body.json | epilot design addConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey

With JSONata filter:

epilot design addConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey --jsonata '$'

removeConsumerโ€‹

Remove a consumer that uses a specific design

PUT /v1/designs/removeConsumer/{application}/{designId}

Parameters

NameInTypeRequiredDescription
designIdpathstringYesId of the design
applicationpathstringYesType of application that uses the design

Request Body (required)

Sample Call

epilot design removeConsumer \
-p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \
-p application=journey \
-d '{"consumer_id":"string","consumer_name":"string","should_delete":"string"}'

Using positional args for path parameters:

epilot design removeConsumer 4a062990-a6a3-11eb-9828-4f3da7d4935a journey

Using stdin pipe:

cat body.json | epilot design removeConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey

With JSONata filter:

epilot design removeConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey --jsonata '$'