Skip to main content

Color

Definition

color.json
{
"id": 0,
"productID": 0,
"colorName": "",
"colorCode": "",
"seq": 0,
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Colors

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

Get Color

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

Apply Color.ID

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

Create Color

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

success status: 201

Update Color

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

Patch Color

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

Update Color Status

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

Destroy Color

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