Open API v2 / Custom Modules / Module Item Attribute Options
Module Item Attribute Options
→
Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.
Creates a new module item attribute option
Parameters
attributeIdinteger · pathrequired
Existent module item attribute id.
Body parameters
Namestringrequired
The title for the attribute group.
Imagestring · nullable
Allows the addition of an image to depict the option. Use the 'add file' icon () to browse for or upload an image file.
OptionPricesarray of objects
Price list for different markets.
Valuenumber
The premium amount or fixed cost of the option.
CurrencyCountrystring · nullable
Full name of the country for which this price is relevant.
Currencystring · nullable
Two-letter currency code by standard.
CountryAbbriviationstring · nullable
Two-letter country code.
Response
Idinteger
The identifier of a specific option. Options setting. Read-only.
Namestring
The title for the attribute group.
Imagestring · nullable
Allows the addition of an image to depict the option.
OptionPricesarray of objects
Price list for different markets.
Valuenumber
The premium amount or fixed cost of the option.
CurrencyCountrystring · nullable
Full name of the country for which this price is relevant.
Currencystring · nullable
Two-letter currency code by standard.
CountryAbbriviationstring · nullable
Two-letter country code.
curl -X POST "https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/options" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"Name":"Example","Image":"string","OptionPrices":[{"Value":0,"CurrencyCountry":"USD","Currency":"USD","CountryAbbriviation":"string"}]}'
await fetch("https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/options", { method: "POST", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({ "Name": "Example", "Image": "string", "OptionPrices": [ { "Value": 0, "CurrencyCountry": "USD", "Currency": "USD", "CountryAbbriviation": "string" } ] }) });
import requests requests.post( "https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/options", headers={"Authorization": "Bearer <token>"}, json={ "Name": "Example", "Image": "string", "OptionPrices": [{ "Value": 0, "CurrencyCountry": "USD", "Currency": "USD", "CountryAbbriviation": "string" }] } )
$client = new GuzzleHttp\Client(); $response = $client->request('POST', 'https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/options', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => [ 'Name' => 'Example', 'Image' => 'string', 'OptionPrices' => [[ 'Value' => 0, 'CurrencyCountry' => 'USD', 'Currency' => 'USD', 'CountryAbbriviation' => 'string' ]] ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/options"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "{\"Name\":\"Example\",\"Image\":\"string\",\"OptionPrices\":[{\"Value\":0,\"CurrencyCountry\":\"USD\",\"Currency\":\"USD\",\"CountryAbbriviation\":\"string\"}]}", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Response · 200
{
"Id": 1,
"Name": "Example",
"Image": "string",
"OptionPrices": [
{
"Value": 0,
"CurrencyCountry": "USD",
"Currency": "USD",
"CountryAbbriviation": "string"
}
]
}Changes existing module item attribute options sort order
Parameters
idinteger · pathrequired
Resource identifier.
Body parameters
curl -X PUT "https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/attributes-options-order" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '["string"]'
await fetch("https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/attributes-options-order", { method: "PUT", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify([ "string" ]) });
import requests requests.put( "https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/attributes-options-order", headers={"Authorization": "Bearer <token>"}, json=["string"] )
$client = new GuzzleHttp\Client(); $response = $client->request('PUT', 'https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/attributes-options-order', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => ['string'] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Put, "https://your-site.webinone.com/api/v2/admin/module-items/attributes/1/attributes-options-order"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "[\"string\"]", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Updates an existing module item attribute option
Parameters
idinteger · pathrequired
Existent module item attribute option id.
Body parameters
Namestringrequired
The title for the attribute group.
Imagestring · nullable
Allows the addition of an image to depict the option. Use the 'add file' icon () to browse for or upload an image file.
OptionPricesarray of objects
Price list for different markets.
Valuenumber
The premium amount or fixed cost of the option.
CurrencyCountrystring · nullable
Full name of the country for which this price is relevant.
Currencystring · nullable
Two-letter currency code by standard.
CountryAbbriviationstring · nullable
Two-letter country code.
Response
Idinteger
The identifier of a specific option. Options setting. Read-only.
Namestring
The title for the attribute group.
Imagestring · nullable
Allows the addition of an image to depict the option.
OptionPricesarray of objects
Price list for different markets.
Valuenumber
The premium amount or fixed cost of the option.
CurrencyCountrystring · nullable
Full name of the country for which this price is relevant.
Currencystring · nullable
Two-letter currency code by standard.
CountryAbbriviationstring · nullable
Two-letter country code.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"Name":"Example","Image":"string","OptionPrices":[{"Value":0,"CurrencyCountry":"USD","Currency":"USD","CountryAbbriviation":"string"}]}'
await fetch("https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1", { method: "PUT", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({ "Name": "Example", "Image": "string", "OptionPrices": [ { "Value": 0, "CurrencyCountry": "USD", "Currency": "USD", "CountryAbbriviation": "string" } ] }) });
import requests requests.put( "https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1", headers={"Authorization": "Bearer <token>"}, json={ "Name": "Example", "Image": "string", "OptionPrices": [{ "Value": 0, "CurrencyCountry": "USD", "Currency": "USD", "CountryAbbriviation": "string" }] } )
$client = new GuzzleHttp\Client(); $response = $client->request('PUT', 'https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => [ 'Name' => 'Example', 'Image' => 'string', 'OptionPrices' => [[ 'Value' => 0, 'CurrencyCountry' => 'USD', 'Currency' => 'USD', 'CountryAbbriviation' => 'string' ]] ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Put, "https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "{\"Name\":\"Example\",\"Image\":\"string\",\"OptionPrices\":[{\"Value\":0,\"CurrencyCountry\":\"USD\",\"Currency\":\"USD\",\"CountryAbbriviation\":\"string\"}]}", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Response · 200
{
"Id": 1,
"Name": "Example",
"Image": "string",
"OptionPrices": [
{
"Value": 0,
"CurrencyCountry": "USD",
"Currency": "USD",
"CountryAbbriviation": "string"
}
]
}Deletes an existing module item attribute option
Parameters
idinteger · pathrequired
Existent module item attribute option id.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1", { method: "DELETE", headers: { "Authorization": "Bearer <token>" } });
import requests requests.delete( "https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('DELETE', 'https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Delete, "https://your-site.webinone.com/api/v2/admin/module-items/attributes/options/1"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);