Common Schema Definitions

Common Schema Definitions

Attributes

Name Type Description Example
data:id string unique identifier of entity "example"
data:type string entity type "product"
data:attributes object attributes of the resource
data:links object hypermedia links for the product resource {"self":"https://api.pixelsquid.com/products/1013105412523693157","spinner":"https://api.pixelsquid.com/products/1013105412523693157/spinners/1013105412523693157"}
data:relationships object relations associated with the entity {"owner":{"data":{"id":"734933714164716571","type":["owner"]}},"spinner":{"data":{"id":"1013105412523693157","type":["spinner"]}}}

Download Link Response Schema

Download Link response schema

Attributes

Name Type Description Example
data:id string unique identifier of entity "1013105412523693157"
data:type string entity type "download_link"
data:attributes:url uri
data:attributes:head_url uri
data:attributes:filename string "example"

Product Response Schema

Product response schema

Attributes

Name Type Description Example
data:id string unique identifier of entity "1013105412523693157"
data:type string entity type "product"
data:attributes:name string name of product "Ladybug"
data:attributes:tags array tags associated with the product ["bug","cute","red","ladybug"]
data:attributes:signature_image_url uri main preview image associated with the product "https://atlas-content4-cdn.pixelsquid.com/assets/928492198528292167/jpeg-600/G15.jpg"
data:attributes:signature_image_low_res_url uri main preview image associated with the product, half resolution "https://atlas-content5-cdn.pixelsquid.com/assets/928492198528292167/jpeg-600/G15.jpg"
data:attributes:search_preview_url uri thumbnail image associated with the product "https://atlas-content1-cdn.pixelsquid.com/assets/928492198528292167/previews/G15-400x400.jpg"
data:attributes:search_preview_low_res_url uri thumbnail image associated with the product, half resolution "https://atlas-content1-cdn.pixelsquid.com/assets/928492198528292167/previews/G15-200x200.jpg"
data:attributes:created_at date-time when entity was created, in IS0 8601 format "2015-06-22T16:46:38Z"
data:attributes:updated_at date-time when entity was updated, in ISO 8601 format "2015-10-29T14:37:49Z"
data:links:self uri hypermedia link
data:links:spinner uri hypermedia link
data:relationships:owner object jsonapi relationship node
data:relationships:spinner object jsonapi relationship node
data:relationships:product_collections object jsonapi relationship node

Product Response Schema Info

Info for existing product.

GET /products/{common_id}

Curl Example

$ curl -n https://api.pixelsquid.com/products/$COMMON_ID

Response Example

HTTP/1.1 200 OK
{
  "data": {
    "id": "1013105412523693157",
    "type": "product",
    "attributes": {
      "name": "Ladybug",
      "tags": [
        "bug",
        "cute",
        "red",
        "ladybug"
      ],
      "signature_image_url": "https://atlas-content4-cdn.pixelsquid.com/assets/928492198528292167/jpeg-600/G15.jpg",
      "signature_image_low_res_url": "https://atlas-content5-cdn.pixelsquid.com/assets/928492198528292167/jpeg-600/G15.jpg",
      "search_preview_url": "https://atlas-content1-cdn.pixelsquid.com/assets/928492198528292167/previews/G15-400x400.jpg",
      "search_preview_low_res_url": "https://atlas-content1-cdn.pixelsquid.com/assets/928492198528292167/previews/G15-200x200.jpg",
      "created_at": "2015-06-22T16:46:38Z",
      "updated_at": "2015-10-29T14:37:49Z"
    },
    "links": {
      "self": "https://api.pixelsquid.com/products/1013105412523693157",
      "spinner": "https://api.pixelsquid.com/products/1013105412523693157/spinners/1013105412523693157"
    },
    "relationships": {
      "owner": {
        "data": {
          "id": "734933714164716571",
          "type": [
            "owner"
          ]
        }
      },
      "spinner": {
        "id": "1013105412523693157",
        "type": [
          "spinner"
        ]
      }
    }
  }
}

Product Collection Response Schema

Product Collection response schema

Attributes

