(Quick Reference)
26 Item group translations - Reference Documentation
Version: 2.1
26 Item group translations
26.1 List
Service: List item group translations
Description: This web service returns a json list of item group translations.
URL:
http://BASE_URL/api/VERSION/itemGroupTranslations
Method: GET
Parameters:
Pagination parameters:
Name | Description | Type | Required | Possible values |
---|
max | Limits the number of resources requested to return. | Integer | no | |
offset | Tells where to start returning records from the entire set of results. | Integer | no | |
order | Orders ascending or descending. | Integer | no | asc,desc |
sort | Orders the results by the specified field. | String | no | |
The
max
parameter is set to
100
by default.
Filters parameters:
Name | Description | Type | Required | Example values |
---|
dateCreated_gt | Filters by the resource's creation date time and operator greater than | Date | no | 2016-08-15T14:52:48Z |
dateCreated_gte | Filters by the resource's creation date time and operator greater than or equal | Date | no | |
dateCreated_lt | Filters by the resource's creation date time and operator less than | Date | no | |
dateCreated_lte | Filters by the resource's creation date time and operator less than or equal | Date | no | |
lastUpdated_gt | Filters by the resource's last-modified date time and operator greater than | Date | no | |
lastUpdated_gte | Filters by the resource's last-modified date time and operator greater than or equal | Date | no | |
lastUpdated_lt | Filters by the resource's last-modified date time and operator less than | Date | no | |
lastUpdated_lte | Filters by the resource's last-modified date time and operator less than or equal | Date | no | |
language | Filters by language | String | no | 'en', 'fr' , etc .. |
reference | Wildcard search by the item group reference | String | no | reference=Ref-6* , reference=*ef-6 , reference=*ef-6* |
Success Output
Status: HTTP/1.1 200 OK
{
"paging": {
"total": 526,
"max": 5,
"offset": 0,
"previous": null,
"next": "/api/v2.1/itemGroupTranslations?max=5&order=asc&offset=5&sort=dateCreated"
},
"data": [
{
"id": 519,
"itemGroupReference": "RG_01",
"itemGroup": {
"id": 1,
"reference": "RG_01",
"href": "/valomniav2/api/v2.1/itemGroups/1"
},
"name": "new ItemGroup1",
"description": "",
"language": {
"id": 3,
"code": "en"
},
"organization": "entity1",
"dateCreated": "2015-12-16T16:38:44Z",
"lastUpdated": "2015-12-16T16:38:44Z"
},
…
]
}
Failure Output
Status: HTTP/1.1 400 Bad Request
{
"error": "invalid_param",
"error_description": "The parameters [dateCreated_gta] you provided are not valid for this request."
}
26.2 Show
Service: Show an item group translation
Description: Returns the requested item group translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/itemGroupTranslations/{id}
Method: GET
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The numerical ID of the desired translation | Long | yes | 123 |
Success Output
Success case: response.status=200
{
"id": 519,
"itemGroupReference": "RG_01",
"itemGroup": {
"id": 1,
"reference": "RG_01",
"href": "/valomniav2/api/v2.1/itemGroups/1"
},
"name": "new ItemGroup1",
"description": "",
"language": {
"id": 3,
"code": "en"
},
"organization": "entity1",
"dateCreated": "2015-12-16T16:38:44Z",
"lastUpdated": "2015-12-16T16:38:44Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The item group translation with the id 7065 doesn't exist."
}
26.3 Delete
Service: Delete an item group translation
Description: Returns a json response.
URL:
https://BASE_URL/api/VERSION/itemGroupTranslations/{id}
Method: DELETE
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The numerical ID of the desired translation | Long | yes | 123 |
Success Output
Success case: response.status=200
{
"success": "true",
"success_description": "Instance deleted successfully"
}
Failure Output
Failure case:response.status = 400
{
"error": "delete_failed",
"error_description": "Failed to delete instance."
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The item group translation with the id 706 doesn't exist."
}
26.4 Save
Service: Create an item group translation
Description: Returns the created item group translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/itemGroupTranslations
Method: POST
Request content type: application/json
Parameters:
Name | Description | Type | Required | Example values |
---|
name | | String | yes | |
description | | String | no | |
itemGroupId | | Long/String | yes | |
language | ISO language code | String | yes | fr |
useExternalId | By default, it is set to false. set it to true if you want to use external ids. | Boolean | no | true , false |
Success Output
Success case: response.status=201
{
"id": 519,
"itemGroupReference": "RG_01",
"itemGroup": {
"id": 1,
"reference": "RG_01",
"href": "/valomniav2/api/v2.1/itemGroups/1"
},
"name": "new ItemGroup1",
"description": "",
"language": {
"id": 3,
"code": "en"
},
"organization": "entity1",
"dateCreated": "2015-12-16T16:38:44Z",
"lastUpdated": "2015-12-16T16:38:44Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "save_failed",
"error_description": "Failed to save instance."
}
{
"error": "missing_param",
"error_description": "itemGroupId parameter is missing"
}
{
"error":"invalid_param_type",
"error_description": "The type of parameter itemGroupId you provided is not valid for this request."
}
{
"error": "language_error",
"error_description": "Failed to "+operation+" the item group translation : incorrect language code"
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The item group with the id 31888 doesn't exist."
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}
26.5 Update
Service: Update an item group translation
Description: Returns the updated item group translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/itemGroupTranslations/{id}
Method: POST
Request content type: application/json
Parameters:
Name | Description | Type | Required | Example values |
---|
name | | String | yes | |
description | | String | no | |
itemGroupId | | Long/String | yes | |
language | ISO language code | String | yes | fr |
useExternalId | By default, it is set to false. set it to true if you want to use external ids. | Boolean | no | true , false |
Success Output
Success case: response.status=200
{
"id": 519,
"itemGroupReference": "RG_01",
"itemGroup": {
"id": 1,
"reference": "RG_01",
"href": "/valomniav2/api/v2.1/itemGroups/1"
},
"name": "new ItemGroup1",
"description": "",
"language": {
"id": 3,
"code": "en"
},
"organization": "entity1",
"dateCreated": "2015-12-16T16:38:44Z",
"lastUpdated": "2015-12-16T16:38:44Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "save_failed",
"error_description": "Failed to save instance."
}
{
"error": "missing_param",
"error_description": "itemGroupId parameter is missing"
}
{
"error":"invalid_param_type",
"error_description": "The type of parameter itemGroupId you provided is not valid for this request."
}
{
"error": "language_error",
"error_description": "Failed to "+operation+" the item group translation : incorrect language code"
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The item group with the id 31888 doesn't exist."
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}
26.6 Upsert
Service: Upsert
Description: This web service is used to insert an item group translation object to the database if it does not already exist, or update it.
URL with external_id:
https://BASE_URL/api/VERSION/itemGroupTranslations/reference/{itemGroupId}/{languageId}
Method: POST
Request content type: application/json
Parameters:
Name | Description | Type | Required | Example values |
---|
name | the name of the item group translated | String | Yes | |
description | description of the item group translated | String | No | |
Success Output
Success case: response.status=201
{
"id": 519,
"itemGroupReference": "RG_01",
"itemGroup": {
"id": 1,
"reference": "RG_01",
"href": "/valomniav2/api/v2.1/itemGroups/1"
},
"name": "new ItemGroup1",
"description": "",
"language": {
"id": 3,
"code": "en"
},
"organization": "entity1",
"dateCreated": "2015-12-16T16:38:44Z",
"lastUpdated": "2015-12-16T16:38:44Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "save_failed",
"error_description": "Failed to save instance"
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}