Brands
Manage brands
Retrieves all brands created by the tenant.
Required scopes
No specific scopes are required.
A standard query parameter is used to search for specific values.
- Searching for items by string-based properties:
- By field value:
q=name:brand_one
, wherename
is the field name andbrand_one
is its desired value. - By localized field value:
q=name.en:brand_one
, wherename
is the field name,en
is a language code, andbrand_one
is the field value expressed in the specified language. Note: This query works only for localized fields stored in the map format, wherekey
is the language code andvalue
is the translation to a particular language.
- By field value:
- Searching for items by a number-based property:
- With a specific value:
q=metadata.version:2
- With a value greater than:
q=metadata.version:>1
- With a value lower than:
q=metadata.version:<3
- With a value greater than or equal to:
q=metadata.version:>=1
- With a value lower than or equal to:
q=metadata.version:<=2
- With a value within a range of values:
q=metadata.version:(>=1 AND <=2)
wheremetadata.version
is the name of the number-based field, and2
is it's querying value.
- With a specific value:
- Searching for items by a date-based property: All numer-based property queries are also valid for dates. In that case, the date should be placed within double quotes:
q=metadata.createdAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
- Searching for items with a nonexistent or empty property:
q=localizedDescription.en:null
, wherelocalizedDescription.en
is the field that has its value set tonull
. - Searching for items with an existing property:
q=localizedDescription:exists
, wherelocalizedDescription
is the field that has a non-empty value. - Searching for items by multiple specific values:
q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494)
, whereid
is the field name, and strings within the bracket are the desired values. - Searching for items by multiple fields:
q=id:5c3325baa9812100098ff48f name:brand_one
whereid
andname
are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in a format presented earlier. - Searching for items with string-based properties conforming to a regex:
q=name:~_on
orq=name:(~brand on)
- in case of searching for strings with space, wherename
is the name of field and_on
orbrand on
is its querying regex. - Searching for items with a localized string-based property conforming to a regex:
localizedName.en:~(_on)
- wherelocalizedName
is the localized field name,en
is a desired language, and_on
is a search term.
name:{brandName}
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
The language or multiple languages acceptable for the response. Defines language(s) of the localized fields that should be returned in the response body.
If set to *
, the response body will contain translations into all languages specified in the tenant configuration.
The specified language needs to be defined in the Configuration Service, under the project_lang
key.
Note: If not specified, the localized fields will be saved in the default language configured by the tenant in the Configuration Service.
fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7
Flag indicating whether the total number of retrieved results should be returned.
GET /brands HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"name": "Brand_1",
"description": "Description of Brand_1 in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
},
"image": "https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id",
"cloudinaryUrl": "tenant/brands/media_Id",
"metadata": {
"createdAt": "2015-01-17T23:00:52.364Z",
"modifiedAt": "2015-01-17T23:00:52.364Z",
"version": 3
},
"id": "55421f3b6ecea7b1a3b73d26"
},
{
"name": "Brand_2",
"description": "Description of Brand_2 in HTML.",
"localizedName": {
"en": "Brand two",
"de": "Marke zwei"
},
"localizedDescription": {
"en": "Description of <strong>Brand two</strong> in HTML.",
"de": "Beschreibung der <strong>Marke zwei</strong> in HTML."
},
"image": "https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id",
"cloudinaryUrl": "tenant/brands/media_Id",
"metadata": {
"createdAt": "2015-01-17T23:00:52.364Z",
"modifiedAt": "2015-01-17T23:00:52.364Z",
"version": 3
},
"id": "55421f3b6ecea7b1a3b73d26"
}
]
Creates a new brand.
Required scopes
brand.brand_manage
Defines the language in which the localized fields are specified.
If set to *
, the request body may contain translations into all languages specified in the tenant configuration.
The specified language need to be defined in the Configuration Serivce under project_lang
key.
Note: If not specified, localized fields will be saved in the default language configured by the tenant in the Configuration Service.
en
Unique identifier of a brand.
55421f3b6ecea7b1a3b73d26
Brand name.
Brand one
Brand description.
Description of <strong>Haribo</strong> in HTML.
Link to the associated media file. This field is deprecated
. Media assignment should be done through media-service
.
https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id
Id of the associated media file. This field is deprecated
. Media assignment should be done through media-service
.
tenant/brands/media_Id
POST /brands HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 313
{
"id": "55421f3b6ecea7b1a3b73d26",
"name": "Brand one",
"description": "Description of <strong>Haribo</strong> in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
}
}
{
"name": "Brand_2",
"description": "Description of Brand_2 in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
},
"image": "https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id",
"metadata": {
"createdAt": "2015-01-17T23:00:52.364Z",
"modifiedAt": "2015-01-17T23:00:52.364Z",
"version": 1
},
"id": "55421f3b6ecea7b1a3b73d26"
}
Retrieves details of a specified brand.
Required scopes
No specific scopes are required.
Unique identifier of a brand.
The language or multiple languages acceptable for the response. Defines language(s) of the localized fields that should be returned in the response body.
If set to *
, the response body will contain translations into all languages specified in the tenant configuration.
The specified language needs to be defined in the Configuration Service, under the project_lang
key.
Note: If not specified, the localized fields will be saved in the default language configured by the tenant in the Configuration Service.
fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7
GET /brands/{brandId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"name": "Haribo",
"description": "Description of Brand_2 in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
},
"image": "https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id",
"cloudinaryUrl": "tenant/brands/media_Id",
"metadata": {
"createdAt": "2015-01-17T23:00:52.364Z",
"modifiedAt": "2015-01-17T23:00:52.364Z",
"version": 3
},
"id": "55421f3b6ecea7b1a3b73d26"
}
Updates a specified brand by replacing all of its existing data with data from the request body.
Required scopes
brand.brand_manage
Unique identifier of a brand.
Defines the language in which the localized fields are specified.
If set to *
, the request body may contain translations into all languages specified in the tenant configuration.
The specified language need to be defined in the Configuration Serivce under project_lang
key.
Note: If not specified, localized fields will be saved in the default language configured by the tenant in the Configuration Service.
en
Brand name.
Brand one
Brand description.
Description of <strong>Haribo</strong> in HTML.
Link to the associated media file. This field is deprecated
. Media assignment should be done through media-service
.
https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id
Id of the associated media file. This field is deprecated
. Media assignment should be done through media-service
.
{tenant}/brands/{media_Id}
PUT /brands/{brandId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 306
{
"name": "Brand one",
"description": "Description of <strong>Haribo</strong> in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
},
"metadata": {
"version": 1
}
}
{
"name": "Haribo",
"description": "Description of <strong>Haribo</strong> in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
},
"image": "https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id",
"cloudinaryUrl": "tenant/brands/media_Id",
"metadata": {
"createdAt": "2015-01-17T23:00:52.364Z",
"modifiedAt": "2015-01-17T23:00:52.364Z",
"version": 2
},
"id": "55421f3b6ecea7b1a3b73d26"
}
Deletes a specified brand.
Required scopes
brand.brand_manage
Unique identifier of a brand.
DELETE /brands/{brandId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Partially updates a specified brand by replacing specificed fields from the request body.
Required scopes
brand.brand_manage
Unique identifier of a brand.
Defines the language in which the localized fields are specified.
If set to *
, the request body may contain translations into all languages specified in the tenant configuration.
The specified language need to be defined in the Configuration Serivce under project_lang
key.
Note: If not specified, localized fields will be saved in the default language configured by the tenant in the Configuration Service.
en
Brand name.
Brand one
Brand description.
Description of <strong>Haribo</strong> in HTML.
Link to the associated media file. This field is deprecated
. Media assignment should be done through media-service
.
https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id
Id of the associated media file. This field is deprecated
. Media assignment should be done through media-service
.
{tenant}/brands/{media_Id}
PATCH /brands/{brandId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 84
{
"name": "Brand one",
"description": "Description of <strong>Haribo</strong> in HTML."
}
{
"name": "Haribo",
"description": "Description of <strong>Haribo</strong> in HTML.",
"localizedName": {
"en": "Brand one",
"de": "Marke einz"
},
"localizedDescription": {
"en": "Description of <strong>Brand one</strong> in HTML.",
"de": "Beschreibung der <strong>Marke einz</strong> in HTML."
},
"image": "https://res.cloudinary.com/saas-ag/image/upload/tenant/brands/media_Id",
"cloudinaryUrl": "tenant/brands/media_Id",
"metadata": {
"createdAt": "2015-01-17T23:00:52.364Z",
"modifiedAt": "2015-01-17T23:00:52.364Z",
"version": 2
},
"id": "55421f3b6ecea7b1a3b73d26"
}
Was this helpful?