Skip to main content

Leased Subnet Management: Assign ASN (Create LOA)

This flow shows how to attach an ASN to a leased IPv4 subnet by purchasing a LOA (Letter of Authorization) add-on, and then how to check LOA status for the service. Use this when a customer has an active leased subnet and wants:
  • ROA / RPKI support
  • route objects (RADB / ROUTE)
  • inetnum automation (WHOIS)
Conceptually: validate ASN → add LOA product to cart → checkout → LOA gets created for the service.

Prerequisites

You need:
  • {access_token} (Auth flow)
  • {tenant_uuid}
  • {asn} (the ASN to assign to)
  • {subnet} (notation string, e.g. 82.27.122.0/24)
  • {company_name} (used in LOA product fields)
  • A billing {address_uuid} available for the tenant (from address list)
  • A payment method {payment_method_uuid} available for the tenant (from payment method list)
If you plan to check LOA status afterwards, you also need:
  • {service_uuid} of the leased subnet service (typically from “List Services” step in the lease flow)

Flow overview

  1. Validate ASN for the subnet
  2. Add LOA/ASN item to cart
  3. Complete checkout (standard cart steps)
  4. List LOAs for the service to confirm status (Pending/Active)

1) Validate ASN for the subnet

Try it.
Before adding LOA to cart, validate that the ASN is eligible for the provided subnet(s).
curl 'https://apigw.ipxo.com/billing/v1/{tenant_uuid}/asn/validate/{asn}' \
-X POST \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
    "subnets": ["{subnet}"]
  }'

What this does

  • Checks whether the ASN can be assigned to the subnet
  • Returns validation info (AS name, country, flags like OFAC/spamhaus, and whether subnet is already added)

What to look for

  • valid: true
  • subnet.already_added: false (if already added, you may not need to purchase again)

2) Add LOA / ASN item to cart

Try it
This adds a LOA product (one-time) to the cart, configured with your ASN + subnet.
curl 'https://apigw.ipxo.com/billing/v1/{tenant_uuid}/cart/items' \
-X POST \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
    "product_type": "loa",
    "billing_cycle": 0,
    "product_fields": {
      "max_length": 24,
      "company_name": "{company_name}",
      "asn": {asn},
      "info": "",
      "create_whois_inetnum": true,
      "whois_data_exposed": false,
      "subnets": ["{subnet}"]
    },
    "product_options": {
      "selection": {
        "roa": "yes",
        "radb": "yes",
        "route": "yes"
      }
    }
  }'

What this does

  • Adds a one-time purchasable LOA item to the cart
  • Specifies optional automation:
    • roa (RPKI / ROA support)
    • radb + route (routing objects)
    • inetnum creation preferences

Response

Often HTTP 204 No Content (same behavior as adding an IPv4 item). If you need confirmation, use List cart items.

3) Complete checkout (standard cart steps)

From here the flow becomes the “standard checkout block” you already have in Lease an IPv4 Subnet.

3.1 List cart (get cart_uuid)

Try it
List the current cart
curl 'https://apigw.ipxo.com/ecommerce/public/{tenant_uuid}/cart' \
-X GET \
-H 'Authorization: Bearer {access_token}'
Save:
  • {cart_uuid}

3.2 Attach billing address to cart

Try it
(Uses the address you already have from earlier List company billing addresses step.)
curl 'https://apigw.ipxo.com/ecommerce/public/{tenant_uuid}/cart/{cart_uuid}/addresses/{address_uuid}' \
-X POST \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{"type":"billing"}'

3.3 (Optional) Apply credits to cart

Try it
curl 'https://apigw.ipxo.com/ecommerce/public/{tenant_uuid}/cart/{cart_uuid}/credits/apply' \
-X POST \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{"amount": 9}'
If credits are insufficient, you’ll still need a payment method assigned before checkout.

3.4 Checkout and create order

Try it
curl 'https://apigw.ipxo.com/ecommerce/public/{tenant_uuid}/cart/{cart_uuid}/checkout' \
-X POST \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{}'
Save:
  • {order_uuid} from response (optional, if you want order verification)

4) List LOAs for the service (Pending / Active)

Try it
After checkout, LOA creation may take a bit of processing time. This endpoint lets you confirm status.
curl 'https://apigw.ipxo.com/billing/v1/{tenant_uuid}/market/ipv4/services/{service_uuid}/loa?statuses%5B0%5D=Active&statuses%5B1%5D=Pending' \
-X GET \
-H 'Authorization: Bearer {access_token}'

What this returns

  • LOAs associated with the leased subnet service
Typically you’ll see:
  • Pending right after checkout
  • Active once processed

What to save (optional)

  • loa.uuid if you later want LOA-specific operations (extend/renew/view details) when you add them.

Variables used and introduced in this flow

VariableWhere it comes fromUsed for
{asn}User inputValidate + add LOA
{subnet}Leased subnet notationValidate + add LOA
{company_name}Customer/company profileLOA details
{cart_uuid}List cartCheckout steps
{address_uuid}List company addressesAttach billing address
{payment_method_uuid}List payment methodsCheckout
{order_uuid}Checkout responseOptional order verification
{service_uuid}“List services” from lease flowList LOAs