# [Alpha] Live Commerce APIs

# Project Catalog API

# Create Product Catalog

Method: POST
Path: /bifrost/api/live/projects/{projectId}/product-catalog
Description: Create a new product catalog, require client scope as below.

Client Scope:
- live.product.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Request Body:

Param Description Type Required
roomId Id of live-room String Y
externalProductId External id of product that does not generate from api String N
sku Sku of product String N
groupName Group of product String N
name Name of product String N
brandId BrandId of product String N
brandName Brand name of product String N
shopId ShopId of product String N
shopName Shop name to sell product String N
status status or product String N
categoryIds Id of category to specific product Arrays N
categoryNames Name of category to specific product Arrays N
tags Tags of product Arrays N
price Price of product Decimal N
sellPrice Price of product for sell customer Decimal N
order Number of order each product String N
detailLink Link of detail product String N
cartLink Link of cart for buying product String N
createdBy User that create product String N
lastModifiedBy User that modified product String N
thumbnailUrl URL of product thumbnail image String N

Request Body Example:

{
	    "groupName": "Mobile",
        "name": "Xiaomi 2",
        "brandId": "5ed0cd0ca83f75000160d7b011",
        "brandName": "Xiaomi",
        "shopId": "5ed0cd0ca83f75000160d7b022",
        "shopName": "cenlard",
        "status": "SALE",
        "categoryIds": [
            "5ed0cd0ca83f75000160d7b0111",
            "5ed0cd0ca83f75000160d7b0333"
        ],
        "categoryNames": [
            "Mobile",
            "Tel"
        ],
        "tags": [
            "xiaomi",
            "xiaomi 2"
        ], 
        "price": 6000,
        "sellPrice": 5000,
        "externalProductId": "1223b2",
        "sku": "",
        "roomId": "5f0bdf1e966e1300017205e411",
        "order": 1,
        "detailLink": "/detailLink/12333",
        "cartLink": "/cartLink/1233222"
}

Request Example:

curl -X POST \
--header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' -d '{ \ 
 	{ \
    	    "groupName": "Mobile", \
            "name": "Xiaomi 2", \
            "brandId": "5ed0cd0ca83f75000160d7b011", \
            "brandName": "Xiaomi", \
            "shopId": "5ed0cd0ca83f75000160d7b022", \
            "shopName": "cenlard", \
            "status": "SALE", \
            "categoryIds": [ \
                "5ed0cd0ca83f75000160d7b0111", \
                "5ed0cd0ca83f75000160d7b0333" \
            ], \
            "categoryNames": [ \
                "Mobile", \
                "Tel" \
            ], \
            "tags": [ \
                "xiaomi", \
                "xiaomi 2" \
            ], \        
            "price": 6000, \
            "sellPrice": 5000, \
            "externalProductId": "1223b2", \
            "sku": "", \
            "roomId": "5f0bdf1e966e1300017205e411", \
            "order": 1, \
            "detailLink": "/detailLink/12333", \
            "cartLink": "/cartLink/1233222" \
    }
 }' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/product-catalog'

Response Example:

HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "id": "5f0ed23ae2da470001b776e9",
    "createdDate": "2020-07-15T09:54:02.646Z",
    "lastModifiedDate": "2020-07-15T09:54:02.646Z",
    "brandName": "Xiaomi",
    "shopName": "cenlard",
    "sellPrice": 5000,
    "roomId": "5f0bdf1e966e1300017205e411",
    "tags": [
        "xiaomi",
        "xiaomi 2"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "groupName": "Mobile",
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "createdBy": "66897977620",
    "price": 6000,
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "name": "Xiaomi 2",
    "cartLink": "/cartLink/1233222",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "externalProductId": "1223b2",
    "sku": "",
    "detailLink": "/detailLink/12333",
    "status": "SALE",
    "order": 1
}

# Update Product Catalog

