CorebanqCorebanq Developer Docs
Tariffsv1Tariffs

Clone tariff

Creates a new tariff with a new ID, copying fee ranges and velocity rules from the source. Optional body name must be unique; when omitted, the server picks Copy of {name} with a numeric suffix if needed.

POST/v1/tariffs/{id}/clone

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/tariffs/497f6eca-6276-4993-bfeb-53cbbbba6f08/clone" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "fallback_tariff_id": "e4b6bec8-3c7c-45ce-b8c3-85abac4ed74b",
  "active": true,
  "default": true,
  "fee_ranges": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "tariff_id": "d82b8db6-f412-4b9c-8c5e-6a0221035c86",
      "range_start": 0,
      "range_end": 0,
      "fixed_fee": 0,
      "percent_fee": 0,
      "method": "fixed",
      "min_fee": 0,
      "max_fee": 0,
      "media": "string",
      "asset": "string",
      "from_channel": "string",
      "to_channel": "string",
      "transaction_type": "string",
      "valid_from": "2019-08-24T14:15:22Z",
      "valid_to": "2019-08-24T14:15:22Z",
      "active": true
    }
  ],
  "velocity_rules": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "tariff_id": "d82b8db6-f412-4b9c-8c5e-6a0221035c86",
      "reference_id": "string",
      "type": "transaction_count",
      "interval": "once",
      "limit": 0,
      "media": "string",
      "asset": "string",
      "from_channel": "string",
      "to_channel": "string",
      "transaction_type": "string",
      "valid_from": "2019-08-24T14:15:22Z",
      "valid_to": "2019-08-24T14:15:22Z",
      "priority": 0,
      "active": true,
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
      "modified_at": "2019-08-24T14:15:22Z",
      "modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f",
      "metadata": {}
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4"
}
{
  "code": "tariffs_m.tariff_not_found",
  "message": "Tariff not found"
}
{
  "code": "tariffs_m.tariff_already_exists",
  "message": "Tariff with this name already exists"
}