Welcome to the SUZURI API!

Overview

This page describes about SUZURI API v1.

HTTPS request

Developers must use HTTPS. Host name is suzuri.jp

Parameters

There are 4 type of HTTP methods for using SUZURI API, they are GET, POST, PUT, DELETE. Many API allow request including parameters. Developers have to use query string when using GET method, and use application/json type request body when using other methods.

Status codes

SUZURI API return some status codes. It returns 200 (or 204 with deleting) after operations succeed, and returns 40x or 50x when operations fail. Response body is uncertain when operation fails, so developers should confirm status code first of the all.

Rate limit

There is access ratelimitations some part of API. The informations of limitaion are included in response headers, named X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

Authentication

Requests must include an access token, which is issued by the authentication flow as follows.

Access token

Access token should be included in request headers like,

Authorization: Bearer 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd

Curl command samples on this page miss header option above. Therefore, when using curl command in practice, developers should add options like below.

-H "Authorization: Bearer 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd"

Activity

It is the event that occurred in the SUZURI

Activity List

Get activities list for current user.

GET /api/v1/activities

Optional Parameters

Name Type Description Example
limit string limit of Activitys list (default 10) pattern: [1-9]|[1-4][0-9]|50$ 30

Curl Example

$ curl -n -X GET /api/v1/activities
 -G \
  -d limit=30

Response Example

HTTP/1.1 200 OK
{
  "activities": [
    {
      "message": "鹿さん が【去年の暮れあたりから蝶がついてきてるモグラ Tシャツ】にズッキュンしたよ。",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "eventType": "favorite",
      "sender": {
        "id": 1,
        "name": "surisurikun",
        "displayName": "忍者スリスリくん",
        "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488",
        "profile": {
          "url": "https://suzuri.jp/",
          "body": "こんにちは!SUZURI の公式忍者・スリスリくんです。\\nキミも忍者にならないか?",
          "headerUrl": "https://dp3obxrw75ln8.cloudfront.net/profiles/headers/10.png?1398245916"
        },
        "identities": [
          {
            "id": 1,
            "provider": "twitter",
            "uid": 1181557592,
            "nickname": "surisurikun",
            "url": "https://twitter.com/surisurikun"
          }
        ]
      }
    }
  ]
}

Activity Unreads Count

Get number of unreads activities

GET /api/v1/activities/unreads

Curl Example

$ curl -n -X GET /api/v1/activities/unreads

Response Example

HTTP/1.1 200 OK
{
  "unreads": 3
}

Choice

Choice

Attributes

Name Type Description Example
id integer unique identifier of Choice 7
title string title of Choice "スリスリピックアップ"
description nullable string description of Choice "猫の商品を沢山あつめてみました。"
secret boolean flag of secret mode false
bannerUrl nullable uri url of banner image of choice "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246"
productsCount integer count of Products included by Choice 1
user:id integer unique identifier of User 1
user:name string unique name of User "surisurikun"
user:displayName nullable string descriptive label for User, displayed on the screen "忍者スリスリくん"
user:avatarUrl nullable string url avatar image of User "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"

Choice Info

get info for Choice selected by id

GET /api/v1/choices/{choice_id}

Curl Example

$ curl -n -X GET /api/v1/choices/$CHOICE_ID

Response Example

HTTP/1.1 200 OK
{
  "choice": {
    "id": 7,
    "title": "スリスリピックアップ",
    "description": "猫の商品を沢山あつめてみました。",
    "secret": false,
    "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
    "productsCount": 1,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  }
}

Choice Create

create Choice

POST /api/v1/choices

Required Parameters

Name Type Description Example
title string title of Choice "スリスリピックアップ"

Optional Parameters

Name Type Description Example
description string description of Choice "猫の商品を沢山あつめてみました。"
bannerUrl string url of Choices banner "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246"
choiceProducts/productId integer unique identifier of product 1
choiceProducts/itemVariantId integer unique identifier of item_variant 1

Curl Example

$ curl -n -X POST /api/v1/choices \
  -H "Content-Type: application/json" \
 \
  -d '{
  "title": "スリスリピックアップ",
  "description": "猫の商品を沢山あつめてみました。",
  "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
  "choiceProducts": [
    {
      "productId": 1,
      "itemVariantId": 1
    }
  ]
}'

Response Example

HTTP/1.1 200 OK
{
  "choice": {
    "id": 7,
    "title": "スリスリピックアップ",
    "description": "猫の商品を沢山あつめてみました。",
    "secret": false,
    "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
    "productsCount": 1,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  }
}

Choice Delete

delete Choice

DELETE /api/v1/choices/{choice_id}

Curl Example

