UserMotive Resource provides access to Customer's private Motive Library. Customer can rely on temporal Session related Library or permanent Library identified by a Customer Key.
GET /accounts/{accountId}/shops/{shopId}/userMotives

Get a list of user motives from your library.

Available Since
1.3.0
Parameters
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
Response Body
Media Type Data Type Description
application/json PagedData
application/xml PagedData
Response (XML)
<pagedData>
  <records>...</records>
  <totalElements>...</totalElements>
</pagedData>
Response (JSON)
{
  "pagedData" : {
    "records" : [ { }, { } ],
    "totalElements" : 12345
  }
}
GET /accounts/{accountId}/shops/{shopId}/userMotives/{motiveId}

Get a single motive by its id.

Available Since
1.3.0
Parameters
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
Response Body
Media Type Data Type Description
application/json Motive
application/xml Motive
Response (XML)
<motive>
  <id>...</id>
  <uuid>...</uuid>
  <name>funny thing</name>
  <type>VECTOR</type>
</motive>
Response (JSON)
{
  "motive" : {
    "id" : 12345,
    "uuid" : "...",
    "name" : "funny thing",
    "type" : "VECTOR"
  }
}
DELETE /accounts/{accountId}/shops/{shopId}/userMotives/{motiveId}

Delete motive.

Available Since
1.3.0
Parameters
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
Response Body
Media Type Data Type Description
application/json object
application/xml anyType
POST /accounts/{accountId}/shops/{shopId}/userMotives/createFromData

Handles single Shirtplatform UserMotiveUpload based File Upload.

Available Since
1.3.0
Parameters
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
Request Body
Media Type Data Type Description
application/json UserMotiveUpload the motive upload data including image URL and metadata
application/xml UserMotiveUpload
Response Body
Media Type Data Type Description
application/json Motive
application/xml Motive
Request (XML)
<userMotiveUpload>
  <attachment>...</attachment>
  <filename>...</filename>
  <url>...</url>
</userMotiveUpload>
Request (JSON)
{
  "userMotiveUpload" : {
    "attachment" : "...",
    "filename" : "...",
    "url" : "..."
  }
}
Response (XML)
<motive>
  <id>...</id>
  <uuid>...</uuid>
  <name>funny thing</name>
  <type>VECTOR</type>
</motive>
Response (JSON)
{
  "motive" : {
    "id" : 12345,
    "uuid" : "...",
    "name" : "funny thing",
    "type" : "VECTOR"
  }
}
POST /accounts/{accountId}/shops/{shopId}/userMotives/createFromMultipartForm

Handles single HTTP Form-based File Upload.

Available Since
1.3.0
Parameters
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
Request Body
Media Type Data Type Description
multipart/form-data (custom) the multipart form data containing the motive image file
Response Body
Media Type Data Type Description
application/json Motive
application/xml Motive
Response (XML)
<motive>
  <id>...</id>
  <uuid>...</uuid>
  <name>funny thing</name>
  <type>VECTOR</type>
</motive>
Response (JSON)
{
  "motive" : {
    "id" : 12345,
    "uuid" : "...",
    "name" : "funny thing",
    "type" : "VECTOR"
  }
}