Method: PUT
Path: /bifrost/api/live/projects/{projectId}/product-catalog/{Id}
Description: Update a existing product catalog, require client scope as below.

Client Scope:
- live.product.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Request Body:

Param Description Type Required
roomId Id of live-room String Y
externalProductId External id of product that does not generate from api String N
sku Sku of product String N
groupName Group of product String N
name Name of product String N
brandId BrandId of product String N
brandName Brand name of product String N
shopId ShopId of product String N
shopName Shop name to sell product String N
status status or product String N
categoryIds Id of category to specific product Arrays N
categoryNames Name of category to specific product Arrays N
tags Tags of product Arrays N
price Price of product Decimal N
sellPrice Price of product for sell customer Decimal N
order Number of order each product String N
detailLink Link of detail product String N
cartLink Link of cart for buying product String N
createdBy User that create product String N
lastModifiedBy User that modified product String N
thumbnailUrl URL of product thumbnail image String N

Existing Data Example:

{
	    "groupName": "Mobile",
        "name": "Xiaomi 2",
        "brandId": "5ed0cd0ca83f75000160d7b011",
        "brandName": "Xiaomi",
        "shopId": "5ed0cd0ca83f75000160d7b022",
        "shopName": "cenlard",
        "status": "SALE",
        "categoryIds": [
            "5ed0cd0ca83f75000160d7b0111",
            "5ed0cd0ca83f75000160d7b0333"
        ],
        "categoryNames": [
            "Mobile",
            "Tel"
        ],
        "tags": [
            "xiaomi",
            "xiaomi 2"
        ], 
        "price": 7000,
        "sellPrice": 5000,
        "externalProductId": "1223b2",
        "sku": "",
        "roomId": "5f0bdf1e966e1300017205e411",
        "order": 1,
        "detailLink": "/detailLink/12333",
        "cartLink": "/cartLink/1233222"
}

Request Example:

curl -X PUT \
--header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' -d '{ \ 
 	{ \
    	    "groupName": "Mobile", \
            "name": "Xiaomi Nova 2", \
            "brandId": "5ed0cd0ca83f75000160d7b011", \
            "brandName": "Xiaomi", \
            "shopId": "5ed0cd0ca83f75000160d7b022", \
            "shopName": "cenlard", \
            "status": "SALE", \
            "categoryIds": [ \
                "5ed0cd0ca83f75000160d7b0111", \
                "5ed0cd0ca83f75000160d7b0333" \
            ], \
            "categoryNames": [ \
                "Mobile", \
                "Tel" \
            ], \
            "tags": [ \
                "xiaomi", \
                "xiaomi Nova" \
            ], \        
            "price": 10000, \
            "sellPrice": 8000, \
            "externalProductId": "1223b2", \
            "sku": "", \
            "roomId": "5f0bdf1e966e1300017205e411", \
            "order": 1, \
            "detailLink": "/detailLink/12333", \
            "cartLink": "/cartLink/1233222" \
    }
 }' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/product-catalog/5f0ed23ae2da470001b776e9'

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": "5f0ed23ae2da470001b776e9",
    "createdDate": "2020-07-15T09:54:02.646Z",
    "lastModifiedDate": "2020-07-15T09:54:02.646Z",
    "brandName": "Xiaomi",
    "shopName": "cenlard",
    "sellPrice": 8000,
    "roomId": "5f0bdf1e966e1300017205e411",
    "tags": [
        "xiaomi",
        "xiaomi Nova"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "groupName": "Mobile",
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "createdBy": "66897977620",
    "price": 10000,
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "name": "Xiaomi Nova 2",
    "cartLink": "/cartLink/1233222",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "externalProductId": "1223b2",
    "sku": "",
    "detailLink": "/detailLink/12333",
    "status": "SALE",
    "order": 1
}

# Get Product Catalog

Method: GET
Path: /bifrost/api/live/projects/{projectId}/product-catalog/{Id}
Description: Get product catalog by id, require client scope as below.

