Skip to main content

Sku

Definition

sku.json
{
"id": 0,
"productID": 0,
"versionID": 0,
"colorID": 0,
"skuName": "",
"qty": 0,
"price": 0,
"discount": 0,
"seq": 0,
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Skus

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

Get Sku

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

Apply Sku.ID

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

Create Sku

curl -X POST "${baseUrl}/sku/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @sku.json
info
sku.json
{
"productID": 0,
"versionID": 0,
"colorID": 0,
"skuName": "",
"qty": 0,
"price": 0,
"discount": 0,
"seq": 0,
"status": 0,
}
tip

success status: 201

Update Sku

#!/bin/bash
curl -X PUT "${baseUrl}/sku/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @sku.json
info
sku.json
{
"productID": 0,
"versionID": 0,
"colorID": 0,
"skuName": "",
"qty": 0,
"price": 0,
"discount": 0,
"seq": 0,
"status": 0,
}

Patch Sku

curl -X PATCH "${baseUrl}/sku/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: productID,versionID,colorID,skuName,qty,price,discount,seq,status" \
-d @sku.json
info
sku.json
{
"productID": 0,
"versionID": 0,
"colorID": 0,
"skuName": "",
"qty": 0,
"price": 0,
"discount": 0,
"seq": 0,
"status": 0,
}

Update Sku Status

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

Destroy Sku

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