$ curl -n -X DELETE /api/v1/choices/$CHOICE_ID \
  -H "Content-Type: application/json" \

Response Example

HTTP/1.1 204 No Content
レスポンスヘッダのみ返します

Choice Add product

add product to Choice

POST /api/v1/choices/{choice_id}

Optional Parameters

Name Type Description Example
productId integer id of product which is to be added to Choice Range: 1 <= value 1
itemVariantId integer id of item variant (combination of color and size) which is to be binded to product Range: 1 <= value 1

Curl Example

$ curl -n -X POST /api/v1/choices/$CHOICE_ID \
  -H "Content-Type: application/json" \
 \
  -d '{
  "productId": 1,
  "itemVariantId": 1
}'

Response Example

HTTP/1.1 200 OK
{
  "choice": {
    "id": 7,
    "title": "スリスリピックアップ",
    "description": "猫の商品を沢山あつめてみました。",
    "secret": false,
    "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
    "productsCount": 1,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  }
}

Choice Remove product

remove product from choice

POST /api/v1/choices/{choice_id}/remove

Optional Parameters

Name Type Description Example
productId integer id of product which is to be removed from Choice Range: 1 <= value 1
itemVariantId integer id of item variant which is to be binded to product Range: 1 <= value 1

Curl Example

$ curl -n -X POST /api/v1/choices/$CHOICE_ID/remove \
  -H "Content-Type: application/json" \
 \
  -d '{
  "productId": 1,
  "itemVariantId": 1
}'

Response Example

HTTP/1.1 200 OK
{
  "choice": {
    "id": 7,
    "title": "スリスリピックアップ",
    "description": "猫の商品を沢山あつめてみました。",
    "secret": false,
    "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
    "productsCount": 1,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  }
}

Choice Update

update Choice

PUT /api/v1/choices/{choice_id}/

Optional Parameters

Name Type Description Example
title string title of Choice "スリスリピックアップ"
description nullable string description of Choice "猫の商品を沢山あつめてみました。"
bannerUrl nullable uri url of banner image of choice "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246"
choiceProducts/productId integer unique identifier of product 1
choiceProducts/itemVariantId integer unique identifier of item_variant 1

Curl Example

$ curl -n -X PUT /api/v1/choices/$CHOICE_ID/ \
  -H "Content-Type: application/json" \
 \
  -d '{
  "title": "スリスリピックアップ",
  "description": "猫の商品を沢山あつめてみました。",
  "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
  "choiceProducts": [
    {
      "productId": 1,
      "itemVariantId": 1
    }
  ]
}'

Response Example

HTTP/1.1 200 OK
{
  "choice": {
    "id": 7,
    "title": "スリスリピックアップ",
    "description": "猫の商品を沢山あつめてみました。",
    "secret": false,
    "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
    "productsCount": 1,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  }
}

Choice List

choices list

GET /api/v1/choices

Optional Parameters

Name Type Description Example
limit string limit of Choice list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 15
offset string offset of list (default is 0, higher number is older) pattern: [0-9][0-9]*$ 100
userId string filtering list by User id of Choice owner pattern: [1-9][0-9]*$ 2
userName string filtering list by User name of Choice owner pattern: [\w-]*$ "surisurikun"

Curl Example

$ curl -n -X GET /api/v1/choices
 -G \
  -d limit=15 \
  -d offset=100 \
  -d userId=2 \
  -d userName=surisurikun

Response Example

