Product API¶
Request a product registration/update request (with webhook notification)
Product information properties¶
| Item name | Description |
|---|---|
|
control required |
(Required) Control
One of the following can be specified.
draft to register privately,
or publish to publish.
Once a product is published, it can be suspend,
but cannot be draft again.
|
| reference_number |
Reference number
id or reference_number.If you set both of id and reference_number,
API prefers id to reference_number
and ignores reference_number.You can set the reference number separately from the product ID which is automatically assigned by BUYMA. It is recommended that you specify a control string in reference_number to identify products that
will be added to BUYMA. The same number cannot be assigned to more than one product. |
|
name required |
Product name
|
|
id read-only |
Product ID
|
|
status read-only |
Product Status
|
|
comments required |
Product Comments
The maximum character limit is 3,000 characters (UTF-8). ・ HTML format is not supported. ・ Emojis and special characters are counted as 2 to 4 characters per each. |
|
brand_id required |
Brand ID
The list of brand ID can be found on brands.csv in
master data.If not specified, enter 0. |
| brand_name |
Brand Name
In this case, brand_id must be 0.
|
| model_id |
Model ID
The list of model ID can be found on models.csv in
master data.
|
|
category_id required |
Category ID
The list of category ID can be found on categories.csv in
master data.
|
| theme_id |
Theme ID
The list of theme ID can be found on themes.csv in
master data.
|
| season_id |
Season ID
The list of season ID can be found on seasons.csv in
master data.
|
|
price required |
Product Price
|
|
list_price read-only |
List Price
|
| regular_price |
Regular listing price
|
| reference_price |
Reference Price
|
|
available_until required |
Purchase deadline (Japan time)
|
|
buying_area_id required |
Buying Area
The list of area ID can be found on areas.csv in
master data.
|
| buying_shop_name |
Name of the store to buy from.
|
|
shipping_area_id required |
Shipping Area
The list of area ID can be found on areas.csv in
master data.
|
| buyer_notes |
Seller Notes
|
| duty |
Tariffs
You can specify one of the following.
|
| tags |
Tags
The list of tag ID can be found on tags.csv in
master data.
|
|
images required |
Product Image
|
|
shipping_methods required |
Shipping Methods
The shipping methods are found BUYMA Partners Sandbox Delivery method management for sandbox environment. The shipping methods are found Shipping Master for production environment. |
| style_numbers |
Model number/identification note
|
|
options required |
Color and size
The master_id should be 99. For value, specify "マルチカラー". For products that are not available in different sizes:The master_id should be 0 for size type.
|
| size_unit |
Size Unit
unites.csv
in master data.
The value of same category_id as product or empty category_id can be set.
|
| colorsize_comments |
Color and size supplementary information
|
|
variants required |
Sales Availability/Stock
The stock number is set for combination of colors and sizes which are defined at options. All combinations of colors and sizes at options must be enumerated. Please refer the following link for stocks. https://qa.buyma.com/shopper/sell/11325.html The stock_type can be chosen one of the following.
stocks is set number of stock in hand or
available for purchase item.
|
| order_quantity |
Total quantity that can be purchased.
Required if variants includes purchase_for_order.
|
| shop_urls |
Buyer's note
|
|
updated_at read-only. |
Updated Date
|
|
created_at read-only. |
Creation Date
|
Restricted editing items after publishing
The following items cannot be updated after publication.
namebrand_idbrand_namecategory_idbuying_area_idbuying_shop_nameshipping_area_id
Entering size details
options records of type: size can contain details.
The items that can be selected for key depend on the category.
If you set a value for optional_value, you can use something
like "68.0-68.5".
For products that can be adjusted for expansion,
contraction, movement, etc., please use that range of input.
The list of key in details can be found on size_details.csv
in master data.
"options": [
{
"type": "size", "value": "S", "master_id": 1, "position": 1,
"details": [
{ "key": "length", "value": "68.0", "optional_value": "68.5" },
{ "key": "shoulder width", "value": "48.0" },
{ "key": "chest circumference", "value": "53.0", "optional_value": "55.0" },
{ "key": "sleeve length", "value": "65.0" }
]
}
]
Fields to be filled in when deleting a product
When deleting products, it is possible to delete products
with control: "delete" items and id / reference_number
which can identify the product.
{
"product": {
"control": "delete",
"reference_number": "56bca058-c171-4e58-a3a1-8c653de898aa"
}
}
POST /api/v1/products.json¶
Accepts requests to create, edit, or delete products. Only a simple validation of required fields will be performed at request receive time, then the detail validations are hold on inserting/updating items.
About required fields
If the control is publish, draft, or suspend, the required fields must
be included in the API request.
When the control is delete, some required fields can be omitted. See the
Required Fields for Product Deletion section for details.
The following webhook events are called after create/update/fail to create fail to update the item.
API Request¶
POST /api/v1/products.json
{
"product": {
"reference_number": "ABC0001",
"control": "publish",
"name": "quilted jacket",
"comments": "Thank you for your interest in our products." ,
"brand_id": 203,
"model_id": null,
"category_id": 3064,
"season_id": null,
"theme_id": null,
"price": 22500,
"reference_price": 25500,
"regular_price": null,
"available_until": "01/10/2019",
"buying_area_id": "2001001000",
"buying_shop_name": "Authorized Dealer",
"shipping_area_id": "2001001000",
"duty": "included",
"tags": [
{ "tag_id": 419 },
{ "tag_id": 710 }
],
"shipping_methods": [
{ "shipping_method_id": 888 }
{ "shipping_method_id": 891 }
],
"images": [
{ "path": "https://example.org/images/1.jpg", "position": 1 }
{ "path": "https://example.org/images/2.jpg", "position": 2 }
],
"style_numbers": [
{ "number": "CATALOG-001-WHITE", "memo": "White" },
{ "number": "CATALOG-001-BLACK", "memo": "Black" }
],
"options": [
{
"type": "size", "value": "S", "position": 1, "master_id": 1,
"details": [
{ "key": "length", "value": "67.0", "optional_value": "67.5" },
{ "key": "shoulder width", "value": "46.0" },
{ "key": "chest circumference", "value": "53.0" },
{ "key": "sleeve length", "value": "63.0", "optional_value": "63.5" }
]
},
{
"type": "size", "value": "M", "position": 2, "master_id": 2,
"details": [
{ "key": "length", "value": "68.0", "optional_value": "68.5" },
{ "key": "shoulder width", "value": "48.0" },
{ "key": "chest circumference", "value": "55.0" },
{ "key": "sleeve length", "value": "65.0", "optional_value": "65.5" }
]
},
{ "type": "color", "value": "White", "position": 1, "master_id": 1 }
{ "type": "color", "value": "Black", "position": 2, "master_id": 2 }
],
"size_unit": "cm",
"variants": [
{
"options": [
{ "type": "size", "value": "S" }
{ "type": "color", "value": "White" }
],
"stock_type": "stock_in_hand",
"stocks": 1
},
{
"options": [
{ "type": "size", "value": "M" }
{ "type": "color", "value": "White" }
],
"stock_type": "stock_in_hand",
"stocks": 1
},
{
"options": [
{ "type": "size", "value": "S" }
{ "type": "color", "value": "Black" }
],
"stock_type": "out_of_stock",
"stocks": null
},
{
"options": [
{ "type": "size", "value": "M" }
{ "type": "color", "value": "Black" }
],
"stock_type": "purchase_for_order",
"stocks": null
}
],
"order_quantity": 3,
"shop_urls": [
{
"label": "label1",
"url": "http://example.com/url/1",
"description": "description1"
},
{
"label": "label2",
"url": "http://example.com/url/2",
"description": "description2"
}
]
}
}
API Response¶
Success¶
HTTP header
HTTP/1.1 201 Created
HTTP body
{
"request_received_at": "2019-09-05T12:10:40.114775+09:00",
"request_uid": "2001909051121040114775174828"
}
|
Item |
Description |
|---|---|
|
request_received_at |
Request received date and time (ISO8601) |
|
request_uid |
request identifier |
failure¶
HTTP header
HTTP/1.1 422 Unprocessable Entity
HTTP body
{
"errors": {
"name": ["Product name is required."]
}
}
Simple validation is performed, such as for required fields.
|
Item |
Description |
|---|---|
|
errors |
Error for each input item |