Skip to content

Store Endpoint

TIP

Refer to products page for Base URL

* Add Store

A user can create only one store.

Endpoint: POST

sell/store

Request Headers

AuthorizationValueDescriptionRequired
Bearer************Firebase access token✔️

Payload Description

NameTypeDescriptionRequired
aboutstringstore description
categoriesarray of stringsMen, Women, Boys, Girls✔️
namestringfull name of store✔️
phonestringtrue if salePrice != 0.00 ~ false by default
statestringregion eg. Ashanti, Western✔️
streetstringstreet address
whatsappstringwhatsapp number

Sample Payload

{
  "about": "sell clothing",
  "categories": ["Men", "Girls", "Boys"],
  "name": "My New Store",
  "phone": "123456789",
  "state": "Greater Accra Region",
  "street": "Adenta st",
  "whatsapp": "0123456789"
}

Sample Response

{
  "id": "1edcf7c9-bbf6-4ca1-8de2-d7f69104ab2b",
  "about": "sell clothing",
  "categories": [
    "Men",
    "Girls",
    "Boys"
  ],
  "country": "Ghana",
  "creatorId": "hudJ90nd0ndjHD03JDs0LSN9dhd7yw",
  "dateCreated": "2023-06-01T08:03:56.944780Z",
  "dateUpdated": "2023-06-01T08:03:56.944780Z",
  "expiryDate": "",
  "followers": 0,
  "image": "/media/https%3A/wookin-shopping-storage.fra1.cdn.digitaloceanspaces.com/media/shops/default/shop-default.webp",
  "isSubscribed": false,
  "name": "My New Store",
  "phone": "123456789",
  "planType": "",
  "productLimit": 0,
  "state": "Greater Accra Region",
  "street": "Adenta st",
  "subscriptionDate": "",
  "slug": "my-new-store-279",
  "website": "https://my.wookin.com.gh/",
  "whatsapp": "0123456789"
}

* Store Details

Endpoint: GET

sell/store/pk

Request Headers

AuthorizationValueDescriptionRequired
Bearer*************Firebase access token✔️

Parameters

NameTypeDescriptionRequired
pk = store_idstringadd id to URL✔️

Sample Request

sell/store/135f1584-18a8-4e71-97db-d6292cce35db

Sample Response

{
  "id": "135f1584-18a8-4e71-97db-d6292cce35db",
  "about": "sell clothing",
  "categories": [
    "Men",
    "Girls",
    "Boys"
  ],
  "image": "http://127.0.0.1:8000/media/https%3A/wookin-shopping-storage.fra1.cdn.digitaloceanspaces.com/media/shops/default/shop-default.webp",
  "name": "My New Store",
  "phone": "123456789",
  "state": "Greater Accra Region",
  "street": "Adenta st",
  "website": "https://my.wookin.com.gh/",
  "whatsapp": "0123456789"
}

* Update Store

Endpoint: PATCH | PUT

sell/store/update/pk

Request Headers

AuthorizationValueDescriptionRequired
Bearer*************Firebase access token✔️

Parameters

NameTypeDescriptionRequired
pkstringstore id✔️

Sample Request

sell/store/update/135f1584-18a8-4e71-97db-d6292cce35db

Sample Payload

{
  "about": "We sell clothing and shoes"
}

Sample Response

{
  "id": "00ad763e-a204-410a-8ea1-f4696ba97d0b",
  "about": "We sell clothing and shoes"
  "categories": [
    "Men",
    "Girls",
    "Boys"
  ],
  "country": "Ghana",
  "creatorId": "hudJ90nd0ndjHD03JD0LSN9dhd7yw",
  "dateCreated": "2023-05-31T08:19:01.252098Z",
  "dateUpdated": "2023-06-01T08:11:22.170046Z",
  "expiryDate": "",
  "followers": 0,
  "image": "http://127.0.0.1:8000/media/https%3A/wookin-shopping-storage.fra1.cdn.digitaloceanspaces.com/media/shops/default/shop-default.webp",
  "isSubscribed": true,
  "name": "My New Store",
  "phone": "123456789",
  "planType": "",
  "productLimit": 0,
  "subscriptionDate": "",
  "slug": "my-new-store-279",
  "state": "Greater Accra Region",
  "street": "Adenta st",
  "website": "https://my.wookin.com.gh/",
  "whatsapp": "0123456789"
}

* Delete Store

Endpoint: DELETE

sell/store/delete/pk

Request Headers

AuthorizationValueDescriptionRequired
Bearer***************Firebase access token✔️

Parameters

NameTypeDescriptionRequired
pkstringstore id✔️

Sample Request

sell/store/delete/135f1584-18a8-4e71-97db-d6292cce35db

Sample Response

{
  data=""store & products deleted"",
  status=204 No Content
}

Released under the MIT License.