Use this method to update an existing category record. Take a look in the POST method for more detailed explanation on every resource property. To see an example usage take a look at docs/REST/samples/category-service/update_category.php
PUT https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}
Parameter name | Value | Description | Additional |
---|---|---|---|
category_id | int64 | The category ID |
Required |
Read-only parameters such as a resource's ID field are to be omitted.
The request body takes a GXCategory resource, containing the following writable properties:
{
"addonValues": null,
"dateAdded": "2008-08-08 17:16:41",
"description": {
"de": "Testkategorie Beschreibung",
"en": "test category description"
},
"descriptionBottom": {
"de": "",
"en": ""
},
"headingTitle": {
"de": "Testkategorie",
"en": "test category"
},
"icon": "item_ltr.gif",
"image": "",
"imageAltText": {
"de": "",
"en": ""
},
"isActive": true,
"lastModified": "2008-08-25 17:33:52",
"metaDescription": {
"de": "",
"en": ""
},
"metaKeywords": {
"de": "",
"en": ""
},
"metaTitle": {
"de": "",
"en": ""
},
"name": {
"de": "Testkategorie",
"en": "test category"
},
"parentId": 0,
"settings": {
"categoryListingTemplate": "categorie_listing.html",
"filterSelectionMode": 0,
"filterValueDeactivation": 0,
"groupPermissions": [
{
"id": "0",
"isPermitted": false
},
{
"id": "1",
"isPermitted": false
},
{
"id": "2",
"isPermitted": false
},
{
"id": "3",
"isPermitted": false
}
],
"isViewModeTiled": false,
"onSitemap": true,
"productListingTemplate": "product_listing_v1.html",
"showAttributes": false,
"showCategoryFilter": false,
"showGraduatedPrice": false,
"showQuantity": true,
"showQuantityInfo": false,
"showSubCategories": true,
"showSubCategoryImages": true,
"showSubCategoryNames": true,
"showSubCategoryProducts": false,
"sitemapChangeFrequency": "daily",
"sitemapPriority": "0.5",
"sortColumn": "p.products_price",
"sortDirection": "ASC"
},
"sortOrder": 0,
"urlKeywords": {
"de": "Testkategorie",
"en": "test-category"
}
}
{
"addonValues": {
"key": "string"
},
"dateAdded": "string",
"description": {
"de": "string",
"en": "string"
},
"descriptionBottom": {
"de": "string",
"en": "string"
},
"headingTitle": {
"de": "string",
"en": "string"
},
"icon": "string",
"image": "string",
"imageAltText": {
"de": "string",
"en": "string"
},
"isActive": "boolean",
"lastModified": "string",
"metaDescription": {
"de": "string",
"en": "string"
},
"metaKeywords": {
"de": "string",
"en": "string"
},
"metaTitle": {
"de": "string",
"en": "string"
},
"name": {
"de": "string",
"en": "string"
},
"parentId": "int64",
"settings": {
"categoryListingTemplate": "string",
"filterSelectionMode": "int64",
"filterValueDeactivation": "int64",
"groupPermissions": [
{
"id": "int64",
"isPermitted": "boolean"
}
],
"isViewModeTiled": "boolean",
"onSitemap": "boolean",
"productListingTemplate": "string",
"showAttributes": "boolean",
"showCategoriesImageInDescription": "boolean",
"showCategoryFilter": "boolean",
"showGraduatedPrice": "boolean",
"showQuantity": "boolean",
"showQuantityInfo": "boolean",
"showSubCategories": "boolean",
"showSubCategoryImages": "boolean",
"showSubCategoryNames": "boolean",
"showSubCategoryProducts": "boolean",
"sitemapChangeFrequency": "string",
"sitemapPriority": "string",
"sortColumn": "string",
"sortDirection": "string"
},
"sortOrder": "int64",
"urlKeywords": {
"de": "string",
"en": "string"
}
}
Name | Type | Description | Additional |
---|---|---|---|
addonValues | object | Required | |
addonValues.key | string | Optional | |
dateAdded | string | Required | |
description | object | GXMultiLangOption | Required |
description.de | string | Required | |
description.en | string | Required | |
descriptionBottom | object | GXMultiLangOption | Required |
descriptionBottom.de | string | Required | |
descriptionBottom.en | string | Required | |
headingTitle | object | GXMultiLangOption | Required |
headingTitle.de | string | Required | |
headingTitle.en | string | Required | |
icon | string | Required | |
image | string | Required | |
imageAltText | object | GXMultiLangOption | Required |
imageAltText.de | string | Required | |
imageAltText.en | string | Required | |
isActive | boolean | Required | |
lastModified | string | Required | |
metaDescription | object | GXMultiLangOption | Required |
metaDescription.de | string | Required | |
metaDescription.en | string | Required | |
metaKeywords | object | GXMultiLangOption | Required |
metaKeywords.de | string | Required | |
metaKeywords.en | string | Required | |
metaTitle | object | GXMultiLangOption | Required |
metaTitle.de | string | Required | |
metaTitle.en | string | Required | |
name | object | GXMultiLangOption | Required |
name.de | string | Required | |
name.en | string | Required | |
parentId | int64 | Required | |
settings | object | categorySettings | Required |
settings.categoryListingTemplate | string | Required | |
settings.filterSelectionMode | int64 | Required | |
settings.filterValueDeactivation | int64 | Required | |
settings.groupPermissions[] | array | Required | |
settings.groupPermissions[].id | int64 | Required | |
settings.groupPermissions[].isPermitted | boolean | Required | |
settings.isViewModeTiled | boolean | Required | |
settings.onSitemap | boolean | Required | |
settings.productListingTemplate | string | Required | |
settings.showAttributes | boolean | Required | |
settings.showCategoriesImageInDescription | boolean | Optional | |
settings.showCategoryFilter | boolean | Required | |
settings.showGraduatedPrice | boolean | Required | |
settings.showQuantity | boolean | Required | |
settings.showQuantityInfo | boolean | Required | |
settings.showSubCategories | boolean | Required | |
settings.showSubCategoryImages | boolean | Required | |
settings.showSubCategoryNames | boolean | Required | |
settings.showSubCategoryProducts | boolean | Required | |
settings.sitemapChangeFrequency | string | Required | |
settings.sitemapPriority | string | Required | |
settings.sortColumn | string | Required | |
settings.sortDirection | string |
Possible values are:
|
Required |
sortOrder | int64 | Required | |
urlKeywords | object | GXMultiLangOption | Required |
urlKeywords.de | string | Required | |
urlKeywords.en | string | Required |
In order to provide the authentication, you must insert the Basic Auth inside the HTTP header. The Basic Auth
is an encrypted base64 string that holds the following content: admin@example.org:12345
where the structure is
as follows: username:password
.
An example header would look as follows:
Authorization: Basic YWRtaW5Ac2hvcC5kZToxMjM0NQ==
This request requires the use of one of following authorisation methods:
BASIC
.
The following HTTP status codes may be returned, optionally with a response resource.
Status code | Description | Resource |
---|---|---|
200 | OK Upon success, returns the updated category |
GXCategory |
400 | Bad Request (Empty request body / Category record ID was not provided or is invalid) |
defaultErrorResponse |
Here are some example implementations for this operation.
curl --request PUT \ --header 'Authorization: Basic REPLACE_BASIC_AUTH' \ --header 'content-type: application/json' \ --data '{"id":0,"dateAdded":"","lastModified":"","parentId":0,"isActive":false,"sortOrder":0,"name":{"en":"","de":""},"headingTitle":{"en":"","de":""},"description":{"en":"","de":""},"descriptionBottom":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"icon":"","image":"","imageAltText":{"en":"","de":""},"settings":{"categoryListingTemplate":"","productListingTemplate":"","sortColumn":"","sortDirection":"ASC","onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","showAttributes":false,"showGraduatedPrice":false,"showQuantity":false,"showQuantityInfo":false,"showSubCategories":false,"showSubCategoryImages":false,"showSubCategoryNames":false,"showSubCategoryProducts":false,"showCategoriesImageInDescription":false,"isViewModeTiled":false,"showCategoryFilter":false,"filterSelectionMode":0,"filterValueDeactivation":0,"groupPermissions":[{"id":0,"isPermitted":false}]},"addonValues":{"key":""}}'
wget --quiet \ --method PUT \ --header 'content-type: application/json' \ --header 'Authorization: Basic REPLACE_BASIC_AUTH' \ --body-data '{"id":0,"dateAdded":"","lastModified":"","parentId":0,"isActive":false,"sortOrder":0,"name":{"en":"","de":""},"headingTitle":{"en":"","de":""},"description":{"en":"","de":""},"descriptionBottom":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"icon":"","image":"","imageAltText":{"en":"","de":""},"settings":{"categoryListingTemplate":"","productListingTemplate":"","sortColumn":"","sortDirection":"ASC","onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","showAttributes":false,"showGraduatedPrice":false,"showQuantity":false,"showQuantityInfo":false,"showSubCategories":false,"showSubCategoryImages":false,"showSubCategoryNames":false,"showSubCategoryProducts":false,"showCategoriesImageInDescription":false,"isViewModeTiled":false,"showCategoryFilter":false,"filterSelectionMode":0,"filterValueDeactivation":0,"groupPermissions":[{"id":0,"isPermitted":false}]},"addonValues":{"key":""}}' \ --output-document
echo '{"id":0,"dateAdded":"","lastModified":"","parentId":0,"isActive":false,"sortOrder":0,"name":{"en":"","de":""},"headingTitle":{"en":"","de":""},"description":{"en":"","de":""},"descriptionBottom":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"icon":"","image":"","imageAltText":{"en":"","de":""},"settings":{"categoryListingTemplate":"","productListingTemplate":"","sortColumn":"","sortDirection":"ASC","onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","showAttributes":false,"showGraduatedPrice":false,"showQuantity":false,"showQuantityInfo":false,"showSubCategories":false,"showSubCategoryImages":false,"showSubCategoryNames":false,"showSubCategoryProducts":false,"showCategoriesImageInDescription":false,"isViewModeTiled":false,"showCategoryFilter":false,"filterSelectionMode":0,"filterValueDeactivation":0,"groupPermissions":[{"id":0,"isPermitted":false}]},"addonValues":{"key":""}}' | \ Authorization:'Basic REPLACE_BASIC_AUTH' \ content-type:application/json
HttpResponse response = Unirest.put("https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}") .header("content-type", "application/json") .header("Authorization", "Basic REPLACE_BASIC_AUTH") .body("{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}") .asString();
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}"); Request request = new Request.Builder() .put(body) .addHeader("content-type", "application/json") .addHeader("Authorization", "Basic REPLACE_BASIC_AUTH") .build(); Response response = client.newCall(request).execute();
var request = new RestRequest(Method.PUT); request.AddHeader("content-type", "application/json"); request.AddHeader("Authorization", "Basic REPLACE_BASIC_AUTH"); request.AddParameter("application/json", "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
const http = require("https"); const options = {
"method": "PUT", "hostname": "gambio-shop.de", "port": null, "path": "/shop1/api.php/v2/categories/{category_id}", "headers": { "content-type": "application/json",
"Authorization": "Basic REPLACE_BASIC_AUTH" }
}; const req = http.request(options, function (res) {
const chunks = []; res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString()); });
}); req.write(JSON.stringify({
id: 0, dateAdded: '', lastModified: '', parentId: 0, isActive: false, sortOrder: 0, name: {en: '', de: ''}, headingTitle: {en: '', de: ''}, description: {en: '', de: ''}, descriptionBottom: {en: '', de: ''}, metaTitle: {en: '', de: ''}, metaDescription: {en: '', de: ''}, metaKeywords: {en: '', de: ''}, urlKeywords: {en: '', de: ''}, icon: '', image: '', imageAltText: {en: '', de: ''}, settings: { categoryListingTemplate: '<ADD STRING VALUE>',
productListingTemplate: '<ADD STRING VALUE>', sortColumn: '<ADD STRING VALUE>', sortDirection: 'ASC', onSitemap: false, sitemapPriority: '<ADD STRING VALUE>', sitemapChangeFrequency: '<ADD STRING VALUE>', showAttributes: false, showGraduatedPrice: false, showQuantity: false, showQuantityInfo: false, showSubCategories: false, showSubCategoryImages: false, showSubCategoryNames: false, showSubCategoryProducts: false, showCategoriesImageInDescription: false, isViewModeTiled: false, showCategoryFilter: false, filterSelectionMode: 0, filterValueDeactivation: 0, groupPermissions: [{id: 0, isPermitted: false}] },
addonValues: {key: ''} })); req.end();
const request = require('request'); const options = {
method: 'PUT', headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'}, body: { id: 0,
dateAdded: '<ADD STRING VALUE>', lastModified: '<ADD STRING VALUE>', parentId: 0, isActive: false, sortOrder: 0, name: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, headingTitle: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, description: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, descriptionBottom: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, metaTitle: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, metaDescription: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, metaKeywords: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, urlKeywords: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, icon: '<ADD STRING VALUE>', image: '<ADD STRING VALUE>', imageAltText: {en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>'}, settings: { categoryListingTemplate: '<ADD STRING VALUE>', productListingTemplate: '<ADD STRING VALUE>', sortColumn: '<ADD STRING VALUE>', sortDirection: 'ASC', onSitemap: false, sitemapPriority: '<ADD STRING VALUE>', sitemapChangeFrequency: '<ADD STRING VALUE>', showAttributes: false, showGraduatedPrice: false, showQuantity: false, showQuantityInfo: false, showSubCategories: false, showSubCategoryImages: false, showSubCategoryNames: false, showSubCategoryProducts: false, showCategoriesImageInDescription: false, isViewModeTiled: false, showCategoryFilter: false, filterSelectionMode: 0, filterValueDeactivation: 0, groupPermissions: [{id: 0, isPermitted: false}] }, addonValues: {key: '<ADD STRING VALUE>'} },
json: true }; request(options, function (error, response, body) {
if (error) throw new Error(error); console.log(body);
});
const unirest = require("unirest"); const req = unirest("PUT", "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}");
req.headers({
"content-type": "application/json", "Authorization": "Basic REPLACE_BASIC_AUTH" }); req.type("json");
req.send({ "id": 0, "dateAdded": "", "lastModified": "", "parentId": 0, "isActive": false, "sortOrder": 0, "name": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"headingTitle": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"description": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"descriptionBottom": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"metaTitle": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"metaDescription": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"metaKeywords": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"urlKeywords": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"icon": "", "image": "", "imageAltText": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"settings": { "categoryListingTemplate": "<ADD STRING VALUE>",
"productListingTemplate": "<ADD STRING VALUE>", "sortColumn": "<ADD STRING VALUE>", "sortDirection": "ASC", "onSitemap": false, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "showAttributes": false, "showGraduatedPrice": false, "showQuantity": false, "showQuantityInfo": false, "showSubCategories": false, "showSubCategoryImages": false, "showSubCategoryNames": false, "showSubCategoryProducts": false, "showCategoriesImageInDescription": false, "isViewModeTiled": false, "showCategoryFilter": false, "filterSelectionMode": 0, "filterValueDeactivation": 0, "groupPermissions": [ { "id": 0, "isPermitted": false } ] },
"addonValues": { "key": "<ADD STRING VALUE>"
}
}); req.end(function (res) {
if (res.error) throw new Error(res.error); console.log(res.body);
});
const data = JSON.stringify({ "id": 0, "dateAdded": "", "lastModified": "", "parentId": 0, "isActive": false, "sortOrder": 0, "name": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"headingTitle": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"description": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"descriptionBottom": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"metaTitle": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"metaDescription": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"metaKeywords": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"urlKeywords": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"icon": "", "image": "", "imageAltText": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"settings": { "categoryListingTemplate": "<ADD STRING VALUE>",
"productListingTemplate": "<ADD STRING VALUE>", "sortColumn": "<ADD STRING VALUE>", "sortDirection": "ASC", "onSitemap": false, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "showAttributes": false, "showGraduatedPrice": false, "showQuantity": false, "showQuantityInfo": false, "showSubCategories": false, "showSubCategoryImages": false, "showSubCategoryNames": false, "showSubCategoryProducts": false, "showCategoriesImageInDescription": false, "isViewModeTiled": false, "showCategoryFilter": false, "filterSelectionMode": 0, "filterValueDeactivation": 0, "groupPermissions": [ { "id": 0, "isPermitted": false } ] },
"addonValues": { "key": "<ADD STRING VALUE>"
}
}); const xhr = new XMLHttpRequest();
xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) { console.log(this.responseText);
}
}); xhr.open("PUT", "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}");
xhr.setRequestHeader("content-type", "application/json"); xhr.setRequestHeader("Authorization", "Basic REPLACE_BASIC_AUTH"); xhr.send(data);
const settings = { "async": true, "crossDomain": true, "method": "PUT", "headers": { "content-type": "application/json",
"Authorization": "Basic REPLACE_BASIC_AUTH" },
"processData": false, "data": "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}" }; $.ajax(settings).done(function (response) {
console.log(response); });
<?php $curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}", CURLOPT_HTTPHEADER => [ "Authorization: Basic REPLACE_BASIC_AUTH",
"content-type: application/json" ],
]); $response = curl_exec($curl);
$err = curl_error($curl); curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err; } else { echo $response; }
<?php $request = new HttpRequest();
$request->setUrl('https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}'); $request->setMethod(HTTP_METH_PUT); $request->setHeaders([
'content-type' => 'application/json', 'Authorization' => 'Basic REPLACE_BASIC_AUTH' ]); $request->setBody('{"id":0,"dateAdded":"","lastModified":"","parentId":0,"isActive":false,"sortOrder":0,"name":{"en":"","de":""},"headingTitle":{"en":"","de":""},"description":{"en":"","de":""},"descriptionBottom":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"icon":"","image":"","imageAltText":{"en":"","de":""},"settings":{"categoryListingTemplate":"","productListingTemplate":"","sortColumn":"","sortDirection":"ASC","onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","showAttributes":false,"showGraduatedPrice":false,"showQuantity":false,"showQuantityInfo":false,"showSubCategories":false,"showSubCategoryImages":false,"showSubCategoryNames":false,"showSubCategoryProducts":false,"showCategoriesImageInDescription":false,"isViewModeTiled":false,"showCategoryFilter":false,"filterSelectionMode":0,"filterValueDeactivation":0,"groupPermissions":[{"id":0,"isPermitted":false}]},"addonValues":{"key":""}}');
try {
$response = $request->send(); echo $response->getBody();
} catch (HttpException $ex) { echo $ex; }
<?php $client = new http\Client;
$request = new http\Client\Request; $body = new http\Message\Body;
$body->append('{"id":0,"dateAdded":"","lastModified":"","parentId":0,"isActive":false,"sortOrder":0,"name":{"en":"","de":""},"headingTitle":{"en":"","de":""},"description":{"en":"","de":""},"descriptionBottom":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"icon":"","image":"","imageAltText":{"en":"","de":""},"settings":{"categoryListingTemplate":"","productListingTemplate":"","sortColumn":"","sortDirection":"ASC","onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","showAttributes":false,"showGraduatedPrice":false,"showQuantity":false,"showQuantityInfo":false,"showSubCategories":false,"showSubCategoryImages":false,"showSubCategoryNames":false,"showSubCategoryProducts":false,"showCategoriesImageInDescription":false,"isViewModeTiled":false,"showCategoryFilter":false,"filterSelectionMode":0,"filterValueDeactivation":0,"groupPermissions":[{"id":0,"isPermitted":false}]},"addonValues":{"key":""}}'); $request->setRequestUrl('https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}');
$request->setRequestMethod('PUT'); $request->setBody($body); $request->setHeaders([
'content-type' => 'application/json', 'Authorization' => 'Basic REPLACE_BASIC_AUTH' ]); $client->enqueue($request)->send();
$response = $client->getResponse(); echo $response->getBody();
import http.client conn = http.client.HTTPSConnection("gambio-shop.de")
payload = "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}"
headers = {
'content-type': "application/json",
'Authorization': "Basic REPLACE_BASIC_AUTH" } conn.request("PUT", "/shop1/api.php/v2/categories/{category_id}", payload, headers)
res = conn.getresponse()
data = res.read() print(data.decode("utf-8"))
import requests payload = {
"id": 0,
"dateAdded": "<ADD STRING VALUE>", "lastModified": "<ADD STRING VALUE>", "parentId": 0, "isActive": False, "sortOrder": 0, "name": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "headingTitle": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "description": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "descriptionBottom": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "metaTitle": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "metaDescription": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "metaKeywords": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "urlKeywords": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "icon": "<ADD STRING VALUE>", "image": "<ADD STRING VALUE>", "imageAltText": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" }, "settings": { "categoryListingTemplate": "<ADD STRING VALUE>", "productListingTemplate": "<ADD STRING VALUE>", "sortColumn": "<ADD STRING VALUE>", "sortDirection": "ASC", "onSitemap": False, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "showAttributes": False, "showGraduatedPrice": False, "showQuantity": False, "showQuantityInfo": False, "showSubCategories": False, "showSubCategoryImages": False, "showSubCategoryNames": False, "showSubCategoryProducts": False, "showCategoriesImageInDescription": False, "isViewModeTiled": False, "showCategoryFilter": False, "filterSelectionMode": 0, "filterValueDeactivation": 0, "groupPermissions": [ { "id": 0, "isPermitted": False } ] }, "addonValues": {"key": "<ADD STRING VALUE>"} }
headers = { "content-type": "application/json",
"Authorization": "Basic REPLACE_BASIC_AUTH" }
response = requests.request("PUT", url, json=payload, headers=headers)
print(response.text)
require 'uri' require 'net/http' require 'openssl' http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json' request["Authorization"] = 'Basic REPLACE_BASIC_AUTH' request.body = "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}" response = http.request(request)
puts response.read_body
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}"); struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json"); headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}");
CURLcode ret = curl_easy_perform(hnd);
package main import (
"fmt"
"strings" "net/http" "io/ioutil" )
func main() {
url := "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}"
payload := strings.NewReader("{\"id\":0,\"dateAdded\":\"<ADD STRING VALUE>\",\"lastModified\":\"<ADD STRING VALUE>\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"headingTitle\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"description\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"descriptionBottom\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"metaTitle\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"metaDescription\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"metaKeywords\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"urlKeywords\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"icon\":\"<ADD STRING VALUE>\",\"image\":\"<ADD STRING VALUE>\",\"imageAltText\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"settings\":{\"categoryListingTemplate\":\"<ADD STRING VALUE>\",\"productListingTemplate\":\"<ADD STRING VALUE>\",\"sortColumn\":\"<ADD STRING VALUE>\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"<ADD STRING VALUE>\",\"sitemapChangeFrequency\":\"<ADD STRING VALUE>\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"<ADD STRING VALUE>\"}}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("content-type", "application/json") req.Header.Add("Authorization", "Basic REPLACE_BASIC_AUTH") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
#import NSDictionary *headers = @{ @"content-type": @"application/json",
@"Authorization": @"Basic REPLACE_BASIC_AUTH" };
NSDictionary *parameters = @{ @"id": @0,
@"dateAdded": @"<ADD STRING VALUE>",
@"lastModified": @"<ADD STRING VALUE>", @"parentId": @0, @"isActive": @NO, @"sortOrder": @0, @"name": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"headingTitle": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"description": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"descriptionBottom": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"metaTitle": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"metaDescription": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"metaKeywords": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"urlKeywords": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"icon": @"<ADD STRING VALUE>", @"image": @"<ADD STRING VALUE>", @"imageAltText": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"settings": @{ @"categoryListingTemplate": @"<ADD STRING VALUE>", @"productListingTemplate": @"<ADD STRING VALUE>", @"sortColumn": @"<ADD STRING VALUE>", @"sortDirection": @"ASC", @"onSitemap": @NO, @"sitemapPriority": @"<ADD STRING VALUE>", @"sitemapChangeFrequency": @"<ADD STRING VALUE>", @"showAttributes": @NO, @"showGraduatedPrice": @NO, @"showQuantity": @NO, @"showQuantityInfo": @NO, @"showSubCategories": @NO, @"showSubCategoryImages": @NO, @"showSubCategoryNames": @NO, @"showSubCategoryProducts": @NO, @"showCategoriesImageInDescription": @NO, @"isViewModeTiled": @NO, @"showCategoryFilter": @NO, @"filterSelectionMode": @0, @"filterValueDeactivation": @0, @"groupPermissions": @[ @{ @"id": @0, @"isPermitted": @NO } ] }, @"addonValues": @{ @"key": @"<ADD STRING VALUE>" } }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0]; [request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume];
import Foundation let headers = [
"content-type": "application/json", "Authorization": "Basic REPLACE_BASIC_AUTH" ] let parameters = [ "id": 0, "dateAdded": "", "lastModified": "", "parentId": 0, "isActive": false, "sortOrder": 0, "name": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"headingTitle": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"description": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"descriptionBottom": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"metaTitle": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"metaDescription": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"metaKeywords": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"urlKeywords": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"icon": "", "image": "", "imageAltText": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"settings": [ "categoryListingTemplate": "<ADD STRING VALUE>",
"productListingTemplate": "<ADD STRING VALUE>", "sortColumn": "<ADD STRING VALUE>", "sortDirection": "ASC", "onSitemap": false, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "showAttributes": false, "showGraduatedPrice": false, "showQuantity": false, "showQuantityInfo": false, "showSubCategories": false, "showSubCategoryImages": false, "showSubCategoryNames": false, "showSubCategoryProducts": false, "showCategoriesImageInDescription": false, "isViewModeTiled": false, "showCategoryFilter": false, "filterSelectionMode": 0, "filterValueDeactivation": 0, "groupPermissions": [ [ "id": 0, "isPermitted": false ] ] ],
"addonValues": ["key": ""] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0) request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse) }
}) dataTask.resume()
open Cohttp_lwt_unix open Cohttp open Lwt let uri = Uri.of_string "https://gambio-shop.de/shop1/api.php/v2/categories/{category_id}" in
let headers = Header.add_list (Header.init ()) [ ("content-type", "application/json"); ("Authorization", "Basic REPLACE_BASIC_AUTH"); ] in let body = Cohttp_lwt_body.of_string "{\"id\":0,\"dateAdded\":\"\",\"lastModified\":\"\",\"parentId\":0,\"isActive\":false,\"sortOrder\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"headingTitle\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"descriptionBottom\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"icon\":\"\",\"image\":\"\",\"imageAltText\":{\"en\":\"\",\"de\":\"\"},\"settings\":{\"categoryListingTemplate\":\"\",\"productListingTemplate\":\"\",\"sortColumn\":\"\",\"sortDirection\":\"ASC\",\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"showAttributes\":false,\"showGraduatedPrice\":false,\"showQuantity\":false,\"showQuantityInfo\":false,\"showSubCategories\":false,\"showSubCategoryImages\":false,\"showSubCategoryNames\":false,\"showSubCategoryProducts\":false,\"showCategoriesImageInDescription\":false,\"isViewModeTiled\":false,\"showCategoryFilter\":false,\"filterSelectionMode\":0,\"filterValueDeactivation\":0,\"groupPermissions\":[{\"id\":0,\"isPermitted\":false}]},\"addonValues\":{\"key\":\"\"}}" in Client.call ~headers ~body `PUT uri
= fun (res, body_stream) ->
(* Do stuff with the result *)