Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Billing profile

Update a billing profile's billing information

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

Body parameters

typestringRequired

Must be exactly "per_owner_pricing_billing_profile".

attributes.billing_profileobjectRequired
first_namestringRequired
Example:"Mark"
last_namestringRequired
Example:"Smith"
companynull, stringRequired
Example:"Acme Inc."
address_linestringRequired
Example:"One Infinite Loop"
citystringRequired
Example:"Cupertino"
emailstringRequired
Example:"invoices@acmeinc.com"
countrystringRequired
Example:"US"
statestringRequired
Example:"California"
zipstringRequired
Example:"95014"
vat_numbernull, stringOptional
cf_cod_fiscalenull, stringOptional
cf_cod_fiscale_partecipante_gruppo_ivanull, stringOptional
po_numbernull, stringOptional

Returns

Returns a resource object of type per_owner_pricing_billing_profile.

Examples

PUT https://site-api.datocms.com/per-owner-pricing-billing-profile/info HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "per_owner_pricing_billing_profile",
"attributes": {
"billing_profile": {
"first_name": "Mark",
"last_name": "Smith",
"company": "Acme Inc.",
"address_line": "One Infinite Loop",
"city": "Cupertino",
"email": "invoices@acmeinc.com",
"country": "US",
"state": "California",
"zip": "95014"
}
}
}
}
Terminal window
curl -g 'https://site-api.datocms.com/per-owner-pricing-billing-profile/info' \
-X PUT \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3" \
-H "Content-Type: application/vnd.api+json" \
--data-binary '{"data":{"type":"per_owner_pricing_billing_profile","attributes":{"billing_profile":{"first_name":"Mark","last_name":"Smith","company":"Acme Inc.","address_line":"One Infinite Loop","city":"Cupertino","email":"invoices@acmeinc.com","country":"US","state":"California","zip":"95014"}}}}'
await fetch(
"https://site-api.datocms.com/per-owner-pricing-billing-profile/info",
{
method: "PUT",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({
data: {
type: "per_owner_pricing_billing_profile",
attributes: {
billing_profile: {
first_name: "Mark",
last_name: "Smith",
company: "Acme Inc.",
address_line: "One Infinite Loop",
city: "Cupertino",
email: "invoices@acmeinc.com",
country: "US",
state: "California",
zip: "95014",
},
},
},
}),
},
);
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "per_owner_pricing_billing_profile",
"id": "124",
"attributes": {
"billing_profile": {
"first_name": "Mark",
"last_name": "Smith",
"company": "Acme Inc.",
"card_last_4": "4242",
"next_billing_at": "2020-04-21T07:57:11.124Z",
"card_type": "visa",
"card_expiry_month": 4,
"card_expiry_year": 2024,
"address_line": "One Infinite Loop",
"city": "Cupertino",
"email": "invoices@acmeinc.com",
"country": "US",
"state": "California",
"zip": "95014",
"vat_number": null,
"defaulting": false,
"defaulting_since": null,
"credits": 0,
"total_dues": 0,
"total_outstanding": 0,
"cf_cod_fiscale": null,
"cf_cod_fiscale_partecipante_gruppo_iva": null,
"po_number": null,
"unbilled_charges": 2700,
"discount_percentage": 10
}
}
}
}