Documentation v1.0.0
API docs
Circular API is a RESTful API that allows you to interact with Circular.
Attributes
GET
List colors
Get all the available colors
Response
response.ts
{
"data": [
{
"name": string,
"slug": string
}
],
"error": {
"code": ,
"message":
},
"pagination": {
"take": ,
"skip": ,
"count": ,
}
}
GET
List categories
Response
response.ts
{
"data": [
{
"name": string,
"slug": string
}
],
"error": {
"code": ,
"message":
},
"pagination": {
"take": ,
"skip": ,
"count": ,
}
}
GET
List brands
Response
response.ts
{
"data": [
{
"name": string,
"slug": string
}
],
"error": {
"code": ,
"message":
},
"pagination": {
"take": ,
"skip": ,
"count": ,
}
}
GET
List materials
Response
response.ts
{
"data": [
{
"name": string,
"slug": string
}
],
"error": {
"code": ,
"message":
},
"pagination": {
"take": ,
"skip": ,
"count": ,
}
}
Payouts
POST
Create payout
Create a payout
Request
request.ts
{
... will add later
}
Products
This is the description of products part of the documentation, it supports all kinds of things
GET
List products
Get all products
POST
Create products
Support both a single product object or multiple
Request
request.ts
{
"price": 400,
"gender": "none" | "male" | "female" | "unisex" | null,
"seller": {
"id": {uuid},
},
"store": {
"id": uuid,
},
"brand": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
},
"category": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
},
"material": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
},
"color": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
}
}
Response
response.ts
{
"data": {
// Product data as it is now stored
},
"error": {
"code": ,
"message": ,
} | null
}
PATCH
Update product
Request
request.ts
{
"id": uuid,
"price": 400,
"gender": "none" | "male" | "female" | "unisex" | null,
"seller": {
"id": {uuid},
},
"store": {
"id": uuid,
},
"brand": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
},
"category": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
},
"material": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
},
"color": {
"slug": , // optional
"name": , // if slug is defined, the name is ignored
}
}
Response
response.ts
{
"data": {
// Product data as it is now stored
},
"error": {
"code": ,
"message": ,
} | null
}
Sellers
POST
Create sellers
Create sellers in your organization
Request
request.ts
{
"id": uuid,// _I
"firstName": string,
"lastName": string,
"name" string, // _I
"email": string, // _R
"phone": string, // _R
}
Response
response.ts
{
"id": uuid,// _I
"firstName": string,
"lastName": string,
"name" string, // _I
"email": string, // _R
"phone": string, // _R
}