Skip to content

Finalize

POST
/rest/billing/finalize
curl --request POST \
--url https://api.shypr.app/rest/billing/finalize \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <X-API-KEY>' \
--data '{ "entityIri": "example", "sendTo": { "name": "example", "email": "hello@example.com", "ccEmails": [ "example" ], "message": "example", "attachments": [ "example" ] } }'

Creates a FinalizeBillingRecordInput resource.

The new FinalizeBillingRecordInput resource

Finalizes a draft from its view page, without the form. The lines stay as the draft has them. A save of the form with the action “create” does the same, see InvoiceUpdateInputHandler.

object
entityIri
required
string
sendTo

Null when the user sends the PDF without Shypr (“manual”).

Any of:
object
name
required
string
email
required

More information

string format: email
ccEmails
Array
message
string | null
<= 1024 characters
attachments

Signed upload tickets, see POST /rest/documents/upload-url.

Array<string>
0 <= 10 items

Example generated

{
"entityIri": "example",
"sendTo": {
"name": "example",
"email": "hello@example.com",
"ccEmails": [
"example"
],
"message": "example",
"attachments": [
"example"
]
}
}

FinalizeBillingRecordInput resource created

Finalizes a draft from its view page, without the form. The lines stay as the draft has them. A save of the form with the action “create” does the same, see InvoiceUpdateInputHandler.

object
entityIri
required
string
sendTo

Null when the user sends the PDF without Shypr (“manual”).

Any of:
object
name
required
string
email
required

More information

string format: email
ccEmails
Array
message
string | null
<= 1024 characters
attachments

Signed upload tickets, see POST /rest/documents/upload-url.

Array<string>
0 <= 10 items

Example generated

{
"entityIri": "example",
"sendTo": {
"name": "example",
"email": "hello@example.com",
"ccEmails": [
"example"
],
"message": "example",
"attachments": [
"example"
]
}
}

Invalid input

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

Forbidden

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

An error occurred

Unprocessable entity

object
status
integer
default: 422
violations
Array<object>
object
propertyPath
required

The property path of the violation

string
message
required

The message associated with the violation

string
code

The code of the violation

string
hint

An extra hint to understand the violation

string
payload

The serialized payload of the violation

object
key
additional properties
any
detail
string
type
string
title
string | null
instance
string | null

Example

{
"status": 422
}