PortaOne icon

PortaOne

Consume PortaOne API (v.1.0.24)

Overview

The PortaOne - Rate Management: Update node allows you to update an existing rate record in the PortaOne system via its API. This is particularly useful for telecom operators or billing administrators who need to programmatically manage and adjust call rates, tariffs, and related parameters without manual intervention through the PortaOne web interface.

Common scenarios include:

  • Updating call rates for specific destinations or countries.
  • Adjusting billing intervals or prices due to regulatory changes.
  • Marking certain rates as discontinued or inactive.
  • Automating bulk updates of rate information based on business logic.

Practical example:
A telecom company wants to automatically increase the price for calls to a specific country during peak hours. Using this node, they can schedule workflows that update the relevant rate records at the required times.


Properties

Name Meaning
Authentication The authentication method to use. Options: Token Authentication, Basic Authentication.
Rate ID The unique ID of the rate record (mandatory for update operations).
AdditionalFields A collection of optional fields to further specify the rate update. See below for available options.
Simplify Whether to simplify the output data. If enabled, only the most relevant part of the response will be returned.
SimplifyPath Path to the property that should be returned when simplification is enabled.

AdditionalFields options include:

  • Country: The code of the country in ISO 3166-1 alpha-2 format.
  • Description: Filters DID numbers using a description search pattern.
  • Destination: The pattern of the destination prefix.
  • Destination Group: Text description for this entry.
  • Discontinued: Indicates that rate is discontinued.
  • Editable: Shows whether the rate is editable (1 = editable, 0 = not editable).
  • Effective From: When the rate becomes effective.
  • Effective Now: Whether the rate is currently effective (1 = yes, 0 = no).
  • Forbidden: Indicates that no calls are authorized for the particular destination.
  • Formula: Indicates if this rate uses a call rating formula.
  • Hidden: Indicates that the rate may be omitted from lists.
  • Huntshop: Indicates whether huntstop is set.
  • Dest ID: The unique ID of the destination record.
  • Destination Group ID: The unique ID of the destination group.
  • Offpeak ID: The unique ID of the off-peak record.
  • Rate Formula ID: The unique ID of the rating formula record.
  • Tariff ID: The unique ID of the tariff.
  • Inactive From: Defines when the rate stops being applied.
  • Inter Intra State Enabled: Specifies if price per minute depends on more than just destination.
  • Interval 1: First billing interval.
  • Interval N: Next billing interval.
  • ISO 3166 1 A2: The ISO 3166 two-letter country code.
  • Network: The name of the mobile network.
  • Op Huntstop: Indicates huntstop for off-peak period.
  • Op Interval 1: First billing interval for off-peak time.
  • Op Interval N: Next billing interval for off-peak time.
  • Op Preference: Routing priority for off-peak period.
  • Op Price 1: Price for first interval for off-peak time.
  • Op Price N: Price for next interval for off-peak time.
  • Op Route Category: ID of route category for off-peak period.
  • Preference: Routing priority.
  • Price 1: Price for first interval.
  • Price N: Price for next interval.
  • Rate Unit: Customer-visible name for units used to calculate charges.
  • Unit: Customer-visible name for units in which service use is measured.
  • Reverse Rating: Indicates whether rate is marked reverse.
  • Route Category: ID of route category.
  • Special Price N: Special price for next interval.
  • Special Price 1: Special price for first interval.

Output

  • By default, the node returns the full JSON response from the PortaOne API after updating the rate record.
  • If Simplify is enabled, the output will be reduced to the property specified by SimplifyPath, or to the most relevant part of the response.
  • The structure of the output typically includes:
    • Confirmation of the updated rate record.
    • Updated field values.
    • Any error messages or status codes if the operation failed.

Example output (simplified):

{
  "success": true,
  "rate": {
    "i_rate": 12345,
    "country": "US",
    "price_1": 0.05,
    ...
  }
}
  • The node does not output binary data.

Dependencies

  • External Services: Requires access to a PortaOne instance with API enabled.
  • API Credentials: You must provide either a valid PortaOne API token or basic authentication credentials, depending on your selection.
  • n8n Configuration: Ensure the appropriate credentials are configured in n8n under "portaOneTokenApi" or "portaOneBasicApi".

Troubleshooting

Common issues:

  • Invalid credentials: If authentication fails, ensure your API token or username/password are correct and have sufficient permissions.
  • Missing Rate ID: The "Rate ID" field is mandatory. Omitting it will result in an error.
  • Incorrect field values: Providing invalid data types or out-of-range values for fields (e.g., negative prices) may cause the API to reject the request.
  • API connectivity: Network issues or incorrect PortaOne API endpoint configuration can prevent successful updates.

Error messages:

  • "Authentication failed": Check your credentials and authentication method.
  • "Rate ID not found": Verify that the provided Rate ID exists in your PortaOne system.
  • "Invalid parameter": Review the input fields for typos or unsupported values.

Links and References

Discussion