Skip to content

AvailabilityGroupProduct_Update_Assigned#


Description#

This function is used to assign or unassign a product from an availability group.

Request Body Parameters#

Parameter
Type Description
availabilitygroup_id
edit_availabilitygroup
availabilitygroup_name
Number
String
String
Availability Group ID
Availability Group Name
Availability Group Name
product_id
product_code
edit_product
product_sku
Number
String
String
String
The product id being assigned
The product code being assigned
The product name being assigned
The product SKU being assigned
assigned Boolean true/false whether customer is assigned to this availability group

Response Parameters#

Parameter
Type Description
success Number 1 indicating a successful request.
0 indicating an unsuccessful request.

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "AvailabilityGroupProduct_Update_Assigned",
    "AvailabilityGroup_Name": "wholesale",
    "Product_Code": "shirt",
    "Assigned": true
}

Example Response#

{
    "success": 1
}

Error Responses#

Error Code Error Message Error Description
MER-AGR-JSN-00040 Unable to load availability group: One of AvailabilityGroup_ID, Edit_AvailabilityGroup or AvailabilityGroup_Name must be specified Missing Required Parameter
MER-AGR-JSN-00039 Availability group not found Availability group not found
MER-JSN-PRD-00073 Unable to load product: One of Product_ID, Edit_Product, Product_Code or Product_SKU must be specified Missing Required Parameter
MER-JSN-PRD-00014 Product not found Product not found