Create or update
You can use the create or update catalogs API to create the catalogs.
Request parameters
Name | Type | Required/Optional | Description |
---|---|---|---|
catalogs | BikCatalog[] | Required | List of catalogs |
BikCatalog Type
Name | Type | Description |
---|---|---|
id | string | Catalog ID |
name | string | Name of the catalog |
description | string | Catalog description |
image | string | Catalog image |
handle | string | Catalog handle |
isSmartCollection | boolean | Is the catalog is a smart collection or not |
isPrivate | boolean | Is the catalog is private |
isHidden | boolean | Is the catalog is hidden |
Request Information
Category | Value |
---|---|
Http request | POST |
URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-catalogs/createOrUpdate |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-catalogs/createOrUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"catalogs": [
{
"name": "Catalog 1",
"id": "453048500520",
"description": "Test catalog 1",
"url": "https://test.com"
}
]
}'
JSON response example:
{
"status": 200,
"success": true,
"data": {
"catalogs": [
{
"name": "Catalog 1",
"description": "Test catalog 1",
"id": "453048500520",
"url": "https://test.com"
}
]
}
}
Response parameters
Name | Type | Description |
---|---|---|
status | number | Response status |
success | boolean | Is successful response or not |
data | BikCatalogs | List of catalogs |
Errors
Error Code | Meaning |
---|---|
400 | Invalid payload -- Your request is invalid. |
401 | Unauthorized -- User is not authenticated. |
404 | Not Found -- The specified API could not be found. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
Error response example:
{
"status": 400,
"errors": [
{
"message": "'catalogs' is required."
}
]
}