Client Scope:
- live.product.r

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Request Example:

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/product-catalog/5f0ed23ae2da470001b776e9'

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": "5f0ed23ae2da470001b776e9",
    "createdDate": "2020-07-15T09:54:02.646Z",
    "lastModifiedDate": "2020-07-15T09:54:02.646Z",
    "brandName": "Xiaomi",
    "shopName": "cenlard",
    "sellPrice": 8000,
    "roomId": "5f0bdf1e966e1300017205e411",
    "tags": [
        "xiaomi",
        "xiaomi Nova"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "groupName": "Mobile",
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "createdBy": "66897977620",
    "price": 10000,
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "name": "Xiaomi Nova 2",
    "cartLink": "/cartLink/1233222",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "externalProductId": "1223b2",
    "sku": "",
    "detailLink": "/detailLink/12333",
    "status": "SALE",
    "order": 1
}

# Search Product Catalog

Method: GET
Path: /bifrost/api/live/projects/{projectId}/product-catalog
Description: List all brands or get brand by criteria.

Client Scope:
- live.product.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Parameter:

Key Description Required Example
<attribute_name> search by attribute name and value N categoryNames=Bag
page The requested page number to display N page=0
size The page size of the result in response body N size=10
sort Sorting criteria. Default sort order is ascending. Multiple sort criteria are supported. N sort=id,desc
createdDate.<operator_name>. search by createdDate that support operator 'greaterThan', 'greaterOrEqualThan', 'lessThan' and 'lessOrEqualThan' N createdDate.greaterThan='2020-04-16T02:15:11.455Z'
lastModifiedDate.<operator_name> search by lastModifiedDate that support operator 'greaterThan', 'greaterOrEqualThan', 'lessThan' and 'lessOrEqualThan' N lastModifiedDate.greaterOrEqualThan='2020-04-16T02:15:11.455Z'

Attribute:

Param Description Type
roomId Id of live-room String
externalProductId External id of product that does not generate from api String
sku Sku of product String
groupName Group of product String
name Name of product String
brandId BrandId of product String
brandName Brand name of product String
shopId ShopId of product String
shopName Shop name to sell product String
status status or product String
categoryIds Id of category to specific product Arrays
categoryNames Name of category to specific product Arrays
tags Tags of product Arrays
price Price of product Decimal
sellPrice Price of product for sell customer Decimal
order Number of order each product String
detailLink Link of detail product String
cartLink Link of cart for buying product String
createdBy User that create product String
lastModifiedBy User that modified product String
thumbnailUrl URL of product thumbnail image String

Operator_Name:

Operator Description Required Example
greaterThan search date type that can search greater than date in value N createdDate.greaterThan='2020-04-16T02:15:11.455Z'
greaterOrEqualThan search date type that can search greater or equal than date in value N createdDate.greaterOrEqualsThan='2020-04-16T02:15:11.455Z'
lessThan search date type that can search less or equal than date in value N lastModifiedDate.lessThan='2020-04-16T02:15:11.455Z'
lessThanOrEqualThan search date type that can search less or equal than date in value N lastModifiedDate.lessOrEquallThan='2020-04-16T02:15:11.455Z'

