Product Group
Extract information about the product groups you created for your account.
Method and URL
GET https://api.2checkout.com/rest/6.0/productgroups/
Example URL
https://api.2checkout.com/rest/6.0/productgroups/
Response
200 JSON
ProductGroup
Array of objects
application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
Invalid data
GET /rest/6.0/productgroups/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
{
"Code": "96A9F43B1B",
"Description": "Default products group",
"Name": "General",
"TemplateName": "GlobalNew"
},
{
"Code": "0F0C8E77B0",
"Description": "Default products group",
"Name": "API_GROUP",
"TemplateName": "Optimized_Template"
},
{
"Code": "D11E983297",
"Description": "Default products group",
"Name": "123",
"TemplateName": "Short funnel checkout"
}
]Send null for product group Code. 2Checkout ignores any values you send for Code and generates identifiers itself.
Use unique product group names.
2Checkout throws an exception if you send a blank product group.
If you send only the name of the product group 2Checkout creates the new product group entity.
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: Created
No content
Invalid data
POST /rest/6.0/productgroups/ 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: 100
{
"Description": "Default products group",
"Name": "API_GROUP_TEST",
"TemplateName": "Optimized_Template"
}No content
Extract information about a specific product group you created for your account.
Method and URL
GET https://api.2checkout.com/rest/6.0/productgroups/{PRODUCT_GROUP_CODE}/
URL parameters
ProductGroupCode
Required (string)
Unique, system-generated identifier assigned to product groups.
Example URL
?https://api.2checkout.com/rest/6.0/productgroups/96A9F43B1B/
Response
200 JSON
ProductGroup
Object
Unique, system-generated identifier assigned to product groups.
96A9F43B1Bapplication/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
Invalid data
GET /rest/6.0/productgroups/{ProductGroupCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"Description": "Default products group",
"Name": "API_GROUP_TEST_Marius",
"TemplateName": "Optimized_Template"
}Retrieve the name of the product's assigned product group
The editable code that you control at product-level, not the unique, system-generated product ID
my_subscription_1Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: OK
Invalid data
GET /rest/6.0/products/{ProductCode}/productgroups/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Tangible productsFollowing the assignation, the 2Checkout system uses the shopping cart template associated with the product group as the default cart design when shoppers purchase a product.
Method and URL
POST https://api.2checkout.com/rest/6.0/products/{ProductCode}/productgroups/{ProductGroupCode}/
The name of the product group is case sensitive.
URL parameters
ProductCode
Required (string)
The editable code that you control at product-level, not the unique, system-generated product ID.
ProductGroupCode
Required (string)
Unique, system-generated identifier assigned to product groups.
Example URL
https://api.2checkout.com/rest/6.0/products/my_subscription/productgroups/96A9F43B1B/
Response
200 JSON
The editable code that you control at product-level, not the unique, system-generated product ID
my_subscription_1Unique, system-generated identifier assigned to product groups.
96A9F43B1BAuthentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: OK
No content
Invalid data
POST /rest/6.0/products/{ProductCode}/productgroups/{ProductGroupCode}/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
No content
The editable code that you control at product-level, not the unique, system-generated product ID
my_subscription_1Unique, system-generated identifier assigned to product groups.
96A9F43B1BAuthentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
No content
DELETE /rest/6.0/products/{ProductCode}/productgroups/{ProductGroupCode}/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: */*
OK
No content
Last updated
Was this helpful?