Manage your cable library through the API

Add your organization's own cable series and their sizes, with the resistance and reactance values your study uses, so a project can select them. These are the same series you add on the Cable Editor page. Built-in cable series are listed and readable but cannot be changed.

Access requirements

OperationAPI scopeOrganization role
List and read seriescatalog:readAny active member
Create, update, and archive series and sizescatalog:writeOwner or admin

The library belongs to an organization, so use an API key created while you work in that organization. A key with no organization returns 403 ORGANIZATION_REQUIRED. A series from another organization answers 404, as if it did not exist.

Routes

RouteScopeResult
GET /cable-seriescatalog:readYour organization's active series and the built-in series, without sizes.
POST /cable-seriescatalog:writeCreate a series, with up to 100 sizes in variants. Returns 201 with the sizes.
GET /cable-series/{seriesId}catalog:readOne series with its active sizes in cableVariants, smallest conductor first.
PATCH /cable-series/{seriesId}catalog:writeChange the fields you send.
DELETE /cable-series/{seriesId}catalog:writeArchive the series.
POST /cable-series/{seriesId}/variantscatalog:writeAdd one size. Returns 201.
PATCH /cable-series/{seriesId}/variants/{variantId}catalog:writeChange the fields you send.
DELETE /cable-series/{seriesId}/variants/{variantId}catalog:writeArchive the size.

Request bodies are limited to 256 KiB. These requests do not use Idempotency-Key. If a create request loses its response, list the series before you send it again; a second create with the same name returns 409 CABLE_SERIES_NAME_TAKEN.

Create a series with its sizes

curl "https://joinekx.com/api/v1/cable-series" \
  -X POST \
  -H "Authorization: Bearer $EKX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mfgName": "ETAP 1/C Cu 600 V",
    "mfgMaxCableTempRatingCelsius": 75,
    "ratedVoltageKv": 0.6,
    "numberOfConductors": 1,
    "variants": [
      { "conductorSize": "1/0", "resistancePerKm": 0.393701, "reactancePerKm": 0.180446, "resistanceTemperatureC": 75 },
      { "conductorSize": "300", "resistancePerKm": 0.147638, "reactancePerKm": 0.167323, "resistanceTemperatureC": 75 }
    ]
  }'

The response contains the series id and each size's id. To use a size in a project, send its id as the cable's cableVariantId and the series id as selectedCableSeriesId; see project data.

Numbers may be sent as JSON numbers or numeric strings. Responses return decimal values as strings, exactly as stored.

Series fields

FieldRequired on createValue
mfgNameYesThe name shown in cable lists. It must be unique among the series you have created, including archived ones.
mfgMaxCableTempRatingCelsiusYesMaximum conductor temperature, °C, above 0.
ratedVoltageKvYesRated voltage, kV, above 0.
numberOfConductorsYesConductors per cable, a whole number.
conductorMaterialNoCU (default) or AL.
insulationTypeNoInsulation, such as XLPE (default), EPR, or PVC.
numberOfGroundConductorsNoA whole number, or null.
armoured, armouredTypeNotrue or false (default), and the armour material, such as AL (default) or STEEL.
integralBondingNotrue when the cable carries its own bonding path, so no separate bonding conductor is installed. Default false.
seriesName, specNumber, manufacturer, descriptionNoText up to 500 characters, or null.
certificationsNoA list of certification codes.

Size fields

FieldRequired on createValue
conductorSizeYes14 to 4/0 AWG, or 250 to 2000 kcmil. EKX sets the unit from the size.
resistancePerKm, reactancePerKmNoΩ per km of conductor, above 0. Divide an Ω per 1000 ft value by 0.3048.
resistanceTemperatureCNoThe temperature of resistancePerKm, 0 to 250 °C.
capacitancePerKmNoµF per km, above 0.
ratedAmperage90, manufacturer90degAmpacityNoAmperes, above 0.
impedanceDataSourceNouser_entered, manufacturer_catalog, nec_chapter_9, system_default, or unknown. EKX records it as the source of both resistance and reactance.
impedanceSourceQuality, resistanceSourceQuality, reactanceSourceQuality, ampacitySourceQualityNomanufacturer_catalog_exact, manufacturer_catalog_substitute, published_reference_table, generic_engineering_fallback, user_entered, or unknown.
groundConductorSize, numberOfGroundConductorsNoA ground conductor size from the same list, and a whole number; or null.
partNumber, descriptionNoText up to 500 characters, or null.

Send null to clear an optional field. A field EKX does not accept, such as organizationId or isActive, returns 400 VALIDATION_ERROR.

Archive a series or size

DELETE archives rather than deletes. An archived series or size disappears from cable library lists and reads and cannot be changed. A cable that already uses it keeps its values, so existing projects calculate as before. An archived series keeps its name.

Error codes

StatusCodeMeaning
400VALIDATION_ERRORA field is missing, unknown, or out of range. message and details.path name the first one, such as variants.1.resistancePerKm; details.value lists every problem.
400INVALID_JSONThe body is not a JSON object.
400INVALID_CABLE_SERIES_ID, INVALID_CABLE_VARIANT_IDThe ID in the path is not a valid ID.
403FORBIDDENThe key lacks the scope, or your role is not owner or admin.
403ORGANIZATION_REQUIREDThe key does not belong to an organization.
403CABLE_SERIES_READ_ONLYThe series is built in. Create your own series instead.
404NOT_FOUNDThe series or size does not exist, is archived, or belongs to another organization.
409CABLE_SERIES_NAME_TAKENYou already created a series with this name.
413REQUEST_TOO_LARGEThe body exceeds 256 KiB.