Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- API Reference
- logDrains
- edge-config
- user
- marketplace
- GETGet Account Information
- GETGet Member Information
- POSTCreate Event
- POSTSubmit Billing Data
- POSTSubmit Invoice
- GETGet Invoice
- POSTInvoice Actions
- POSTSubmit Prepayment Balances
- PUTUpdate Resource Secrets (Deprecated)
- PUTUpdate Resource Secrets
- PUTImport Resource
- POSTCreate one or multiple experimentation items
- DELDelete an existing experimentation item
- PATCHPatch an existing experimentation item
- PUTPush data into a user-provided Edge Config
- HEADGet the data of a user-provided Edge Config
- GET
- integrations
- authentication
- logs
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
marketplace
Submit Billing Data
Sends the billing and usage data. The partner should do this at least once a day and ideally once per hour.
Use the credentials.access_token
we provided in the Upsert Installation body to authorize this request.
POST
/
v1
/
installations
/
{integrationConfigurationId}
/
billing
Copy
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
await vercel.marketplace.submitBillingData({
integrationConfigurationId: "<id>",
requestBody: {
timestamp: new Date("2023-11-26T05:03:03.977Z"),
eod: new Date("2023-04-14T04:58:49.647Z"),
period: {
start: new Date("2023-03-12T13:32:00.895Z"),
end: new Date("2023-12-15T15:17:13.187Z"),
},
billing: [
{
billingPlanId: "<id>",
name: "<value>",
price: "694.00",
quantity: 228.64,
units: "<value>",
total: "<value>",
},
{
billingPlanId: "<id>",
name: "<value>",
price: "694.00",
quantity: 228.64,
units: "<value>",
total: "<value>",
},
],
usage: [
{
name: "<value>",
type: "interval",
units: "<value>",
dayValue: 5212.43,
periodValue: 4147.35,
},
{
name: "<value>",
type: "interval",
units: "<value>",
dayValue: 5212.43,
periodValue: 4147.35,
},
{
name: "<value>",
type: "interval",
units: "<value>",
dayValue: 5212.43,
periodValue: 4147.35,
},
],
},
});
}
run();
Copy
This response has no body data.
Authorizations
Default authentication mechanism
Path Parameters
Body
application/json
Copy
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
await vercel.marketplace.submitBillingData({
integrationConfigurationId: "<id>",
requestBody: {
timestamp: new Date("2023-11-26T05:03:03.977Z"),
eod: new Date("2023-04-14T04:58:49.647Z"),
period: {
start: new Date("2023-03-12T13:32:00.895Z"),
end: new Date("2023-12-15T15:17:13.187Z"),
},
billing: [
{
billingPlanId: "<id>",
name: "<value>",
price: "694.00",
quantity: 228.64,
units: "<value>",
total: "<value>",
},
{
billingPlanId: "<id>",
name: "<value>",
price: "694.00",
quantity: 228.64,
units: "<value>",
total: "<value>",
},
],
usage: [
{
name: "<value>",
type: "interval",
units: "<value>",
dayValue: 5212.43,
periodValue: 4147.35,
},
{
name: "<value>",
type: "interval",
units: "<value>",
dayValue: 5212.43,
periodValue: 4147.35,
},
{
name: "<value>",
type: "interval",
units: "<value>",
dayValue: 5212.43,
periodValue: 4147.35,
},
],
},
});
}
run();
Copy
This response has no body data.
Assistant
Responses are generated using AI and may contain mistakes.