POST https://{host}/rest/v1/{unitId}/documents
Example of very simple issued document
{
"type": "DOCUMENT.ISSUED",
"agencyId": 18,
"ownerId": 24,
"companyId": 30370,
"personId": 24409,
"binderId": 25619,
"properties": {
"name": "This is subject",
"createdOn": "2021-09-03",
"bodyRichtext-1": "<p>This is body <strong>formatted</strong> text.</p>"
}
}
Example of similar document, but with process "Manager approval" to be initialized
{
"type": "DOCUMENT.ISSUED",
"agencyId": 18,
"ownerId": 24,
"companyId": 30370,
"personId": 24409,
"binderId": 25619,
"setProcess": "PROCESS-DOCUMENT.MANAGER.APPROVAL",
"properties": {
"name": "This is subject",
"createdOn": "2021-09-03",
"bodyRichtext-1": "<p>This is body <strong>formatted</strong> text.</p>"
}
}
Example of document with label filled
{
"type": "DOCUMENT.ISSUED",
"agencyId": 18,
"ownerId": 24,
"companyId": 30370,
"personId": 24409,
"binderId": 25619,
"tags": ["tag1"],
"status": "PROCESSING",
"statusDate": "2021-09-01",
"category": "CATEGORY.DOCUMENT-LETTER",
"properties": {
"name": "This is subject",
"createdOn": "2021-09-03",
"bodyRichtext-1": "<p>This is body <strong>formatted</strong> text.</p>",
"properties.companyName": "AD-IN-ONE Europe a.s.",
"properties.companyLabelName": "Mr. James Sample",
"properties.companyLabelNameSuffix": "CEO",
"properties.companyLabelAddress": "'Venceslass square16\n15500 Praha\nCzechia'"
}
}
Example of issued purchase order including table of items
{
"type": "DOCUMENT.ORDER.PURCHASE",
"agencyId": 18,
"ownerId": 24,
"companyId": 30370,
"personId": 24409,
"binderId": 26582,
"tags": [
"štítek1"
],
"status": "PROCESSING",
"statusDate": "2021-09-01",
"category": "",
"acl": {
"read": {
"users": [],
"groups": [232]
},
"write": {
"users": [24],
"groups": []
}
},
"properties": {
"name": "Purchase order",
"createdOn": "2021-09-03",
"bodyRichtext-1": "<p>This is body <strong>formatted</strong> text.</p>",
"paperSize": "PAPER.SIZE-A4",
"paperOrientation": "PORTRAIT",
"printForm": "PAPER.HEADER-DOCUMENT.OFFICIAL",
"formLanguage": "en",
"createdIn": "external system",
"showSignature": false,
"currencyDoc": "CZK",
"exPairDocAcc": "CZK/CZK",
"exRateDocAcc": 1,
"exchangeDate": "2021-09-06",
"paymentCondition": "CONDITION.PAYMENT.PURCHASE_ORDER-TRANSFER.AFTER_DELIVERY",
"bodyEditTable-DOCUMENT.ORDER.PURCHASE.ITEMS": {
"data": [
{
"amountDoc": 100,
"jobOwnerName": "",
"rowNumber": 0,
"unitCostDoc": 100,
"currencyDoc": "CZK",
"brand": "",
"jobName": "",
"amountAcc": 100,
"name": "test",
"client": "",
"info": "",
"itemId": -1,
"count": 1,
"currencyAcc": "CZK",
"jobOwnerId": "",
"target": {
"jobId": 25713
}
]
}
}
}
Example of issued client invoice including table of items
{
"agencyId": 2,
"type": "INVOICE.SALES",
"ownerId": 2,
"companyId": 3,
"personId": 2,
"binderId": null,
"number": null,
"tags": [],
"status": "PROCESSING",
"statusDate": "2022-01-01",
"category": "CATEGORY.INVOICE.SALES-LOCAL",
"properties": {
"name": "First sample sales invoice",
"createdOn": "2022-01-01",
"companyName": "",
"companyLabelName": "",
"companyLabelNameSuffix": "",
"companyLabelAddress": "Bavorská 14\n155 00 Praha 5\nCzechia",
"bodyRichtext-1": "<p></p>",
"bodyRichtext-2": "<p></p>",
"paperSize": "PAPER.SIZE-A4",
"paperOrientation": "PORTRAIT",
"printForm": "PAPER.HEADER-INVOICE.SALES",
"formLanguage": "en",
"createdIn": "external system",
"showSignature": false,
"currencyDoc": "EUR",
"exPairDocAcc": "CZK/EUR",
"exRateDocAcc": 25.0,
"exchangeDate": "2022-01-01",
"vatDate": "2022-01-01",
"issueDate": "2022-01-01",
"supplyDate": "2022-01-01",
"paymentDate": "2022-01-01",
"paymentCondition": "CONDITION.PAYMENT.INVOICE-TRANSFER",
"paymentMark": "PAYMENT.NONE",
"agencyBankAccountId": null,
"agencyBankAccount": {},
"referenceNumber": "1234",
"bodyEditTable-INVOICE.SALES.ITEMS": {
"data": [
{
"rowId": 1,
"name": "Design",
"count": 25,
"unitPriceDoc": 100,
"amountDoc": 2500,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 2,
"name": "Print of leaflets",
"count": 1000,
"unitPriceDoc": 0.50,
"amountDoc": 500,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 3,
"name": "Designer",
"count": 10,
"unitPriceDoc": 100,
"amountDoc": 1000,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 4,
"name": "Web programmer",
"count": 10,
"unitPriceDoc": 120,
"amountDoc": 1200,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
}
]
}
}
}
Example of issued purchase invoice including table of items
{
"agencyId": 2,
"type": "INVOICE.PURCHASE",
"ownerId": 2,
"companyId": 3,
"personId": 2,
"binderId": null,
"number": null,
"tags": [],
"status": "PROCESSING",
"statusDate": "2022-01-02",
"category": "CATEGORY.INVOICE.PURCHASE-LOCAL",
"properties": {
"name": "First sample sales invoice",
"createdOn": "2022-01-02",
"referenceNumber": "AA-01234",
"companyNumber": "1234",
"companyName": "",
"companyLabelName": "",
"companyLabelNameSuffix": "",
"companyLabelAddress": "Bavorská 14\n155 00 Praha 5\nCzechia",
"bodyRichtext-1": "<p></p>",
"bodyRichtext-2": "<p></p>",
"paperSize": "PAPER.SIZE-A4",
"paperOrientation": "PORTRAIT",
"printForm": "PAPER.HEADER-INVOICE.PURCHASE",
"formLanguage": "en",
"createdIn": "external system",
"showSignature": false,
"currencyDoc": "EUR",
"exPairDocAcc": "CZK/EUR",
"exRateDocAcc": 25.0,
"exchangeDate": "2022-01-02",
"vatDate": "2022-01-02",
"issueDate": "2022-01-02",
"supplyDate": "2022-01-02",
"receiptDate": "2022-01-02",
"paymentDate": "2022-01-02",
"paymentCondition": "CONDITION.PAYMENT.INVOICE-TRANSFER",
"paymentMark": "PAYMENT.NONE",
"agencyBankAccountId": null,
"agencyBankAccount": {},
"bodyEditTable-INVOICE.PURCHASE.ITEMS": {
"data": [
{
"rowId": 1,
"name": "Design",
"count": 25,
"unitPriceDoc": 100,
"amountDoc": 2500,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 2,
"name": "Print of leaflets",
"count": 1000,
"unitPriceDoc": 0.50,
"amountDoc": 500,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
}
]
}
}
}
Example of issued sales quotation including table of items
{
"agencyId": 2,
"type": "DOCUMENT.QUOTATION.SALES",
"ownerId": 2,
"companyId": 3,
"personId": 2,
"binderId": null,
"number": null,
"tags": [],
"status": "APPROVED",
"statusDate": "2022-01-03",
"category": "",
"properties": {
"name": "Quotation for the sample project",
"createdOn": "2022-01-03",
"companyName": "",
"companyLabelName": "",
"companyLabelNameSuffix": "",
"companyLabelAddress": "Bavorská 14\n155 00 Praha 5\nCzechia",
"bodyRichtext-1": "<p></p>",
"bodyRichtext-2": "<p></p>",
"paperSize": "PAPER.SIZE-A4",
"paperOrientation": "PORTRAIT",
"printForm": "PAPER.HEADER-DOCUMENT",
"formLanguage": "en",
"createdIn": "external system",
"showSignature": false,
"currencyDoc": "EUR",
"exPairDocAcc": "CZK/EUR",
"exRateDocAcc": 25.0,
"exchangeDate": "2022-01-03",
"paymentCondition": "CONDITION.PAYMENT.INVOICE-TRANSFER",
"bodyEditTable-DOCUMENT.QUOTATION.SALES.ITEMS": {
"data": [
{
"rowId": 1,
"name": "Design",
"count": 10,
"unitPriceDoc": 100,
"costPriceQuote": 1000,
"costUnitPriceQuote": 100,
"costUnitMarkupQuote": 50,
"costSalesPrice": 1500,
"workHoursQuote": 0,
"workRateQuote": 0,
"workSalesPrice": 0,
"discountPercentage": 0,
"commissionPercentage": 0,
"amountDoc": 1500,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 2,
"name": "Print of leaflets",
"count": 1000,
"unitPriceDoc": 0.50,
"costPriceQuote": 500,
"costUnitPriceQuote": 0.50,
"costUnitMarkupQuote": 0.25,
"costSalesPrice": 750,
"workHoursQuote": 0,
"workRateQuote": 0,
"workSalesPrice": 0,
"discountPercentage": 0,
"commissionPercentage": 0,
"amountDoc": 750,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 3,
"name": "Designer",
"count": 10,
"unitPriceDoc": 0,
"costPriceQuote": 0,
"costUnitPriceQuote": 0,
"costUnitMarkupQuote": 0,
"costSalesPrice": 0,
"workHoursQuote": 10,
"workRateQuote": 120,
"workSalesPrice": 0,
"discountPercentage": 0,
"commissionPercentage": 0,
"amountDoc": 0,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
},
{
"rowId": 4,
"name": "Web programmer",
"count": 15,
"unitPriceDoc": 0,
"costPriceQuote": 0,
"costUnitPriceQuote": 0,
"costUnitMarkupQuote": 0,
"costSalesPrice": 0,
"workHoursQuote": 15,
"workRateQuote": 140,
"workSalesPrice": 0,
"discountPercentage": 0,
"commissionPercentage": 0,
"amountDoc": 0,
"currencyDoc": "EUR",
"vatSelector": "0.00",
"vatPercentage": 0,
"itemNumber": "JOB-00001",
"category": "OPIN.JOB"
}
]
}
}
}
Example of Opportunity
{
"agencyId": 2,
"type": "OPPORTUNITY",
"ownerId": 7,
"companyId": 4,
"personId": null,
"binderId": null,
"tags": null,
"number": null,
"status": "POTENTIAL",
"participantIds": null,
"statusDate": "2022-01-04",
"category": null,
"properties": {
"name": "Digital services Sample",
"createdOn": "2022-01-04",
"opportunityNextStepNote": "Call them",
"opportunityExpCloseDate": "2022-01-04",
"opportunityNextStepDate": "2022-01-04",
"opportunityValue": 50000,
"bodyRichtext-1": "<p>This is such a great potential client. They are looking for a Digital services across many countries. Our goal from the Sales part is to convince them that we have the best Digital division in the country.</p>",
"formLanguage": "en",
"paperOrientation": "PORTRAIT",
"paperSize": "PAPER.SIZE-A4",
"printForm": "PAPER.HEADER-DOCUMENT"
}
}
Example of Absence request
{
"type": "ABSENCE",
"ownerId": 24,
"companyId": 23792,
"personId": null,
"binderId": null,
"number": "",
"status": "APPROVED",
"statusDate": "2021-12-23",
"category": "CATEGORY.ABSENCE-ABSENCE",
"properties": {
"name": "Bobby Brown Absence 2022-03-05 - 2022-03-08",
"absenceType": "SUBCATEGORY.ABSENCE-PAID_FULL",
"startDate": "2022-03-05",
"endDate": "2022-03-08",
"bodyRichtext-1": "<p>Absence HTML body</p>",
"paperOrientation": "PORTRAIT",
"formLanguage": "cs",
"paperSize": "PAPER.SIZE-A4",
"printForm": "PAPER.HEADER-ABSENCE",
"division": "",
"department": ""
}
}