0

I have added this code but this is not working. I want the promocodes to be saved in infusionsoft

$carray = array(
  php_xmlrpc_encode($app->key),
  php_xmlrpc_encode($contactId), 
  php_xmlrpc_encode($creditCardId), 
  php_xmlrpc_encode($payPlanId), 
  php_xmlrpc_encode(array($productId1, $productId2)), 
  php_xmlrpc_encode(array($subscriptionPlanId1, $subscriptionPlanId2)), 
  php_xmlrpc_encode($processSpecials), 
  php_xmlrpc_encode(array($promoCode1, $promoCode2)) // array of strings
);
$app->methodCaller("OrderService.placeOrder", $carray);
Himanshu
  • 4,327
  • 16
  • 31
  • 39
user
  • 217
  • 1
  • 10

1 Answers1

0

Promo Codes are read-only. This means that, while they can be used during orders and applied to invoices, you can't add new Promo Codes via the API.

This is an unfortunate limitation of the InfusionSoft API. Read more in the Table Documentation.

rnevius
  • 26,578
  • 10
  • 58
  • 86
  • I know this is old, but I cannot find anywhere how to add a promocode to my blank invoice. The documentation is so unhelpful. I have my API setup, it creates a blank invoice then once the customer has paid it adds all of the products to it and then marks it as paid. But there is no way to add a promo code to an invoice? – warmwhisky Jun 04 '20 at 11:36