The Account resource is a collection of the general settings and information about merchants's account. One account can have multiple shops.

The resource lets you retrieve information about the account but doesn't let you update any information. Only the merchant can update this information from inside the Shirtplatform admin.

GET /accounts/session

Get the account that belongs to the currently authenticated user. The account is resolved from the authentication token, so no account id is passed in the path. This is the convenient equivalent of looking up your own account by id.

Parameters
Name In Default Constraints Description
x-auth-token header     The authentication token
Response Codes
Code Condition
200 the account was successfully retrieved
Response Body
Media Type Data Type Description
application/json Account
application/xml Account
Response (XML)
<account>
  <id>...</id>
  <name>...</name>
  <fullName>...</fullName>
  <affiliateId>...</affiliateId>
  <accountDataRetention>
    <id>...</id>
    <keepPersonalDataMonths>...</keepPersonalDataMonths>
    <keepPrintDataMonths>...</keepPrintDataMonths>
  </accountDataRetention>
  <persitenceConfig>
    <id>...</id>
    <archiveDays>...</archiveDays>
    <deleteDays>...</deleteDays>
  </persitenceConfig>
</account>
Response (JSON)
{
  "account" : {
    "id" : 12345,
    "name" : "...",
    "fullName" : "...",
    "affiliateId" : "...",
    "accountDataRetention" : {
      "id" : 12345,
      "keepPersonalDataMonths" : 12345,
      "keepPrintDataMonths" : 12345
    },
    "persitenceConfig" : { }
  }
}
GET /accounts/{accountId}

Get a single account by its id. The account must be the one the authenticated user belongs to; requesting another account's id is rejected by the ownership check. The account is read-only over the API — it can only be updated by the merchant from the Shirtplatform admin.

Parameters
Name In Default Constraints Description
x-auth-token header     The authentication token
accountId required path   int the unique identifier of the account
Response Codes
Code Condition
200 the account was successfully retrieved
Response Body
Media Type Data Type Description
application/json Account
application/xml Account
Response (XML)
<account>
  <id>...</id>
  <name>...</name>
  <fullName>...</fullName>
  <affiliateId>...</affiliateId>
  <accountDataRetention>
    <id>...</id>
    <keepPersonalDataMonths>...</keepPersonalDataMonths>
    <keepPrintDataMonths>...</keepPrintDataMonths>
  </accountDataRetention>
  <persitenceConfig>
    <id>...</id>
    <archiveDays>...</archiveDays>
    <deleteDays>...</deleteDays>
  </persitenceConfig>
</account>
Response (JSON)
{
  "account" : {
    "id" : 12345,
    "name" : "...",
    "fullName" : "...",
    "affiliateId" : "...",
    "accountDataRetention" : {
      "id" : 12345,
      "keepPersonalDataMonths" : 12345,
      "keepPrintDataMonths" : 12345
    },
    "persitenceConfig" : { }
  }
}