curl --request POST \
--url https://b.anny.co/api/v1/invoices/{invoice_id}/move-to-balance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"balanceable_type": "customers",
"balanceable_id": "12345"
}
'{
"data": {
"id": "<string>",
"type": "invoices",
"attributes": {
"number": "<string>",
"formatted_number": "<string>",
"currency": "<string>",
"is_cancellation": true,
"is_credit": true,
"has_payment": true,
"show_transfer_note": true,
"vat_number": "<string>",
"notes": "<string>",
"recipient": "<string>",
"invoicing_party": "<string>",
"total": 123,
"net_amount": 123,
"tax_amount": 123,
"status": "draft",
"is_processing": true,
"access_token": "<string>",
"issued_at": "<string>",
"due_date": "<string>",
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"order": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"items": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"payments": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"organization": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Orders & Billing
Move invoice to a balance
Move an existing draft invoice to a customer balance. If the invoice is already on a balance, it is detached from the old one and attached to the new target.
The target balanceable can be a Customer or a Business. The system resolves or creates the appropriate open balance for the current billing period.
Rejects locked invoices and consolidated child invoices (HTTP 400).
POST
/
api
/
v1
/
invoices
/
{invoice_id}
/
move-to-balance
curl --request POST \
--url https://b.anny.co/api/v1/invoices/{invoice_id}/move-to-balance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"balanceable_type": "customers",
"balanceable_id": "12345"
}
'{
"data": {
"id": "<string>",
"type": "invoices",
"attributes": {
"number": "<string>",
"formatted_number": "<string>",
"currency": "<string>",
"is_cancellation": true,
"is_credit": true,
"has_payment": true,
"show_transfer_note": true,
"vat_number": "<string>",
"notes": "<string>",
"recipient": "<string>",
"invoicing_party": "<string>",
"total": 123,
"net_amount": 123,
"tax_amount": 123,
"status": "draft",
"is_processing": true,
"access_token": "<string>",
"issued_at": "<string>",
"due_date": "<string>",
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"order": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"items": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"payments": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"organization": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Header
Bearer Token
Pfadparameter
UUID of the invoice
Abfrageparameter
Organization ID
Body
application/json
Antwort
OK
An invoice generated for an order, containing line items and payment status.
Show child attributes
Show child attributes