@accounter/green-invoice-graphql
Version:
Graphql proxy for Green Invoice API
1,926 lines (1,924 loc) • 76.5 kB
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api.greeninvoice.co.il/schema/v1",
"$defs": {
"getDocumentResponse": {
"$ref": "#/$defs/Document"
},
"searchDocumentsRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"page": {
"type": "number",
"description": "Page requested"
},
"pageSize": {
"type": "number",
"description": "Results per page"
},
"number": {
"$ref": "#/$defs/DocumentTaxNumber"
},
"type": {
"type": "array",
"description": "Document type",
"items": {
"$ref": "#/$defs/DocumentType"
}
},
"status": {
"type": "array",
"description": "Document status",
"items": {
"type": "number",
"enum": [0, 1, 2, 3, 4]
}
},
"paymentTypes": {
"type": "array",
"description": "Payment types used in this document",
"items": {
"type": "number",
"enum": [-1, 0, 1, 2, 3, 4, 5, 10, 11]
}
},
"fromDate": {
"type": "string",
"description": "Documents that were created after the specified date in the format YYYY-MM-DD",
"format": "date"
},
"toDate": {
"type": "string",
"description": "Documents that were created until the specified date in the format YYYY-MM-DD",
"format": "date"
},
"clientId": {
"type": "string",
"description": "Client ID"
},
"clientName": {
"type": "string",
"description": "Client name"
},
"description": {
"type": "string",
"description": "Document description"
},
"download": {
"type": "boolean",
"description": "Whether document was downloaded by client"
},
"sort": {
"enum": ["documentDate", "creationDate"]
}
},
"required": []
},
"searchDocumentsResponse": {
"allOf": [
{ "$ref": "#/$defs/PaginationMeta" },
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/Document"
}
}
},
"required": ["items"]
}
],
"unevaluatedProperties": false
},
"previewDocumentRequest": {
"description": "Previews a document before the actual generation",
"additionalProperties": false,
"$ref": "#/$defs/DocumentInputNew"
},
"previewDocumentResponse": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"description": "Preview document file in Base64",
"type": "string"
}
},
"required": ["file"]
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"getLinkedDocumentsResponse": {
"$ref": "#/$defs/GetLinkedDocuments"
},
"getDocumentsDownloadLinksResponse": {
"$ref": "#/$defs/Url"
},
"addDocumentRequest": {
"description": "Add a document to the current business",
"allOf": [
{ "$ref": "#/$defs/DocumentInputNew" },
{
"type": "object",
"properties": {
"emailContent": {
"type": "string",
"description": "Email content to send with the document"
},
"attachment": {
"type": "boolean",
"description": "Whether to attach the document to the email"
}
}
}
],
"unevaluatedProperties": false
},
"addDocumentResponse": {
"oneOf": [
{
"$ref": "#/$defs/AddedDocument"
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"closeDocumentResponse": {
"type": "object",
"additionalProperties": false,
"properties": {}
},
"getExpenseRequest": {
"type": "object",
"additionalProperties": false,
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "The expense ID"
}
}
},
"getExpenseResponse": {
"$ref": "#/$defs/GetExpense"
},
"searchExpensesRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"fromDate": {
"type": "string",
"description": "Expense that were created after the specified date in the format YYYY-MM-DD"
},
"toDate": {
"type": "string",
"description": "Expense that were created until the specified date in the format YYYY-MM-DD"
},
"dueDate": {
"type": "string",
"description": "Due date of the expense, in the format YYYY-MM-DD"
},
"description": {
"type": "string",
"description": "Expense description"
},
"supplierId": {
"type": "string",
"description": "Supplier's ID"
},
"supplierName": {
"type": "string",
"description": "Supplier's name"
},
"number": {
"type": "string",
"description": "Expense serial number"
},
"paid": {
"type": "boolean",
"description": "Filter expenses that are only paid or unpaid, if not added to the request, will return both"
},
"reported": {
"type": "boolean",
"description": "Filter expenses that are only reported or unreported, if not added to the request, will return both"
},
"sort": {
"type": "string",
"description": "The field to sort the results by"
},
"minAmount": {
"type": "number",
"description": "Min amount of the expense"
},
"maxAmount": {
"type": "number",
"description": "Max amount of the expense"
},
"page": {
"type": "number",
"description": "Page requested"
},
"pageSize": {
"type": "number",
"description": "Results per page"
}
},
"required": ["minAmount", "maxAmount", "page", "pageSize"]
},
"searchExpensesResponse": {
"allOf": [
{ "$ref": "#/$defs/PaginationMeta" },
{
"type": "object",
"properties": {
"items": {
"$ref": "#/$defs/GetExpense"
}
}
}
],
"unevaluatedProperties": false
},
"addExpenseRequest": {
"$ref": "#/$defs/Expense"
},
"addExpenseResponse": {
"oneOf": [
{
"$ref": "#/$defs/Expense"
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"updateExpenseRequest": {
"type": "object",
"additionalProperties": false,
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "The expense ID"
},
"paymentType": {
"description": "Payment method",
"oneOf": [
{
"type": "boolean"
},
{
"type": ["string", "number"],
"enum": ["1", "2", "3", "4", "5", "10", "11", 1, 2, 3, 4, 5, 10, 11]
}
]
},
"currency": {
"$ref": "#/$defs/Currency"
},
"currencyRate": {
"$ref": "#/$defs/CurrencyRate"
},
"vat": {
"$ref": "#/$defs/Vat"
},
"amount": {
"type": "number",
"description": "The total amount of the expense"
},
"date": {
"type": "string",
"description": "Date of the expense"
},
"dueDate": {
"type": "string",
"description": "Due date of the expense"
},
"reportingDate": {
"type": "string",
"description": "Reporting date of the expense"
},
"documentType": {
"$ref": "#/$defs/ExpenseDocumentType"
},
"number": {
"type": "string",
"description": "Number of the expense"
},
"description": {
"type": "string",
"description": "Description for the expense"
},
"remarks": {
"type": "string",
"description": "Remarks for the expense"
},
"supplier": {
"$ref": "#/$defs/Supplier"
},
"accountingClassification": {
"$ref": "#/$defs/AccountingClassification"
},
"active": {
"type": "boolean",
"description": "Is the expense active or not"
}
}
},
"updateExpenseResponse": {
"oneOf": [
{
"$ref": "#/$defs/GetExpense"
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"searchExpenseDraftsRequest": {
"type": "object",
"additionalProperties": false,
"required": [],
"properties": {
"fromDate": {
"type": "string",
"description": "Expense drafts that were created after the specified date in the format YYYY-MM-DD",
"format": "date"
},
"toDate": {
"type": "string",
"description": "Expense drafts that were created until the specified date in the format YYYY-MM-DD",
"format": "date"
},
"description": {
"type": "string",
"description": "Expense draft description"
},
"supplierId": {
"type": "string",
"description": "Supplier's ID"
},
"supplierName": {
"type": "string",
"description": "Supplier's name"
},
"page": {
"type": "number",
"description": "Page requested"
},
"pageSize": {
"type": "number",
"description": "Results per page"
}
}
},
"searchExpenseDraftsResponse": {
"allOf": [
{ "$ref": "#/$defs/PaginationMeta" },
{
"type": "object",
"properties": {
"aggregations": {
"type": "object",
"additionalProperties": false,
"required": ["totalAmount"],
"properties": {
"totalAmount": {
"type": "object",
"additionalProperties": false,
"required": ["value"],
"properties": {
"value": {
"type": "number"
}
}
}
}
},
"items": {
"type": "array",
"description": "The expense drafts that were found",
"items": {
"type": "object",
"additionalProperties": false,
"description": "Partial Expense",
"required": [
"id",
"status",
"creationDate",
"lastUpdateDate",
"reportingPeriod",
"hasDefaultValues",
"url",
"thumbnail",
"expense"
],
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "number"
},
"creationDate": {
"$ref": "#/$defs/CreationDate"
},
"lastUpdateDate": {
"type": "number"
},
"reportingPeriod": {
"type": "string"
},
"hasDefaultValues": {
"type": "boolean"
},
"url": {
"type": "string"
},
"thumbnail": {
"type": "string"
},
"expense": {
"type": "object",
"additionalProperties": false,
"required": [
"accountingClassification",
"active",
"addRecipient",
"confirmFromEdit",
"currency",
"currencyRate",
"description",
"documentType",
"fileHash",
"fileKey",
"labels",
"reportingDate",
"supplier",
"tags",
"texts",
"vat"
],
"properties": {
"accountingClassification": {
"$ref": "#/$defs/AccountingClassification"
},
"active": {
"type": "boolean",
"description": "Is the expense active or not"
},
"addRecipient": {
"type": "boolean",
"description": "Should we save the supplier or not (by setting this to true you are required to add a supplier)"
},
"amount": {
"type": "number",
"description": "The total amount of the expense"
},
"confirmFromEdit": {
"type": "boolean"
},
"currency": {
"$ref": "#/$defs/Currency"
},
"currencyRate": {
"$ref": "#/$defs/CurrencyRate"
},
"date": {
"type": "string",
"description": "Date of the expense"
},
"description": {
"type": "string",
"description": "Description for the expense"
},
"documentType": {
"$ref": "#/$defs/ExpenseDocumentType"
},
"fileHash": {
"type": "string",
"description": "File hash"
},
"fileKey": {
"type": "string",
"description": "Key of the file location"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"number": {
"type": ["string", "null"],
"description": "Number of the expense"
},
"paymentType": {
"description": "Payment method",
"oneOf": [
{
"type": "boolean"
},
{
"type": ["string", "number"],
"enum": ["1", "2", "3", "4", "5", "10", "11", 1, 2, 3, 4, 5, 10, 11]
}
]
},
"reportingDate": {
"type": "string",
"description": "Reporting date of the expense"
},
"supplier": {
"$ref": "#/$defs/Supplier"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"texts": {
"type": "array",
"items": {
"type": "string"
}
},
"vat": {
"$ref": "#/$defs/Vat"
}
}
}
}
}
}
},
"required": ["aggregations", "items"]
}
],
"unevaluatedProperties": false
},
"addExpenseDraftByFileRequest": {
"type": "object",
"additionalProperties": false,
"required": [],
"properties": {
"file": {
"type": "string",
"description": "The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF"
}
}
},
"addExpenseDraftByFileResponse": {
"$ref": "#/$defs/GetExpenseDraft"
},
"addClientRequest": {
"description": "Add a new client to the current business",
"allOf": [
{ "$ref": "#/$defs/ContactInfo" },
{ "$ref": "#/$defs/Address" },
{ "$ref": "#/$defs/BankingInfo" },
{
"type": "object",
"properties": {
"name": {
"$ref": "#/$defs/ClientName"
},
"active": {
"type": "boolean",
"description": "Is the client currently active or not"
},
"taxId": {
"type": "string",
"description": "The client tax ID",
"examples": ["0123456789"]
},
"paymentTerms": {
"type": "integer",
"description": "The client payment term, default is 0",
"enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"send": {
"type": "boolean",
"description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
},
"department": {
"type": "string",
"description": "The client department"
},
"accountingKey": {
"type": "string",
"description": "The client accounting key"
},
"category": {
"type": "integer",
"description": "The category this client is related to"
},
"subCategory": {
"type": "integer",
"description": "The sub category this client is related to"
},
"remarks": {
"type": "string",
"description": "Client remarks for self use",
"example": "Customer approved 2016 sales"
}
},
"required": ["name"]
}
],
"unevaluatedProperties": false
},
"addClientResponse": {
"oneOf": [
{
"$ref": "#/$defs/getClientResponse"
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"updateClientRequest": {
"description": "Update an existing client",
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {
"$ref": "#/$defs/ClientName"
},
"active": {
"type": "boolean",
"description": "Is the client currently active or not"
},
"taxId": {
"type": "string",
"description": "The client tax ID",
"examples": ["0123456789"]
},
"paymentTerms": {
"type": "integer",
"description": "The client payment term, default is 0",
"enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"send": {
"type": "boolean",
"description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
},
"department": {
"type": "string",
"description": "The client department"
},
"accountingKey": {
"type": "string",
"description": "The client accounting key"
},
"category": {
"type": "integer",
"description": "The category this client is related to"
},
"subCategory": {
"type": "integer",
"description": "The sub category this client is related to"
},
"remarks": {
"type": "string",
"description": "Client remarks for self use",
"example": "Customer approved 2016 sales"
},
"phone": {
"type": "string",
"description": "Phone number"
},
"mobile": {
"type": "string",
"description": "Mobile number"
},
"emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "Email addresses"
},
"fax": {
"type": "string",
"description": "Fax number"
},
"contactPerson": {
"type": "string",
"description": "Contact person name"
},
"address": {
"type": "string",
"description": "Street address"
},
"city": {
"type": "string",
"description": "City name"
},
"zip": {
"type": "string",
"description": "Zip/postal code"
},
"country": {
"$ref": "#/$defs/Country"
},
"bankName": {
"type": "string",
"description": "Bank name"
},
"bankBranch": {
"type": "string",
"description": "Bank branch number"
},
"bankAccount": {
"type": "string",
"description": "Bank account number"
}
}
},
"updateClientResponse": {
"oneOf": [
{
"$ref": "#/$defs/getClientResponse"
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"deleteClientResponse": {
"oneOf": [
{
"$ref": "#/$defs/getClientResponse"
},
{
"$ref": "#/$defs/ErrorResponse"
}
]
},
"getClientResponse": {
"allOf": [
{ "$ref": "#/$defs/ContactInfo" },
{ "$ref": "#/$defs/Address" },
{ "$ref": "#/$defs/BankingInfo" },
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/ClientId"
},
"name": {
"$ref": "#/$defs/ClientName"
},
"active": {
"type": "boolean",
"description": "Is the client currently active or not"
},
"taxId": {
"type": "string",
"description": "The client tax ID",
"examples": ["0123456789"]
},
"paymentTerms": {
"type": "integer",
"description": "The client payment term, default is 0",
"enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"creationDate": {
"$ref": "#/$defs/CreationDate"
},
"lastUpdateDate": {
"type": "integer",
"description": "The last update date of the supplier, in UNIX timestamp format"
},
"send": {
"type": "boolean",
"description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
},
"department": {
"type": "string",
"description": "The supplier department"
},
"accountingKey": {
"type": "string",
"description": "The supplier accounting key"
},
"category": {
"type": "integer",
"description": "The category this client is related to"
},
"subCategory": {
"type": "integer",
"description": "The sub category this client is related to"
},
"remarks": {
"type": "string",
"description": "Client remarks for self use",
"example": "Customer approved 2016 sales"
},
"incomeAmount": {
"type": "number",
"description": "The amount of incomes from the customer"
},
"paymentAmount": {
"type": "number"
},
"balanceAmount": {
"type": "number",
"description": "The balance amount of the client"
}
}
}
],
"unevaluatedProperties": false
},
"getFileUploadUrlResponse": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "File Upload URL"
},
"fields": {
"type": "object",
"properties": {
"otherField": {
"type": "string"
},
"bucket": {
"type": "string"
},
"key": {
"type": "string"
},
"Policy": {
"type": "string"
},
"x-amz-meta-account-id": {
"type": "string"
},
"x-amz-meta-user-id": {
"type": "string"
},
"x-amz-meta-business-id": {
"type": "string"
},
"x-amz-meta-file-context": {
"type": "string"
},
"x-amz-meta-file-data": {
"type": "string"
},
"X-Amz-Algorithm": {
"type": "string"
},
"X-Amz-Credential": {
"type": "string"
},
"X-Amz-Date": {
"type": "string"
},
"X-Amz-Security-Token": {
"type": "string"
},
"X-Amz-Signature": {
"type": "string"
}
}
}
},
"required": ["url", "fields"]
},
"getBankTransactionsResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"size": {
"type": "integer"
},
"total": {
"type": "integer"
},
"pages": {
"type": "integer"
},
"page": {
"type": "integer"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
},
"aggregations": {
"type": "object",
"additionalProperties": false
},
"results": {
"type": "array",
"items": {
"$ref": "#/$defs/BankTransaction"
}
}
},
"required": []
},
"generalErrorResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"errorCode": {
"type": "integer"
},
"errorMessage": {
"type": ["string", "null"]
}
}
},
"AccountingClassification": {
"type": "object",
"additionalProperties": false,
"description": "Account classification of the expense",
"properties": {
"id": {
"type": "string",
"description": "The classification ID, see 'Get Accounting Classifications' endpoint"
},
"key": {
"type": "string",
"description": "The classification key"
},
"code": {
"type": "string",
"description": "The classification code"
},
"title": {
"type": "string",
"description": "The classification title"
},
"irsCode": {
"type": "number",
"description": "The classification IRS code",
"enum": [
1306, 1307, 1310, 1320, 1330, 1340, 1390, 3011, 3012, 3015, 3055, 3060, 3066, 3067,
3068, 3070, 3075, 3080, 3085, 3090, 3100, 3120, 3511, 3512, 3515, 3520, 3535, 3540,
3545, 3550, 3555, 3560, 3566, 3567, 3568, 3570, 3575, 3580, 3590, 3595, 3600, 3620,
3625, 3640, 3650, 3660, 3665, 3680, 5010, 5090, 8040, 8050, 8060, 8080, 8090
]
},
"income": {
"type": "number",
"description": "The classification income"
},
"type": {
"type": "number",
"description": "The classification type"
},
"vat": {
"type": "number",
"description": "The classification VAT"
}
}
},
"Address": {
"type": "object",
"description": "Physical address information",
"additionalProperties": false,
"properties": {
"address": {
"type": "string",
"description": "Street address"
},
"city": {
"type": "string",
"description": "City name"
},
"zip": {
"type": "string",
"description": "Zip/postal code"
},
"country": {
"$ref": "#/$defs/Country"
}
}
},
"BankingInfo": {
"type": "object",
"description": "Banking information",
"additionalProperties": false,
"properties": {
"bankName": {
"type": "string",
"description": "Bank name"
},
"bankBranch": {
"type": "string",
"description": "Bank branch number"
},
"bankAccount": {
"type": "string",
"description": "Bank account number"
}
}
},
"BankTransaction": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The transaction ID"
},
"aspspCode": {
"type": "string",
"description": "The bank code",
"enum": ["12"]
},
"businessId": {
"type": "string",
"description": "The business ID"
},
"createdAt": {
"type": "number",
"description": "The creation date timestamp"
},
"updatedAt": {
"type": "number",
"description": "The update date timestamp"
},
"status": {
"type": "integer"
},
"classification": {
"type": "integer"
},
"bookingStatus": {
"type": "string",
"description": "The booking status",
"enum": ["booked"]
},
"source": {
"type": "string",
"description": "The source of the transaction",
"enum": ["bank"]
},
"amount": {
"type": "number",
"description": "The amount of the transaction"
},
"resourceId": {
"type": "string",
"description": "The resource ID"
},
"creditorName": {
"type": ["string", "null"],
"description": "The creditor name"
},
"creditorAccount": {
"type": ["string", "null"],
"description": "The creditor account"
},
"currency": { "$ref": "#/$defs/Currency" },
"valueDate": {
"type": "string",
"description": "Value date of the transaction"
},
"bookingDate": {
"type": "string",
"description": "Booking date of the transaction"
},
"checkId": {
"type": ["string", "null"],
"description": "The check ID"
},
"description": {
"type": "string"
},
"debtorName": {
"type": ["string", "null"],
"description": "The debtor name"
},
"debtorAccount": {
"type": ["string", "null"],
"description": "The debtor account"
},
"type": {
"type": "string",
"description": "The type of the transaction",
"enum": ["credit", "debt"]
},
"name": { "type": "string" },
"date": {
"type": "string"
},
"iban": {
"type": "string",
"description": "The IBAN of the transaction"
}
}
},
"Business": {
"type": "object",
"additionalProperties": false,
"properties": {
"accountantDocsEmailSettings": {
"type": "number"
},
"accountantEmails": {
"type": "array"
},
"accountantReportEmailSettings": {
"type": "number"
},
"accountingType": {
"type": "number"
},
"active": {
"type": "boolean"
},
"advanceNationalInsuranceRate": {
"type": "number"
},
"advanceTaxRate": {
"type": "number"
},
"bankDisplay": {
"type": "boolean"
},
"bankDisplayEn": {
"type": "boolean"
},
"deductionRate": {
"type": "number"
},
"documentsEmailSettings": {
"type": "number"
},
"emailSubjectType": {
"type": "number"
},
"exemption": {
"type": "boolean",
"description": "Is the business exemption free or not",
"examples": [false]
},
"incomeReportEmailSettings": {
"type": "number"
},
"incomeReportFormatType": {
"type": "number"
},
"reportSendingDay": {
"type": "number"
},
"senderEmailSettings": {
"type": "number"
},
"type": {
"type": "number",
"description": "The business type ID",
"enum": [1, 2, 3, 4, 5, 6]
}
},
"required": [
"accountantDocsEmailSettings",
"accountantEmails",
"accountantReportEmailSettings",
"accountingType",
"active",
"advanceNationalInsuranceRate",
"advanceTaxRate",
"bankDisplay",
"bankDisplayEn",
"deductionRate",
"documentsEmailSettings",
"emailSubjectType",
"exemption",
"incomeReportEmailSettings",
"incomeReportFormatType",
"reportSendingDay",
"senderEmailSettings",
"type"
]
},
"Client": {
"type": "object",
"additionalProperties": false,
"properties": {
"country": {
"$ref": "#/$defs/Country"
},
"emails": {
"$ref": "#/$defs/ClientEmails"
},
"id": {
"$ref": "#/$defs/ClientId"
},
"name": {
"$ref": "#/$defs/ClientName"
},
"phone": {
"$ref": "#/$defs/ClientPhone"
},
"taxId": {
"type": "string",
"description": "The client tax ID",
"examples": ["0123456789"]
},
"self": {
"$ref": "#/$defs/ClientSelf"
},
"address": {
"type": "string",
"description": "Client address"
},
"city": {
"type": "string",
"description": "Client city"
},
"zip": {
"type": "string",
"description": "Client zip code"
},
"fax": {
"type": "string",
"description": "Client fax"
},
"mobile": {
"type": "string",
"description": "The client mobile number"
},
"add": {
"type": "boolean",
"description": "Add a temporary client to the clients' list"
}
}
},
"ClientEmails": {
"type": "array",
"description": "List of email addresses",
"items": {
"type": "string",
"format": "email"
}
},
"ClientId": {
"type": "string",
"description": "The client ID",
"examples": ["8b338c95-095e-46d4-b2c6-331747508759"],
"format": "uuid"
},
"ClientName": {
"type": "string",
"description": "The client name",
"examples": ["לקוח אפ3"],
"minLength": 1
},
"ClientPhone": {
"type": "string"
},
"ClientSelf": {
"type": "boolean",
"description": "Whether the client is self",
"examples": [false]
},
"ContactInfo": {
"type": "object",
"description": "Contact information for clients and suppliers",
"additionalProperties": false,
"properties": {
"phone": {
"type": "string",
"description": "Phone number"
},
"mobile": {
"type": "string",
"description": "Mobile number"
},
"emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "Email addresses"
},
"fax": {
"type": "string",
"description": "Fax number"
},
"contactPerson": {
"type": "string",
"description": "Contact person name"
}
}
},
"Country": {
"type": "string",
"description": "2-letter ISO supplier country code, default is IL",
"enum": [
"UG",
"UZ",
"AT",
"AU",
"UA",
"UY",
"AZ",
"CX",
"AE",
"IT",
"BS",
"GS",
"UM",
"VI",
"VG",
"HM",
"TC",
"MP",
"MH",
"SB",
"FO",
"FK",
"FJ",
"KM",
"CK",
"CC",
"KY",
"ID",
"IS",
"IE",
"IR",
"SV",
"AL",
"DZ",
"AX",
"AO",
"AI",
"AD",
"AQ",
"AG",
"EE",
"AF",
"EC",
"AR",
"US",
"AW",
"ER",
"AM",
"ET",
"BT",
"BV",
"BW",
"BG",
"BO",
"BA",
"BI",
"BF",
"BH",
"BY",
"BE",
"BZ",
"BD",
"BJ",
"BB",
"BN",
"BR",
"GB",
"BM",
"DJ",
"JM",
"JE",
"GA",
"GE",
"GH",
"GT",
"GU",
"GP",
"GY",
"GI",
"GN",
"GW",
"GQ",
"GF",
"GM",
"GL",
"DE",
"GD",
"GG",
"DM",
"DK",
"ZA",
"SS",
"KR",
"IM",
"NF",
"HT",
"MV",
"BQ",
"IN",
"NL",
"HK",
"HU",
"HN",
"IO",
"TF",
"PH",
"DO",
"CD",
"CF",
"PS",
"WF",
"VN",
"VU",
"VE",
"VA",
"ZW",
"ZM",
"CI",
"TJ",
"TV",
"TG",
"TO",
"TN",
"TK",
"TR",
"TM",
"TW",
"TZ",
"TT",
"GR",
"JP",
"JO",
"IL",
"KW",
"CV",
"LA",
"LB",
"LY",
"LU",
"LV",
"LR",
"LT",
"LI",
"LS",
"MR",
"MU",
"ML",
"MG",
"MZ",
"MD",
"MN",
"ME",
"MS",
"MC",
"TL",
"MM",
"YT",
"FM",
"MW",
"MY",
"MT",
"EG",
"MO",
"MK",
"MX",
"MA",
"MQ",
"NR",
"NO",
"NG",
"NZ",
"NU",
"NE",
"NI",
"NA",
"NP",
"ST",
"SJ",
"EH",
"SD",
"SZ",
"SO",
"SY",
"SR",
"SL",
"SC",
"CN",
"SG",
"SI",
"SK",
"WS",
"AS",
"BL",
"MF",
"SM",
"PM",
"SN",
"SH",
"VC",
"LC",
"SX",
"KN",
"SA",
"ES",
"RS",
"LK",
"OM",
"IQ",
"PW",
"PL",
"PF",
"PR",
"PT",
"PN",
"FI",
"PA",
"PG",
"PK",
"PY",
"PE",
"TD",
"CL",
"CZ",
"KP",
"FR",
"CU",
"CO",
"CG",
"XK",
"CR",
"CW",
"KZ",
"QA",
"KG",
"KI",
"NC",
"KH",
"CM",
"CA",
"KE",
"CY",
"HR",
"RE",
"RW",
"RO",
"RU",
"SE",
"CH",
"TH",
"YE"
]
},
"Currency": {
"type": "string",
"description": "3-letter ISO item currency code",
"enum": [
"ILS",
"USD",
"EUR",
"GBP",
"JPY",
"CHF",
"CNY",
"AUD",
"CAD",
"RUB",
"BRL",
"HKD",
"SGD",
"THB",
"MXN",
"TRY",
"NZD",
"SEK",
"NOK",
"DKK",
"KRW",
"INR",
"IDR",
"PLN",
"RON",
"ZAR",
"HRK"
]
},
"AddedDocument": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/$defs/DocumentId"
},
"lang": {
"$ref": "#/$defs/DocumentLang"
},
"number": {
"$ref": "#/$defs/DocumentSerialNumber"
},
"signed": {
"$ref": "#/$defs/DocumentSigned"
},
"url": {
"$ref": "#/$defs/Url"
}
},
"required": ["id", "lang", "number", "signed", "url"]
},
"Document": {
"type": "object",
"description": "A Single Document",
"additionalProperties": false,
"properties": {
"amount": {
"$ref": "#/$defs/DocumentAmount"
},
"amountDueVat": {
"$ref": "#/$defs/DocumentAmountDueVat"
},
"amountDueVatLocal": {
"$ref": "#/$defs/DocumentAmountDueVatLocal"
},
"amountExcludeVat": {
"$ref": "#/$defs/DocumentAmountExcludeVat"
},
"amountExemptVat": {
"$ref": "#/$defs/DocumentAmountExemptVat"
},
"amountLocal": {
"$ref": "#/$defs/DocumentAmountLocal"
},
"amountOpened": {
"$ref": "#/$defs/DocumentAmountOpened"
},
"business": {
"$ref": "#/$defs/Business"
},
"calculatedAmountLocal": {
"type": "number"
},
"calculatedAmountOpenedLocal": {
"type": "number"
},
"calculatedIncomeAmountExcludeLocal": {
"type": "number"
},
"calculatedIncomeAmountLocal": {
"type": "number"
},
"calculatedPaymentAmountLocal": {
"type": "number"
},
"cancellable": {
"type": "boolean"
},
"cancelType": {
"type": "number"
},
"client": {
"allOf": [
{ "$ref": "#/$defs/Client" },
{
"type": "object",
"required": ["country", "emails", "id", "name", "phone", "self"]
}
],
"unevaluatedProperties": false
},
"creationDate": {
"$ref": "#/$defs/CreationDate"
},
"currency": { "$ref": "#/$defs/Currency" },
"currencyRate": {
"$ref": "#/$defs/CurrencyRate"
},
"data": {
"$ref": "#/$defs/DocumentData"
},
"description": {
"$ref": "#/$defs/DocumentDescription"
},
"documentDate": {
"$ref": "#/$defs/DocumentDate"
},
"downloaded": {
"type": "boolean"
},
"footer": {
"$ref": "#/$defs/DocumentFooter"
},
"id": {
"$ref": "#/$defs/DocumentId"
},
"income": {
"$ref": "#/$defs/DocumentIncome"
},
"lang": {
"$ref": "#/$defs/DocumentLang"
},
"linkedDocuments": {
"$ref": "#/$defs/DocumentLinkedDocuments"
},
"number": {
"$ref": "#/$defs/DocumentTaxNumber"
},
"payment": {
"$ref": "#/$defs/DocumentPayment"
},
"ref": {
"$ref": "#/$defs/DocumentRef"
},
"remarks": {
"$ref": "#/$defs/DocumentRemarks"
},
"reverseCharge": {
"type": "boolean"
},
"rounding": {
"$ref": "#/$defs/DocumentRounding"
},
"signed": {
"$ref": "#/$defs/DocumentSigned"
},
"skinId": {
"type": "number"
},
"status": {
"$ref": "#/$defs/DocumentStatus"
},
"taxConfirmationEligible": {
"type": "boolean"
},
"templateId": {
"type": "number"
},
"type": {
"$ref": "#/$defs/DocumentType"
},
"url": {
"$ref": "#/$defs/Url"
},
"userName": {
"type": "string"
},
"vat": {
"$ref": "#/$defs/Vat"
},
"vatLocal": {
"type": "number"
},
"vatRate": {
"$ref": "#/$defs/VatRate"
},
"vatType": {
"$ref": "#/$defs/VatType"
}
},
"required": [
"amount",
"amountDueVat",
"amountDueVatLocal",
"amountExcludeVat",
"amountExemptVat",
"amountLocal",
"amountOpened",
"business",
"calculatedAmountLocal",
"calculatedAmountOpenedLocal",
"calculatedIncomeAmountExcludeLocal",
"calculatedIncomeAmountLocal",
"calculatedPaymentAmountLocal",
"cancellable",
"client",
"creationDate",
"currency",
"currencyRate",
"data",
"description",
"documentDate",
"downloaded",
"id",
"income",
"lang",
"number",
"payment",
"ref",
"reverseCharge",
"rounding",
"signed",
"skinId",
"status",
"taxConfirmationEligible",
"templateId",
"type",
"url",
"vat",
"vatRate",
"vatType"
]
},
"DocumentInputNew": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"$ref": "#/$defs/DocumentDescription"
},
"remarks": {
"$ref": "#/$defs/DocumentRemarks"
},
"footer": {
"$ref": "#/$defs/DocumentFooter"
},
"type": {
"$ref": "#/$defs/DocumentType"
},
"date": {
"description": "Document date in the format YYYY-MM-DD",
"type": "string"
},
"dueDate": {
"description": "Document payment due date in the format YYYY-MM-DD",
"type": "string"
},
"lang": {
"$ref": "#/$defs/DocumentLang"
},
"currency": { "$ref": "#/$defs/Currency" },
"vatType": {
"$ref": "#/$defs/VatType"
},
"discount": {
"$ref": "#/$defs/DocumentDiscount"
},
"rounding": {
"$ref": "#/$defs/DocumentRounding"
},
"signed": {
"$ref": "#/$defs/DocumentSigned"
},
"maxPayments": {
"description": "Max payments allowed (valid only on supported accounts)",
"type": "integer"
},
"client": {
"allOf": [
{ "$ref": "#/$defs/Client" },
{
"type": "object",
"required": ["id"]
}
],
"unevaluatedProperties": false
},
"income": {
"$ref": "#/$defs/DocumentIncome"
},
"payment": {
"$ref": "#/$defs/DocumentPayment"
},
"linkedDocumentIds": {
"description": "Linked document IDs. allows you to state the related / relevant documents, e.g.: when creating a receipt, attach your original invoice document ID as one of the ids in the linkedDocumentIds - this in turn will automatically close the original invoice if needed.",
"type": "array",
"items": {
"type": "string"
}
},
"linkedPaymentId": {
"description": "Linked payment ID (valid for document type 305 only). allows you to define the paymentId that the document is going to be relevant to, this can be attached only to invoice documents (type 305).",
"type": "string"
},
"linkType": {
"description": "Reference type (applicable only when using linkedDocumentIds)",
"type": "string",