- 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 Product
Production
Production
POST
https://api.b2b.retter.io/5p1hp1d2t/CALL/PIMAPI/upsertProduct/{PROJECT_ID}
PIM
Last modified:2025-01-31 14:05:41
Request
Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
PROJECT_ID
string
required
Body Params application/json
dataType
string
required
parent
string
optional
data
object
required
code
string
optional
sku
string
required
family
string
required
enabled
boolean
optional
status
required
When products are in the "DRAFT" state and are updated, webhooks are not triggered. Changes in products that are in the "ACTIVE" state trigger webhooks. Even though changes in the "ARCHIVED" state trigger the webhook, modifications within the product itself do not trigger the webhook.
Allowed values:
DRAFTACTIVEARCHIVED
groups
array[string]
optional
categories
array[string]
optional
attributes
array [object {2}]
optional
axesValues
array [object {2}]
optional
axe
string
optional
value
string
optional
bundles
array[string]
optional
products
array [object {2}]
optional
sku
string
required
quantity
number
required
>= 1
translateWithAI
boolean
optional
For the translation process to be successfully completed, the default locale field must be filled, while the target languages should be left empty.
Example
{
"dataType": "PRODUCT",
"data": {
"code": "code",
"sku": "123456",
"family": "testfamily",
"status": "DRAFT",
"groups": [
"happy"
],
"categories": [
"drinks"
],
"attributes": [
{
"code": "name",
"data": [
{
"scope": "eCommerce",
"locale": "tr_TR",
"value": "awesome"
}
]
}
]
},
"axesValues": [
{
"axe": "color",
"value": "RED"
}
]
}
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/upsertProduct/' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"dataType": "PRODUCT",
"data": {
"code": "code",
"sku": "123456",
"family": "testfamily",
"status": "DRAFT",
"groups": [
"happy"
],
"categories": [
"drinks"
],
"attributes": [
{
"code": "name",
"data": [
{
"scope": "eCommerce",
"locale": "tr_TR",
"value": "awesome"
}
]
}
]
},
"axesValues": [
{
"axe": "color",
"value": "RED"
}
]
}'
Responses
🟢200OK
application/json
Body
meta
object
optional
createdAt
string
optional
updatedAt
string
optional
updateToken
string
optional
Example
{
"meta": {
"createdAt": "string",
"updatedAt": "string",
"updateToken": "string"
}
}
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
Modified at 2025-01-31 14:05:41