# Sync Products and Variants Creates or updates products and their variants based on the externalId of the product. When the product can be found it will be updated, otherwise a new product will be created. Newly created products must be reviewed manually in C-SAR. Once a variant was created it is immutable. Products can be created without variants, but variants cannot be 'null'. Products and variants will not be deleted with this request. It is possible to delete products and variants in C-SAR. Be aware that you can only submit 50 products at a time. Endpoint: POST /mrp.product.syncProducts Security: oauth2 ## Request fields (application/json): - `data` (array) Defines the data required for the operation, including all mandatory and optional fields. - `data.externalId` (string, required) Represents the unique identifier of the imported product in an external system (e.g. ERP) Example: "PRC-PROD-101" - `data.name` (string, required) The name of the product. Example: "Ethiopia Natural" - `data.variants` (array, required) List of variants of the imported product, can be empty but not null - `data.variants.sku` (string, required) Unique identifier of the variant. Example: "ETH-250G-WB" - `data.variants.coffeeOptions` (object, required) Options specific for Coffee products. - `data.variants.coffeeOptions.packageSize` (string, required) The size of the package to be produced. Enum: "PACKAGE0G", "PACKAGE1G", "PACKAGE5G", "PACKAGE6G", "PACKAGE10G", "PACKAGE12G", "PACKAGE13_2G", "PACKAGE14_2G", "PACKAGE15G", "PACKAGE20G", "PACKAGE30G", "PACKAGE40G", "PACKAGE50G", "PACKAGE60G", "PACKAGE65G", "PACKAGE70G", "PACKAGE71G", "PACKAGE80G", "PACKAGE85G", "PACKAGE90G", "PACKAGE95G", "PACKAGE96G", "PACKAGE100G", "PACKAGE105G", "PACKAGE110G", "PACKAGE120G", "PACKAGE121G", "PACKAGE125G", "PACKAGE140G", "PACKAGE142G", "PACKAGE150G", "PACKAGE156_25G", "PACKAGE164G", "PACKAGE170G", "PACKAGE175G", "PACKAGE180G", "PACKAGE200G", "PACKAGE225G", "PACKAGE227G", "PACKAGE230G", "PACKAGE250G", "PACKAGE265G", "PACKAGE285G", "PACKAGE300G", "PACKAGE310G", "PACKAGE312_5G", "PACKAGE333G", "PACKAGE340G", "PACKAGE350G", "PACKAGE380G", "PACKAGE400G", "PACKAGE450G", "PACKAGE454G", "PACKAGE500G", "PACKAGE600G", "PACKAGE750G", "PACKAGE676G", "PACKAGE900G", "PACKAGE950G", "PACKAGE1KG", "PACKAGE1_2KG", "PACKAGE1_25KG", "PACKAGE1_5KG", "PACKAGE2KG", "PACKAGE2_27KG", "PACKAGE2_5KG", "PACKAGE2_72KG", "PACKAGE2_8KG", "PACKAGE3KG", "PACKAGE3_5KG", "PACKAGE3_6KG", "PACKAGE4KG", "PACKAGE5KG", "PACKAGE5_6KG", "PACKAGE6KG", "PACKAGE7KG", "PACKAGE8KG", "PACKAGE9KG", "PACKAGE10KG", "PACKAGE12KG", "PACKAGE14KG", "PACKAGE15KG", "PACKAGE30KG", "PACKAGE35KG", "PACKAGE50KG", "PACKAGE69KG", "PACKAGE70KG", "PACKAGE920KG", "PACKAGE0_5LBS", "PACKAGE1LBS", "PACKAGE1_1LBS", "PACKAGE1_5LBS", "PACKAGE1_75LBS", "PACKAGE2LBS", "PACKAGE2_5LBS", "PACKAGE3LBS", "PACKAGE3_5LBS", "PACKAGE3_75LBS", "PACKAGE3_85LBS", "PACKAGE4LBS", "PACKAGE4_5LBS", "PACKAGE5LBS", "PACKAGE6LBS", "PACKAGE7LBS", "PACKAGE7_5LBS", "PACKAGE8_5LBS", "PACKAGE9LBS", "PACKAGE10LBS", "PACKAGE11LBS", "PACKAGE12LBS", "PACKAGE12_5LBS", "PACKAGE15LBS", "PACKAGE16LBS", "PACKAGE20LBS", "PACKAGE22_5LBS", "PACKAGE24LBS", "PACKAGE25LBS", "PACKAGE30LBS", "PACKAGE40LBS", "PACKAGE50LBS", "PACKAGE125LBS", "PACKAGE800LBS", "PACKAGE1OZ", "PACKAGE2OZ", "PACKAGE2_5OZ", "PACKAGE3OZ", "PACKAGE4OZ", "PACKAGE5OZ", "PACKAGE6OZ", "PACKAGE7OZ", "PACKAGE8OZ", "PACKAGE9OZ", "PACKAGE10OZ", "PACKAGE10_5OZ", "PACKAGE10_9OZ", "PACKAGE11OZ", "PACKAGE12OZ", "PACKAGE12_07OZ", "PACKAGE14OZ", "PACKAGE16OZ", "PACKAGE18OZ", "PACKAGE22OZ", "PACKAGE24OZ", "PACKAGE35OZ", "PACKAGE36OZ", "PACKAGE45OZ", "PACKAGE48OZ", "PACKAGE72OZ", "PACKAGE90OZ", "PACKAGE120OZ", "PACKAGE144OZ", "PACKAGE6912OZ" - `data.variants.coffeeOptions.grindStyle` (string, required) The grind style of the coffee. Example: "Whole Bean" ## Response 200 fields (application/json): - `ok` (boolean) Indicates whether the request was successful. Example: true - `result` (object) Contains the response data of a successful request. - `result.syncedProducts` (array) - `result.syncedProducts.id` (string) The unique identifier of the product. Example: "550e8400-e29b-41d4-a716-446655440000" - `result.syncedProducts.externalId` (string) Represents the unique identifier of the imported product in an external system (e.g. ERP) Example: "PRC-PROD-101" - `result.syncedProducts.name` (string) The name of the product. Example: "Ethiopia Natural" - `result.syncedProducts.reviewState` (string) Indicates if actions in C-SAR are required - unreviewed products cannot be processed in C-SAR. Enum: "REVIEWED", "UNREVIEWED" - `result.syncedProducts.variants` (array) List of all available variants of the product. - `result.syncedProducts.variants.sku` (string) Unique identifier of the variant. Example: "EN-250G-WB" - `result.syncedProducts.variants.reviewState` (string) Indicates if actions in C-SAR are required because at least one more option value is missing. Enum: "REVIEWED", "UNREVIEWED" - `result.syncedProducts.variants.coffeeOptions` (object) Options specific for Coffee products. - `result.syncedProducts.variants.coffeeOptions.packageSize` (string, required) The size of the package to be produced. Enum: "PACKAGE0G", "PACKAGE1G", "PACKAGE5G", "PACKAGE6G", "PACKAGE10G", "PACKAGE12G", "PACKAGE13_2G", "PACKAGE14_2G", "PACKAGE15G", "PACKAGE20G", "PACKAGE30G", "PACKAGE40G", "PACKAGE50G", "PACKAGE60G", "PACKAGE65G", "PACKAGE70G", "PACKAGE71G", "PACKAGE80G", "PACKAGE85G", "PACKAGE90G", "PACKAGE95G", "PACKAGE96G", "PACKAGE100G", "PACKAGE105G", "PACKAGE110G", "PACKAGE120G", "PACKAGE121G", "PACKAGE125G", "PACKAGE140G", "PACKAGE142G", "PACKAGE150G", "PACKAGE156_25G", "PACKAGE164G", "PACKAGE170G", "PACKAGE175G", "PACKAGE180G", "PACKAGE200G", "PACKAGE225G", "PACKAGE227G", "PACKAGE230G", "PACKAGE250G", "PACKAGE265G", "PACKAGE285G", "PACKAGE300G", "PACKAGE310G", "PACKAGE312_5G", "PACKAGE333G", "PACKAGE340G", "PACKAGE350G", "PACKAGE380G", "PACKAGE400G", "PACKAGE450G", "PACKAGE454G", "PACKAGE500G", "PACKAGE600G", "PACKAGE750G", "PACKAGE676G", "PACKAGE900G", "PACKAGE950G", "PACKAGE1KG", "PACKAGE1_2KG", "PACKAGE1_25KG", "PACKAGE1_5KG", "PACKAGE2KG", "PACKAGE2_27KG", "PACKAGE2_5KG", "PACKAGE2_72KG", "PACKAGE2_8KG", "PACKAGE3KG", "PACKAGE3_5KG", "PACKAGE3_6KG", "PACKAGE4KG", "PACKAGE5KG", "PACKAGE5_6KG", "PACKAGE6KG", "PACKAGE7KG", "PACKAGE8KG", "PACKAGE9KG", "PACKAGE10KG", "PACKAGE12KG", "PACKAGE14KG", "PACKAGE15KG", "PACKAGE30KG", "PACKAGE35KG", "PACKAGE50KG", "PACKAGE69KG", "PACKAGE70KG", "PACKAGE920KG", "PACKAGE0_5LBS", "PACKAGE1LBS", "PACKAGE1_1LBS", "PACKAGE1_5LBS", "PACKAGE1_75LBS", "PACKAGE2LBS", "PACKAGE2_5LBS", "PACKAGE3LBS", "PACKAGE3_5LBS", "PACKAGE3_75LBS", "PACKAGE3_85LBS", "PACKAGE4LBS", "PACKAGE4_5LBS", "PACKAGE5LBS", "PACKAGE6LBS", "PACKAGE7LBS", "PACKAGE7_5LBS", "PACKAGE8_5LBS", "PACKAGE9LBS", "PACKAGE10LBS", "PACKAGE11LBS", "PACKAGE12LBS", "PACKAGE12_5LBS", "PACKAGE15LBS", "PACKAGE16LBS", "PACKAGE20LBS", "PACKAGE22_5LBS", "PACKAGE24LBS", "PACKAGE25LBS", "PACKAGE30LBS", "PACKAGE40LBS", "PACKAGE50LBS", "PACKAGE125LBS", "PACKAGE800LBS", "PACKAGE1OZ", "PACKAGE2OZ", "PACKAGE2_5OZ", "PACKAGE3OZ", "PACKAGE4OZ", "PACKAGE5OZ", "PACKAGE6OZ", "PACKAGE7OZ", "PACKAGE8OZ", "PACKAGE9OZ", "PACKAGE10OZ", "PACKAGE10_5OZ", "PACKAGE10_9OZ", "PACKAGE11OZ", "PACKAGE12OZ", "PACKAGE12_07OZ", "PACKAGE14OZ", "PACKAGE16OZ", "PACKAGE18OZ", "PACKAGE22OZ", "PACKAGE24OZ", "PACKAGE35OZ", "PACKAGE36OZ", "PACKAGE45OZ", "PACKAGE48OZ", "PACKAGE72OZ", "PACKAGE90OZ", "PACKAGE120OZ", "PACKAGE144OZ", "PACKAGE6912OZ" - `result.syncedProducts.variants.coffeeOptions.grindStyle` (string, required) The grind style of the coffee. Example: "Whole Bean" ## Response 400 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided" ## Response 401 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided" ## Response 403 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided" ## Response 422 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Indicates that one or multiple items are invalid and no changes were saved. Example: "bulk_operation_failed" - `error.message` (string) A detailed description of the occurred error. Example: "One or multiple items are invalid. No changes were saved." - `error.data` (object) Defines additional information about the error. - `error.data.details` (array) A detailed list of issues detected in the request. - `error.data.details.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" ## Response 500 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided"