Product is the merchant's product.
Method | Description | URI |
---|---|---|
Create a product | /api/products |
|
Get a list of products | /api/products |
|
Update a product's detail | /api/products/{ID} |
|
Delete a product | /api/products/{ID} |
Key | Value |
---|---|
Accept | application/json |
Content-Type | application/json |
Authorization | Bearer {ACCESS-TOKEN} |
Method | URI |
---|---|
/api/products |
Key | Type | Required |
---|---|---|
title | string |
Yes |
code | string |
Yes |
price | integer |
Yes |
{
"title": "example-title",
"code": "Asxxd23d",
"price" : 5
}
{success} Success code :
200
{
"title": "example-title",
"code": "Asxxd23d",
"price": 5,
"organization_id": 1,
"updated_at": "2020-06-25 07:48:01",
"created_at": "2020-06-25 07:48:01",
"id": {ID}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/products |
{success} Success code :
200
{
"current_page": 1,
"data": [
{
"title": "example-title",
"code": "Asxxd23d",
"price": 5,
"organization_id": 1,
"updated_at": "2020-06-25 07:48:01",
"created_at": "2020-06-25 07:48:01",
"id": {ID}
}
],
"first_page_url": "{SERVER-URL}/api/products?page=1,
"from": 1,
"last_page": 1,
"last_page_url": "{SERVER-URL}/api/products?page=1",
"next_page_url": null,
"path": "{SERVER-URL}/api/products?page=1",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/products/{ID} |
Key | Type | Required |
---|---|---|
title | string |
No |
code | string |
No |
price | integer |
No |
{
"title": "example-title-update",
"code": "Asxxd23d",
"price" : 5
}
{success} Success code :
200
{
"title": "example-title-update",
"code": "Asxxd23d",
"price": 5,
"organization_id": 1,
"updated_at": "2020-06-25 07:48:01",
"created_at": "2020-06-25 07:48:01",
"id": {ID}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/products/{ID} |
{success} Success code :
200
[ ]
{info} For Error Reference, Related guide:
Errors