Request Example:

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/product-catalog?sort=sellPrice,desc \

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json
{
     [
         {
             "id": "5f0ed23ae2da470001b776e9", 
             "createdDate": "2020-07-15T09:54:02.646Z",
             "lastModifiedDate": "2020-07-15T09:54:02.646Z",
             "brandName": "Xiaomi",
             "shopName": "cenlard",
             "sellPrice": 8000,
             "roomId": "5f0bdf1e966e1300017205e411",
             "tags": [
                 "xiaomi",
                 "xiaomi Nova"
             ],
             "categoryNames": [
                 "Mobile",
                 "Tel"
             ],
             "groupName": "Mobile",
             "categoryIds": [
                 "5ed0cd0ca83f75000160d7b0111",
                 "5ed0cd0ca83f75000160d7b0333"
             ],
             "createdBy": "66897977620",
             "price": 10000,
             "brandId": "5ed0cd0ca83f75000160d7b011",
             "name": "Xiaomi Nova 2",
             "cartLink": "/cartLink/1233222",
             "shopId": "5ed0cd0ca83f75000160d7b022",
             "externalProductId": "1223b2",
             "sku": "",
             "detailLink": "/detailLink/12333",
             "status": "SALE",
             "order": 1
         },
         {
            "id": "5f0ecdd8e2da470001b776e5",
            "createdDate": "2020-07-15T09:35:20.713Z",
            "lastModifiedDate": "2020-07-15T09:35:20.713Z",
            "brandName": "Xiaomi",
            "lastModifiedBy": "",
            "shopName": "cenlard",
            "sellPrice": 5000,
            "roomId": "5f0bdf1e966e1300017205e411",
            "tags": [
                "xiaomi",
                "xiaomi 2"
            ],
            "categoryNames": [
                "Mobile",
                "Tel"
            ],
            "groupName": "Mobile",
            "categoryIds": [
                "5ed0cd0ca83f75000160d7b0111",
                "5ed0cd0ca83f75000160d7b0333"
            ],
            "createdBy": "fame",
            "price": 6000,
            "brandId": "5ed0cd0ca83f75000160d7b011",
            "name": "Xiaomi 2",
            "cartLink": "/cartLink/1233222",
            "shopId": "5ed0cd0ca83f75000160d7b022",
            "externalProductId": "1223b2",
            "sku": "",
            "detailLink": "/detailLink/12333",
            "status": "SALE",
            "order": 1
         }
     ]
}

# Delete Product Catalog

Method: DELETE
Path: /bifrost/api/live/projects/{projectId}/product-catalog/{Id}
Description: Delete product catalog by id, require client scope as below.

Client Scope:
- live.product.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Request Example:

curl -X DELETE --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/product-catalog/5f0ed23ae2da470001b776e9'

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json

# Room Management API

# Create Room

Method: POST
Path: /bifrost/api/live/projects/{projectId}/rooms
Description: Create a new room, require client scope as below.

Client Scope:
- live.room.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Request Body:

Field Description Type Required Default
title Room title String N Untitled
brandId Brand reference String N
brandName Brand name String N
shopId Shop reference String N
shopName Shop name String N
numOfView Number of views Integer N
status Status String N UNPUBLISHED
categoryIds List of category references Arrays N
categoryNames List of category names Arrays N
tags List of tags Arrays N
streamUrl Live stream URL String N
streamKey Key to access live stream String N
streamId Live stream reference String N
streamType Type of live stream String N
thumbnailUrl URL of video cover String N
brandLogoUrl URL of the brand's logo String N

Remark:
The status of room can be set as below:

  • LIVE_NOW
  • UNPUBLISHED
  • SCHEDULED_UNPUBLISHED
  • SCHEDULED_LIVE
  • SCHEDULED
  • SCHEDULED_CANCELED

Request Example:

curl -X POST \
--header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' -d '{ \ 
     \
    "title": "Xiami Happy Day", \
    "streamId": "10159314566364625", \
    "streamUrl":"rtmps://live-api-s.facebook.com:443/rtmp/10159314566364625", \
    "streamType": "facebook", \
    "streamKey": "FA00077888111", \
    "thumbnailUrl":"https://webview.weomni.com/live/resource/10159314566364625.svg", \
    "brandId": "5ed0cd0ca83f75000160d7b011", \
    "brandName": "Xiaomi", \
    "shopId": "5ed0cd0ca83f75000160d7b022", \
    "shopName": "cenlard", \
    "categoryIds": [ \
        "5ed0cd0ca83f75000160d7b0111", \
        "5ed0cd0ca83f75000160d7b0333" \
    ], \
    "categoryNames": [ \
        "Mobile", \
        "Tel" \
    ], \
    "tags": [ \
        "xiaomi", \
        "mobile phone" \
    ] \
 }' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/rooms'