HTTP/1.1 200 OK
{
  "choices": [
    {
      "id": 7,
      "title": "スリスリピックアップ",
      "description": "猫の商品を沢山あつめてみました。",
      "secret": false,
      "bannerUrl": "https://dp3obxrw75ln8.cloudfront.net/choices/banners/7.jpg?1415260246",
      "productsCount": 1,
      "user": {
        "id": 1,
        "name": "surisurikun",
        "displayName": "忍者スリスリくん",
        "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

Favorite

Favorite is users action of favoring Product (like facebook's like or twitter's favorite)

Attributes

Name Type Description Example
id integer unique identifier of Favrotie 7
count integer Favorite count 3
productId integer id of product which is favored 14

Favorite Product favorite list

get Favorites info of specific product

GET /api/v1/products/{product_id}/favorites

Optional Parameters

Name Type Description Example
itemId string name of Item pattern: [1-9][0-9]*$ 1
limit string limit of Favorite list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 30
offset string offset of Favorite list pattern: [0-9][0-9]*$ 100

Curl Example

$ curl -n -X GET /api/v1/products/$PRODUCT_ID/favorites
 -G \
  -d itemId=1 \
  -d limit=30 \
  -d offset=100

Response Example

HTTP/1.1 200 OK
{
  "favorites": [
    {
      "id": 7,
      "count": 3,
      "productId": 14,
      "user": {
        "id": 1,
        "name": "surisurikun",
        "displayName": "忍者スリスリくん",
        "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

Favorite User favorite List

get Favorites info of specific User

GET /api/v1/users/{user_id}/favorites

Curl Example

$ curl -n -X GET /api/v1/users/$USER_ID/favorites

Response Example

HTTP/1.1 200 OK
{
  "favorites": [
    {
      "id": 7,
      "count": 3,
      "product": {
        "id": 1,
        "title": "AAスリスリくん Tシャツ",
        "published": true,
        "publishedAt": "2015-01-14T11:58:29.534+09:00",
        "createdAt": "2015-01-14T11:58:29.539+09:00",
        "updatedAt": "2015-01-14T11:58:29.539+09:00",
        "examplaryAngle": "back",
        "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
        "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
        "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
        "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
        "item": {
          "id": 1,
          "name": "t-shirt",
          "angles": [
            1
          ],
          "humanizeName": "Tシャツ"
        },
        "material": {
          "id": 31106,
          "title": "AAスリスリくん",
          "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
          "price": 100,
          "violation": false,
          "published": true,
          "publishedAt": "2014-05-07T11:05:25.072+09:00",
          "uploadedAt": "2014-05-07T11:03:15.465+09:00",
          "dominantRgb": "#ffffff",
          "originalWidth": 1920,
          "originalHeight": 1080,
          "user": {
            "id": 1,
            "name": "surisurikun",
            "displayName": "忍者スリスリくん",
            "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
          }
        },
        "sampleItemVariant": {
          "id": 1,
          "price": 2080,
          "exemplary": true,
          "color": {
            "id": 1,
            "name": "white",
            "rgb": "white"
          },
          "size": {
            "id": 1,
            "name": "s"
          }
        }
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

Favorite Create

create Favorite to Product

POST /api/v1/products/{product_id}/favorites

Optional Parameters

Name Type Description Example
anonymouse boolean If you need anonymouse favorite, set true true

Curl Example

$ curl -n -X POST /api/v1/products/$PRODUCT_ID/favorites \
  -H "Content-Type: application/json" \
 \
  -d '{
  "anonymouse": true
}'

Response Example

HTTP/1.1 201 Created
{
  "favorite": {
    "id": 7,
    "count": 3,
    "rotation": 138,
    "x": 0.5702,
    "y": 0.5702
  },
  "meta": {
    "totalCount": 10
  }
}

Item

Item is a product type we can create in SUZURI. For example, there is the item of 'T-Shirt' or 'Mug'.

Attributes

Name Type Description Example
id integer unique identifier of Item 1
name string unique name of Item "t-shirt"
angles array angles of Item (used when generate item image) [1]
humanizeName string descriptive label for Item, displayed on the screen "Tシャツ"

Item List

get all Item list

GET /api/v1/items

Curl Example

$ curl -n -X GET /api/v1/items

Response Example

HTTP/1.1 200 OK
{
  "items": [
    {
      "id": 1,
      "name": "t-shirt",
      "angles": [
        1
      ],
      "humanizeName": "Tシャツ",
      "variants": [
        {
          "id": 1,
          "price": 2080,
          "exemplary": true,
          "color": {
            "id": 1,
            "name": "white",
            "rgb": "white"
          },
          "size": {
            "id": 1,
            "name": "s"
          }
        }
      ]
    }
  ]
}

Material

Material is a material for create Product. Material is generated from image file uploaded by User

Attributes

Name Type Description Example
id integer unique identifier of Material 31106
title string title of Material "AAスリスリくん"
description nullable string description of Material "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah."
price integer price of Material (will be added to the price of item variant) 100
violation boolean true when the material go violate the rules false
published boolean true when the material go be published true
publishedAt nullable date-time when material was published "2014-05-07T11:05:25.072+09:00"
uploadedAt date-time when material was uploaded "2014-05-07T11:03:15.465+09:00"
dominantRgb nullable string dominant color RGB of material "#ffffff"
originalWidth integer original width of Material 1920
originalHeight integer original height of Material 1080
user:id integer unique identifier of User 1
user:name string unique name of User "surisurikun"
user:displayName nullable string descriptive label for User, displayed on the screen "忍者スリスリくん"
user:avatarUrl nullable string url avatar image of User "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"

Material List

get Material list

GET /api/v1/materials

Optional Parameters

Name Type Description Example
limit string limit of Materials list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 30
offset string offset of Materials list pattern: [0-9][0-9]*$ 100
userId string filtering list by User id of Material owner pattern: [1-9][0-9]*$ 2

Curl Example

$ curl -n -X GET /api/v1/materials
 -G \
  -d limit=30 \
  -d offset=100 \
  -d userId=2

Response Example

HTTP/1.1 200 OK
{
  "materials": [
    {
      "id": 31106,
      "title": "AAスリスリくん",
      "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
      "price": 100,
      "violation": false,
      "published": true,
      "publishedAt": "2014-05-07T11:05:25.072+09:00",
      "uploadedAt": "2014-05-07T11:03:15.465+09:00",
      "dominantRgb": "#ffffff",
      "originalWidth": 1920,
      "originalHeight": 1080,
      "user": {
        "id": 1,
        "name": "surisurikun",
        "displayName": "忍者スリスリくん",
        "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

Material Create

create Material & Products by from image

POST /api/v1/materials

Required Parameters

Name Type Description Example
texture string url of texture image of material (data uri is OK) "https://41.media.tumblr.com/QA9JpdgnOc8ov98s1C4S5EjJ_500.jpg"
title string title of Material "AAスリスリくん"

Optional Parameters

Name Type Description Example
price integer price of Material (will be added to the price of item variant) 100
description nullable string description of Material "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah."
products/itemId integer id of Item of Product 1
products/exemplaryItemVariantId integer id of Item variant of Product 151
products/published boolean if you publish Product, turn this field true true
products/resizeMode nullable string resize mode of material "contain"
products/sub_materials/texture string url of texture image of material (data uri is OK) "https://41.media.tumblr.com/QA9JpdgnOc8ov98s1C4S5EjJ_500.jpg"
products/sub_materials/printSide string print side of SubMaterial "back"
products/sub_materials/enabled boolean if you enable SubMaterial, turn this field true true

Curl Example

$ curl -n -X POST /api/v1/materials \
  -H "Content-Type: application/json" \
 \
  -d '{
  "texture": "https://41.media.tumblr.com/QA9JpdgnOc8ov98s1C4S5EjJ_500.jpg",
  "title": "AAスリスリくん",
  "price": 100,
  "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
  "products": [
    {
      "itemId": 1,
      "exemplaryItemVariantId": 151,
      "published": true,
      "resizeMode": "contain",
      "sub_materials": [
        {
          "texture": "https://41.media.tumblr.com/QA9JpdgnOc8ov98s1C4S5EjJ_500.jpg",
          "printSide": "back",
          "enabled": true
        }
      ]
    }
  ]
}'

Response Example

HTTP/1.1 200 OK
{
  "material": {
    "id": 31106,
    "title": "AAスリスリくん",
    "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
    "price": 100,
    "violation": false,
    "published": true,
    "publishedAt": "2014-05-07T11:05:25.072+09:00",
    "uploadedAt": "2014-05-07T11:03:15.465+09:00",
    "dominantRgb": "#ffffff",
    "originalWidth": 1920,
    "originalHeight": 1080,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  },
  "products": [
    {
      "id": 1,
      "title": "AAスリスリくん Tシャツ",
      "published": true,
      "publishedAt": "2015-01-14T11:58:29.534+09:00",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "updatedAt": "2015-01-14T11:58:29.539+09:00",
      "examplaryAngle": "back",
      "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
      "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
      "item": {
        "id": 1,
        "name": "t-shirt",
        "angles": [
          1
        ],
        "humanizeName": "Tシャツ"
      },
      "material": {
        "id": 31106,
        "title": "AAスリスリくん",
        "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
        "price": 100,
        "violation": false,
        "published": true,
        "publishedAt": "2014-05-07T11:05:25.072+09:00",
        "uploadedAt": "2014-05-07T11:03:15.465+09:00",
        "dominantRgb": "#ffffff",
        "originalWidth": 1920,
        "originalHeight": 1080,
        "user": {
          "id": 1,
          "name": "surisurikun",
          "displayName": "忍者スリスリくん",
          "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
        }
      },
      "sampleItemVariant": {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    }
  ]
}

Material Update

Update Material information

PUT /api/v1/materials/{material_id}

Optional Parameters

Name Type Description Example
title string title of Material "AAスリスリくん"
price integer price of Material (will be added to the price of item variant) 100
description nullable string description of Material "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah."
products/itemId integer id of Item of Product 1
products/exemplaryItemVariantId integer id of Item variant of Product 151
products/published boolean if you publish product, turn this field true true
products/resizeMode nullable string resize mode of material "contain"

Curl Example

$ curl -n -X PUT /api/v1/materials/$MATERIAL_ID \
  -H "Content-Type: application/json" \
 \
  -d '{
  "title": "AAスリスリくん",
  "price": 100,
  "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
  "products": [
    {
      "itemId": 1,
      "exemplaryItemVariantId": 151,
      "published": true,
      "resizeMode": "contain"
    }
  ]
}'

Response Example

HTTP/1.1 200 OK
{
  "material": {
    "id": 31106,
    "title": "AAスリスリくん",
    "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
    "price": 100,
    "violation": false,
    "published": true,
    "publishedAt": "2014-05-07T11:05:25.072+09:00",
    "uploadedAt": "2014-05-07T11:03:15.465+09:00",
    "dominantRgb": "#ffffff",
    "originalWidth": 1920,
    "originalHeight": 1080,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  },
  "products": [
    {
      "id": 1,
      "title": "AAスリスリくん Tシャツ",
      "published": true,
      "publishedAt": "2015-01-14T11:58:29.534+09:00",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "updatedAt": "2015-01-14T11:58:29.539+09:00",
      "examplaryAngle": "back",
      "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
      "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
      "item": {
        "id": 1,
        "name": "t-shirt",
        "angles": [
          1
        ],
        "humanizeName": "Tシャツ"
      },
      "material": {
        "id": 31106,
        "title": "AAスリスリくん",
        "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
        "price": 100,
        "violation": false,
        "published": true,
        "publishedAt": "2014-05-07T11:05:25.072+09:00",
        "uploadedAt": "2014-05-07T11:03:15.465+09:00",
        "dominantRgb": "#ffffff",
        "originalWidth": 1920,
        "originalHeight": 1080,
        "user": {
          "id": 1,
          "name": "surisurikun",
          "displayName": "忍者スリスリくん",
          "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
        }
      },
      "sampleItemVariant": {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    }
  ]
}

Material Delete

Delete Material

DELETE /api/v1/materials/{material_id}

Curl Example

$ curl -n -X DELETE /api/v1/materials/$MATERIAL_ID \
  -H "Content-Type: application/json" \

Response Example

HTTP/1.1 204 No Content
レスポンスヘッダのみ返します

Material Text

create Material & t-shirt by from text

POST /api/v1/materials/text

Required Parameters

Name Type Description Example
text string text which will made material "AAスリスリくん"

Optional Parameters

Name Type Description Example
itemVariantId integer One product will be made from this item variant 1

Curl Example

$ curl -n -X POST /api/v1/materials/text \
  -H "Content-Type: application/json" \
 \
  -d '{
  "text": "AAスリスリくん",
  "itemVariantId": 1
}'

Response Example

HTTP/1.1 200 OK
{
  "material": {
    "id": 31106,
    "title": "AAスリスリくん",
    "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
    "price": 100,
    "violation": false,
    "published": true,
    "publishedAt": "2014-05-07T11:05:25.072+09:00",
    "uploadedAt": "2014-05-07T11:03:15.465+09:00",
    "dominantRgb": "#ffffff",
    "originalWidth": 1920,
    "originalHeight": 1080,
    "user": {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
    }
  },
  "products": [
    {
      "id": 1,
      "title": "AAスリスリくん Tシャツ",
      "published": true,
      "publishedAt": "2015-01-14T11:58:29.534+09:00",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "updatedAt": "2015-01-14T11:58:29.539+09:00",
      "examplaryAngle": "back",
      "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
      "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
      "item": {
        "id": 1,
        "name": "t-shirt",
        "angles": [
          1
        ],
        "humanizeName": "Tシャツ"
      },
      "material": {
        "id": 31106,
        "title": "AAスリスリくん",
        "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
        "price": 100,
        "violation": false,
        "published": true,
        "publishedAt": "2014-05-07T11:05:25.072+09:00",
        "uploadedAt": "2014-05-07T11:03:15.465+09:00",
        "dominantRgb": "#ffffff",
        "originalWidth": 1920,
        "originalHeight": 1080,
        "user": {
          "id": 1,
          "name": "surisurikun",
          "displayName": "忍者スリスリくん",
          "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
        }
      },
      "sampleItemVariant": {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    }
  ]
}

Product

Product created from Material

Attributes

Name Type Description Example
id integer unique identifier of product 1
title string title of product "AAスリスリくん Tシャツ"
published boolean if product is published, this is true true
publishedAt nullable date-time when product was published "2015-01-14T11:58:29.534+09:00"
createdAt date-time when product was created "2015-01-14T11:58:29.539+09:00"
updatedAt date-time when product was updated "2015-01-14T11:58:29.539+09:00"
examplaryAngle nullable string exemplary angle of products (which is used for SUZURI web page) "back"
imageUrl string url of product image (we have to fix where enclosed by \'{}\') "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b"
sampleImageUrl string sample of image url "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b"
url string url of product (we have to fix where enclosed by \'{}\') "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}"
sampleUrl string sample of url "https://suzuri.jp/surisurikun/31106/t-shirt/s/white"
item:id integer unique identifier of Item 1
item:name string unique name of Item "t-shirt"
item:angles array angles of Item (used when generate item image) [1]
item:humanizeName string descriptive label for Item, displayed on the screen "Tシャツ"
material:id integer unique identifier of Material 31106
material:title string title of Material "AAスリスリくん"
material:description nullable string description of Material "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah."
material:price integer price of Material (will be added to the price of item variant) 100
material:violation boolean true when the material go violate the rules false
material:published boolean true when the material go be published true
material:publishedAt nullable date-time when material was published "2014-05-07T11:05:25.072+09:00"
material:uploadedAt date-time when material was uploaded "2014-05-07T11:03:15.465+09:00"
material:dominantRgb nullable string dominant color RGB of material "#ffffff"
material:originalWidth integer original width of Material 1920
material:originalHeight integer original height of Material 1080
material:user:id integer unique identifier of User 1
material:user:name string unique name of User "surisurikun"
material:user:displayName nullable string descriptive label for User, displayed on the screen "忍者スリスリくん"
material:user:avatarUrl nullable string url avatar image of User "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
sampleItemVariant:id integer unique identifier of item_variant 1
sampleItemVariant:price integer price of item_variant 2080
sampleItemVariant:exemplary boolean flag of exemplary or not (if variant was exemplary, that is used for SUZURI\'s products list page) true
sampleItemVariant:color:id integer unique identifier of item color 1
sampleItemVariant:color:name string unique name of item color "white"
sampleItemVariant:color:rgb string rgb color of item color "white"
sampleItemVariant:size:id integer unique identifier of item size 1
sampleItemVariant:size:name string unique name of item size "s"

Product List

get Product list

GET /api/v1/products

Optional Parameters

Name Type Description Example
itemId string name of Item pattern: [1-9][0-9]*$ 1
limit string limit of Products list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 30
offset string offset of Products list pattern: [0-9][0-9]*$ 100
userId string filtering list by User id of Product owner pattern: [1-9][0-9]*$ 2
userName string filtering list by User name of Product owner pattern: [\w-]*$ "surisurikun"
materialId string filtering list by Material id pattern: [1-9][0-9]*$ 101

Curl Example

$ curl -n -X GET /api/v1/products
 -G \
  -d itemId=1 \
  -d limit=30 \
  -d offset=100 \
  -d userId=2 \
  -d userName=surisurikun \
  -d materialId=101

Response Example

HTTP/1.1 200 OK
{
  "products": [
    {
      "id": 1,
      "title": "AAスリスリくん Tシャツ",
      "published": true,
      "publishedAt": "2015-01-14T11:58:29.534+09:00",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "updatedAt": "2015-01-14T11:58:29.539+09:00",
      "examplaryAngle": "back",
      "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
      "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
      "item": {
        "id": 1,
        "name": "t-shirt",
        "angles": [
          1
        ],
        "humanizeName": "Tシャツ"
      },
      "material": {
        "id": 31106,
        "title": "AAスリスリくん",
        "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
        "price": 100,
        "violation": false,
        "published": true,
        "publishedAt": "2014-05-07T11:05:25.072+09:00",
        "uploadedAt": "2014-05-07T11:03:15.465+09:00",
        "dominantRgb": "#ffffff",
        "originalWidth": 1920,
        "originalHeight": 1080,
        "user": {
          "id": 1,
          "name": "surisurikun",
          "displayName": "忍者スリスリくん",
          "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
        }
      },
      "sampleItemVariant": {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

Product Choice product list

get Choice product list

GET /api/v1/choices/{choice_id}/products

Optional Parameters

Name Type Description Example
limit string limit of Products list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 30
offset string offset of Products list pattern: [0-9][0-9]*$ 100

Curl Example

$ curl -n -X GET /api/v1/choices/$CHOICE_ID/products
 -G \
  -d limit=30 \
  -d offset=100

Response Example

HTTP/1.1 200 OK
{
  "products": [
    {
      "id": 1,
      "title": "AAスリスリくん Tシャツ",
      "published": true,
      "publishedAt": "2015-01-14T11:58:29.534+09:00",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "updatedAt": "2015-01-14T11:58:29.539+09:00",
      "examplaryAngle": "back",
      "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
      "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
      "item": {
        "id": 1,
        "name": "t-shirt",
        "angles": [
          1
        ],
        "humanizeName": "Tシャツ"
      },
      "material": {
        "id": 31106,
        "title": "AAスリスリくん",
        "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
        "price": 100,
        "violation": false,
        "published": true,
        "publishedAt": "2014-05-07T11:05:25.072+09:00",
        "uploadedAt": "2014-05-07T11:03:15.465+09:00",
        "dominantRgb": "#ffffff",
        "originalWidth": 1920,
        "originalHeight": 1080,
        "user": {
          "id": 1,
          "name": "surisurikun",
          "displayName": "忍者スリスリくん",
          "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
        }
      },
      "sampleItemVariant": {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

search Product

GET /api/v1/products/search

Optional Parameters

Name Type Description Example
limit string limit of Products list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 30
offset string offset of Products list pattern: [0-9][0-9]*$ 100
q string search word "NINJYA"
itemId string name of Item pattern: [1-9][0-9]*$ 1

Curl Example

$ curl -n -X GET /api/v1/products/search
 -G \
  -d limit=30 \
  -d offset=100 \
  -d q=NINJYA \
  -d itemId=1

Response Example

HTTP/1.1 200 OK
{
  "products": [
    {
      "id": 1,
      "title": "AAスリスリくん Tシャツ",
      "published": true,
      "publishedAt": "2015-01-14T11:58:29.534+09:00",
      "createdAt": "2015-01-14T11:58:29.539+09:00",
      "updatedAt": "2015-01-14T11:58:29.539+09:00",
      "examplaryAngle": "back",
      "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
      "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
      "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
      "item": {
        "id": 1,
        "name": "t-shirt",
        "angles": [
          1
        ],
        "humanizeName": "Tシャツ"
      },
      "material": {
        "id": 31106,
        "title": "AAスリスリくん",
        "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
        "price": 100,
        "violation": false,
        "published": true,
        "publishedAt": "2014-05-07T11:05:25.072+09:00",
        "uploadedAt": "2014-05-07T11:03:15.465+09:00",
        "dominantRgb": "#ffffff",
        "originalWidth": 1920,
        "originalHeight": 1080,
        "user": {
          "id": 1,
          "name": "surisurikun",
          "displayName": "忍者スリスリくん",
          "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
        }
      },
      "sampleItemVariant": {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    }
  ],
  "meta": {
    "hasNext": true
  }
}

Product Info

get info for a Product specified by id.

GET /api/v1/products/{product_id}

Curl Example

$ curl -n -X GET /api/v1/products/$PRODUCT_ID

Response Example

HTTP/1.1 200 OK
{
  "products": {
    "id": 1,
    "title": "AAスリスリくん Tシャツ",
    "published": true,
    "publishedAt": "2015-01-14T11:58:29.534+09:00",
    "createdAt": "2015-01-14T11:58:29.539+09:00",
    "updatedAt": "2015-01-14T11:58:29.539+09:00",
    "examplaryAngle": "back",
    "imageUrl": "https://d1q9av5b648rmv.cloudfront.net/{width}x{height}/t-shirt/{size}/{color}[/angle]/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
    "sampleImageUrl": "https://d1q9av5b648rmv.cloudfront.net/1530x1530/t-shirt/s/white/31106/1399428195-2520x2992.png.jpg?h=224855199776d40aa2f7d6e3f181bfb19db9a90b",
    "url": "https://suzuri.jp/surisurikun/31106/t-shirt/{size}/{white}",
    "sampleUrl": "https://suzuri.jp/surisurikun/31106/t-shirt/s/white",
    "item": {
      "id": 1,
      "name": "t-shirt",
      "angles": [
        1
      ],
      "humanizeName": "Tシャツ"
    },
    "material": {
      "id": 31106,
      "title": "AAスリスリくん",
      "description": "cjdiaosjdadfv:::surisurikun:::jaifiavdaiovfhaidhviwefoiah.",
      "price": 100,
      "violation": false,
      "published": true,
      "publishedAt": "2014-05-07T11:05:25.072+09:00",
      "uploadedAt": "2014-05-07T11:03:15.465+09:00",
      "dominantRgb": "#ffffff",
      "originalWidth": 1920,
      "originalHeight": 1080,
      "user": {
        "id": 1,
        "name": "surisurikun",
        "displayName": "忍者スリスリくん",
        "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
      }
    },
    "itemVariants": [
      {
        "id": 1,
        "price": 2080,
        "exemplary": true,
        "color": {
          "id": 1,
          "name": "white",
          "rgb": "white"
        },
        "size": {
          "id": 1,
          "name": "s"
        }
      }
    ],
    "sampleItemVariant": {
      "id": 1,
      "price": 2080,
      "exemplary": true,
      "color": {
        "id": 1,
        "name": "white",
        "rgb": "white"
      },
      "size": {
        "id": 1,
        "name": "s"
      }
    }
  }
}

User

User is a Suzuri User.

Attributes

Name Type Description Example
id integer unique identifier of User 1
name string unique name of User "surisurikun"
displayName nullable string descriptive label for User, displayed on the screen "忍者スリスリくん"
avatarUrl nullable string url avatar image of User "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488"
profile:url nullable string user\'s web page "https://suzuri.jp/"
profile:body nullable string profile description "こんにちは!SUZURI の公式忍者・スリスリくんです。\\nキミも忍者にならないか?"
profile:headerUrl nullable string url of header image of user\'s profile page "https://dp3obxrw75ln8.cloudfront.net/profiles/headers/10.png?1398245916"
identities array auth providers [{"id"=>1, "provider"=>"twitter", "uid"=>1181557592, "nickname"=>"surisurikun", "url"=>"https://twitter.com/surisurikun"}]

User List

get User list

GET /api/v1/users

Optional Parameters

Name Type Description Example
name string name of User pattern: [\w-]*$ "surisurikun"
limit string limit of User list (default 20) pattern: [1-9]|[1-4][0-9]|50$ 30
offset string offset of User list pattern: [0-9][0-9]*$ 100

Curl Example

$ curl -n -X GET /api/v1/users
 -G \
  -d name=surisurikun \
  -d limit=30 \
  -d offset=100

Response Example

HTTP/1.1 200 OK
{
  "users": [
    {
      "id": 1,
      "name": "surisurikun",
      "displayName": "忍者スリスリくん",
      "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488",
      "profile": {
        "url": "https://suzuri.jp/",
        "body": "こんにちは!SUZURI の公式忍者・スリスリくんです。\\nキミも忍者にならないか?",
        "headerUrl": "https://dp3obxrw75ln8.cloudfront.net/profiles/headers/10.png?1398245916"
      },
      "identities": [
        {
          "id": 1,
          "provider": "twitter",
          "uid": 1181557592,
          "nickname": "surisurikun",
          "url": "https://twitter.com/surisurikun"
        }
      ]
    }
  ],
  "meta": {
    "hasNext": true
  }
}

User Info

Info for existing User.

GET /api/v1/users/{user_id}

Curl Example

$ curl -n -X GET /api/v1/users/$USER_ID

Response Example

HTTP/1.1 200 OK
{
  "user": {
    "id": 1,
    "name": "surisurikun",
    "displayName": "忍者スリスリくん",
    "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488",
    "profile": {
      "url": "https://suzuri.jp/",
      "body": "こんにちは!SUZURI の公式忍者・スリスリくんです。\\nキミも忍者にならないか?",
      "headerUrl": "https://dp3obxrw75ln8.cloudfront.net/profiles/headers/10.png?1398245916"
    },
    "identities": [
      {
        "id": 1,
        "provider": "twitter",
        "uid": 1181557592,
        "nickname": "surisurikun",
        "url": "https://twitter.com/surisurikun"
      }
    ]
  }
}

User self

Info for authorized User

GET /api/v1/user

Curl Example

$ curl -n -X GET /api/v1/user

Response Example

HTTP/1.1 200 OK
{
  "user": {
    "id": 1,
    "email": "hoge@suzuri.jp",
    "name": "surisurikun",
    "displayName": "忍者スリスリくん",
    "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488",
    "profile": {
      "url": "https://suzuri.jp/",
      "body": "こんにちは!SUZURI の公式忍者・スリスリくんです。\\nキミも忍者にならないか?",
      "headerUrl": "https://dp3obxrw75ln8.cloudfront.net/profiles/headers/10.png?1398245916"
    },
    "identities": [
      {
        "id": 1,
        "provider": "twitter",
        "uid": 1181557592,
        "nickname": "surisurikun",
        "url": "https://twitter.com/surisurikun"
      }
    ]
  }
}

User update

update authorized User

PUT /api/v1/user

Curl Example

$ curl -n -X PUT /api/v1/user \
  -H "Content-Type: application/json" \

Response Example

HTTP/1.1 200 OK
{
  "user": {
    "id": 1,
    "name": "surisurikun",
    "displayName": "忍者スリスリくん",
    "avatarUrl": "https://dp3obxrw75ln8.cloudfront.net/users/avatars/7.png?1395818488",
    "profile": {
      "url": "https://suzuri.jp/",
      "body": "こんにちは!SUZURI の公式忍者・スリスリくんです。\\nキミも忍者にならないか?",
      "headerUrl": "https://dp3obxrw75ln8.cloudfront.net/profiles/headers/10.png?1398245916"
    },
    "identities": [
      {
        "id": 1,
        "provider": "twitter",
        "uid": 1181557592,
        "nickname": "surisurikun",
        "url": "https://twitter.com/surisurikun"
      }
    ]
  }
}