Reference
Was this helpful?
Was this helpful?
Retrieves a single reference.
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the entity.
Version of the entity.
1
List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.
*
, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.GET /schema/{tenant}/references/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "64d35aa7fa54121ca47db657",
"name": {
"en": "Product Custom Attributes"
},
"types": [
"PRODUCT"
],
"metadata": {
"version": 1,
"createdAt": "2023-08-09T09:21:42.693Z",
"modifiedAt": "2023-08-09T09:21:42.693Z",
"url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/64d35aa7fa54121ca47db657_v1.json"
}
}
Deletes a single reference. It deletes just a database entry. The cloudinary reference file remains untouched.
Required scopes
schema.schema_manage
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the entity.
Version of the entity.
1
DELETE /schema/{tenant}/references/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Retrieves all references. You can filter the results with query parameters.
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Page number to be retrieved. The number of the first page is 1.
1
Number of items to be retrieved per page.
60
List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.
Possible values:
{fieldName}
{fieldName}:asc
{fieldName}:desc
Note: If you want to sort the results by localized properties, the possible values are:
{fieldName}.{language}
{fieldName}.{language}:asc
{fieldName}.{language}:desc
If the sorting direction is not specified, the fields are sorted in ascending order.
A standard query parameter is used to search for specific values.
q=siteCode:main
, where siteCode
is the field name, and main
is its desired value.q=items.product.name.en:apple_lobo
, where name
is the field name of product, en
is the language code, and apple_lobo
is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, where key
is the language code and value
is the translation to particular language.q=items.quantity.quantity:20
q=items.quantity.quantity:>20
q=items.quantity.quantity:<20
q=items.quantity.quantity:>=20
q=items.quantity.quantity:<=20
q=items.quantity.quantity:(>=10 AND <=20)
items.quantity.quantity
is the name of the number-based field, and 20
is its querying value.q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
q=description.multiLanguage:true
, where description.multiLanguage
is the boolean field name, and true
is its desired value.q=description.en:null
, where description.en
is the field that has its value set to null
.q=mixin:exists
, where mixin
is the field that has a non-empty value.q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494)
, where id
is the field name, and strings within the bracket are the desired values.q=id:5c3325baa9812100098ff48f siteCode:main
where id
and siteCode
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 the format presented earlier.q=siteCode:~ain
or q=code:(~U PL)
- in case of searching for strings with space, where siteCode
is the name of the field, and ain
or U PL
is its querying regex.items.product.name.en:~(Yoghurt im)
- where name
is the product field name, en
is the desired language, and Joghurt im
is the search term.siteCode:{main}
Fields to be included in the response.
Filters references by type. Possible types to specify, CART, CATEGORY, COMPANY, COUPON, CUSTOMER, CUSTOMER_ADDRESS, ORDER, PRODUCT, QUOTE, RETURN, PRICE_LIST, CUSTOM_ENTITY. When the newer version of a reference is of different type than the previous one and the previous one matches the type specified in this query param, then the previous version is returned.
Flag indicating whether the total number of retrieved items should be returned.
false
Example: true
List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.
*
, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.GET /schema/{tenant}/references HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "64d35aa7fa54121ca47db657",
"name": {
"en": "Product Custom Attributes"
},
"types": [
"PRODUCT"
],
"metadata": {
"version": 1,
"createdAt": "2023-08-09T09:21:42.693Z",
"modifiedAt": "2023-08-09T09:21:42.693Z",
"url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/64d35aa7fa54121ca47db657_v1.json"
}
}
]
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
The Content-Language request HTTP header defines language(s) of the payload.
de
Content of the file.
POST /schema/{tenant}/references HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 198
{
"file": {
"externalValue": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/653a30c0951b2b0665884f89_v1.json"
},
"body": {
"name": {
"en": "Product Custom Attributes"
},
"types": [
"PRODUCT"
]
}
}
{
"id": "e241dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}
Updates a single reference.
Required scopes
schema.schema_manage
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the entity.
Version of the entity.
1
The Content-Language request HTTP header defines language(s) of the payload.
de
Content of the file.
PUT /schema/{tenant}/references/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 223
{
"file": {
"externalValue": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/653a30c0951b2b0665884f89_v1.json"
},
"body": {
"name": {
"en": "Product Custom Attributes"
},
"types": [
"PRODUCT"
],
"metadata": {
"version": 1
}
}
}
No content