You can generate an API key for each of your customers and use it for the automated transfer of products. A PHP library is currently available for this purpose as a Composer bundle.
API URL and Authentication
The current version of the REST API is available at https://www.punchcommerce.de/api/v1/products. Authentication is carried out via the bearer token, which is displayed in your PunchCommerce account.
Retrieve products
GET https://www.punchcommerce.de/api/v1/products
Retrieve a product
GET https://www.punchcommerce.de/api/v1/products/{ordernumber}
{
"brand_ordernumber": "",
"category": "Leisure & Electronics",
"description_long": null,
"image_url": null,
"purchase_unit": null,
"reference_unit": null,
"unit": null,
"unit_name": null,
"ordernumber": "SW10001",
"brand": "Shopware Freetime",
"title": "Main item",
"description": "Main item",
"price": 459.94999999999999,
"tax_rate": 19,
"packaging_unit": "STCK",
"weight": 0.17000000000000001,
"classification_type": "UNSPSC",
"classification": "43232403",
"shipping_time": 3,
"active": true
}
Create product
POST https://www.punchcommerce.de/api/v1/products
{
"brand_ordernumber": "",
"category": "Leisure & Electronics",
"description_long": null,
"image_url": null,
"purchase_unit": null,
"reference_unit": null,
"unit": null,
"unit_name": null,
"ordernumber": "SW10001",
"brand": "Shopware Freetime",
"title": "Main item",
"description": "Main item",
"price": 459.94999999999999,
"tax_rate": 19,
"packaging_unit": "STCK",
"weight": 0.17000000000000001,
"shipping_time": 3,
"classification_type": "UNSPSC",
"classification": "43232403",
"active": true
}
Update product
PUT https://www.punchcommerce.de/api/v1/products/{ordernumber}
{
"brand_ordernumber": "",
"category": "Leisure & Electronics",
"description_long": null,
"image_url": null,
"purchase_unit": null,
"reference_unit": null,
"unit": null,
"unit_name": null,
"ordernumber": "SW10001",
"brand": "Shopware Freetime",
"title": "Main item",
"description": "Main item",
"price": 459.94999999999999,
"tax_rate": 19,
"packaging_unit": "STCK",
"weight": 0.17000000000000001,
"shipping_time": 3,
"classification_type": "UNSPSC",
"classification": "43232403",
"active": true
}
Delete all products
DELETE https://www.punchcommerce.de/api/v1/products
Delete a product
DELETE https://www.punchcommerce.de/api/v1/products/{ordernumber}
Composer Bundle
You can find the PunchCommerce client library as a Composer bundle in our Git repository at https://stash.netzdirektion.de/scm/pun/punchcommerce-client-php.git
Units of Measure
We recommend using UN/CEFACT units when tagging products. A complete list of units can be found at the following link:
https://unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf
Category
A category can be specified as a path of categories. The individual category names must be separated by a "|". The path is interpreted from left to right as a nested structure.
Example:
Living|Kitchen|Electrical appliances
becomes