Name Type Description Example
data:id string unique identifier of entity "1013105412523693157"
data:type string entity type "product_collection"
data:attributes:name string ["Debris Collection"]
data:links:self uri hypermedia link

Product Collection Response Schema Info

Info for product collection.

GET /product_collections/{common_id}

Curl Example

$ curl -n https://api.pixelsquid.com/product_collections/$COMMON_ID

Response Example

HTTP/1.1 200 OK
{
  "data": {
    "id": "1013105412523693157",
    "type": "product_collection",
    "attributes": {
      "name": [
        "Debris Collection"
      ]
    },
    "links": {
      "self": "https://api.pixelsquid.com/products/1013105412523693157",
      "spinner": "https://api.pixelsquid.com/products/1013105412523693157/spinners/1013105412523693157"
    }
  }
}

Spinner Response Schema

Spinner response schema

Attributes

Name Type Description Example
data:id string unique identifier of entity "1013105412523693157"
data:type string entity type "spinner"
data:attributes:videos nullable array null
data:attributes:videos nullable array null
data:attributes:resolutions array available resolutions of spinner angles ["100","600","2k","300"]
data:attributes:formats array available formats of spinner angles ["jpeg","png","psd"]
data:attributes:latitudes array available latitudes of spinner angles ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"]
data:attributes:longitudes array available longitudes of angles ["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16"]
data:attributes:sprites_300_url uri url for 300px resolution sprite sheet "https://atlas-content5-cdn.pixelsquid.com/assets/928492198528292167/atlas-300.jpg"
data:attributes:sprites_600_url uri url for 600px resolution sprite sheet "https://atlas-content5-cdn.pixelsquid.com/assets/928492198528292167/atlas-600.jpg"
data:attributes:camera_type_code string
one of:"full_spinner" or "half_spinner"
"full_spinner"
data:links:self uri hypermedia link
data:links:product uri hypermedia link

Spinner Response Schema Info

Info for product spinner.

GET /products/{common_id}/spinners/{common_id}

Curl Example

$ curl -n https://api.pixelsquid.com/products/$COMMON_ID/spinners/$COMMON_ID

Response Example

HTTP/1.1 200 OK
{
  "data": {
    "id": "1013105412523693157",
    "type": "spinner",
    "attributes": {
      "videos": [
        {
          "created_at": "2015-01-01T12:00:00Z",
          "id": "01234567-89ab-cdef-0123-456789abcdef",
          "format": "mp4",
          "path": "example",
          "height": 42,
          "width": 42,
          "feature_version": "example"
        }
      ],
      "resolutions": [
        "100",
        "600",
        "2k",
        "300"
      ],
      "formats": [
        "jpeg",
        "png",
        "psd"
      ],
      "latitudes": [
        "A",
        "B",
        "C",
        "D",
        "E",
        "F",
        "G",
        "H",
        "I",
        "J",
        "K",
        "L",
        "M",
        "N",
        "O",
        "P"
      ],
      "longitudes": [
        "01",
        "02",
        "03",
        "04",
        "05",
        "06",
        "07",
        "08",
        "09",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16"
      ],
      "sprites_300_url": "https://atlas-content5-cdn.pixelsquid.com/assets/928492198528292167/atlas-300.jpg",
      "sprites_600_url": "https://atlas-content5-cdn.pixelsquid.com/assets/928492198528292167/atlas-600.jpg",
      "camera_type_code": "full_spinner"
    },
    "links": {
      "self": "https://api.pixelsquid.com/products/1013105412523693157",
      "spinner": "https://api.pixelsquid.com/products/1013105412523693157/spinners/1013105412523693157"
    }
  }
}

Video Response Schema

Video response schema

Attributes

Name Type Description Example
created_at date-time when video was created "2015-01-01T12:00:00Z"
id uuid unique identifier of video, to used when referencing media for download "01234567-89ab-cdef-0123-456789abcdef"
format string
one of:"mp4" or "webm"
"mp4"
path string relative path of the video media "example"
height integer video resolution height 42
width integer video resolution width 42
feature_version string A string that maps to a set of video encoding/configuration options "example"