Variant
Berikut ini adalah list endpoint API untuk mendapatkan informasi tentang Variant.
POST/api/v3/variant
Get Variant List
Digunakan untuk mendapatkan informasi Variant List yang ada di BANGJEFF.
Headers
- Name
Authorization
- Type
- Bearer {API_KEY}
- Description
Api Key dari BANGJEFF.
- Name
Content-Type
- Type
- application/json
- Description
Content type JSON.
Body
- Name
code
- Type
- string
- Description
Code bisa didapatkan dari Variant
Get Product List
.
{
"code": "string"
}
Request
POST
/api/v3/variantcurl -X POST "https://api.bangjeff.com/api/v3/variant" \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d "{ \"code\": \"string\"}"
Response
{
"error": false,
"code": 200,
"message": "string",
"data": [
{
"id": 0,
"code": "string",
"name": "string",
"isActive": false,
"price": 0,
"process": 0
}
]
}
POST/api/v3/variant/{code}
Get Variant Detail
Digunakan untuk mendapatkan informasi Variant Detail yang ada di BANGJEFF.
Headers
- Name
Authorization
- Type
- Bearer {API_KEY}
- Description
Api Key dari BANGJEFF.
- Name
Content-Type
- Type
- application/json
- Description
Content type JSON.
Required Params
- Name
code
- Type
- string
- Description
Code bisa didapatkan dari Variant List atau Variant Detail.
Request
POST
/api/v3/variant/{code}curl -X POST "https://api.bangjeff.com/api/v3/variant/{code}" \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json"
Response
{
"error": false,
"code": 200,
"message": "string",
"data": {
"id": 0,
"code": "string",
"name": "string",
"isActive": false,
"price": 0,
"process": 0
}
}
Response Error
Berikut ini adalah list Response error pada endpoint api variant.
HTTP Code | Error Message | Description |
---|---|---|
403 | Access Token is required | Wrong API Key |
403 | Access Token is not valid | Wrong API Key |
400 | Couldn't find product with code XXX | Product Not Found |
400 | Couldn't find product variant with code XXX | Product Variant Not Found |