Skip to Content
NovoDIDNovoDIDdocumentation
Public APIOperation referenceBuy numbers

Quote one DID subscription

Catalog, quotes, checkout and order tracking.

POST /api/v1/orders/quote

Permission: catalog:read

Scope: catalog:read. Body: didId, cycle (monthly/semiannually/yearly), paymentMethod (pix/card), optional quantity=1 and couponCode (1–80 letters, digits, hyphens or underscores). Returns totalAmount in cents, recurrence and required SMS acknowledgements. No payment or reservation is created. Eligibility/profile/capacity/availability failures return 409. Revalidate through checkout before purchase.

During temporary mobile-number offers, available billing cycles and SMS inclusion may vary. Always request a quote: did.smsEnabled states whether SMS is included, and acknowledgements.mobileMonthlySms.required indicates whether mobileMonthlySmsAcknowledged=true is required after customer consent. Despite their names, these fields apply to any mobile cycle without SMS. A quote does not guarantee an offer; conditions are checked again when payment is created. Payments issued during an offer keep their conditions until the payment itself expires. After an offer ends, new purchases follow current conditions, while completed subscriptions keep their cycle and SMS entitlement on renewals for as long as the subscription remains in effect. This is not a price guarantee. Account eligibility, verification, limits, available stock and one number per order remain required.

While an account is under security review, reads and operations are blocked with HTTP 403 and code account_security_review, including previously issued tokens. Do not bypass the restriction or retry automatically. Access resumes after administrative release; other limits and restrictions still apply. Pending webhooks and events during the restriction are suppressed without automatic replay. Billing, due dates and expiration follow existing rules. Follow the review at https://novodid.com/seguranca/atendimento. Only the linked security ticket can be read and answered, including attachments, on the authenticated website. Other tickets and the public API remain blocked. The customer must wait for the first staff message and may send only one reply to each new staff message, including requested attachments.

Request body

{
  "didId": 1234,
  "quantity": 1,
  "cycle": "monthly",
  "paymentMethod": "pix",
  "fixedDidSmsAcknowledged": true
}

Success response (200)

{
  "did": {
    "id": 1234,
    "number": "551130001234",
    "kind": "fixed",
    "smsEnabled": false
  },
  "quantity": 1,
  "paymentMethod": "pix",
  "pricing": {
    "currency": "BRL",
    "baseMonthlyAmount": 1499,
    "cycle": "monthly",
    "cycleMonths": 1,
    "subtotalAmount": 1499,
    "totalDiscountPercent": 0,
    "discountedAmount": 1499,
    "cardFeeAmount": 0,
    "totalAmount": 1499
  },
  "recurring": true,
  "reserved": false,
  "acknowledgements": {
    "fixedDidSms": {
      "required": true,
      "message": "Confirme que está ciente de que este número fixo não recebe SMS antes de assinar."
    },
    "mobileMonthlySms": {
      "required": false,
      "message": null
    }
  }
}

Error example

{
  "error": {
    "code": "did_unavailable",
    "message": "Número indisponível para compra."
  }
}

curl

curl -X POST \
  -H "Authorization: Bearer $NOVODID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"didId":1234,"quantity":1,"cycle":"monthly","paymentMethod":"pix","fixedDidSmsAcknowledged":true}' \
  "https://novodid.com/api/v1/orders/quote"

Node

const response = await fetch("https://novodid.com/api/v1/orders/quote", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.NOVODID_API_TOKEN}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "didId": 1234,
  "quantity": 1,
  "cycle": "monthly",
  "paymentMethod": "pix",
  "fixedDidSmsAcknowledged": true
})
});
const payload = await response.json();

if (!response.ok) {
  throw new Error(payload.error?.message || "Erro na API NovoDID");
}

console.log({ status: response.status });

Python

import os
import requests

response = requests.post(
    "https://novodid.com/api/v1/orders/quote",
    headers={"Authorization": f"Bearer {os.environ['NOVODID_API_TOKEN']}"},
    json={
  "didId": 1234,
  "quantity": 1,
  "cycle": "monthly",
  "paymentMethod": "pix",
  "fixedDidSmsAcknowledged": True
},
    timeout=30,
)

payload = response.json()
response.raise_for_status()
print({"status": response.status_code})

Go

package main

import (
    "fmt"
    "io"
    "net/http"
    "os"
    "strings"
)

func main() {
    req, err := http.NewRequest("POST", "https://novodid.com/api/v1/orders/quote", strings.NewReader(`{"didId":1234,"quantity":1,"cycle":"monthly","paymentMethod":"pix","fixedDidSmsAcknowledged":true}`))
    if err != nil {
        panic(err)
    }

    req.Header.Set("Authorization", "Bearer "+os.Getenv("NOVODID_API_TOKEN"))
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer res.Body.Close()

    _, _ = io.Copy(io.Discard, res.Body)
    if res.StatusCode >= 300 {
        panic(fmt.Sprintf("NovoDID API HTTP %d", res.StatusCode))
    }

    fmt.Println(res.StatusCode)
}

Rust

use serde_json::json;
use reqwest::blocking::Client;
use std::env;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let response = client
        .post("https://novodid.com/api/v1/orders/quote")
        .bearer_auth(env::var("NOVODID_API_TOKEN")?)
        .json(&json!({
  "didId": 1234,
  "quantity": 1,
  "cycle": "monthly",
  "paymentMethod": "pix",
  "fixedDidSmsAcknowledged": true
}))
        .send()?;

    let status = response.status();
    let _payload = response.text()?;
    if !status.is_success() {
        return Err(format!("NovoDID API HTTP {}", status).into());
    }

    println!("HTTP {}", status);
    Ok(())
}

PHP

<?php

$ch = curl_init("https://novodid.com/api/v1/orders/quote");

curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("NOVODID_API_TOKEN"),
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => '{"didId":1234,"quantity":1,"cycle":"monthly","paymentMethod":"pix","fixedDidSmsAcknowledged":true}',
]);

$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($response === false || $status >= 300) {
  throw new RuntimeException("NovoDID API HTTP " . $status);
}

echo $status . PHP_EOL;

Ruby

require "net/http"

uri = URI("https://novodid.com/api/v1/orders/quote")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("NOVODID_API_TOKEN")}"
request["Content-Type"] = "application/json"
request.body = %q({"didId":1234,"quantity":1,"cycle":"monthly","paymentMethod":"pix","fixedDidSmsAcknowledged":true})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

raise "NovoDID API HTTP #{response.code}" unless response.is_a?(Net::HTTPSuccess)

puts response.code

C#

using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://novodid.com/api/v1/orders/quote");

request.Headers.Authorization = new AuthenticationHeaderValue(
    "Bearer",
    Environment.GetEnvironmentVariable("NOVODID_API_TOKEN")
);

request.Content = new StringContent(
    """
{
  "didId": 1234,
  "quantity": 1,
  "cycle": "monthly",
  "paymentMethod": "pix",
  "fixedDidSmsAcknowledged": true
}
""",
    Encoding.UTF8,
    "application/json"
);

using var response = await client.SendAsync(request);
var payload = await response.Content.ReadAsStringAsync();

response.EnsureSuccessStatusCode();
Console.WriteLine(response.StatusCode);

On this page