For the complete documentation index, see llms.txt. This page is also available as Markdown.

Product Group

Retrieve product groups

get

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

Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get/productgroups/
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"
  }
]

Create a product group

post
  • 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.

Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
Codestring · nullableOptional
DescriptionstringOptional
NamestringOptional
TemplateNamestringOptional
Responses
201

Created

No content

post/productgroups/
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

Retrieve a product group

get

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

Attributes
Type/Description

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

Attributes
Type/Description

ProductGroup

Object

Path parameters
ProductGroupCodestringRequired

Unique, system-generated identifier assigned to product groups.

Example: 96A9F43B1B
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get/productgroups/{ProductGroupCode}/
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"
}

Get the assigned product group for a product

get

Retrieve the name of the product's assigned product group

Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
get/products/{ProductCode}/productgroups/
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 products

Assign a product to a product group

post

Following 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

Attributes
Type/Description

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

Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
ProductGroupCodestringRequired

Unique, system-generated identifier assigned to product groups.

Example: 96A9F43B1B
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

No content

post/products/{ProductCode}/productgroups/{ProductGroupCode}/
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

Unassign a product from a product group

delete
Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
ProductGroupCodestringRequired

Unique, system-generated identifier assigned to product groups.

Example: 96A9F43B1B
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

No content

delete/products/{ProductCode}/productgroups/{ProductGroupCode}/
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: */*
200

OK

No content

Last updated

Was this helpful?