create_surcharge_m
Summary
| API Name | create_surcharge_m |
|---|---|
| Class | administration_services_m |
| Update Version | 6.22 |
Description
Creates a surcharge.
Inputs
| Name | Type | Length | Required | Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| client_no | long | 12 | Yes |
Aria-assigned unique identifier indicating the Aria client providing service to this account. |
||||||||||||||||||||||||||
| auth_key | string | 32 | Yes |
Aria-assigned unique key to be passed with each method call for authenticating the validity of the requestor. |
||||||||||||||||||||||||||
| surcharge_name | string | 100 | Yes |
Specifies the surcharge name. Translatable. |
||||||||||||||||||||||||||
| client_surcharge_id | string | 100 | No |
Specifies the client-defined ID for the surcharge. |
||||||||||||||||||||||||||
| description | string | 1000 | Yes |
Specifies the description for the surcharge. Translatable. |
||||||||||||||||||||||||||
| ext_description | string | 1000 | Yes |
Specifies the description that can be added to the statement and is visible to the user. Translatable. |
||||||||||||||||||||||||||
| currency_cd | string | 3 | No |
Specifies the currency code of the surcharge. Note: This field was deprecated in version 41. |
||||||||||||||||||||||||||
| surcharge_type_cd | string | 1 | Yes |
Specifies whether the discount is fixed or percentage based. Allowed values:
|
||||||||||||||||||||||||||
| inline_offset_ind | string | 1 | Yes |
Specifies how the discount is displayed in the invoice. Allowed values:
|
||||||||||||||||||||||||||
| apply_b4_or_after_discount_cd | string | 1 | Yes |
Specifies whether the surcharge should consider item totals before or after discounts are applied. Allowed values:
|
||||||||||||||||||||||||||
| apply_to_zero_invoice_ind | int | 8 | No |
Specifies whether the minimum surcharge should apply to a zero dollar invoice. Note: This field was deprecated in version 11.1. |
||||||||||||||||||||||||||
| tax_group | int | 8 | No |
Specifies the tax group to use when calculating the surcharge. |
||||||||||||||||||||||||||
| gl_cd | string | 30 | No |
Specifies the revenue account chart of access code. |
||||||||||||||||||||||||||
| ar_gl_cd | string | 30 | No |
Specifies the accounts receivable chart of access code. |
||||||||||||||||||||||||||
| scope_no | int | 2 | Yes |
Specifies the charges eligible for the surcharge. Allowed values:
|
||||||||||||||||||||||||||
| plan_no | long | 12 | No |
Specifies the plans that are eligible for the surcharge. This is mandatory for scope 3 and 5. REST input arrays should be passed in the following format: plan_no[0]=1002&plan_no[1]=1003, etc. Alternative field: client_plan_id |
||||||||||||||||||||||||||
| client_plan_id | string | 100 | No |
Specifies the plans that are eligible for the surcharge. This is mandatory for scope 3 and 5. REST input arrays should be passed in the following format: client_plan_id[0]=1002&client_plan_id[1]=1003, etc. Alternative field: plan_no |
||||||||||||||||||||||||||
| service_no | long | 12 | No |
Specifies the services that are eligible for the surcharge. This is mandatory for scope 4 and 5. REST input arrays should be passed in the following format: for scope 4, service_no[0]=1002&service_no[1]=1003. For scope 5, service_no[0][0]=10002&service_no[0][1]=1001&service_no[1][0]=100&service_no[1][1]=103. Alternative field: client_service_id |
||||||||||||||||||||||||||
| client_service_id | string | 100 | No |
Specifies the services that are eligible for the surcharge. This is mandatory for scope 4 and 5. REST input arrays should be passed in the following format: for scope 4, client_service_id[0]=1002&client_service_id[1]=1003. For scope 5, client_service_id[0][0]=10002. Alternative field: service_no |
||||||||||||||||||||||||||
| item_no | long | 12 | No |
Specifies the inventory items that are eligible for the surcharge. This is mandatory for scope 10. REST input arrays should be passed in the following format: item_no[0]=1002&item_no[1]=103. Alternative field: client_sku |
||||||||||||||||||||||||||
| client_sku | string | 30 | No |
Specifies the inventory items that are eligible for the surcharge. This is mandatory for scope 10. REST input arrays should be passed in the following format: client_sku[0]=1002&client_sku[1]=103. Alternative field: item_no |
||||||||||||||||||||||||||
| client_item_id | object | No |
Specifies the client-defined identifiers of the inventory items that are eligible for the surcharge. Note: This field was deprecated in version 43. |
|||||||||||||||||||||||||||
| surcharge_tier | object | Yes |
Specifies the pricing tiers for the surcharge. |
|||||||||||||||||||||||||||
| schedule | object | No |
Specifies the rate schedule associated with the surcharge. |
|||||||||||||||||||||||||||
| surcharge_scope | int | 1 | No |
Specifies the surcharge application. This parameter is available only for EOM clients. Allowed values:
|
||||||||||||||||||||||||||
| tax_inclusive_ind | int | 1 | No |
This flag denotes whether a surcharge is inclusive of taxes. Valid values are 1, meaning a tax-inclusive surcharge, and 0 (default), meaning a tax-exclusive surcharge. |
||||||||||||||||||||||||||
| installment_surcharge_ind | int | 1 | No |
Indicates whether the surcharge should be spread over the installment period. This applies only when an item is purchased with installments. Valid values are 0, meaning the surcharge is not spread over the installment period, and 1, meaning the surcharge is spread over the installment period. |
client_item_id fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| client_item_ids | string | 100 | No |
Specifies the inventory items that are eligible for the surcharge. This is mandatory for scope 10. REST input arrays should be passed in the following format: client_item_id[0]=1002&client_item_id[1]=103. |
surcharge_tier fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| from | int | 10 | Yes |
REST input arrays should be passed in the following format: surcharge_tier[0][from]=1&surcharge_tier[1][from]=1, etc. Index 0 specifies the first tier, index 1 specifies the second tier, and so on. |
| to | int | 10 | No |
REST input arrays should be passed in the following format: surcharge_tier[0][to]=3&surcharge_tier[1][to]=7, etc. Index 0 specifies the first tier, index 1 specifies the second tier, and so on. This field is mandatory unless it is the last tier. |
| rate | float | 12 | Yes |
REST input arrays should be passed in the following format: surcharge_tier[0][rate][0]=3&surcharge_tier[0][rate][1]=4, etc. |
| description | string | 50 | No |
This field is used to display a custom rate tier description. REST input arrays should be passed in the following format: surcharge_tier[1][description]=Custom description, etc. Index [tier][0] specifies the first tier, index [tier][1] specifies the second tier, and so on. Translatable. |
schedule fields
| Name | Type | Length | Required | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| schedule_name | string | 10 | Yes |
Specifies the schedule name. REST input arrays should be passed in the following format: schedule[0][schedule_name]=TestSchedule1&schedule[1][schedule_name]=TestSchedule2, etc. Translatable. |
||||||
| currency_cd | string | 3 | Yes |
Currency of the rate schedule. REST input arrays should be passed in the following format: schedule[0][currency_cd]=usd&schedule[1][currency_cd]=eur, etc. |
||||||
| is_default | int | 5 | No |
Specifies whether the rate schedule is the default for the currency. REST input arrays should be passed in the following format: schedule[0][is_default]=1&schedule[1][is_default]=1, etc. Allowed values:
|
||||||
| min_surcharge_to_apply | float | 5 | No |
Minimum surcharge to apply. REST input arrays should be passed in the following format: schedule[0][min_surcharge_to_apply]=10, etc. |
||||||
| include_zero | int | 1 | No |
Specifies how the discount is displayed in the invoice. Allowed values:
|
Outputs
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| error_code | long | Yes |
Aria-assigned error identifier. Zero indicates no error. |
|
| error_msg | string | Yes |
Textual description of any error that occurred. "OK" if there was no error. |
|
| surcharge_no | long | 32 | No |
Surcharge number. |