Product is the merchant's product.
Method | Description | URI |
---|---|---|
Create a product | /api/v2/products |
|
Get a list of products | /api/v2/products |
|
Update a product's detail | /api/v2/products/{ID} |
|
Delete a product | /api/v2/products/{ID} |
Key | Value |
---|---|
Accept | application/json |
Content-Type | application/json |
Authorization | Bearer {ACCESS-TOKEN} |
Method | URI |
---|---|
/api/v2/products |
Key | Type | Required |
---|---|---|
title | string |
Yes |
code | string |
Yes |
price | integer |
Yes |
{
"title": "example-title",
"code": "Asxxd23d",
"price" : 5
}
{success} Success code :
200
{
"success": true,
"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}
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 07:48:01 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/products |
{success} Success code :
200
{
"success": true,
"data": {
"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/v2/products?page=1,
"from": 1,
"last_page": 1,
"last_page_url": "{SERVER-URL}/api/v2/products?page=1",
"next_page_url": null,
"path": "{SERVER-URL}/api/v2/products?page=1",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 07:23:54 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/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
{
"success": true,
"data": {
"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}
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 07:22:29 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/products/{ID} |
{success} Success code :
200
{
"success": true,
"data": true,
"errors": null,
"meta": {
"timestamp": "2020-06-25 07:36:17 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors