API:Accept Order

Home / Support / Documentation
From WHMCS Documentation
Jump to: navigation, search

Purpose

This command is used to accept a pending order in the system.

Attributes

  • orderid - the Order ID to be accepted

Optional Attributes

  • serverid - the Server ID to provision any hosting products in the order to, overrides default
  • serviceusername - the Username to assign for provisioning, overrides default
  • servicepassword - the Password to assign for products being provisioned, overrides auto generation
  • registrar - the domain registrar module to assign any domains to
  • autosetup - true/false - determines whether product provisioning is performed
  • sendregistrar - true/false determines whether domain automation is performed
  • sendemail - true/false - sets if welcome emails for products and registration confirmation emails for domains should be sent

Example Command

External API

 $postfields["action"] = "acceptorder";
 $postfields["orderid"] = "1";
 $postfields["autosetup"] = true;
 $postfields["sendemail"] = true;

Internal API

 $command = "acceptorder";
 $adminuser = "admin";
 $values["orderid"] = "1";
 $values["autosetup"] = true;
 $values["sendemail"] = true;
 
 $results = localAPI($command,$values,$adminuser);

Successful Response

 result - success

Error Response

result=error&message=Order ID not found or Status not Pending /* Given order ID not found 
or order is not pending.*/


API Functions
Client Management
Add Client - Update Client - Delete Client - Close Client - Get Clients
Get Clients Details - Get Clients Products - Get Clients Password - Add Contact - Update Contact
Delete Contact - Update Client Product - Upgrade Product - Validate Login - Send Email
Support Tickets
Get Support Departments - Get Support Statuses - Get Tickets - Get Ticket - Get Ticket Predefined Cats
Get Ticket Predefined Replies - Open Ticket - Reply Ticket - Add Ticket Note - Delete Ticket - Update Ticket
Quotes
Create Quote - Update Quote - Delete Quote - Send Quote - Accept Quote
Module Commands
Module Create - Module Suspend - Module Unsuspend - Module Terminate
Domain Commands
Renew Domain - Get Domain Lock - Get Nameservers - Get WHOIS - Request EPP
Update Lock - Update Nameservers - Update WHOIS - Domain WHOIS Lookup
Order Handling
Get Orders - Get Order Statuses - Add Order - Accept Order - Pending Order - Cancel Order - Fraud Order - Delete Order
Payments/Billing
Get Invoice - Get Payment Methods - Create Invoice - Update Invoice - Add Billable Item - Add Invoice Payment
Add Transaction - Add Credit - Capture Payment
Miscellaneous
Get Activity Log - Get Admin Details - Update Admin Notes - Get Currencies - Get Email Templates
Get To-Do Items - Get To-Do Item Statuses - Get Staff Online - Get Stats - Encrypt Password - Decrypt Password