STQRY Public API (1.1.0)

Download OpenAPI specification:

API documentation for STQRY's public API

Codes

Returns a list of codes for an account

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number

per_page
integer [ 1 .. 1000 ]
Default: 30

Number of items per page, max 1000

sort_field
string
Enum: "coupon_code" "valid_from" "valid_to" "redemptions" "id"

Field to sort by

sort_direction
string
Default: "ASC"
Enum: "ASC" "DESC"

Direction to sort by

include_archived
boolean

Include archived codes

tags
string

Comma separated list of tags. Tags are ANDed

valid_now
boolean

Currently valid codes

q
string

Search query

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Creates a new code

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Code

id
integer
status
string
Enum: "expired" "future" "valid" "invalid" "collection_unlocked" "current" "max_redemptions" "requires_email"
linked_id
integer
linked_type
string
Enum: "Project" "Collection"
string or null (Date)
string or null (Date)
coupon_code
string
redemption_count
integer
project_id
integer
integer or null
integer or null
timezone
string (Timezone)

Timezone as defined by TZInfo

tags
Array of strings (TagList)

Array of tags to help orgainse and search

string or null (DateTime)
string or null (DateTime)

Responses

Request samples

Content type
application/json
{
  • "id": 1024,
  • "status": "expired",
  • "linked_id": 2048,
  • "linked_type": "Project",
  • "valid_from": "2021-01-01",
  • "valid_to": "2021-01-01",
  • "coupon_code": "DOWNTOWNTOUR",
  • "redemption_count": 5,
  • "project_id": 1024,
  • "max_redemptions": 10,
  • "expire_after": 1440,
  • "timezone": "string",
  • "tags": [
    ],
  • "created_at": "2017-07-21T17:32:28Z",
  • "updated_at": "2017-07-21T17:32:28Z"
}

Response samples

Content type
application/json
{
  • "code": {
    }
}

Returns a single code

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Code to retrieve

Responses

Response samples

Content type
application/json
{
  • "code": {
    }
}

Updates an existing code

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Code to retrieve

Request Body schema: application/json
required

Code

id
integer
status
string
Enum: "expired" "future" "valid" "invalid" "collection_unlocked" "current" "max_redemptions" "requires_email"
linked_id
integer
linked_type
string
Enum: "Project" "Collection"
string or null (Date)
string or null (Date)
coupon_code
string
redemption_count
integer
project_id
integer
integer or null
integer or null
timezone
string (Timezone)

Timezone as defined by TZInfo

tags
Array of strings (TagList)

Array of tags to help orgainse and search

string or null (DateTime)
string or null (DateTime)

Responses

Request samples

Content type
application/json
{
  • "id": 1024,
  • "status": "expired",
  • "linked_id": 2048,
  • "linked_type": "Project",
  • "valid_from": "2021-01-01",
  • "valid_to": "2021-01-01",
  • "coupon_code": "DOWNTOWNTOUR",
  • "redemption_count": 5,
  • "project_id": 1024,
  • "max_redemptions": 10,
  • "expire_after": 1440,
  • "timezone": "string",
  • "tags": [
    ],
  • "created_at": "2017-07-21T17:32:28Z",
  • "updated_at": "2017-07-21T17:32:28Z"
}

Response samples

Content type
application/json
{
  • "code": {
    }
}

Updates an existing code

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Code to retrieve

Request Body schema: application/json
required

Code

id
integer
status
string
Enum: "expired" "future" "valid" "invalid" "collection_unlocked" "current" "max_redemptions" "requires_email"
linked_id
integer
linked_type
string
Enum: "Project" "Collection"
string or null (Date)
string or null (Date)
coupon_code
string
redemption_count
integer
project_id
integer
integer or null
integer or null
timezone
string (Timezone)

Timezone as defined by TZInfo

tags
Array of strings (TagList)

Array of tags to help orgainse and search

string or null (DateTime)
string or null (DateTime)

Responses

Request samples

Content type
application/json
{
  • "id": 1024,
  • "status": "expired",
  • "linked_id": 2048,
  • "linked_type": "Project",
  • "valid_from": "2021-01-01",
  • "valid_to": "2021-01-01",
  • "coupon_code": "DOWNTOWNTOUR",
  • "redemption_count": 5,
  • "project_id": 1024,
  • "max_redemptions": 10,
  • "expire_after": 1440,
  • "timezone": "string",
  • "tags": [
    ],
  • "created_at": "2017-07-21T17:32:28Z",
  • "updated_at": "2017-07-21T17:32:28Z"
}

