How To Place An Order Using The API?
Publisher: Psychz Networks, October 13,2022As a customer of Psychz Networks, you can utilize our API to manage your clients, services, or infrastructure. The API facilitates seamless order placements and processes requests efficiently.
Prerequisites
- Whitelist your IP Address: Add your IP address in the “IP Address” section under the API feature in your Dashboard.
- Get Token and Username: Follow the steps in the Setup API Access article to obtain these credentials.
Order creation is a three-step process that involves getting order plans, order creation, and order submission. We also offer order express API if you don't wish to customize the order.
Order Plans
This will show you all the available plans in the system. You can import several parameters like Category, Plan name, Plan ID, location, price, etc.
Sample code
"data": {
"dedicated_servers": [
{
"category_name": "cMetal",
"category_id": 2,
"billing_type": "1",
"plan_name": "Los Angeles :: E3-1230 v2",
"plan_id": "138",
"base_price": "28.00",
"reseller_price": "23.8",
"standard_note": "",
"location_name": "Los Angeles, USA",
"location_code": "LAX",
"configuration_items": {
"2055": {
"item_id": "2055",
"item_name": "Support Type",
"options": {
"6460": {
"option_id": "6460",
"description": "Tier-1 Management",
"option_price": "35.00",
"option_setup_price": "0.00",
"default": 0
},
NOTE: Download the full JSON file for detailed parameters.
Order Create
To create an order, provide the Plan ID, order quantity, and configuration options. The order will then be placed in your cart, awaiting payment.
Sample code
"access_token": "string",
"access_username": "string",
"plan_id": 0,
"order_quantity": 1,
"config_option": {}
}
Order Submit
Order submission is the final step in the order placement process. The available payment options are “Credit only” and “Credit Card.” If paying by credit card, ensure a default credit card is added to the system. The order ID generated during order creation must be provided along with the payment mode.
Sample code
"access_token": "string",
"access_username": "string",
"payment_mode": 0,
"order_id": 0,
"partner_id": 0
}
Order Express
To place multiple orders simultaneously, use the express order feature. Below is the code snippet along with the required parameters:
Sample code
"access_token": "string",
"access_username": "string",
"auth_method": 1,
"plan_id": 0,
"order_quantity": 1,
"payment_mode": 0,
"os_cat": 0,
"os_id": 0,
"disk_partition_id": 0,
"disk_partition_file_system": "string",
"disk_partition_management": "string",
"disk_partition_boot_size": 0,
"disk_partition_swap_size": 0,
"software_raid": 7456,
"software_raid_drives": [
"string"
],
"hostname": "string",
"password": "string",
"private_key": 0,
"partner_id": 0,
"enforce_password_change": 0,
"dry_run": 0
}
For more functionality related information, kindly refer to the following page https://www.psychz.net/api/doc/dist/.