Quote reason
Your Emporix tenant name.
Note: The tenant name should always be written in lowercase.
saasdev2Number of items to be retrieved per page.
60Page number to be retrieved. The number of the first page is 1.
1List 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.
- Searching for items by string-based properties:
- By a field value:
q=siteCode:main, wheresiteCodeis the field name, andmainis its desired value. - By a localized field value:
q=items.product.name.en:apple_lobo, wherenameis the field name of product,enis the language code, andapple_lobois the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, wherekeyis the language code andvalueis the translation to particular language.
- By a field value:
- Searching for items by a number-based property:
- With a specific value:
q=items.quantity.quantity:20 - With a value greater than:
q=items.quantity.quantity:>20 - With a value lower than:
q=items.quantity.quantity:<20 - With a value greater than or equal to:
q=items.quantity.quantity:>=20 - With a value lower than or equal to:
q=items.quantity.quantity:<=20 - With a value within a range of values:
q=items.quantity.quantity:(>=10 AND <=20)
whereitems.quantity.quantityis the name of the number-based field, and20is its querying value.
- With a specific value:
- Searching for items by a date-based property: All number-based property queries are also valid for dates. In that case, the date should be placed within double quotes:
q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z") - Searching for items by a boolean-based property:
q=description.multiLanguage:true, wheredescription.multiLanguageis the boolean field name, andtrueis its desired value. - Searching for items with a nonexistent or empty property:
q=description.en:null, wheredescription.enis the field that has its value set tonull. - Searching for items with an existing property:
q=mixin:exists, wheremixinis the field that has a non-empty value. - Searching for items by multiple specific values:
q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), whereidis the field name, and strings within the bracket are the desired values. - Searching for items by multiple fields:
q=id:5c3325baa9812100098ff48f siteCode:mainwhereidandsiteCodeare 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. - Searching for items with string-based properties conforming to a regex:
q=siteCode:~ainorq=code:(~U PL)- in case of searching for strings with space, wheresiteCodeis the name of the field, andainorU PLis its querying regex. - Searching for items with a localized string-based property conforming to a regex:
items.product.name.en:~(Yoghurt im)- wherenameis the product field name,enis the desired language, andJoghurt imis the search term.
siteCode:{main}Fields to be returned in the response.
When this parameter is passed, only the id and {fieldName} are retrieved for each entry.
You can specify multiple fields by separating them with commas.
code,messageList 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.
- If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
- If the header is set to
*, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Flag indicating whether the total number of retrieved items should be returned.
falseExample: trueOK
Unsupported language provided.
Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
GET /quote/{tenant}/quote-reasons HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "642c1ff3c78f9b2958d17c18",
"code": "PRICE_TOO_HIGH",
"message": {
"en": "The price is too high",
"de": "Der Preis ist zu hoch"
},
"type": "CHANGE",
"metadata": {
"version": 1,
"createdAt": "2023-02-23T09:36:55.929Z",
"modifiedAt": "2023-02-23T09:38:49.196Z"
}
}
]Creating reasons for the 'CHANGE' or 'DECLINE' types of quote statuses. The reason for the quote status change serves to provide more descriptive information why the status has been changed. This option is available both for merchants and customers, depending on who updates the status of the quote.
Required scopes
quote.quote_manage
Your Emporix tenant name.
Note: The tenant name should always be written in lowercase.
saasdev2The Content-Language request HTTP header defines language(s) of the payload.
deThe schema specifies the attributes that must be provided when creating a quote reason.
The ID for a quote reason can either be manually provided at the time of the quote reason creation, or is automatically generated if not provided.
Type of the quote reason.
Code of the reason for the quote status change.
The request was successful. Quote reason was created and its id is returned.
Unsupported language provided.
Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Conflict.
POST /quote/{tenant}/quote-reasons HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Language: de
Content-Type: application/json
Accept: */*
Content-Length: 111
{
"code": "PRICE_TOO_HIGH",
"type": "CHANGE",
"message": {
"en": "The price is too high",
"de": "Der Preis ist zu hoch"
}
}{
"id": "642c1ff3c78f9b2958d17c18"
}Your Emporix tenant name.
Note: The tenant name should always be written in lowercase.
saasdev2Quote reason unique identifier generated when the quote reason is created.
642c1ff3c78f9b2958d17c18List 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.
- If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
- If the header is set to
*, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
OK
Unsupported language provided.
Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Given resource cannot be found.
GET /quote/{tenant}/quote-reasons/{quoteReasonId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "642c1ff3c78f9b2958d17c18",
"code": "PRICE_TOO_HIGH",
"message": {
"en": "The price is too high",
"de": "Der Preis ist zu hoch"
},
"type": "CHANGE",
"metadata": {
"version": 1,
"createdAt": "2023-02-23T09:36:55.929Z",
"modifiedAt": "2023-02-23T09:38:49.196Z"
}
}Your Emporix tenant name.
Note: The tenant name should always be written in lowercase.
saasdev2Quote reason unique identifier generated when the quote reason is created.
642c1ff3c78f9b2958d17c18The Content-Language request HTTP header defines language(s) of the payload.
deThe schema specifies the attributes that must be provided when creating a quote reason.
Type of the quote reason.
Code of the reason for the quote status change.
The request was successful. Quote reason has been updated.
No content
Unsupported language provided.
Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Given resource cannot be found.
Conflict.
PUT /quote/{tenant}/quote-reasons/{quoteReasonId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Language: de
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"code": "PRICE_TOO_HIGH",
"type": "CHANGE",
"message": {
"en": "The price is too high",
"de": "Der Preis ist zu hoch"
},
"metadata": {
"version": 1
}
}No content
Your Emporix tenant name.
Note: The tenant name should always be written in lowercase.
saasdev2Quote reason unique identifier generated when the quote reason is created.
642c1ff3c78f9b2958d17c18Quote reason has been deleted successfully.
No content
Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
DELETE /quote/{tenant}/quote-reasons/{quoteReasonId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Last updated
Was this helpful?

