- Introduction
- Authentication
- Errors
- Change Logs
- Promotion
- Loyalty
- Wallet
- PIM
- Get ProductsPOST
- Get Product SettingsGET
- Get Catalog SettingsGET
- Upsert ProductPOST
- Upsert CategoryPOST
- Bulk Product UpsertPOST
- Check Batch StatusPOST
- Delete ProductPOST
- Attach Product Attribute ImagePOST
- Attach Category ImagePOST
- Get ImageGET
- Upsert AttributesPOST
- Delete AttributePOST
- Upsert Attribute OptionsPOST
- Upsert Attribute OptionPOST
- Delete Attribute OptionPOST
- Merchant
- How to
Upsert Category
Production
Production
POST
https://api.b2b.retter.io/5p1hp1d2t/CALL/PIMAPI/upsertCategory/{PROJECT_ID}
PIM
Last modified:2025-04-08 11:33:06
Request
Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
PROJECT_ID
string
required
Body Params application/json
category
object
required
code
string
required
image
string
required
label
array [object {2}]
required
description
array [object {2}]
required
subCategories
array [object {4}]
required
Example
{
"category": {
"code": "masterCatalog",
"image": "https://picsum.photos/200/300",
"label": [
{
"value": "Main Menü",
"locale": "en_US"
},
{
"value": "Ana Menü",
"locale": "tr_TR"
}
],
"description": [
{
"locale": "en_US",
"value": "All Cloths"
},
{
"locale": "tr_TR",
"value": "Tüm Menü"
}
],
"subCategories": [
{
"code": "clothing",
"label": [
{
"locale": "en_US",
"value": "Clothing"
},
{
"locale": "tr_TR",
"value": "Giyim"
}
],
"subCategories": [
{
"code": "001",
"image": "https://picsum.photos/200/300",
"label": [
{
"locale": "en_US",
"value": "Sweaters"
},
{
"value": "Sweatshirt",
"locale": "tr_TR"
}
]
},
{
"code": "0011",
"image": "https://picsum.photos/200/300",
"label": [
{
"value": "Long Sleeve Sweats",
"locale": "en_US"
},
{
"value": "Uzun Kollu Sweatshirts",
"locale": "tr_TR"
}
]
},
{
"code": "002",
"image": "https://picsum.photos/200/300",
"label": [
{
"locale": "en_US",
"value": "Pants"
},
{
"value": "Pantolon",
"locale": "tr_TR"
}
],
"description": [
{
"locale": "en_US",
"value": "Pants"
},
{
"value": "Pantalonlar",
"locale": "tr_TR"
}
]
},
{
"code": "tshirts",
"image": "https://picsum.photos/200/300",
"label": [
{
"locale": "en_US",
"value": "T-shirts"
}
]
},
{
"code": "shoes",
"label": [
{
"locale": "en_US",
"value": "Shoes"
},
{
"locale": "tr_TR",
"value": "Ayakkabılar"
}
],
"subCategories": [
{
"code": "sportshoes",
"label": [
{
"value": "Sport Shoes",
"locale": "en_US"
},
{
"value": "Spor Ayakkabılar",
"locale": "tr_TR"
}
],
"subCategories": [
{
"code": "running",
"label": [
{
"locale": "en_US",
"value": "Running Shoes"
},
{
"locale": "tr_TR",
"value": "Koşu Ayakkabıları"
}
]
}
]
}
]
}
]
}
]
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.b2b.retter.io/5p1hp1d2t/CALL/PIMAPI/upsertCategory/' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"category": {
"code": "masterCatalog",
"image": "https://picsum.photos/200/300",
"label": [
{
"value": "Main Menü",
"locale": "en_US"
},
{
"value": "Ana Menü",
"locale": "tr_TR"
}
],
"description": [
{
"locale": "en_US",
"value": "All Cloths"
},
{
"locale": "tr_TR",
"value": "Tüm Menü"
}
],
"subCategories": [
{
"code": "clothing",
"label": [
{
"locale": "en_US",
"value": "Clothing"
},
{
"locale": "tr_TR",
"value": "Giyim"
}
],
"subCategories": [
{
"code": "001",
"image": "https://picsum.photos/200/300",
"label": [
{
"locale": "en_US",
"value": "Sweaters"
},
{
"value": "Sweatshirt",
"locale": "tr_TR"
}
]
},
{
"code": "0011",
"image": "https://picsum.photos/200/300",
"label": [
{
"value": "Long Sleeve Sweats",
"locale": "en_US"
},
{
"value": "Uzun Kollu Sweatshirts",
"locale": "tr_TR"
}
]
},
{
"code": "002",
"image": "https://picsum.photos/200/300",
"label": [
{
"locale": "en_US",
"value": "Pants"
},
{
"value": "Pantolon",
"locale": "tr_TR"
}
],
"description": [
{
"locale": "en_US",
"value": "Pants"
},
{
"value": "Pantalonlar",
"locale": "tr_TR"
}
]
},
{
"code": "tshirts",
"image": "https://picsum.photos/200/300",
"label": [
{
"locale": "en_US",
"value": "T-shirts"
}
]
},
{
"code": "shoes",
"label": [
{
"locale": "en_US",
"value": "Shoes"
},
{
"locale": "tr_TR",
"value": "Ayakkabılar"
}
],
"subCategories": [
{
"code": "sportshoes",
"label": [
{
"value": "Sport Shoes",
"locale": "en_US"
},
{
"value": "Spor Ayakkabılar",
"locale": "tr_TR"
}
],
"subCategories": [
{
"code": "running",
"label": [
{
"locale": "en_US",
"value": "Running Shoes"
},
{
"locale": "tr_TR",
"value": "Koşu Ayakkabıları"
}
]
}
]
}
]
}
]
}
]
}
}'
Responses
🟢200OK
application/json
Body
meta
object
optional
updateToken
string
optional
Example
{
"meta": {
"updateToken": "string"
}
}
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
Modified at 2025-04-08 11:33:06