In this article, Beehexa will show you how to create a product on BigCommerce using Postman. Creating products is a must for every business running on an eCommerce website. It means a new product with product information like name, SKU, product type, weight, size, and price,… You can follow this process to create a product with all the information you want using Postman in BigCommerce.
Table of Contents
Step 1: Check Scope on BigCommerce
Scope limits the ability to read or write data. Set the scopes to the minimum level of access needed to accomplish the task at hand.
When creating any data, that data must be allowed access because BigCommerce only provides access to the information you are granted access to.
To know you have the right to access any information, you must verify the Scope.
Here are the steps you have to do to check the scope:
- Go to the Home page
- Select the โAdvanced settingsโ section
- Then Click on API Accounts
Step 2: Access Postman to create a product
After checking the Scope, we will create a product in BigCommerce using Postman.
Now, we are ready to create a product using Postman.
Log in to your Postman and create a new workspace.
Step 3: Create a product
Now we are prepared to create a product:
You can create only one product at a time.
Create a new POST with this URL: https://api.bigcommerce.com/stores/8qp1vm0sx2/v3/catalog/products
Replace {store_hash} with your store_hash generated on BigCommerce from the API path.
1. In the Header section
You need to declare the information :
- Accept: application/JSON
- Content-Type: application/JSON
- X-Auth-Client: Client ID
- X-Auth-Token: Access token
If this is the first time you make a call in the Postman, you must generate API credentials from the BigCommerce Admin Account. You can read Blog How to create a BigCommerce API account on the Beehexa website.
2. In the Body section
First, you need to click on the Body section, then tick at โrawโ to fill the data; remember to change the โtextโ to โJSON.โ
Now, you need to declare the information to create a product.
- Name: The product name. (>= 1 characters<= 250 characters)
- Type: The product type. One of physical – a physical stock unit, digital – a digital download.
Allowed values: physical/ digital
- Weight: The product’s weight when calculating shipping costs. It depends on the unit set on the store (>= 0<= 9999999999)
- Price: The price of the product. The price should include or exclude tax based on the store settings. (>= 0)
All information above is requested when you create a product.
I will show you our example below, and you can create your product.
{
"name": "hexasync 01",
"price": "500.00",
"categories": [
23
],
"weight": 4,
"type": "physical"
}
Code language: JSON / JSON with Comments (json)
NOTE
- A product name should not exceed 250 characters.
- A POST request to /products accepts a single video object; to send an array of video objects, see: /products/{product_id}/videos.
Read-Only Fields include: (It means that you canโt modify any of them)
- id
- date_created
- date_modified
- calculated_price
- Base_variant_id
You also can add more information such as SKU and description, โฆ follow BigCommerce Dev Center to know more.
After filling in all the information, click the send button to send the API request.
Response: The API will return the data like this.
{
"data": {
"id": 117,
"name": "Hexasync 01 ",
"type": "physical",
"sku": "",
"description": "",
"weight": 4,
"width": 0,
"depth": 0,
"height": 0,
"price": 500,
"cost_price": 0,
"retail_price": 0,
"sale_price": 0,
"map_price": 0,
"tax_class_id": 0,
"product_tax_code": "",
"calculated_price": 500,
"categories": [
23
],
"brand_id": 0,
"option_set_id": null,
"option_set_display": "right",
"inventory_level": 0,
"inventory_warning_level": 0,
"inventory_tracking": "none",
"reviews_rating_sum": 0,
"reviews_count": 0,
"total_sold": 0,
"fixed_cost_shipping_price": 0,
"is_free_shipping": false,
"is_visible": true,
"is_featured": false,
"related_products": [
-1
],
"warranty": "",
"bin_picking_number": "",
"layout_file": "",
"upc": "",
"mpn": "",
"gtin": "",
"search_keywords": "",
"availability": "available",
"availability_description": "",
"gift_wrapping_options_type": "any",
"gift_wrapping_options_list": [],
"sort_order": 0,
"condition": "New",
"is_condition_shown": false,
"order_quantity_minimum": 0,
"order_quantity_maximum": 0,
"page_title": "",
"meta_keywords": [],
"meta_description": "",
"date_created": "2022-06-17T08:44:27+00:00",
"date_modified": "2022-06-17T08:44:27+00:00",
"view_count": 0,
"preorder_release_date": null,
"preorder_message": "",
"is_preorder_only": false,
"is_price_hidden": false,
"price_hidden_label": "",
"custom_url": {
"url": "/hexasync-jun/",
"is_customized": false
},
"base_variant_id": 82,
"open_graph_type": "product",
"open_graph_title": "",
"open_graph_description": "",
"open_graph_use_meta_description": true,
"open_graph_use_product_name": true,
"open_graph_use_image": true,
"variants": [
{
"id": 82,
"product_id": 117,
"sku": "",
"sku_id": null,
"price": 500,
"calculated_price": 500,
"sale_price": 0,
"retail_price": 0,
"map_price": 0,
"weight": 4,
"width": 0,
"height": 0,
"depth": 0,
"is_free_shipping": false,
"fixed_cost_shipping_price": 0,
"calculated_weight": 4,
"purchasing_disabled": false,
"purchasing_disabled_message": "",
"image_url": "",
"cost_price": 0,
"upc": "",
"mpn": "",
"gtin": "",
"inventory_level": 0,
"inventory_warning_level": 0,
"bin_picking_number": "",
"option_values": []
}
],
"images": [],
"primary_image": null,
"videos": [],
"custom_fields": [],
"bulk_pricing_rules": [],
"reviews": [],
"options": [],
"modifiers": [],
"parent_relations": []
},
"meta": {}
}
Code language: JSON / JSON with Comments (json)
Now, backing to the BigCommerce Store to check out, you will see the result.
The above are all steps to create a Product on BigCommerce with Postman. Please comment below or refer to our BigCommerce API documentation if you have any questions.
Hopefully, you can do it!
These steps will give to you visually in the video below.