Unlike the shop's built-in motive catalog (the Motive resource), this library is scoped to the
calling customer. Entries are keyed by a customer key derived from the request: a temporary,
per-session library, or a permanent library identified by a customer key. An uploaded motive is
referenced by its returned id when it is placed in a design.
/accounts/{accountId}/shops/{shopId}/userMotives
List the motives in the customer's private library. Returns a paginated list of the motives uploaded by the calling customer.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
shopId |
required | path | int | the unique identifier of the shop | |
page |
query | 0 |
int | zero-based page index | |
size |
query | 10 |
int | number of items per page |
| Code | Condition |
|---|---|
| 200 | paginated list of the customer's motives |
<pagedData>
<records>...</records>
<totalElements>...</totalElements>
</pagedData>
{
"pagedData" : {
"records" : [ { }, { } ],
"totalElements" : 12345
}
}
/accounts/{accountId}/shops/{shopId}/userMotives/{motiveId}
Get a single user motive by its id.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
motiveId |
required | path | int | the unique identifier of the motive | |
shopId |
required | path | int | the unique identifier of the shop |
| Code | Condition |
|---|---|
| 200 | the motive was successfully retrieved |
| 404 | motive not found for the given id |
<motive>
<id>...</id>
<uuid>...</uuid>
<name>funny thing</name>
<type>VECTOR</type>
</motive>
{
"motive" : {
"id" : 12345,
"uuid" : "...",
"name" : "funny thing",
"type" : "VECTOR"
}
}
/accounts/{accountId}/shops/{shopId}/userMotives/{motiveId}
Delete a motive from the customer's private library. Removes the motive from the calling customer's library.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
motiveId |
required | path | int | the unique identifier of the motive to delete | |
shopId |
required | path | int | the unique identifier of the shop |
| Code | Condition |
|---|---|
| 204 | the motive was deleted successfully; no response body |
| 404 | motive not found in the customer's library for the given id |
| Media Type | Data Type | Description |
|---|---|---|
application/json |
object
|
|
application/xml |
anyType
|
/accounts/{accountId}/shops/{shopId}/userMotives/createFromData
Upload a motive to the customer's private library from a URL or inline data.
Supply the image either as a public url the platform downloads, or as
base64-encoded attachment bytes, together with a filename. The
motive is stored in the calling customer's library and returned.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
shopId |
required | path | int | the unique identifier of the shop |
| Media Type | Data Type | Description |
|---|---|---|
application/json |
UserMotiveUpload | the upload payload: either url or
attachment, plus filename |
application/xml |
UserMotiveUpload |
| Code | Condition |
|---|---|
| 200 | the motive was uploaded and stored in the customer's library |
<userMotiveUpload>
<attachment>...</attachment>
<filename>...</filename>
<url>...</url>
</userMotiveUpload>
{
"userMotiveUpload" : {
"attachment" : "...",
"filename" : "...",
"url" : "..."
}
}
<motive>
<id>...</id>
<uuid>...</uuid>
<name>funny thing</name>
<type>VECTOR</type>
</motive>
{
"motive" : {
"id" : 12345,
"uuid" : "...",
"name" : "funny thing",
"type" : "VECTOR"
}
}
/accounts/{accountId}/shops/{shopId}/userMotives/createFromMultipartForm
Upload a motive to the customer's private library via a multipart form.
The image bytes must be sent as multipart/form-data in the
uploadedFile form field; an optional name field carries the file
name. The motive is stored in the calling customer's library and returned.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
shopId |
required | path | int | the unique identifier of the shop |
| Media Type | Data Type | Description |
|---|---|---|
multipart/form-data |
(custom)
|
the multipart form containing the image file in uploadedFile |
| Code | Condition |
|---|---|
| 200 | the motive was uploaded and stored in the customer's library |
| 400 | no file content was supplied |
<motive>
<id>...</id>
<uuid>...</uuid>
<name>funny thing</name>
<type>VECTOR</type>
</motive>
{
"motive" : {
"id" : 12345,
"uuid" : "...",
"name" : "funny thing",
"type" : "VECTOR"
}
}