This API returns the OSA details of the mapped products for a given brand and date.

Sample Response

{
    "success": true,
    "message": "",
    "errorCode": "",
    "result": {
        "data": [
            {
                "availableCount": 17,
                "sold": 1367,
                "codeType": "EAN",
                "merchant": "shopee",
                "availability": true,
                "brand": "anmum",
                "skuId": "B079ZC7KKN",
                "productImage": null,
                "title": "Anmum Essential Step 3 Plain (1.5kg)",
                "code": "6902395642602",
                "coc": false
            }
        ],
        "total": 1,
        "type": "osa",
        "date": "2021-05-02"
    }
}

Response Fields

Field

Description

Data Type

success

Indicates if API response is success or not.

bool

message

Response message. Typically populated in error scenarios.

string

errorCode

Error code.

string

codeType

Product code type.

string

merchant

Merchant name.

string

availability

Product availability.

bool

brand

Brand name.

string

skuId

Product id at merchant site.

string

availableCount

In-stock count (This field is available for some merchants only).

number

sold

Sold count (This field is available for some merchants only).

number

title

Title as seen at merchant site.

string

code

Product code.

string

coc

Core of the core.

bool

total

Total product count.

number

date

Date.

string

Exceptions and Error Conditions

The OSA API will look for matching data based on the filters applied. However, there are a few scenarios where the API may not be able to return a valid response. For example

  • Data request for a future date.
  • Data requested for invalid merchant/brand combination.
  • Invalid access token (API response status code 401).
  • Missing authentication token (API response status code 401).

In all the above scenarios, the OSA API would return with an error response.
Example:

{
  "success": false,
  "message": "You can not request for future date",
  "errorCode": "INVALID_DATE",
  "result": ""
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!