Update a billing subscription
Changed onUpdate a billing subscription
ℹ️ This endpoint requires the following scope: billing_subscriptions:all
Request
- Base URLhttps://app.pennylane.com
- URLhttps://app.pennylane.com/api/external/v2/billing_subscriptions/{id}
- AuthOAuth 2Authorization code: https://app.pennylane.com/oauth/authorizeToken URL: https://app.pennylane.com/oauth/oauth/token scopes: billing_subscriptions:all
Path parameters
The ID of the billing subscription to retrieve
Headers
Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.
Request body
Example request
{
"mode": {
"email_settings": {
"recipients": [
"customer@example.com",
"accounting@example.com"
]
}
},
"recurring_rule": {
"count": 12
},
"customer_id": 42,
"customer_invoice_data": {
"customer_invoice_template_id": 42,
"pdf_invoice_free_text": "Additional free field",
"pdf_invoice_subject": "Invoice title",
"pdf_description": "Invoice description",
"special_mention": "Additional details",
"discount": {
"value": "25"
},
"invoice_line_sections": {
"create": [
{
"title": "Invoice line section title",
"description": "Invoice line section description",
"rank": 1
}
],
"update": [
{
"id": 12,
"title": "Invoice line section title",
"description": "Invoice line section description",
"rank": 1
}
],
"delete": [
{
"id": 12
}
]
},
"invoice_lines": {
"create": [
{
"label": "Demo label",
"quantity": 12,
"unit": "piece",
"raw_currency_unit_price": "33.333334",
"vat_rate": "FR_200",
"section_rank": 1,
"discount": {
"value": "25"
},
"ledger_account_id": 1255,
"product_id": 42
}
],
"update": [
{
"id": 42,
"label": "Demo label",
"quantity": 12,
"unit": "piece",
"raw_currency_unit_price": "33.333334",
"vat_rate": "FR_200",
"section_rank": 1,
"discount": {
"value": "25"
},
"ledger_account_id": 1255,
"product_id": 42
}
],
"delete": [
{
"id": 42
}
]
}
}
}Response
Renders the updated billing subscription
Example response
{
"id": 42,
"next_occurrence": "2023-01-01",
"prev_occurrence": "2023-01-01",
"stopped_at": "2023-08-30T10:08:08.146343Z",
"start": "2023-01-01",
"finish": "2023-12-31",
"activated_at": "2023-08-30T10:08:08.146343Z",
"recurring_rule": {
"rule_type": "monthly",
"count": 12
},
"customer": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/customers/42"
},
"customer_invoice_data": {
"label": "Demo label",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"currency_tax": "34.0",
"discount": {
"value": "25"
},
"pdf_invoice_free_text": "Thanks for paying this invoice",
"pdf_invoice_subject": "Invoice subject",
"pdf_description": "Invoice description",
"special_mention": "Additional details",
"invoice_line_sections": {
"url": "https://app.pennylane.com/api/external/v2/billing_subscriptions/42/invoice_line_sections"
},
"invoice_lines": {
"url": "https://app.pennylane.com/api/external/v2/billing_subscriptions/42/invoice_lines"
}
},
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}Changes
- breaking
added
subschema #1subschema #2to therequest propertyallOflist - breaking
removed
subschema #1: Yearly recurrencesubschema #2: Monthly recurrencesubschema #3: Weekly recurrencefrom therequest propertyanyOflist - breaking
the
request property type changed fromobjectto no type - warning
added the new
VESenum value to the/response property for the response status - warning
added the new
es_ESenum value to the/response property for the response status - info
added the new optional
headerrequest parameterX-Company-Id - info
added the new
DE_intracom_exempt_BU0233enum value to the request property//// - info
added the new
DE_intracom_exempt_BU0233enum value to the request property//// - info
added the new
ES_intracom_sales_goodsenum value to the request property//// - info
added the new
ES_intracom_sales_goodsenum value to the request property//// - info
added the new
ES_intracom_sales_servicesenum value to the request property//// - info
added the new
ES_intracom_sales_servicesenum value to the request property//// - info
added the new
ES_isp_purchases_100enum value to the request property//// - info
added the new
ES_isp_purchases_100enum value to the request property//// - info
added the new
ES_isp_purchases_210enum value to the request property//// - info
added the new
ES_isp_purchases_210enum value to the request property//// - info
added the new
ES_isp_salesenum value to the request property//// - info
added the new
ES_isp_salesenum value to the request property//// - info
added the new
ES_suplidoenum value to the request property//// - info
added the new
ES_suplidoenum value to the request property//// - info
added the new
VESenum value to the request property/ - info
added the new
es_ESenum value to the request property/
- breaking