Store Endpoint
TIP
Refer to products page for Base URL
* Add Store
A user can create only one store.
Endpoint: POST
admin/storeRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ************* | Firebase access token | ✔️ |
Payload Description
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | full name of store | ✔️ |
| about | string | store description | ❌ |
| creatorId | string | store owner user id | ✔️ |
| phone | string | true if salePrice != 0.00 ~ false by default | ❌ |
| string | whatsapp number | ❌ | |
| state | string | region eg. Ashanti, Western | ✔️ |
| street | string | street address | ❌ |
| categories | array of main category ids | "e112d61c-8770-4d12-b7c6-fdfd5135f497", | ✔️ |
Sample Payload
{
"name": "Official Store",
"about": "Shoes and Clothing",
"creatorId": "Zhd9XVCpn2WD6liAexICnxs3uj6Ks",
"phone": "200034616",
"whatsapp": "200034616",
"state": "Greater Accra Region",
"street": "spintex road, accra, ghana",
"categories": [
"e112d61c-8770-4d12-b7c6-fdfd5135f497",
"5af2f883-77c9-4c18-a1ab-b65875c6f635",
"81981b9a-3625-4186-b32a-387d4553244c",
"7ba33c48-7762-494c-81c6-62c1827809e9"
]
}Sample Response
{
"id": "8f6b92cb-fc5f-4941-ba5d-3b65473b0dc3",
"dateCreated": "2023-08-05T16:10:18.362849Z",
"dateUpdated": "2023-08-05T16:10:18.362849Z",
"about": "Shoes and Clothing",
"creatorId": "Zhd9XVCpn2WD6liAexICnxs3uj6Ks2",
"country": "Ghana",
"image": "/media/https%3A/wookein-storage.fra1.cdn.digitaloceanspaces.com/stores/default.png",
"name": "Official Store",
"phone": "200034616",
"state": "Greater Accra Region",
"street": "spintex road, accra, ghana",
"slug": "official-store-2530",
"website": "https://official-store-2530.wookein.com/",
"whatsapp": "200034616"
}* List Stores
Endpoint: GET
admin/storesRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ************* | Firebase access token | ✔️ |
Parameters
Not required
Sample Response
{
"count": 10,
"next": null,
"previous": null,
"results": [
{
"id": "8f6b92cb-fc5f-4941-ba5d-3b65473b0dc3",
"categories": [
{
"id": "a7486e97-955a-45fc-b716-a0dccf693093",
"storeId": "a3fb70cf-8a5c-4cca-af1c-fbe103728bf1",
"categoryId": "8b22665d-0dd1-4448-8e2b-2776234e0eb5"
},
{
"id": "d3255d02-e98d-4577-bf0b-23e36a00ea65",
"storeId": "a3fb70cf-8a5c-4cca-af1c-fbe103728bf1",
"categoryId": "fbad61aa-1917-4060-ae1f-d3eff7b62b69"
}
],
"dateCreated": "2023-08-05T16:10:18.362849Z",
"dateUpdated": "2023-08-05T16:10:18.362849Z",
"about": "Shoes and Clothing",
"creatorId": "Zhd9XVCpn2WD6liAexICnxs3uj6Ks2",
"country": "Ghana",
"image": "http://127.0.0.1:8000/media/https%3A/wookein-storage.fra1.cdn.digitaloceanspaces.com/stores/default.png",
"name": "Official Store",
"phone": "200034616",
"state": "Greater Accra Region",
"street": "spintex road, accra, ghana",
"slug": "official-store-2530",
"website": "https://official-store-2530.wookein.com/",
"whatsapp": "200034616"
},
]
}* List Stores ~ Return Name & Id Only
Endpoint: GET
admin/stores-name-idRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ************* | Firebase access token | ✔️ |
Parameters
Not required
Sample Response
{
"count": 10,
"next": null,
"previous": null,
"results": [
{
"name": "store 1",
"id": "1edcf7c9-bbf6-4ca1-8de2-d7f69104ab2b"
},
{
"name": "store 2",
"id": "717ebbad-e7ac-40f4-ba0d-fc576dd03bdf"
},
]
}* Update Store
Endpoint: PATCH | PUT
admin/store/pkRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ************* | Firebase access token | ✔️ |
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| pk | string | store id | ✔️ |
Sample Request
admin/store/135f1584-18a8-4e71-97db-d6292cce35dbSample 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
admin/store/delete/pkRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ************* | Firebase access token | ✔️ |
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| pk | string | store id | ✔️ |
Sample Request
admin/store/delete/135f1584-18a8-4e71-97db-d6292cce35dbSample Response
{
data="store deleted",
status=204 No Content
}
Wookein Docs