Use this method to update an existing product record. Take a look in the POST method for more detailed explanation on every resource property. To see an example usage consider docs/REST/samples/product-service/update_product.php
PUT https://gambio-shop.de/shop1/api.php/v2/products/{product_id}
Parameter name | Value | Description | Additional |
---|---|---|---|
product_id | int64 | The product ID |
Required |
Read-only parameters such as a resource's ID field are to be omitted.
The request body takes a GXProduct resource, containing the following writable properties:
{
"addonValues": {
"productsImageHeight": "0",
"productsImageWidth": "0"
},
"checkoutInformation": {
"de": "",
"en": ""
},
"dateAdded": "2015-08-08 17.19:46",
"dateAvailable": "2016-01-21 12:15:42",
"description": {
"de": "[TAB:Seite 1] Testartikel Beschreibung Seite 1 [TAB:Seite 2] Testartikel Beschreibung\nSeite 2 [TAB:Seite 3] Testartikel Beschreibung Seite 3",
"en": "<p>Test product description.</p>"
},
"discountAllowed": 0,
"ean": "",
"images": [
{
"filename": "artikelbild_1_1.jpg",
"imageAltText": {
"de": "",
"en": ""
},
"isPrimary": false,
"isVisible": true
},
{
"filename": "artikelbild_1_2.jpg",
"imageAltText": {
"de": "",
"en": ""
},
"isPrimary": false,
"isVisible": true
},
{
"filename": "artikelbild_1_3.jpg",
"imageAltText": {
"de": "",
"en": ""
},
"isPrimary": false,
"isVisible": true
}
],
"isActive": false,
"isFsk18": false,
"isVpeActive": false,
"keywords": {
"de": "",
"en": ""
},
"lastModified": "2016-03-16 16:01:51",
"manufacturerId": 0,
"metaDescription": {
"de": "",
"en": ""
},
"metaKeywords": {
"de": "",
"en": ""
},
"metaTitle": {
"de": "",
"en": ""
},
"name": {
"de": "Testartikel",
"en": "Test Product"
},
"orderedCount": 1,
"price": 16.7983,
"productModel": "ABC123",
"productTypeId": 1,
"quantity": 998,
"quantityUnitId": 0,
"settings": {
"detailsTemplate": "standard.html",
"graduatedQuantity": 1,
"minOrder": 1,
"onSitemap": true,
"optionsDetailsTemplate": "product_options_dropdown.html",
"optionsListingTemplate": "product_options_dropdown.html",
"priceStatus": 0,
"propertiesDropdownMode": "dropdown_mode_1",
"showAddedDateTime": false,
"showOnStartpage": false,
"showPriceOffer": true,
"showPropertiesPrice": true,
"showQuantityInfo": true,
"showWeight": false,
"sitemapChangeFrequency": "daily",
"sitemapPriority": "0.5",
"startpageSortOrder": 0,
"usePropertiesCombisQuantity": false,
"usePropertiesCombisShippingTime": true,
"usePropertiesCombisWeight": false
},
"shippingCosts": 0,
"shippingTimeId": 1,
"shortDescription": {
"de": "<p>Testartikel Kurzbeschreibung</p>",
"en": "<p>Test product short description.</p>"
},
"sortOrder": 0,
"taxClassId": 1,
"url": {
"de": "",
"en": ""
},
"urlKeywords": {
"de": "testartikel",
"en": "test-product"
},
"viewedCount": {
"de": 32,
"en": 0
},
"vpeID": 0,
"vpeValue": 0,
"weight": 0
}
{
"addonValues": {
"ccCvv": "string",
"ccExpires": "string",
"ccIssue": "string",
"ccNumber": "string",
"ccOwner": "string",
"ccStart": "string",
"ccType": "string",
"customerIp": "string",
"downloadAbandonmentStatus": "string",
"serviceAbandonmentStatus": "string"
},
"checkoutInformation": {
"de": "string",
"en": "string"
},
"dateAdded": "string",
"dateAvailable": "string",
"description": {
"de": "string",
"en": "string"
},
"discountAllowed": "int64",
"ean": "string",
"images": [
{
"filename": "string",
"imageAltText": {
"de": "string",
"en": "string"
},
"isPrimary": "boolean",
"isVisible": "boolean"
}
],
"infoUrl": {
"de": "string",
"en": "string"
},
"isActive": "boolean",
"isFsk18": "boolean",
"isVpeActive": "boolean",
"keywords": {
"de": "string",
"en": "string"
},
"lastModified": "string",
"manufacturerId": "int64",
"metaDescription": {
"de": "string",
"en": "string"
},
"metaKeywords": {
"de": "string",
"en": "string"
},
"metaTitle": {
"de": "string",
"en": "string"
},
"name": {
"de": "string",
"en": "string"
},
"orderedCount": "int64",
"price": "float",
"productModel": "string",
"productTypeId": "int64",
"quantity": "int64",
"quantityUnitId": "int64",
"settings": {
"detailsTemplate": "string",
"graduatedQuantity": "int64",
"groupPermissions": [
{
"isPermitted": "boolean"
}
],
"minOrder": "int64",
"onSitemap": "boolean",
"optionsDetailsTemplate": "string",
"optionsListingTemplate": "string",
"priceStatus": "int64",
"propertiesCombisQuantityCheckMode": "int64",
"propertiesDropdownMode": "string",
"showAddedDateTime": "boolean",
"showOnStartpage": "boolean",
"showPriceOffer": "boolean",
"showPropertiesPrice": "boolean",
"showQuantityInfo": "boolean",
"showWeight": "boolean",
"sitemapChangeFrequency": "string",
"sitemapPriority": "string",
"startpageSortOrder": "int64",
"usePropertiesCombisShippingTime": "boolean",
"usePropertiesCombisWeight": "boolean"
},
"shippingCosts": "int64",
"shippingTimeId": "int64",
"shortDescription": {
"de": "string",
"en": "string"
},
"sortOrder": "int64",
"taxClassId": "int64",
"url": {
"de": "string",
"en": "string"
},
"urlKeywords": {
"de": "string",
"en": "string"
},
"viewedCount": {
"de": "string",
"en": "string"
},
"vpeId": "int64",
"vpeValue": "int64",
"weight": "int64"
}
Name | Type | Description | Additional |
---|---|---|---|
addonValues | object | GXOrderAddonValues | Required |
addonValues.ccCvv | string | Required | |
addonValues.ccExpires | string | Required | |
addonValues.ccIssue | string | Required | |
addonValues.ccNumber | string | Required | |
addonValues.ccOwner | string | Required | |
addonValues.ccStart | string | Required | |
addonValues.ccType | string | Required | |
addonValues.customerIp | string | Required | |
addonValues.downloadAbandonmentStatus | string | Required | |
addonValues.serviceAbandonmentStatus | string | Required | |
checkoutInformation | object | GXMultiLangOption | Required |
checkoutInformation.de | string | Optional | |
checkoutInformation.en | string | Optional | |
dateAdded | string | Required | |
dateAvailable | string | Required | |
description | object | GXMultiLangOption | Required |
description.de | string | Optional | |
description.en | string | Optional | |
discountAllowed | int64 | Required | |
ean | string | Required | |
images[] | array | Optional | |
images[].filename | string | Required | |
images[].imageAltText | object | GXMultiLangOption | Required |
images[].imageAltText.de | string | Optional | |
images[].imageAltText.en | string | Optional | |
images[].isPrimary | boolean | Required | |
images[].isVisible | boolean | Required | |
infoUrl | object | GXMultiLangOption | Required |
infoUrl.de | string | Optional | |
infoUrl.en | string | Optional | |
isActive | boolean | Required | |
isFsk18 | boolean | Required | |
isVpeActive | boolean | Required | |
keywords | object | GXMultiLangOption | Required |
keywords.de | string | Optional | |
keywords.en | string | Optional | |
lastModified | string | Required | |
manufacturerId | int64 | Required | |
metaDescription | object | GXMultiLangOption | Required |
metaDescription.de | string | Optional | |
metaDescription.en | string | Optional | |
metaKeywords | object | GXMultiLangOption | Required |
metaKeywords.de | string | Optional | |
metaKeywords.en | string | Optional | |
metaTitle | object | GXMultiLangOption | Required |
metaTitle.de | string | Optional | |
metaTitle.en | string | Optional | |
name | object | GXMultiLangOption | Required |
name.de | string | Optional | |
name.en | string | Optional | |
orderedCount | int64 | Required | |
price | float |
The product's net price |
Required |
productModel | string | Required | |
productTypeId | int64 | Required | |
quantity | int64 | Required | |
quantityUnitId | int64 | Required | |
settings | object | GXProductSettings | Required |
settings.detailsTemplate | string | Required | |
settings.graduatedQuantity | int64 | Required | |
settings.groupPermissions[] | array | Required | |
settings.groupPermissions[].isPermitted | boolean | Required | |
settings.minOrder | int64 | Required | |
settings.onSitemap | boolean | Required | |
settings.optionsDetailsTemplate | string | Required | |
settings.optionsListingTemplate | string | Required | |
settings.priceStatus | int64 |
Provide: "0" for normal, "1" for price on request and "2" for not available for purchase. |
Required |
settings.propertiesCombisQuantityCheckMode | int64 | Required | |
settings.propertiesDropdownMode | string | Required | |
settings.showAddedDateTime | boolean | Required | |
settings.showOnStartpage | boolean | Required | |
settings.showPriceOffer | boolean | Required | |
settings.showPropertiesPrice | boolean | Required | |
settings.showQuantityInfo | boolean | Required | |
settings.showWeight | boolean | Required | |
settings.sitemapChangeFrequency | string | Required | |
settings.sitemapPriority | string | Required | |
settings.startpageSortOrder | int64 | Required | |
settings.usePropertiesCombisShippingTime | boolean | Required | |
settings.usePropertiesCombisWeight | boolean | Required | |
shippingCosts | int64 | Required | |
shippingTimeId | int64 | Required | |
shortDescription | object | GXMultiLangOption | Required |
shortDescription.de | string | Optional | |
shortDescription.en | string | Optional | |
sortOrder | int64 | Required | |
taxClassId | int64 | Required | |
url | object | GXMultiLangOption | Required |
url.de | string | Optional | |
url.en | string | Optional | |
urlKeywords | object | GXMultiLangOption | Required |
urlKeywords.de | string | Optional | |
urlKeywords.en | string | Optional | |
viewedCount | object | GXMultiLangOption | Required |
viewedCount.de | string | Optional | |
viewedCount.en | string | Optional | |
vpeId | int64 | Required | |
vpeValue | int64 | Required | |
weight | int64 | 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@shop.de: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 product |
GXProduct |
400 | Bad Request (Missing data or ID 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,"isActive":false,"sortOrder":0,"dateAdded":"","dateAvailable":"","lastModified":"","orderedCount":0,"productModel":"","ean":"","price":0,"discountAllowed":0,"taxClassId":0,"quantity":0,"weight":0,"shippingCosts":0,"shippingTimeId":0,"productTypeId":0,"manufacturerId":0,"isFsk18":false,"isVpeActive":false,"vpeId":0,"vpeValue":0,"name":{"en":"","de":""},"description":{"en":"","de":""},"shortDescription":{"en":"","de":""},"keywords":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"url":{"en":"","de":""},"infoUrl":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"checkoutInformation":{"en":"","de":""},"viewedCount":{"en":"","de":""},"images":[{"filename":"","isPrimary":false,"isVisible":false,"imageAltText":{"en":"","de":""}}],"addonValues":{"ccCvv":"","ccExpires":"","ccIssue":"","ccNumber":"","ccOwner":"","ccStart":"","ccType":"","customerIp":"","downloadAbandonmentStatus":"","serviceAbandonmentStatus":""},"settings":{"detailsTemplate":"","optionsDetailsTemplate":"","optionsListingTemplate":"","showOnStartpage":false,"showQuantityInfo":false,"showWeight":false,"showPriceOffer":false,"showAddedDateTime":false,"priceStatus":0,"minOrder":0,"graduatedQuantity":0,"onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","propertiesDropdownMode":"","startpageSortOrder":0,"showPropertiesPrice":false,"propertiesCombisQuantityCheckMode":0,"usePropertiesCombisShippingTime":false,"usePropertiesCombisWeight":false,"groupPermissions":[{"id":"","isPermitted":false}]},"quantityUnitId":0}'
wget --quiet \ --method PUT \ --header 'content-type: application/json' \ --header 'authorization: Basic REPLACE_BASIC_AUTH' \ --body-data '{"id":0,"isActive":false,"sortOrder":0,"dateAdded":"","dateAvailable":"","lastModified":"","orderedCount":0,"productModel":"","ean":"","price":0,"discountAllowed":0,"taxClassId":0,"quantity":0,"weight":0,"shippingCosts":0,"shippingTimeId":0,"productTypeId":0,"manufacturerId":0,"isFsk18":false,"isVpeActive":false,"vpeId":0,"vpeValue":0,"name":{"en":"","de":""},"description":{"en":"","de":""},"shortDescription":{"en":"","de":""},"keywords":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"url":{"en":"","de":""},"infoUrl":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"checkoutInformation":{"en":"","de":""},"viewedCount":{"en":"","de":""},"images":[{"filename":"","isPrimary":false,"isVisible":false,"imageAltText":{"en":"","de":""}}],"addonValues":{"ccCvv":"","ccExpires":"","ccIssue":"","ccNumber":"","ccOwner":"","ccStart":"","ccType":"","customerIp":"","downloadAbandonmentStatus":"","serviceAbandonmentStatus":""},"settings":{"detailsTemplate":"","optionsDetailsTemplate":"","optionsListingTemplate":"","showOnStartpage":false,"showQuantityInfo":false,"showWeight":false,"showPriceOffer":false,"showAddedDateTime":false,"priceStatus":0,"minOrder":0,"graduatedQuantity":0,"onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","propertiesDropdownMode":"","startpageSortOrder":0,"showPropertiesPrice":false,"propertiesCombisQuantityCheckMode":0,"usePropertiesCombisShippingTime":false,"usePropertiesCombisWeight":false,"groupPermissions":[{"id":"","isPermitted":false}]},"quantityUnitId":0}' \ --output-document
echo '{"id":0,"isActive":false,"sortOrder":0,"dateAdded":"","dateAvailable":"","lastModified":"","orderedCount":0,"productModel":"","ean":"","price":0,"discountAllowed":0,"taxClassId":0,"quantity":0,"weight":0,"shippingCosts":0,"shippingTimeId":0,"productTypeId":0,"manufacturerId":0,"isFsk18":false,"isVpeActive":false,"vpeId":0,"vpeValue":0,"name":{"en":"","de":""},"description":{"en":"","de":""},"shortDescription":{"en":"","de":""},"keywords":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"url":{"en":"","de":""},"infoUrl":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"checkoutInformation":{"en":"","de":""},"viewedCount":{"en":"","de":""},"images":[{"filename":"","isPrimary":false,"isVisible":false,"imageAltText":{"en":"","de":""}}],"addonValues":{"ccCvv":"","ccExpires":"","ccIssue":"","ccNumber":"","ccOwner":"","ccStart":"","ccType":"","customerIp":"","downloadAbandonmentStatus":"","serviceAbandonmentStatus":""},"settings":{"detailsTemplate":"","optionsDetailsTemplate":"","optionsListingTemplate":"","showOnStartpage":false,"showQuantityInfo":false,"showWeight":false,"showPriceOffer":false,"showAddedDateTime":false,"priceStatus":0,"minOrder":0,"graduatedQuantity":0,"onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","propertiesDropdownMode":"","startpageSortOrder":0,"showPropertiesPrice":false,"propertiesCombisQuantityCheckMode":0,"usePropertiesCombisShippingTime":false,"usePropertiesCombisWeight":false,"groupPermissions":[{"id":"","isPermitted":false}]},"quantityUnitId":0}' | \ authorization:'Basic REPLACE_BASIC_AUTH' \ content-type:application/json
HttpResponse response = Unirest.put("https://gambio-shop.de/shop1/api.php/v2/products/{product_id}") .header("content-type", "application/json") .header("authorization", "Basic REPLACE_BASIC_AUTH") .body("{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}") .asString();
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}"); 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("authorization", "Basic REPLACE_BASIC_AUTH"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var http = require("https"); var options = {
"method": "PUT", "hostname": "gambio-shop.de", "port": null, "path": "/shop1/api.php/v2/products/{product_id}", "headers": { "content-type": "application/json",
"authorization": "Basic REPLACE_BASIC_AUTH" }
}; var req = http.request(options, function (res) {
var chunks = []; res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString()); });
}); req.write(JSON.stringify({ id: 0,
isActive: false, sortOrder: 0, dateAdded: '', dateAvailable: '', lastModified: '', orderedCount: 0, productModel: '', ean: '', price: 0, discountAllowed: 0, taxClassId: 0, quantity: 0, weight: 0, shippingCosts: 0, shippingTimeId: 0, productTypeId: 0, manufacturerId: 0, isFsk18: false, isVpeActive: false, vpeId: 0, vpeValue: 0, name: { en: '', de: '' }, description: { en: '', de: '' }, shortDescription: { en: '', de: '' }, keywords: { en: '', de: '' }, metaTitle: { en: '', de: '' }, metaDescription: { en: '', de: '' }, metaKeywords: { en: '', de: '' }, url: { en: '', de: '' }, infoUrl: { en: '', de: '' }, urlKeywords: { en: '', de: '' }, checkoutInformation: { en: '', de: '' }, viewedCount: { en: '', de: '' }, images: [ { filename: '', isPrimary: false,
isVisible: false, imageAltText: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' } } ], addonValues:
{ ccCvv: '', ccExpires: '<ADD STRING VALUE>',
ccIssue: '<ADD STRING VALUE>', ccNumber: '<ADD STRING VALUE>', ccOwner: '<ADD STRING VALUE>', ccStart: '<ADD STRING VALUE>', ccType: '<ADD STRING VALUE>', customerIp: '<ADD STRING VALUE>', downloadAbandonmentStatus: '<ADD STRING VALUE>', serviceAbandonmentStatus: '<ADD STRING VALUE>' }, settings:
{ detailsTemplate: '', optionsDetailsTemplate: '<ADD STRING VALUE>',
optionsListingTemplate: '<ADD STRING VALUE>', showOnStartpage: false, showQuantityInfo: false, showWeight: false, showPriceOffer: false, showAddedDateTime: false, priceStatus: 0, minOrder: 0, graduatedQuantity: 0, onSitemap: false, sitemapPriority: '<ADD STRING VALUE>', sitemapChangeFrequency: '<ADD STRING VALUE>', propertiesDropdownMode: '<ADD STRING VALUE>', startpageSortOrder: 0, showPropertiesPrice: false, propertiesCombisQuantityCheckMode: 0, usePropertiesCombisShippingTime: false, usePropertiesCombisWeight: false, groupPermissions: [ { id: '<ADD STRING VALUE>', isPermitted: false } ] }, quantityUnitId: 0 }));
req.end();
var request = require("request"); var options = { method: 'PUT',
url: headers: { authorization: 'Basic REPLACE_BASIC_AUTH', 'content-type': 'application/json' },
body:
{ id: 0, isActive: false,
sortOrder: 0, dateAdded: '<ADD STRING VALUE>', dateAvailable: '<ADD STRING VALUE>', lastModified: '<ADD STRING VALUE>', orderedCount: 0, productModel: '<ADD STRING VALUE>', ean: '<ADD STRING VALUE>', price: 0, discountAllowed: 0, taxClassId: 0, quantity: 0, weight: 0, shippingCosts: 0, shippingTimeId: 0, productTypeId: 0, manufacturerId: 0, isFsk18: false, isVpeActive: false, vpeId: 0, vpeValue: 0, name: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, description: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, shortDescription: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, keywords: { 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>' }, url: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, infoUrl: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, urlKeywords: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, checkoutInformation: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, viewedCount: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' }, images: [ { filename: '<ADD STRING VALUE>', isPrimary: false, isVisible: false, imageAltText: { en: '<ADD STRING VALUE>', de: '<ADD STRING VALUE>' } } ], addonValues: { ccCvv: '<ADD STRING VALUE>', ccExpires: '<ADD STRING VALUE>', ccIssue: '<ADD STRING VALUE>', ccNumber: '<ADD STRING VALUE>', ccOwner: '<ADD STRING VALUE>', ccStart: '<ADD STRING VALUE>', ccType: '<ADD STRING VALUE>', customerIp: '<ADD STRING VALUE>', downloadAbandonmentStatus: '<ADD STRING VALUE>', serviceAbandonmentStatus: '<ADD STRING VALUE>' }, settings: { detailsTemplate: '<ADD STRING VALUE>', optionsDetailsTemplate: '<ADD STRING VALUE>', optionsListingTemplate: '<ADD STRING VALUE>', showOnStartpage: false, showQuantityInfo: false, showWeight: false, showPriceOffer: false, showAddedDateTime: false, priceStatus: 0, minOrder: 0, graduatedQuantity: 0, onSitemap: false, sitemapPriority: '<ADD STRING VALUE>', sitemapChangeFrequency: '<ADD STRING VALUE>', propertiesDropdownMode: '<ADD STRING VALUE>', startpageSortOrder: 0, showPropertiesPrice: false, propertiesCombisQuantityCheckMode: 0, usePropertiesCombisShippingTime: false, usePropertiesCombisWeight: false, groupPermissions: [ { id: '<ADD STRING VALUE>', isPermitted: false } ] }, quantityUnitId: 0 }, json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error); console.log(body);
});
var unirest = require("unirest"); var req = unirest("PUT", "https://gambio-shop.de/shop1/api.php/v2/products/{product_id}");
req.headers({
"authorization": "Basic REPLACE_BASIC_AUTH", "content-type": "application/json" }); req.type("json");
req.send({ "id": 0, "isActive": false, "sortOrder": 0, "dateAdded": "", "dateAvailable": "", "lastModified": "", "orderedCount": 0, "productModel": "", "ean": "", "price": 0, "discountAllowed": 0, "taxClassId": 0, "quantity": 0, "weight": 0, "shippingCosts": 0, "shippingTimeId": 0, "productTypeId": 0, "manufacturerId": 0, "isFsk18": false, "isVpeActive": false, "vpeId": 0, "vpeValue": 0, "name": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"description": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"shortDescription": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"keywords": { "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>" },
"url": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"infoUrl": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"urlKeywords": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"checkoutInformation": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"viewedCount": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"images": [ {
"filename": "<ADD STRING VALUE>", "isPrimary": false, "isVisible": false, "imageAltText": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" } } ],
"addonValues": { "ccCvv": "<ADD STRING VALUE>",
"ccExpires": "<ADD STRING VALUE>", "ccIssue": "<ADD STRING VALUE>", "ccNumber": "<ADD STRING VALUE>", "ccOwner": "<ADD STRING VALUE>", "ccStart": "<ADD STRING VALUE>", "ccType": "<ADD STRING VALUE>", "customerIp": "<ADD STRING VALUE>", "downloadAbandonmentStatus": "<ADD STRING VALUE>", "serviceAbandonmentStatus": "<ADD STRING VALUE>" },
"settings": { "detailsTemplate": "<ADD STRING VALUE>",
"optionsDetailsTemplate": "<ADD STRING VALUE>", "optionsListingTemplate": "<ADD STRING VALUE>", "showOnStartpage": false, "showQuantityInfo": false, "showWeight": false, "showPriceOffer": false, "showAddedDateTime": false, "priceStatus": 0, "minOrder": 0, "graduatedQuantity": 0, "onSitemap": false, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "propertiesDropdownMode": "<ADD STRING VALUE>", "startpageSortOrder": 0, "showPropertiesPrice": false, "propertiesCombisQuantityCheckMode": 0, "usePropertiesCombisShippingTime": false, "usePropertiesCombisWeight": false, "groupPermissions": [ { "id": "<ADD STRING VALUE>", "isPermitted": false } ] },
"quantityUnitId": 0 }); req.end(function (res) {
if (res.error) throw new Error(res.error); console.log(res.body);
});
var data = JSON.stringify({ "id": 0, "isActive": false, "sortOrder": 0, "dateAdded": "", "dateAvailable": "", "lastModified": "", "orderedCount": 0, "productModel": "", "ean": "", "price": 0, "discountAllowed": 0, "taxClassId": 0, "quantity": 0, "weight": 0, "shippingCosts": 0, "shippingTimeId": 0, "productTypeId": 0, "manufacturerId": 0, "isFsk18": false, "isVpeActive": false, "vpeId": 0, "vpeValue": 0, "name": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"description": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"shortDescription": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"keywords": { "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>" },
"url": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"infoUrl": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"urlKeywords": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"checkoutInformation": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"viewedCount": { "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" },
"images": [ {
"filename": "<ADD STRING VALUE>", "isPrimary": false, "isVisible": false, "imageAltText": { "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" } } ],
"addonValues": { "ccCvv": "<ADD STRING VALUE>",
"ccExpires": "<ADD STRING VALUE>", "ccIssue": "<ADD STRING VALUE>", "ccNumber": "<ADD STRING VALUE>", "ccOwner": "<ADD STRING VALUE>", "ccStart": "<ADD STRING VALUE>", "ccType": "<ADD STRING VALUE>", "customerIp": "<ADD STRING VALUE>", "downloadAbandonmentStatus": "<ADD STRING VALUE>", "serviceAbandonmentStatus": "<ADD STRING VALUE>" },
"settings": { "detailsTemplate": "<ADD STRING VALUE>",
"optionsDetailsTemplate": "<ADD STRING VALUE>", "optionsListingTemplate": "<ADD STRING VALUE>", "showOnStartpage": false, "showQuantityInfo": false, "showWeight": false, "showPriceOffer": false, "showAddedDateTime": false, "priceStatus": 0, "minOrder": 0, "graduatedQuantity": 0, "onSitemap": false, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "propertiesDropdownMode": "<ADD STRING VALUE>", "startpageSortOrder": 0, "showPropertiesPrice": false, "propertiesCombisQuantityCheckMode": 0, "usePropertiesCombisShippingTime": false, "usePropertiesCombisWeight": false, "groupPermissions": [ { "id": "<ADD STRING VALUE>", "isPermitted": false } ] },
"quantityUnitId": 0 }); var 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/products/{product_id}");
xhr.setRequestHeader("content-type", "application/json"); xhr.setRequestHeader("authorization", "Basic REPLACE_BASIC_AUTH"); xhr.send(data);
var settings = { "async": true, "crossDomain": true, "method": "PUT", "headers": { "content-type": "application/json",
"authorization": "Basic REPLACE_BASIC_AUTH" },
"processData": false, "data": "{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}" } $.ajax(settings).done(function (response) {
console.log(response); });
<?php $curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://gambio-shop.de/shop1/api.php/v2/products/{product_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,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}", CURLOPT_HTTPHEADER => array( "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/products/{product_id}'); $request->setMethod(HTTP_METH_PUT); $request->setHeaders(array(
'authorization' => 'Basic REPLACE_BASIC_AUTH', 'content-type' => 'application/json' )); $request->setBody('{"id":0,"isActive":false,"sortOrder":0,"dateAdded":"","dateAvailable":"","lastModified":"","orderedCount":0,"productModel":"","ean":"","price":0,"discountAllowed":0,"taxClassId":0,"quantity":0,"weight":0,"shippingCosts":0,"shippingTimeId":0,"productTypeId":0,"manufacturerId":0,"isFsk18":false,"isVpeActive":false,"vpeId":0,"vpeValue":0,"name":{"en":"","de":""},"description":{"en":"","de":""},"shortDescription":{"en":"","de":""},"keywords":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"url":{"en":"","de":""},"infoUrl":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"checkoutInformation":{"en":"","de":""},"viewedCount":{"en":"","de":""},"images":[{"filename":"","isPrimary":false,"isVisible":false,"imageAltText":{"en":"","de":""}}],"addonValues":{"ccCvv":"","ccExpires":"","ccIssue":"","ccNumber":"","ccOwner":"","ccStart":"","ccType":"","customerIp":"","downloadAbandonmentStatus":"","serviceAbandonmentStatus":""},"settings":{"detailsTemplate":"","optionsDetailsTemplate":"","optionsListingTemplate":"","showOnStartpage":false,"showQuantityInfo":false,"showWeight":false,"showPriceOffer":false,"showAddedDateTime":false,"priceStatus":0,"minOrder":0,"graduatedQuantity":0,"onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","propertiesDropdownMode":"","startpageSortOrder":0,"showPropertiesPrice":false,"propertiesCombisQuantityCheckMode":0,"usePropertiesCombisShippingTime":false,"usePropertiesCombisWeight":false,"groupPermissions":[{"id":"","isPermitted":false}]},"quantityUnitId":0}');
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,"isActive":false,"sortOrder":0,"dateAdded":"","dateAvailable":"","lastModified":"","orderedCount":0,"productModel":"","ean":"","price":0,"discountAllowed":0,"taxClassId":0,"quantity":0,"weight":0,"shippingCosts":0,"shippingTimeId":0,"productTypeId":0,"manufacturerId":0,"isFsk18":false,"isVpeActive":false,"vpeId":0,"vpeValue":0,"name":{"en":"","de":""},"description":{"en":"","de":""},"shortDescription":{"en":"","de":""},"keywords":{"en":"","de":""},"metaTitle":{"en":"","de":""},"metaDescription":{"en":"","de":""},"metaKeywords":{"en":"","de":""},"url":{"en":"","de":""},"infoUrl":{"en":"","de":""},"urlKeywords":{"en":"","de":""},"checkoutInformation":{"en":"","de":""},"viewedCount":{"en":"","de":""},"images":[{"filename":"","isPrimary":false,"isVisible":false,"imageAltText":{"en":"","de":""}}],"addonValues":{"ccCvv":"","ccExpires":"","ccIssue":"","ccNumber":"","ccOwner":"","ccStart":"","ccType":"","customerIp":"","downloadAbandonmentStatus":"","serviceAbandonmentStatus":""},"settings":{"detailsTemplate":"","optionsDetailsTemplate":"","optionsListingTemplate":"","showOnStartpage":false,"showQuantityInfo":false,"showWeight":false,"showPriceOffer":false,"showAddedDateTime":false,"priceStatus":0,"minOrder":0,"graduatedQuantity":0,"onSitemap":false,"sitemapPriority":"","sitemapChangeFrequency":"","propertiesDropdownMode":"","startpageSortOrder":0,"showPropertiesPrice":false,"propertiesCombisQuantityCheckMode":0,"usePropertiesCombisShippingTime":false,"usePropertiesCombisWeight":false,"groupPermissions":[{"id":"","isPermitted":false}]},"quantityUnitId":0}'); $request->setRequestUrl('https://gambio-shop.de/shop1/api.php/v2/products/{product_id}');
$request->setRequestMethod('PUT'); $request->setBody($body); $request->setHeaders(array(
'authorization' => 'Basic REPLACE_BASIC_AUTH', 'content-type' => 'application/json' )); $client->enqueue($request)->send();
$response = $client->getResponse(); echo $response->getBody();
import http.client conn = http.client.HTTPSConnection("gambio-shop.de")
payload = "{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}"
headers = {
'content-type': "application/json",
'authorization': "Basic REPLACE_BASIC_AUTH" } conn.request("PUT", "/shop1/api.php/v2/products/{product_id}", payload, headers)
res = conn.getresponse()
data = res.read() print(data.decode("utf-8"))
import requests payload = "{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}"
headers = { 'content-type': "application/json",
'authorization': "Basic REPLACE_BASIC_AUTH" } response = requests.request("PUT", url, data=payload, headers=headers)
print(response.text)
require 'uri' require 'net/http' 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,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}" 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/products/{product_id}"); struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: Basic REPLACE_BASIC_AUTH"); headers = curl_slist_append(headers, "content-type: application/json"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}");
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/products/{product_id}"
payload := strings.NewReader("{\"id\":0,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"<ADD STRING VALUE>\",\"dateAvailable\":\"<ADD STRING VALUE>\",\"lastModified\":\"<ADD STRING VALUE>\",\"orderedCount\":0,\"productModel\":\"<ADD STRING VALUE>\",\"ean\":\"<ADD STRING VALUE>\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"description\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"shortDescription\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"keywords\":{\"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>\"},\"url\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"infoUrl\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"urlKeywords\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"checkoutInformation\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"viewedCount\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"},\"images\":[{\"filename\":\"<ADD STRING VALUE>\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"<ADD STRING VALUE>\",\"de\":\"<ADD STRING VALUE>\"}}],\"addonValues\":{\"ccCvv\":\"<ADD STRING VALUE>\",\"ccExpires\":\"<ADD STRING VALUE>\",\"ccIssue\":\"<ADD STRING VALUE>\",\"ccNumber\":\"<ADD STRING VALUE>\",\"ccOwner\":\"<ADD STRING VALUE>\",\"ccStart\":\"<ADD STRING VALUE>\",\"ccType\":\"<ADD STRING VALUE>\",\"customerIp\":\"<ADD STRING VALUE>\",\"downloadAbandonmentStatus\":\"<ADD STRING VALUE>\",\"serviceAbandonmentStatus\":\"<ADD STRING VALUE>\"},\"settings\":{\"detailsTemplate\":\"<ADD STRING VALUE>\",\"optionsDetailsTemplate\":\"<ADD STRING VALUE>\",\"optionsListingTemplate\":\"<ADD STRING VALUE>\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"<ADD STRING VALUE>\",\"sitemapChangeFrequency\":\"<ADD STRING VALUE>\",\"propertiesDropdownMode\":\"<ADD STRING VALUE>\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"<ADD STRING VALUE>\",\"isPermitted\":false}]},\"quantityUnitId\":0}") 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,
@"isActive": @NO,
@"sortOrder": @0, @"dateAdded": @"<ADD STRING VALUE>", @"dateAvailable": @"<ADD STRING VALUE>", @"lastModified": @"<ADD STRING VALUE>", @"orderedCount": @0, @"productModel": @"<ADD STRING VALUE>", @"ean": @"<ADD STRING VALUE>", @"price": @0, @"discountAllowed": @0, @"taxClassId": @0, @"quantity": @0, @"weight": @0, @"shippingCosts": @0, @"shippingTimeId": @0, @"productTypeId": @0, @"manufacturerId": @0, @"isFsk18": @NO, @"isVpeActive": @NO, @"vpeId": @0, @"vpeValue": @0, @"name": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"description": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"shortDescription": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"keywords": @{ @"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>" }, @"url": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"infoUrl": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"urlKeywords": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"checkoutInformation": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"viewedCount": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" }, @"images": @[ @{ @"filename": @"<ADD STRING VALUE>", @"isPrimary": @NO, @"isVisible": @NO, @"imageAltText": @{ @"en": @"<ADD STRING VALUE>", @"de": @"<ADD STRING VALUE>" } } ], @"addonValues": @{ @"ccCvv": @"<ADD STRING VALUE>", @"ccExpires": @"<ADD STRING VALUE>", @"ccIssue": @"<ADD STRING VALUE>", @"ccNumber": @"<ADD STRING VALUE>", @"ccOwner": @"<ADD STRING VALUE>", @"ccStart": @"<ADD STRING VALUE>", @"ccType": @"<ADD STRING VALUE>", @"customerIp": @"<ADD STRING VALUE>", @"downloadAbandonmentStatus": @"<ADD STRING VALUE>", @"serviceAbandonmentStatus": @"<ADD STRING VALUE>" }, @"settings": @{ @"detailsTemplate": @"<ADD STRING VALUE>", @"optionsDetailsTemplate": @"<ADD STRING VALUE>", @"optionsListingTemplate": @"<ADD STRING VALUE>", @"showOnStartpage": @NO, @"showQuantityInfo": @NO, @"showWeight": @NO, @"showPriceOffer": @NO, @"showAddedDateTime": @NO, @"priceStatus": @0, @"minOrder": @0, @"graduatedQuantity": @0, @"onSitemap": @NO, @"sitemapPriority": @"<ADD STRING VALUE>", @"sitemapChangeFrequency": @"<ADD STRING VALUE>", @"propertiesDropdownMode": @"<ADD STRING VALUE>", @"startpageSortOrder": @0, @"showPropertiesPrice": @NO, @"propertiesCombisQuantityCheckMode": @0, @"usePropertiesCombisShippingTime": @NO, @"usePropertiesCombisWeight": @NO, @"groupPermissions": @[ @{ @"id": @"<ADD STRING VALUE>", @"isPermitted": @NO } ] }, @"quantityUnitId": @0 }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://gambio-shop.de/shop1/api.php/v2/products/{product_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, "isActive": false, "sortOrder": 0, "dateAdded": "", "dateAvailable": "", "lastModified": "", "orderedCount": 0, "productModel": "", "ean": "", "price": 0, "discountAllowed": 0, "taxClassId": 0, "quantity": 0, "weight": 0, "shippingCosts": 0, "shippingTimeId": 0, "productTypeId": 0, "manufacturerId": 0, "isFsk18": false, "isVpeActive": false, "vpeId": 0, "vpeValue": 0, "name": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"description": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"shortDescription": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"keywords": [ "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>" ],
"url": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"infoUrl": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"urlKeywords": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"checkoutInformation": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"viewedCount": [ "en": "<ADD STRING VALUE>",
"de": "<ADD STRING VALUE>" ],
"images": [ [
"filename": "<ADD STRING VALUE>", "isPrimary": false, "isVisible": false, "imageAltText": [ "en": "<ADD STRING VALUE>", "de": "<ADD STRING VALUE>" ] ] ],
"addonValues": [ "ccCvv": "<ADD STRING VALUE>",
"ccExpires": "<ADD STRING VALUE>", "ccIssue": "<ADD STRING VALUE>", "ccNumber": "<ADD STRING VALUE>", "ccOwner": "<ADD STRING VALUE>", "ccStart": "<ADD STRING VALUE>", "ccType": "<ADD STRING VALUE>", "customerIp": "<ADD STRING VALUE>", "downloadAbandonmentStatus": "<ADD STRING VALUE>", "serviceAbandonmentStatus": "<ADD STRING VALUE>" ],
"settings": [ "detailsTemplate": "<ADD STRING VALUE>",
"optionsDetailsTemplate": "<ADD STRING VALUE>", "optionsListingTemplate": "<ADD STRING VALUE>", "showOnStartpage": false, "showQuantityInfo": false, "showWeight": false, "showPriceOffer": false, "showAddedDateTime": false, "priceStatus": 0, "minOrder": 0, "graduatedQuantity": 0, "onSitemap": false, "sitemapPriority": "<ADD STRING VALUE>", "sitemapChangeFrequency": "<ADD STRING VALUE>", "propertiesDropdownMode": "<ADD STRING VALUE>", "startpageSortOrder": 0, "showPropertiesPrice": false, "propertiesCombisQuantityCheckMode": 0, "usePropertiesCombisShippingTime": false, "usePropertiesCombisWeight": false, "groupPermissions": [ [ "id": "<ADD STRING VALUE>", "isPermitted": false ] ] ],
"quantityUnitId": 0 ] let postData = NSJSONSerialization.dataWithJSONObject(parameters, options: nil, error: nil)
var request = NSMutableURLRequest(URL: NSURL(string: "https://gambio-shop.de/shop1/api.php/v2/products/{product_id}")!,
cachePolicy: .UseProtocolCachePolicy,
timeoutInterval: 10.0) request.HTTPMethod = "PUT"
request.allHTTPHeaderFields = headers request.HTTPBody = postData let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in if (error != nil) { println(error)
} else {
let httpResponse = response as? NSHTTPURLResponse
println(httpResponse) }
}) dataTask.resume()
open Cohttp_lwt_unix open Cohttp open Lwt let uri = Uri.of_string "https://gambio-shop.de/shop1/api.php/v2/products/{product_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,\"isActive\":false,\"sortOrder\":0,\"dateAdded\":\"\",\"dateAvailable\":\"\",\"lastModified\":\"\",\"orderedCount\":0,\"productModel\":\"\",\"ean\":\"\",\"price\":0,\"discountAllowed\":0,\"taxClassId\":0,\"quantity\":0,\"weight\":0,\"shippingCosts\":0,\"shippingTimeId\":0,\"productTypeId\":0,\"manufacturerId\":0,\"isFsk18\":false,\"isVpeActive\":false,\"vpeId\":0,\"vpeValue\":0,\"name\":{\"en\":\"\",\"de\":\"\"},\"description\":{\"en\":\"\",\"de\":\"\"},\"shortDescription\":{\"en\":\"\",\"de\":\"\"},\"keywords\":{\"en\":\"\",\"de\":\"\"},\"metaTitle\":{\"en\":\"\",\"de\":\"\"},\"metaDescription\":{\"en\":\"\",\"de\":\"\"},\"metaKeywords\":{\"en\":\"\",\"de\":\"\"},\"url\":{\"en\":\"\",\"de\":\"\"},\"infoUrl\":{\"en\":\"\",\"de\":\"\"},\"urlKeywords\":{\"en\":\"\",\"de\":\"\"},\"checkoutInformation\":{\"en\":\"\",\"de\":\"\"},\"viewedCount\":{\"en\":\"\",\"de\":\"\"},\"images\":[{\"filename\":\"\",\"isPrimary\":false,\"isVisible\":false,\"imageAltText\":{\"en\":\"\",\"de\":\"\"}}],\"addonValues\":{\"ccCvv\":\"\",\"ccExpires\":\"\",\"ccIssue\":\"\",\"ccNumber\":\"\",\"ccOwner\":\"\",\"ccStart\":\"\",\"ccType\":\"\",\"customerIp\":\"\",\"downloadAbandonmentStatus\":\"\",\"serviceAbandonmentStatus\":\"\"},\"settings\":{\"detailsTemplate\":\"\",\"optionsDetailsTemplate\":\"\",\"optionsListingTemplate\":\"\",\"showOnStartpage\":false,\"showQuantityInfo\":false,\"showWeight\":false,\"showPriceOffer\":false,\"showAddedDateTime\":false,\"priceStatus\":0,\"minOrder\":0,\"graduatedQuantity\":0,\"onSitemap\":false,\"sitemapPriority\":\"\",\"sitemapChangeFrequency\":\"\",\"propertiesDropdownMode\":\"\",\"startpageSortOrder\":0,\"showPropertiesPrice\":false,\"propertiesCombisQuantityCheckMode\":0,\"usePropertiesCombisShippingTime\":false,\"usePropertiesCombisWeight\":false,\"groupPermissions\":[{\"id\":\"\",\"isPermitted\":false}]},\"quantityUnitId\":0}" in Client.call ~headers ~body `PUT uri
= fun (res, body_stream) ->
(* Do stuff with the result *)