Response Example:

HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "id": "5f112345b016240001035670",
    "title": "Xiami Happy Day",
    "streamId": "10159314566364625",
    "streamUrl":"rtmps://live-api-s.facebook.com:443/rtmp/10159314566364625",
    "streamType": "facebook",
    "streamKey": "FA00077888111",
    "thumbnailUrl":"https://webview.weomni.com/live/resource/10159314566364625.svg",
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "brandName": "Xiaomi",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "shopName": "cenlard",
    "status": "UNPUBLISHED"
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "tags": [
        "xiaomi",
        "mobile phone"
    ]
}

# Update Room

Method: PUT
Path: /bifrost/api/live/projects/{projectId}/rooms/{Id}
Description: Update a room by ID, require client scope as below.

Client Scope:
- live.room.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}
Content-Type The MIME type of this content Y application/json

Request Body:

Field Description Type Required
id Reference of the room String Y
title Room title String Y
brandId Brand reference String N
brandName Brand name String N
shopId Shop reference String N
shopName Shop name String N
numOfView Number of views Integer N
status Status String Y
categoryIds List of category references Arrays N
categoryNames List of category names Arrays N
tags List of tags Arrays N
streamUrl Live stream URL String N
streamKey Key to access live stream String N
streamId Live stream reference String N
streamType Type of live stream String N
thumbnailUrl URL of video cover String N
brandLogoUrl URL of the brand's logo String N
createdBy User/Client who created the room String N

Request Example:

curl -X PUT \
--header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' -d '{ \ 
    "id": "5f112345b016240001035670", \
    "title": "Xiami Happy Day", \
    "streamId": "10159314566364625", \
    "streamUrl":"rtmps://live-api-s.facebook.com:443/rtmp/10159314566364625", \
    "streamType": "facebook", \
    "streamKey": "FA00077888111", \
    "thumbnailUrl":"https://webview.weomni.com/live/resource/10159314566364625.svg", \
    "brandId": "5ed0cd0ca83f75000160d7b011", \
    "brandName": "Xiaomi", \
    "shopId": "5ed0cd0ca83f75000160d7b022", \
    "shopName": "cenlard", \
    "status": "LIVE_NOW", \
    "categoryIds": [ \
        "5ed0cd0ca83f75000160d7b0111", \
        "5ed0cd0ca83f75000160d7b0333" \
    ], \
    "categoryNames": [ \
        "Mobile", \
        "Tel" \
    ], \
    "tags": [ \
        "xiaomi", \
        "mobile phone" \
    ] \
 }' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/rooms/5f112345b016240001035670'

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": "5f112345b016240001035670",
    "title": "Xiami Happy Day",
    "streamId": "10159314566364625",
    "streamUrl":"rtmps://live-api-s.facebook.com:443/rtmp/10159314566364625",
    "streamType": "facebook",
    "streamKey": "FA00077888111",
    "thumbnailUrl":"https://webview.weomni.com/live/resource/10159314566364625.svg",
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "brandName": "Xiaomi",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "shopName": "cenlard",
    "status": "LIVE_NOW", \
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "tags": [
        "xiaomi",
        "mobile phone"
    ],
    "createdBy": "userA",
    "createdDate": "2020-07-15T09:54:02.646Z",
    "lastModifiedBy":"userA",
    "lastModifiedDate": "2020-07-15T09:54:02.646Z"
}

# Get Room

Method: GET
Path: /bifrost/api/live/projects/{projectId}/rooms/{id}
Description: Get details of a room, require client scope as below.

Client Scope:
- live.room.r

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}

Request Parameters:

Param Description Type Required
id Reference of the room String Y

