api-hotstuff (1.7.2)

Download OpenAPI specification:Download

License: ISC

Documentation for hotstuff.se external product API

Tags

GetTags

Fetch all tags, this is a dynamic list managed from within Kobra.

These could for example be used to mark a product as having an uncertain price, possible incomplete artist information or something else.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Suppliers

GetSuppliers Deprecated

Fetch all suppliers. This has been deprecated due to it being is set automatically for all created products to "BEGAGNAT"

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Others

Version

Fetch the current version of API according to X.Y.Z. Below is taken from https://semver.org

  • MAJOR version when you make incompatible API changes (X)
  • MINOR version when you add functionality in a backward compatible manner (Y)
  • PATCH version when you make backward compatible bug fixes (Z)
Authorizations:
access_token

Responses

Response samples

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

Products

GetProductById

Retrieves the details of an existing product. Supply the unique product ID and receive corresponding product details.

Authorizations:
access_token
path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "productNumber": "string",
  • "productListId": 0,
  • "categoryIds": [
    ],
  • "labelId": 0,
  • "artistId": 0,
  • "mediaId": 0,
  • "recordConditionId": 0,
  • "sleeveConditionId": 0,
  • "title": "string",
  • "text": "string",
  • "inPrice": 0,
  • "outPrice": 0,
  • "tagIds": [
    ],
  • "supplierArticleNumber": "string",
  • "releaseDate": "2019-08-24T14:15:22Z"
}

CreateProduct

Create a new product. Status will always be set to inactive, supplier to "BEGAGNAT", Currency to SEK, VAT to 0%, Stock to 1

Authorizations:
access_token
Request Body schema: application/json
required
productListId
required
integer <int32>
categoryIds
required
Array of integers <int32> non-empty [ items <int32 > ]
labelId
required
integer <int32>
artistId
required
integer <int32>
mediaId
required
integer <int32>
recordConditionId
required
integer <int32>
sleeveConditionId
required
integer <int32>
title
required
string [ 0 .. 120 ] characters
text
required
string
inPrice
number <double>
Default: 10

The price payed for product. Should be in SEK.

outPrice
required
number <double>

The price which product should be put up for sale at. Should be in SEK.

tagIds
Array of integers <int32> [ items <int32 > ]
supplierArticleNumber
string [ 0 .. 30 ] characters
releaseDate
string <date-time>
noLongerAvailable
boolean

Responses

Request samples

Content type
application/json
{
  • "productListId": 0,
  • "categoryIds": [
    ],
  • "labelId": 0,
  • "artistId": 0,
  • "mediaId": 0,
  • "recordConditionId": 0,
  • "sleeveConditionId": 0,
  • "title": "string",
  • "text": "string",
  • "inPrice": 10,
  • "outPrice": 0.1,
  • "tagIds": [
    ],
  • "supplierArticleNumber": "string",
  • "releaseDate": "2019-08-24T14:15:22Z",
  • "noLongerAvailable": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "productNumber": "string",
  • "productListId": 0,
  • "categoryIds": [
    ],
  • "labelId": 0,
  • "artistId": 0,
  • "mediaId": 0,
  • "recordConditionId": 0,
  • "sleeveConditionId": 0,
  • "title": "string",
  • "text": "string",
  • "inPrice": 0,
  • "outPrice": 0,
  • "tagIds": [
    ],
  • "supplierArticleNumber": "string",
  • "releaseDate": "2019-08-24T14:15:22Z"
}

UploadImage

Upload image for product. If original image is larger than 350kb it will be hit with compression. Provided file be used to output 2 variants. A smaller one which is used in list view and one for the product details view.

Note! The image should be passed in body under the key "file". This is not displayed in docs properly due to technical reasons

Authorizations:
access_token
Request Body schema: application/json
required
rank
required
number <double>
productId
required
number <double>

Responses

Request samples

Content type
application/json
{
  • "rank": 0.1,
  • "productId": 0.1
}

Response samples

Content type
application/json
null

Product Lists

GetProductLists

Fetch all product lists, also referred to as batches.

When creating products, the product list must be included or else product creation will not be accepted.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateProductList

Create a new product list. This list can then later be used for adding products to.

Authorizations:
access_token
Request Body schema: application/json
required
name
required
string [ 0 .. 35 ] characters
usedProducts
boolean
Default: true

This flag is currently ignored.

public
boolean
Default: false

This flag is currently ignored.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "usedProducts": true,
  • "public": false
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "usedProducts": true,
  • "public": true
}

GetProductsByProductListId

Retrieves all products in product-list. Supply the unique product list ID and receive details for all products in product-list.

Authorizations:
access_token
path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Medias

GetMedias

Fetch a list of all types of media, this is a dynamic list managed from within Kobra.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Labels

GetLabels

Fetch all labels, this is a dynamic list managed from within Kobra.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateLabel

Create a new label.

Authorizations:
access_token
Request Body schema: application/json
required
name
required
string [ 0 .. 50 ] characters

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string"
}

Conditions

GetConditions

Fetch all available conditions, this is a dynamic list managed from within Kobra.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Categories

GetCategories

Fetch a list of all categories, this is a dynamic list managed from within Kobra.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Artists

GetArtistById

Retrieves the details of an existing artist. Supply the unique artist ID and receive corresponding artist details.

Authorizations:
access_token
path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "primaryCategory": 1,
  • "relatedArtistIds": [
    ]
}

GetArtists

Retrieves the details of all artists.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateArtist

Create a new artist.

Authorizations:
access_token
Request Body schema: application/json
required
name
required
string [ 0 .. 100 ] characters
orderBy
string [ 0 .. 100 ] characters

Defaults to name if not provided

primaryCategory
required
integer <int32> >= 1
relatedArtistIds
Array of integers <int32> [ items <int32 > ]

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "orderBy": "string",
  • "primaryCategory": 1,
  • "relatedArtistIds": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "primaryCategory": 1,
  • "relatedArtistIds": [
    ]
}