Receipts
Mutation
cloneReceipt — Returns Receipt
Scopes Required: modify_receipts
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the Receipt to clone |
|
|
name |
String! |
The name of the newly cloned Receipt |
Example Mutation
mutation CloneReceipt($id: ID!, $name: String!) {
cloneReceipt(id: $id, name: $name) {
id,
name,
type,
components,
receiptWidth
}
}
# Example variables
{
"id": "<ID>",
"name": "<NAME>"
}Mutation
createReceipt — Returns Receipt
Scopes Required: modify_receipts
| Arguments | Type | Description |
|---|---|---|
|
name |
String! |
The name of the receipt |
|
type |
The type of receipt this is |
|
|
width |
Int |
The width of the receipt (currently only valid for TEXT_ONLY receipts) |
|
account |
Boolean |
Whether this is an account receipt (true) or a normal sale receipt (false) |
|
empty |
Boolean |
Whether the new receipt should contain the default template or be empty (defaults to true) |
|
attachments |
The receipts to attach when sent via email, this is only valid when |
Example Mutation
mutation CreateReceipt($name: String!, $type: ReceiptTypeEnum!) {
createReceipt(name: $name, type: $type) {
id,
name,
type,
components,
receiptWidth
}
}
# Example variables
{
"name": "<NAME>",
"type": "NORMAL"
}Mutation
deleteReceipt — Returns Receipt
Scopes Required: modify_receipts
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the receipt to delete |
Example Mutation
mutation DeleteReceipt($id: ID!) {
deleteReceipt(id: $id) {
id,
name,
type,
components,
receiptWidth
}
}
# Example variables
{
"id": "<ID>"
}Mutation
updateReceipt — Returns Receipt
Scopes Required: modify_receipts
This is currently an experimental mutation, please get in contact with us before using it.
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the receipt |
|
|
name |
String |
The name of the receipt |
|
components |
The components this receipt contains |
|
|
padding |
The padding this receipt should have |
|
|
receiptWidth |
Float |
The width of the receipt (typically in mm) |
|
attachments |
The attachments that should be automatically connected to this receipt |
Example Mutation
mutation UpdateReceipt($id: ID!) {
updateReceipt(id: $id) {
id,
name,
type,
components,
receiptWidth
}
}
# Example variables
{
"id": "<ID>"
}