Product SKU
Stock keeping unit or SKU is a number assigned to a particular product by a digital or physical retail store for easy identification and inventory tracking purposes. The SKU number is a string of alphanumeric characters that uniquely identify details such as price, product options and manufacturer of a particular product or service. SKUs are used in order notifications, electronic delivery, export files, etc
To create a new SKU schema, define the combination criteria from the Settings section below. The SKU number is a unique combination of Product ID (Product Code) plus all or one of the following: Currencies/Volume Discounts/Purchase Types/Pricing Options
{ "Products": [ { "Code": "VALID_PRODUCT_CODE_1", "Currencies": [ "USD", "EUR", "GBP", "BGN" ], "PurchaseTypes": [ "NEW_PRODUCT", "RENEWAL" ], "PricingConfigurationCodes": [ { "Code": "VALID_PRICING_CONFIGURATION_CODE_1", "VolumeDiscounts": [ [ 1, 3 ], [ 4, 10 ] ], "OptionGroups": [ { "Code": "GROUP_CODE_2" } ] } ] }, { "Code": "VALID_PRODUCT_CODE_2", "Currencies": [ "USD", "EUR" ], "PurchaseTypes": [ "NEW_PRODUCT" ], "PricingConfigurationCodes": [ { "Code": "VALID_PRICING_CONFIGURATION_CODE_2", "OptionGroups": [ { "Code": "GROUP_CODE_1" } ] } ] } ] }application/jsonExample: application/jsonPossible values: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns generated SKU schema
Authentication failure
GET /rest/6.0/productsku/?schema=text HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"ProductCode": "text",
"SkuPricingOptions": {
"0": {
"Code": "PRODUCT_CODE_1",
"Details": {
"0": {
"ProductSKU": "",
"Currency": "USD",
"FromQty": 1,
"ToQty": 5,
"PurchaseType": "NEW_PRODUCT",
"Groups": {
"0": {
"GroupCode": "OPTION_GROUP_CODE_1",
"Options": {
"0": {
"Name": "Option label #1",
"Value": "OPTION_CODE_1"
}
}
}
},
"Options": "eJwBLADT/6G10uOW07exk6mNk7K/oN2Sc4l1lbXToqi5sriTcbOXseWu3pGFp3auuZOoleEc+Q=="
},
"1": {
"ProductSKU": "",
"Currency": "USD",
"FromQty": 1,
"ToQty": 5,
"PurchaseType": "NEW_PRODUCT",
"Groups": {
"0": {
"GroupCode": "OPTION_GROUP_CODE_1",
"Options": {
"0": {
"Name": "Option label #1",
"Value": "OPTION_CODE_1"
}
}
}
},
"Options": "eJwBLADT/6G10uOW07exk6mNk7K/oN2Sc4l1lbXToqi5sriTcbOXseWu3pGFp3auuZOoleEc+Q=="
}
},
"Errors": [
""
]
},
"1": {
"ProductCode": "VALIDATION_ERRORS_PRODUCT_CODE",
"SkuPricingOptions": {
"Code": "",
"Details": {},
"Errors": [
[
"Product code INVALID_PRODUCT_CODE doesn't belong to this vendor",
"Pricing Configuration Code INVALID_PRICING_CONFIGURATION_CODE is not valid for product code VALID_PRODUCT_CODE",
"Pricing Configuration Code VALID_PRICING_CONFIGURATION_CODE is duplicated for product code VALID_PRODUCT_CODE",
"Couldn't find any valid pricing options for groupCode INVALID_GROUP_CODE and pricing option code PRICING_CONFIGURATION_CODE",
"We couldn't validate the following purchase types for product code : INVALID_PURCHASE_TYPE",
"We couldn't validate the following currencies: USD_INVALID",
"We could't validate all the requested volumes: [[1,3],[4,10]]. Please make sure that they are properly set for this pricing configuration code.",
"There are too many possible combinations available for these input items.",
"Product id 12312344 doesn't have any PricingConfigurationCodes"
]
]
}
}
}
}6B3CB17DDA_COPY1application/jsonExample: application/jsonPossible values: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns generated SKU schema
O365BASICGET /rest/6.0/productsku/search?ProductCode=text&PricingConfigurations=[object+Object] HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Returns generated SKU schema
{
"ProductCode": "O365BASIC",
"PricingConfigurations": {
"Code": "5667F988EC",
"Currencies": [
{
"Code": "EUR"
}
],
"PurchaseTypes": [
{
"Code": "NEW_PRODUCT"
}
],
"QuantityIntervals": [
{
"MinQuantity": 0,
"MaxQuantity": 9999
}
],
"PriceOptionGroups": [
{
"Code": "WDS998U",
"Options": [
{
"OptionValue": "Black color"
}
]
}
],
"SkuCollection": [
{
"ProductCode": "PODQ92E",
"SkuPricingOptions": [
{
"Code": "POC29I",
"Details": [
{
"ProductSKU": " SKU-USD-0-20-R-C",
"Currency": "USD",
"FromQty": 0,
"ToQty": 20,
"PurchaseType": "NEW_PRODUCT",
"Groups": {
"GroupCode": "SMGRP",
"Options": [
{
"Name": "DetailOption",
"Value": "OptionValue"
}
]
},
"Options": "a:1:{i:13471;a:1:{i:0;i:72680;}"
}
]
}
]
}
]
},
"Errors": [
{
"Field": "PricingConfigurations[0].Code",
"Message": "This value should not be blank."
}
]
}Delete product SKU by criteria
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: ABAC3939F["AA11","AA12","AA13"]In case of success
B293KS234["AA11","AA12","AA13!"]["Can't parse both SKU and PriceConfiguration at same time","Invalid SKU AA13!"]Invalid data
Authentication failure
POST /rest/6.0/productsku/delete HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 151
[
{
"ProductCode": "ABAC3939F",
"PriceConfiguration": [
{
"PriceConfigurationCode": "B293KS234",
"SKUs": [
"AA11",
"AA12",
"AA13"
]
}
],
"SKUs": [
"AA11",
"AA12",
"AA13"
]
}
][
{
"ProductCode": "B293KS234",
"PriceConfiguration": [
{
"PriceConfigurationCode": "B293KS234",
"SKUs": [
"AA11",
"AA12",
"AA13"
],
"Errors": [
"Invalid PriceConfigurationCode",
"Invalid SKU AA13!"
]
}
],
"SKUs": [
"AA11",
"AA12",
"AA13!"
],
"Errors": [
"Can't parse both SKU and PriceConfiguration at same time",
"Invalid SKU AA13!"
]
}
]Last updated
Was this helpful?