# Get pricing for purchasing, renewing, and upgrading resources. - GetUFilePkgPrice

## Overview

Get pricing for purchasing, renewing, and upgrading resources.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetUFilePkgPrice`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.sigcalcloud.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Availability Zones. See [List of Availability Zones](/docs/api/summary/regionlist) |No|
| **ProjectId** | string | Project ID. Leaving this field blank will default to the project ID. This is required for sub-accounts. Please refer to the [GetProjectList API](/docs/api/summary/get_project_list) |No|
| **InquiryType** | string | Operation type: new: new purchase, upgrade: upgrade, renew: renewal, delete: refund |**Yes**|
| **Amount** | int | Required for new purchases and upgrades |No|
| **AmountUnit** | string | Required for new purchases and upgrades |No|
| **Duration** | int | Required for new purchases and upgrades |No|
| **DurationUnit** | string | Required for new purchases and upgrades |No|
| **ResourceId** | string | Resource ID is required for upgrades, renewals, and refunds. |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **CustomPrice** | int | Actual price |No|
| **OriginPrice** | int | Original Price |No|




## Example

### Request Example
    
```
https://api.sigcalcloud.com/?Action=GetUFilePkgPrice
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=YxwjecXw
&InquiryType=new
&Amount=1
&AmountUnit=TwjvCtIh
&Duration=6
&DurationUnit=yvnroMOB
&ResourceId=ArmDDgNR
```

### Response Example
    
```json
{
  "Action": "GetUFilePkgPriceResponse",
  "CustomPrice": 4,
  "OriginPrice": 1,
  "RetCode": 0
}
```