Response samples

Content type
application/json
{
  • "code": {
    }
}

Deletes an existing code

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Code to delete

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Collections

Returns a list of collections for an account

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number

per_page
integer [ 1 .. 1000 ]
Default: 30

Number of items per page, max 1000

sort_field
string
Enum: "id" "name" "created_at" "updated_at"

Field to sort by

sort_direction
string
Default: "ASC"
Enum: "ASC" "DESC"

Direction to sort by

q
string

Search query

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Returns a single collection

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Collection to retrieve

Responses

Response samples

Content type
application/json
{
  • "collection": {
    }
}

MediaItems

Returns a list of media_items for an account

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number

per_page
integer [ 1 .. 1000 ]
Default: 30

Number of items per page, max 1000

sort_field
string
Enum: "id" "name" "created_at" "updated_at"

Field to sort by

sort_direction
string
Default: "ASC"
Enum: "ASC" "DESC"

Direction to sort by

q
string

Search query

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Returns a single media_item

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the MediaItem to retrieve

Responses

Response samples

Content type
application/json
{
  • "media_item": {
    }
}

Projects

Returns a list of projects for an account

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number

per_page
integer [ 1 .. 1000 ]
Default: 30

Number of items per page, max 1000

sort_field
string
Enum: "id" "name" "created_at" "updated_at"

Field to sort by

sort_direction
string
Default: "ASC"
Enum: "ASC" "DESC"

Direction to sort by

q
string

Search query

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Returns a single project

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Project to retrieve

Responses

Response samples

Content type
application/json
{
  • "project": {
    }
}

Screens

Returns a list of screens for an account

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number

per_page
integer [ 1 .. 1000 ]
Default: 30

Number of items per page, max 1000

sort_field
string
Enum: "id" "name" "created_at" "updated_at"

Field to sort by

sort_direction
string
Default: "ASC"
Enum: "ASC" "DESC"

Direction to sort by

q
string

Search query

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Returns a single screen

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the Screen to retrieve

Responses

Response samples

Content type
application/json
{
  • "screen": {
    }
}

UploadedFiles

Returns a list of uploaded_files for an account

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number

per_page
integer [ 1 .. 1000 ]
Default: 30

Number of items per page, max 1000

sort_field
string
Enum: "id" "filename" "file_type"

Field to sort by

sort_direction
string
Default: "ASC"
Enum: "ASC" "DESC"

Direction to sort by

q
string

Search query

Responses

Response samples

Content type
application/json
{}

Creates a presigned URL to upload a file directly to S3

Authorizations:
ApiKeyAuth
query Parameters
filename
required
string

The name of the file to be uploaded

Responses

Response samples

Content type
application/json
{
  • "url": "string"
}

Enqueues a job to process an uploaded file

Authorizations:
ApiKeyAuth
query Parameters
url
required
string

The S3 URL of the uploaded file

subtype
string

A hint for how to process the file. If not provided, the system will try to infer it from the file type

focal_point
Array of numbers (FocalPoint)

The focal point for image cropping, in the format 'x,y' where x and y are between 0 and 1

Responses

Response samples

Content type
application/json
{
  • "job_id": "b228773e2f36eac2ef0512cd"
}

Returns a single uploaded_file from the hash

Authorizations:
ApiKeyAuth
path Parameters
md5_hash
required
string

MD5 hash of the UploadedFile to retrieve

Responses

Response samples

Content type
application/json
{}

Returns the status of a processing job

Authorizations:
ApiKeyAuth
path Parameters
job_id
required
string

The job ID returned when the job was enqueued

Responses

Response samples

Content type
application/json
{}

Returns a single uploaded_file

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the UploadedFile to retrieve

Responses

Response samples

Content type
application/json
{}

Updates an uploaded file's metadata

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the UploadedFile to update

Request Body schema: application/json
required

UploadedFileUpdate

focal_point
Array of numbers (FocalPoint)

FocalPoint to indicate the area of interest in an image

Responses

Request samples

Content type
application/json
{
  • "focal_point": [
    ]
}

Response samples

Content type
application/json
{}

Updates an uploaded file's metadata

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer

ID of the UploadedFile to update

Request Body schema: application/json
required

UploadedFileUpdate

focal_point
Array of numbers (FocalPoint)

FocalPoint to indicate the area of interest in an image

Responses

Request samples

Content type
application/json
{
  • "focal_point": [
    ]
}

Response samples

Content type
application/json
{}

stqry