SubscriptionAndOrderItem_Add
#
Description#
This function adds an item to an order and a subscription.
Request Parameters#
Parameter |
Type | Description |
---|---|---|
order_id |
Number | The order number to be updated |
customer_id edit_customer customer_login |
Number String String |
The customer id The customer login The customer login |
paymentcard_id |
Number | The id of the saved payment card linked to the order |
product_id Edit_Product Product_Code Product_SKU |
Number String String String |
ID Number of product Product code string Product code string Product SKU string |
productsubscriptionterm_id |
Number | Subscription term id for the product |
address_id |
Number | Address id for the subscription |
ship_id |
Number | Shipping id for the subscription |
ship_data |
String | The name of the shipping option for the subscription |
quantity |
Number | Product quantity for the subscription |
nextdate |
Number | Datetime string for the next subscription fulfillment date |
template_codes |
String | Template codes for product |
attribute_codes |
String | Attribute codes for product |
values |
String | Product values |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
Boolean | Boolean value indicating if the api request was successful |
total |
Number | Subscription total price |
formatted_total |
String | Currency formatted subscription total price |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Function": "SubscriptionAndOrderItem_Add",
"Order_ID": 1013,
"Customer_ID": 2,
"PaymentCard_ID": 0,
"Product_ID": 9,
"ProductSubscriptionTerm_ID": 1,
"Address_ID": 2,
"Ship_ID": 140,
"Ship_Data": "next day air",
"Quantity": 1,
"NextDate": "2022-03-11T00:00:00-00:00",
"Template_Codes": "",
"Attribute_Codes": "",
"Values": ""
}
Example Response#
{
"success": 1,
"data": {
"total": 59.27,
"formatted_total": "$59.27"
}
}
Error Responses#
Error Code | Error Message | Error Description |
---|---|---|
MER-JSN-ORD-00025 | Order not found | Order not found |