(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:

NameDescriptionTypeRequiredPossible values
maxLimits the number of resources requested to return.Integerno 
offsetTells where to start returning records from the entire set of results.Integerno 
orderOrders ascending or descending.Integernoasc,desc
sortOrders the results by the specified field.Stringno 

The max parameter is set to 100 by default.

Filters parameters:

NameDescriptionTypeRequiredExample values
dateCreated_gtFilters by the resource's creation date time and operator greater thanDateno2016-08-15T14:52:48Z
dateCreated_gteFilters by the resource's creation date time and operator greater than or equalDateno 
dateCreated_ltFilters by the resource's creation date time and operator less thanDateno 
dateCreated_lteFilters by the resource's creation date time and operator less than or equalDateno 
lastUpdated_gtFilters by the resource's last-modified date time and operator greater thanDateno 
lastUpdated_gteFilters by the resource's last-modified date time and operator greater than or equalDateno 
lastUpdated_ltFilters by the resource's last-modified date time and operator less thanDateno 
lastUpdated_lteFilters by the resource's last-modified date time and operator less than or equalDateno 
languageFilters by languageStringno'en', 'fr' , etc ..
referenceWildcard search by the item group referenceStringnoreference=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:

NameDescriptionTypeRequiredExample values
idThe numerical ID of the desired translationLongyes123

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:

NameDescriptionTypeRequiredExample values
idThe numerical ID of the desired translationLongyes123

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:

NameDescriptionTypeRequiredExample values
name Stringyes 
description Stringno 
itemGroupId Long/Stringyes 
languageISO language codeStringyesfr
useExternalIdBy default, it is set to false. set it to true if you want to use external ids.Booleannotrue , 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:

NameDescriptionTypeRequiredExample values
name Stringyes 
description Stringno 
itemGroupId Long/Stringyes 
languageISO language codeStringyesfr
useExternalIdBy default, it is set to false. set it to true if you want to use external ids.Booleannotrue , 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:

NameDescriptionTypeRequiredExample values
namethe name of the item group translatedStringYes 
descriptiondescription of the item group translatedStringNo 

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..."
}