Skip to main content

Brand

Definition

brand.json
{
"id": 0,
"key": "",
"brandName": "",
"seq": 0,
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Brands

curl -X GET "${baseUrl}/brand/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Brand

curl -X GET "${baseUrl}/brand/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Brand.ID

curl -X POST "${baseUrl}/apply/brand/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Brand

curl -X POST "${baseUrl}/brand/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @brand.json
info
brand.json
{
"key": "",
"brandName": "",
"seq": 0,
"status": 0,
}
tip

success status: 201

Update Brand

#!/bin/bash
curl -X PUT "${baseUrl}/brand/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @brand.json
info
brand.json
{
"key": "",
"brandName": "",
"seq": 0,
"status": 0,
}

Patch Brand

curl -X PATCH "${baseUrl}/brand/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: key,brandName,seq,status" \
-d @brand.json
info
brand.json
{
"key": "",
"brandName": "",
"seq": 0,
"status": 0,
}

Update Brand Status

curl -X PATCH "${baseUrl}/brand/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @brand.json
info
brand.json
{
"status": 0
}

Destroy Brand

curl -X DELETE "${baseUrl}/brand/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"