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

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

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 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

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}

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}
200

OK

No content

Last updated

Was this helpful?