Artisyn API
  1. Artisans
Artisyn API
  • INTRODUCTION
  • Auth
    • OAUTH
      • Google
      • Google Callback
    • Login
      POST
    • Register
      POST
    • Verify Account
      PUT
    • Logout
      DELETE
    • Forgot Password
      POST
    • Reset Password
      PUT
  • Admin
    • Categories
      • List Categories
      • Create Category
      • Get Category
      • Update Category
      • Delete Category
  • Categories
    • List Categories
      GET
    • Get Category
      GET
  • Curator
    • Artisans
      • List Artisans
        GET
      • Create Artisan
        POST
      • Show Artisan
        GET
      • Update Artisan
        PUT
      • Toggle Activation
        PUT
      • Bulk Operation
        POST
      • Delete Artisan
        DELETE
  • Index
    POST
  1. Artisans

Create Artisan

Developing
POST
http://127.0.0.1:3000/api/curator/artisans
Maintainer:Not configured
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:3000/api/curator/artisans' \
--form 'name="John Obi"' \
--form 'avatar=@""' \
--form 'images=@""' \
--form 'category_id="1"' \
--form 'email="john.obi@example.com"' \
--form 'phone="+2349098765432"' \
--form 'type="PERSON"' \
--form 'description="A computer programmer specialised in programming computers."' \
--form 'address="881 Malvina Lights"' \
--form 'country="Nigeria"' \
--form 'state="Rivers"' \
--form 'city="Port Harcourt"' \
--form 'price_range="100-500"' \
--form 'price="7000"'
Response Response Example
201 - Example 1
{
    "data": {
        "id": "string",
        "name": "string",
        "email": "string",
        "phone": "string",
        "avatar": null,
        "type": "string",
        "description": "string",
        "price": 0,
        "priceRange": [
            0
        ],
        "images": [
            "string"
        ],
        "curatorId": "string",
        "categoryId": "string",
        "subcategoryId": null,
        "locationId": "string",
        "isActive": true,
        "isVerified": true,
        "createdAt": "string",
        "updatedAt": "string",
        "category": {
            "id": "string",
            "name": "string",
            "description": "string",
            "icon": "string",
            "createdAt": "string",
            "updatedAt": "string"
        },
        "location": {
            "id": "string",
            "address": null,
            "city": "string",
            "state": "string",
            "country": "string",
            "postalCode": null,
            "latitude": 0,
            "longitude": 0,
            "createdAt": "string",
            "updatedAt": "string"
        }
    },
    "status": "string",
    "message": "string",
    "code": 0
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params multipart/form-data
name
string 
required
name
Example:
John Obi
avatar
file 
optional
The avatar image for the entity
images
file 
optional
A list of image files to add t to the entity's portfolio
category_id
string 
required
Category ID
Example:
1
email
string 
optional
[Required without phone number] Email Address
Example:
john.obi@example.com
phone
string 
optional
[Required without email address] Phone Number
Example:
+2349098765432
type
enum<string> 
required
Only verified curators can add businesses.
Allowed values:
PERSONBUSINESS
Default:
PERSON
Example:
PERSON
description
string 
required
About the entity
Example:
A computer programmer specialised in programming computers.
address
string  | null 
optional
The business address of the entity
Example:
881 Malvina Lights
country
string 
required
Example:
Nigeria
state
string 
required
Example:
Rivers
city
string 
required
Example:
Port Harcourt
price_range
string  | null 
optional
The price range for services by this entity.
Default:
null
Example:
100-500
Match pattern:
^\d+-\d+$
price
number  | null 
optional
The base price charged by this entity in thier local currency.
>= 0
Default:
0
Example:
7000

Responses

🟢201Create Person
application/json
Body
data
object 
required
id
string 
required
name
string 
required
email
string 
required
phone
string 
required
avatar
null 
required
type
string 
required
description
string 
required
price
number 
required
priceRange
array[number]
required
images
array[string]
required
curatorId
string 
required
categoryId
string 
required
subcategoryId
null 
required
locationId
string 
required
isActive
boolean 
required
isVerified
boolean 
required
createdAt
string 
required
updatedAt
string 
required
category
object 
required
location
object 
required
status
string 
required
message
string 
required
code
integer 
required
🟠422Parameter Error
🟢201Create Business
Previous
List Artisans
Next
Show Artisan
Built with