Child pages
  • UAPI Functions - Market::set_status_of_pending_queue_items
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

 

Description

This function sets the status of an item or items in the cPanel Market pending queue.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Market/set_status_of_pending_queue_items?provider=cPStore&order_item_id=8675309&status=confirmed


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Set the status of 8675309 item in the queue to confirmed status.
$davidbowielives = $cpanel->uapi(
    'Market', 'set_status_of_pending_queue_items',
    array(
        'provider'        => 'cPStore',
        'order_item_id'   => '8675309',
        'status'          => 'confirmed'
    )
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Set the status of 8675309 item in the queue to confirmed status
my $davidbowielives = $cpliveapi->uapi(
    'Market', 'set_status_of_pending_queue_items',
    {
        'provider'         => 'cPStore',
        'order_item_id'    => '8675309',
        'status'           => 'confirmed'
    }
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Template Toolkit
<!--  Set the status of 8675309 item in the queue to confirmed status -->
[% execute('Market', 'set_status_of_pending_queue_items', { provider => 'cPStore','order_item_id'=>'8675309','status' => 'confirmed' } ) %]


Note:

For more information, read our Guide to Template Toolkit documentation. 

 

 Command Line
uapi --user=username Market set_status_of_pending_queue_items provider=cPStore order_item_id=8675309 status=confirmed


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)

Success:

 

{    
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  
   }
}

Failure:

 

{  
   "data":{  
      "error_type":"EntryDoesNotExist",
      "order_item_ids":[  
         8675309,
         5551212
      ]
   },
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   }
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
providerstring

Required

The cPanel Market provider's name.

A valid string.

cPStore
order_item_idstring

Required

The ID of the ordered item.

Note:

To set the status for multiple items, duplicate or increment the parameter name. For example, to change the status for three certificates, use the order_item_id parameter multiple times or use the order_item_id-1, order_item_id-2, and order_item_id-3 parameters.

A valid string.8675309
statusstring

Required

The new status of the item in the cPanel Market pending queue.

  • confirmed — The system confirmed payment for the item with the provider.
confirmed

 

Returns

Note:

The function only returns these values if the user or users do not have the order_item_id item in the cPanel Market pending queue.

ReturnTypeDescriptionPossible valuesExample
error_typestring

The type of error that the function encountered.

Note:

We introduced this return in cPanel & WHM version 56.1.

  • EntryDoesNotExist — The returned order_item_ids do not exist in the cPanel Market pending queue for the user.
cPStore
order_item_idsarray

An array that lists order item IDs which do not exist in the cPanel Market pending queue for the user.

Note:

We introduced this return in cPanel & WHM version 56.1.

A list of order item IDs.8675309

 

 

  • No labels