Editor REST api - users
Base URI
You can choose the fields you want returned with the fields
query parameter. This is really useful for making your API calls more efficient and fast. Should be a comma-separated string
You can group certain data sets by the field name provided as value for this parameter
You can order certain data sets by the field name provided as value for this parameter
Size of the record set requested
Index of record to start result set (used for pagination)
Conditions for result set in JSON encoded string. Result set will satisfy all provided conditions.
The following example would translate to:
conditionA = valueA AND conditionB = valueB AND (conditionC = valueC1 OR conditionC = valueC2)
Search conditions for result set in JSON encoded string. Result set will satisfy all provided conditions.
The following example would translate to:
conditionA LIKE %valueA% AND conditionB LIKE %valueB% AND (conditionC LIKE %valueC1% OR conditionC LIKE %valueC2%)
API route to get next set of records
API route to get previous set of records
Total number of records available
Authorization is required to access user data
Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET
request, the response will contain an entity corresponding to the requested resource. In a PUT
request, the response will contain an entity corresponding to the changed resource.
The request has been fulfilled and resulted in a new resource being created.
The server successfully processed the request, but is not returning any content. Default response for DELETE
requests.
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
Authorization error. Please reauthenticate and try again.
You don’t have necessary permissions for the resource.
A request was made of a resource using a request method not supported by that resource; for example, using PUT
on a read-only resource.
Indicates that the resource requested is no longer available and will not be available again.
The requested route has not been setup correctly. Please contact support.
This API is a RESTful service which provides methods for accessing specific resources at canonical URLs and for searching and filtering sets of resources by various criteria. Our webapp is build on this API. The list of API methods below is not a complete list of all available methods.
All representations are encoded as JSON objects.
- GET: Used for retrieving resources. Safe and idempotent method.
- POST: Used for creating new resources. Unsafe and non-idempotent method.
- PUT: Used for changing the attributes of a model. Unsafe and idempotent method.
- DELETE: Used for deleting resources. Unsafe and idempotent method.
Safe methods?
Safe methods are HTTP methods that do not modify resources.
Idempotent methods?
An idempotent HTTP method is a HTTP method that can be called many times without different outcomes.
Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The name “Bearer authentication” can be understood as “give access to the bearer of this token.” The bearer token is a cryptic string, usually generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources. The bearer token is short-lived.
POST
and PUT
requests should send the data in the body of the request as JSON object.
All PUT
and POST
requests accept single objects as request data. Some methods also accept batch requests, for which the request data will be an array of objects.
Request for a single object
{
"key1": "string1",
"key2": 2,
"key3": "string3"
}
Batch request data (i.e. POST /api/price
)
[{
"key1": "string1a",
"key2": 2,
"key3": "string3a
},
{
"key1": "string1b",
"key2": 2,
"key3": "string3b"
}]
When a request is successful, a response body will typically be sent back in the form of a JSON object. An exception to this is when a DELETE request is processed, which will result in a successful HTTP 204 status.
The value of the response will generally be a JSON object for a request on a single object and an array of objects for a request on a collection of objects.
Response for a single object (i.e. /api/user/83654
)
{
"id": 83654,
"first_name": "John",
"last_name": "Doe"
}
Response for a collection of objects (i.e. /api/user
)
[{
"id": 83654,
"first_name": "John",
"last_name": "Doe"
},
{
"id": 83655,
"first_name": "Mickey",
"last_name": "Mouse"
}]
GET requests without id
parameters return a limited result set. The size of the result set is subject to the provided limit
parameter in the request, with a maximum value of 1000. The index of the first record in the result set is subject to the offset
parameter in the request.
GET requests (without id
) will return three headers that can be used for pagination of the result set:
- X-Total-Records: The total number of records found in the database for the requested resource
- X-Pagination-Next: This header will be set when there are additional results available not included in the returned result set. The value is the API URL to get the next set of results.
- X-Pagination-Previous: This header will be set when there are previous results available. The value is the API URL to navigate back to the previous result set.
Authentication
Request body
Two letter ISO code for selected country
Unique number of country in database
Three letter ISO code for selected currency
Responses
Body
Authentication
Get parameters to identify user in AWS Cognito
Notes
The API will call GetOpenIdTokenForDeveloperId at the AWS Cognito API, and then return the two relevant parameters. See more information: https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetOpenIdTokenForDeveloperIdentity.html
Responses
Body
A unique identifier in the format REGION:GUID. Length Constraints: Minimum length of 1. Maximum length of 55. Pattern: [\w-]+:[0-9a-f-]+
An OpenID token.
Authentication
Responses
Body
API methods to work with user data.
{userid}
/photos{userid}
/products{userid}
/photosAuthentication
Get all previously uploaded photos from the user
Path variables
Request parameters
You can order certain data sets by the field name provided as value for this parameter
Filter records based on photodate field - select photos taken after this date
Filter records based on photodate field - select photos taken before this date
Conditions for result set in JSON encoded string. Result set will satisfy all provided conditions.
The following example would translate to:
conditionA = valueA AND conditionB = valueB AND (conditionC = valueC1 OR conditionC = valueC2)
Search conditions for result set in JSON encoded string. Result set will satisfy all provided conditions.
The following example would translate to:
conditionA LIKE %valueA% AND conditionB LIKE %valueB% AND (conditionC LIKE %valueC1% OR conditionC LIKE %valueC2%)
Request headers
Responses
Body
{userid}
/productsAuthentication
Get all user generated products
Path variables
Request parameters
You can order certain data sets by the field name provided as value for this parameter
You can choose the fields you want returned with the fields
query parameter. This is really useful for making your API calls more efficient and fast. Should be a comma-separated string
Conditions for result set in JSON encoded string. Result set will satisfy all provided conditions.
The following example would translate to:
conditionA = valueA AND conditionB = valueB AND (conditionC = valueC1 OR conditionC = valueC2)
Search conditions for result set in JSON encoded string. Result set will satisfy all provided conditions.
The following example would translate to:
conditionA LIKE %valueA% AND conditionB LIKE %valueB% AND (conditionC LIKE %valueC1% OR conditionC LIKE %valueC2%)
Request headers
Responses
Body
Record of user generated product.
Unique identifier for the project
Userid reference to the owner of the project
Used for defining the type of offering this project is
Used for defining the type of offering this project is
Id of theme that the user selected for this product
Date and time the user started the project
Token used for sharing the project with others
URL of the product thumbnail image
Core project definition this was built on. Used when making incompatible changes to the project json scheme.
Examples
{
"id": 254784,
"userid": 25689,
"group": 101,
"typeid": 1001,
"themeid": 13,
"created_time": "2020-05-26 12:58:52",
"read_token": "n7Pe5LmUzFbT3W7IQAtD",
"thumbnail": "https://demo-staging-snapshots.s3-eu-west-1.amazonaws.com/productimage/72/1330_AG3IowImxQhNk1bAgG3D/cover.jpg",
"core": 1
}
Record of app user.
Unique identifier
Id of tracker that user was coming from when creating account.
Id of available currency that user is using
Id of the user’s country (defaults to IP detection)
First name of user
Last name of user
Locale of user (ISO code)
Date and time when creating user account
Email address of user
Number of times the user logged in
Last time the user logged in
If this is a guest account
Examples
{
"id": 1,
"affiliateid": 1,
"currency": "USD",
"countryid": 25,
"first_name": "John",
"last_name": "Doe",
"language": "en_US",
"timestamp": "2015-01-01 23:24:02",
"email": "johndoe@gmail.com",
"session_nr": 5,
"session_time": "",
"temporary": 1
}
Photo imported by the user
Unique identifier for the photo
UserId reference to the owner of the photo
Kilobyte size of the full sized photo
Source this photo was selected from
URL of the full-sized photo
Width in pixels of the full-sized photo
Height in pixels of the full-sized photo
URL of the medium-sized photo
Width in pixels of the medium-sized photo
Height in pixels of the medium-sized photo
URL of the thumbnail-sized photo
Width in pixels of the thumbnail-sized photo
Height in pixels of the thumbnail-sized photo
Pixel column number where the facebox starts in the full-sized photo
Pixel row number where the facebox starts in the full-sized photo
Width of facebox in pixels in the full-sized photo
Height of facebox in pixels in the full-sized photo
Photo caption (auto imported from sources as Facebook)
Unique identifier for the photo at the source of the photo (see source field)
20-character long string needed for access to the photo
Date and time the photo was taken
Examples
{
"id": 87392083,
"userid": 1324895,
"kbyte": 1024,
"source": "instagram",
"full_url": "https://hema-user.s3-eu-west-1.amazonaws.com/1324895/uploads/87392083_ajz6fpm9JmZ7SsvvCo5k/full.jpg",
"full_width": 2322,
"full_height": 3239,
"url": "https://hema-user.s3-eu-west-1.amazonaws.com/1324895/uploads/87392083_ajz6fpm9JmZ7SsvvCo5k/web.jpg",
"width": 889,
"height": 1240,
"thumb_url": "https://hema-user.s3-eu-west-1.amazonaws.com/1324895/uploads/87392083_ajz6fpm9JmZ7SsvvCo5k/thumb.jpg",
"thumb_width": 100,
"thumb_height": 140,
"fcx": 356,
"fcy": 245,
"fcw": 1045,
"fch": 509,
"title": "Chilling at the beach",
"externalId": "49202093822394",
"token": "ajz6fpm9JmZ7SsvvCo5k",
"photodate": "2020-05-26 12:58:52"
}
Timestamp when access_token expires
Token to be used as Bearer token as auhtorization in API calls
Token to be used to request a new access_token
Type of access_token returned