Skip to main content
POST
/
plans
/
bandwidth
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";

const latitudesh = new Latitudesh({
  bearer: process.env["LATITUDESH_BEARER"] ?? "",
});

async function run() {
  const result = await latitudesh.plans.updateBandwidth({
    data: {
      type: "bandwidth_packages",
      attributes: {
        project: "proj_z2A3DVZ3DnawP",
        quantity: 5,
        regionSlug: "brazil",
      },
    },
  });

  console.log(result);
}

run();
{
  "data": {
    "type": "bandwidth_packages",
    "attributes": {
      "project": {
        "id": "proj_z2A3DVZ3DnawP",
        "name": "Renner-Rodriguez",
        "slug": "renner-rodriguez"
      },
      "packages": [
        {
          "region_slug": "united-states",
          "unit_price": 0.5,
          "currency": "USD",
          "contracted": 10,
          "total_price": 5
        },
        {
          "region_slug": "brazil",
          "unit_price": 4.6,
          "currency": "USD",
          "contracted": 0,
          "total_price": 0
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Body

data
object

Response

200 - application/vnd.api+json

Success

type
enum<string>
Available options:
bandwidth_packages
attributes
object