curl --location --request PATCH 'https://api.qa.ordermesh.io/catalog/v1/merchantCatalog' \
--header 'Content-Type: application/json' \
--data '{
"id": "681abd18c61bccfab89bc63e",
"name": "Updated Catalog Name",
"description": "This is an updated description for the merchant catalog.",
"isEnabled": true,
"assignedToSubAccountIds": [
"7a2b1d33-c5ef-4a8b-9c7d-5e6f7a8b9c12",
"15115a31-c5ef-4a8b-9c7d-5e6f7a8b9c12",
"8b2b1d43-c5ef-4a8b-9c7d-5e6f7a8b9c12"
],
"variantsToAdd": [
{
"sku": "newSku123",
"merchantSku": "newMerchantSku123",
"merchantPrice": {
"currencies": [
{
"amount": 29.99,
"currency": "USD"
},
{
"amount": 27.99,
"currency": "EUR"
}
],
"amount": 29.99,
"currency": "USD"
},
"skipImageManipulation": null,
"productId": null,
"decorations": [
{
"area": "Front",
"width": 200,
"height": 300,
"dpi": 300,
"method": "DirectToGarment",
"price": {
"currencies": [
{
"amount": 12.99,
"currency": "USD"
},
{
"amount": 11.99,
"currency": "EUR"
}
],
"amount": 0,
"currency": null
},
"printImage": {
"sourcePrintFileUrl": "https://example.com/images/new-front-print.png",
"imageUploadStatus": null,
"imageUploadStatusDesc": null,
"ourPrintFileId": null,
"ourPrintFileUrl": null
}
}
],
"attributes": [
{
"name": "Color",
"value": "Red"
},
{
"name": "Size",
"value": "Large"
}
]
}
],
"variantsSkusToRemove": [
"skuToRemove123",
"skuToRemove456"
],
"variantsToUpdate": [
{
"sku": "existingSku123",
"merchantSku": "updatedMerchantSku123",
"merchantPrice": {
"currencies": [
{
"amount": 32.99,
"currency": "USD"
},
{
"amount": 30.99,
"currency": "EUR"
}
],
"amount": 32.99,
"currency": "USD"
},
"skipImageManipulation": null,
"productId": null,
"decorations": [
{
"area": "Back",
"width": 250,
"height": 350,
"dpi": 300,
"method": "Embroidery",
"price": {
"currencies": [
{
"amount": 15.99,
"currency": "USD"
}
],
"amount": 0,
"currency": null
},
"printImage": {
"sourcePrintFileUrl": "https://example.com/images/back-print-updated.png",
"imageUploadStatus": null,
"imageUploadStatusDesc": null,
"ourPrintFileId": null,
"ourPrintFileUrl": null
}
}
],
"attributes": [
{
"name": "Color",
"value": "Red"
},
{
"name": "Size",
"value": "Large"
}
]
}
]
}'{
"catalog": {
"id": "catalog123",
"ownerMerchantId": "merchant123",
"name": "Updated Catalog Name",
"description": "This is an updated description for the merchant catalog.",
"isEnabled": true,
"assignedToSubAccountIds": [
"subAccount1",
"subAccount2",
"subAccount3"
]
},
"variantsAdded": 2,
"variantsUpdated": 1,
"variantsRemoved": 3,
"errors": [
{
"errorMessage": "Catalog updated with error",
"propertyName": "VariantsToAdd",
"attemptedValue": [
"invalid-sku-1",
"invalid-sku-2"
]
}
]
}