Request Example:

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/rooms/5f112345b016240001035670' \

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": "5f112345b016240001035670",
    "title": "Xiami Happy Day",
    "streamId": "10159314566364625",
    "streamUrl":"rtmps://live-api-s.facebook.com:443/rtmp/10159314566364625",
    "streamType": "facebook",
    "streamKey": "FA00077888111",
    "thumbnailUrl":"https://webview.weomni.com/live/resource/10159314566364625.svg",
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "brandName": "Xiaomi",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "shopName": "cenlard",
    "status": "LIVE_NOW", \
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "tags": [
        "xiaomi",
        "mobile phone"
    ],
    "createdBy": "userA",
    "createdDate": "2020-07-15T09:54:02.646Z",
    "lastModifiedBy":"userA",
    "lastModifiedDate": "2020-07-15T09:54:02.646Z"
}

# Search Rooms

Method: GET
Path: /bifrost/api/live/projects/{projectId}/rooms
Description: Search rooms, require client scope as below.

Client Scope:
- live.room.r

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}

Request Parameters:

Param Description Type Required
id Reference of the room String N
title Room title String N
brandId Brand reference String N
brandName Brand name String N
shopId Shop reference String N
shopName Shop name String N
numOfView Number of views Integer N
status Status String N
categoryIds List of category references Arrays N
categoryNames List of category names Arrays N
tags List of tags Arrays N
streamUrl Live stream URL String N
streamKey Key to access live stream String N
streamId Live stream reference String N
streamType Type of live stream String N
thumbnailUrl URL of video cover String N
brandLogoUrl URL of the brand's logo String N
createdBy User/Client who created the room String N
createdDate Date time the room created String N
lastModifiedBy User/Client who last modified the room String N
lastModifiedDate Date time the room last modified String N

Request Example:

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/rooms?tags=mobile phone' \

Response Example:

HTTP/1.1 200 OK
Content-Type: application/json
[ 
  {
    "id": "5f112345b016240001035670",
    "title": "Xiami Happy Day",
    "streamId": "10159314566364625",
    "streamUrl":"rtmps://live-api-s.facebook.com:443/rtmp/10159314566364625",
    "streamType": "facebook",
    "streamKey": "FA00077888111",
    "thumbnailUrl":"https://webview.weomni.com/live/resource/10159314566364625.svg",
    "brandId": "5ed0cd0ca83f75000160d7b011",
    "brandName": "Xiaomi",
    "shopId": "5ed0cd0ca83f75000160d7b022",
    "shopName": "cenlard",
    "status": "LIVE_NOW", \
    "categoryIds": [
        "5ed0cd0ca83f75000160d7b0111",
        "5ed0cd0ca83f75000160d7b0333"
    ],
    "categoryNames": [
        "Mobile",
        "Tel"
    ],
    "tags": [
        "xiaomi",
        "mobile phone"
    ],
    "createdBy": "userA",
    "createdDate": "2020-07-15T09:54:02.646Z",
    "lastModifiedBy":"userA",
    "lastModifiedDate": "2020-07-15T09:54:02.646Z"
  }
]

# Delete Room

Method: DELETE
Path: /bifrost/api/live/projects/{projectId}/rooms/{id}
Description: Delete a room by ID, require client scope as below.

Client Scope:
- live.room.w

Authority: -

Request Header:

Param Description Required Example
Authorization The OAuth2 authentication with the O2O System Y Bearer {O2O Access Token}

Request Parameters:

Param Description Type Required
id Reference of the room String Y

Request Example:

curl -X DELETE --header 'Accept: application/json' --header 'Authorization: Bearer {O2O Access Token}' 'https://dev-platform.weomni-test.com/bifrost/api/live/projects/5ed0cd0ca83f75000160d7b0/rooms/5f112345b016240001035670'

Response Example:

HTTP/1.1 200 OK
Last Updated: 8/25/2020, 7:35:21 AM