(Quick Reference)
                
                    
                
                
                    24 Item category translations - Reference Documentation
                    
                    Version: 2.1
                    
                 
                
                
                
                
24 Item category translations
24.1 List
Service: List item category translations
Description: This web service returns a json list of item category translations.
URL: 
http://BASE_URL/api/VERSION/itemCategoryTranslations
: 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 category 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/itemCategoryTranslations?max=5&order=asc&offset=5&sort=dateCreated"
  },
  "data": [
    {
      "id": 519,
      "itemCategoryReference": "R100",
      "itemCategory": {
        "id": 1,
        "reference": "R100",
        "href": "/valomniav2/api/v2.1/itemCategories/1"
      },
      "name": "new Cate",
      "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."
}24.2 Show
Service: Show an item category translation
Description: Returns the requested item category translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL: 
https://BASE_URL/api/VERSION/itemCategoryTranslations/{id}: 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,
  "itemCategoryReference": "R100",
  "itemCategory": {
    "id": 1,
    "reference": "R100",
    "href": "/valomniav2/api/v2.1/itemCategories/1"
  },
  "name": "new Cate",
  "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 category translation with the id 7065 doesn't exist."
}24.3 Delete
Service: Delete an item category translation
Description: Returns a json response.
URL: 
https://BASE_URL/api/VERSION/itemCategoryTranslations/{id}: 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 category translation with the id 706 doesn't exist."
}24.4 Save
Service: Create an item category translation
Description: Returns the created item category translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL: 
https://BASE_URL/api/VERSION/itemCategoryTranslations
: POST
Request content type: application/json
Parameters:
| Name | Description | Type | Required | Example values | 
|---|
| name |  | String | yes |  | 
| description |  | String | no |  | 
| itemCategoryId |  | 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,
  "itemCategoryReference": "R100",
  "itemCategory": {
    "id": 1,
    "reference": "R100",
    "href": "/valomniav2/api/v2.1/itemCategories/1"
  },
  "name": "new Cate",
  "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": "itemCategoryId parameter is missing"
}{
  "error":"invalid_param_type",
  "error_description": "The type of parameter itemCategoryId you provided is not valid for this request."
}{
  "error": "language_error",
  "error_description": "Failed to "+operation+" the item category translation : incorrect language code"
} Failure case:response.status = 404 
{
  "error": "not_found",
  "error_description": "The item category with the id 31888 doesn't exist."
} Failure case:response.status = 500 
{
  "error": "server_error",
  "error_description": "Oops! Something went wrong..."
}24.5 Update
Service: Update an item category translation
Description: Returns the updated item category translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL: 
https://BASE_URL/api/VERSION/itemCategoryTranslations/{id}: POST
Request content type: application/json
Parameters:
| Name | Description | Type | Required | Example values | 
|---|
| name |  | String | yes |  | 
| description |  | String | no |  | 
| itemCategoryId |  | 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,
  "itemCategoryReference": "R100",
  "itemCategory": {
    "id": 1,
    "reference": "R100",
    "href": "/valomniav2/api/v2.1/itemCategories/1"
  },
  "name": "new Cate",
  "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": "itemCategoryId parameter is missing"
}{
  "error":"invalid_param_type",
  "error_description": "The type of parameter itemCategoryId you provided is not valid for this request."
}{
  "error": "language_error",
  "error_description": "Failed to "+operation+" the item category translation : incorrect language code"
} Failure case:response.status = 404 
{
  "error": "not_found",
  "error_description": "The item category with the id 31888 doesn't exist."
} Failure case:response.status = 500 
{
  "error": "server_error",
  "error_description": "Oops! Something went wrong..."
}24.6 Upsert
Service: Upsert
Description: This web service is used to insert an item category translation object to the database if it does not already exist, or update it.
URL with external_id: 
https://BASE_URL/api/VERSION/itemCategoryTranslations/reference/{itemCategoryId}/{languageId}: POST
Request content type: application/json
Parameters:
| Name | Description | Type | Required | Example values | 
|---|
| name | the name of the item category translated | String | Yes |  | 
| description | description of the item category translated | String | No |  | 
Success Output
 Success case: response.status=201 
{
  "id": 519,
  "itemCategoryReference": "R100",
  "itemCategory": {
    "id": 1,
    "reference": "R100",
    "href": "/valomniav2/api/v2.1/itemCategories/1"
  },
  "name": "new Cate",
  "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..."
}