OpenAPI Documentation
Sales
Data export
Sales
Get invoice data
Retrieve data for a particular invoice available in the system
This endpoint may be used as a base for new invoice data that we wish to create based on a set of related invoices
If you wish to generate such object base you will need to provide both:
related
parameter, listing the related invoicesinvoiceType
of the new invoice we wish to create
The return object will be a temporary invoice object you may further extend before saving it.
GET
/
sales
/
invoice
Copy
curl --request GET \
--url https://api.altera.co/sales/invoice \
--header 'Authorization: <api-key>'
Copy
{
"invoice": {
"modelType": "INVOICE",
"readOnly": false,
"basicInformation": {
"invoiceId": 118584,
"invoiceType": "PRO_FORMA",
"invoiceFormat": "PRO %N/%M/%Y",
"invoiceNumber": "PRO 2/12/2022",
"year": 2022,
"month": 12,
"invoiceNumberInPeriod": 2,
"statusId": "SENT",
"isReceipt": false,
"isRelated": false,
"netPrice": 5760,
"grossPrice": 7084.8,
"currency": "PLN",
"exchangeRate": 1,
"vatPLN": 1324.8,
"issueDate": "2022-12-27T00:00:00.000Z",
"saleDate": "2022-12-27T00:00:00.000Z",
"uploadDate": "2022-12-27T08:52:22.000Z",
"relatedInvoicesIds": [],
"priceTypeId": "NET"
},
"contractor": {
"contractorName": "American Water Works Company, Inc.",
"contractorId": 106,
"taxIdentificationNumber": "3748414103",
"country": "PL",
"contractorType": "COMPANY",
"contractorRegion": "POLAND",
"defaultCurrency": "PLN",
"city": "Norton Canes",
"street": "Dezsez View",
"houseNumber": "396",
"flatNumber": "154",
"postCode": "97-135",
"email": "went@able.com,fv@altera.co",
"phoneNumber": "420577850",
"areaNumber": ""
},
"buyer": {
"contractorName": "American Water Works Company, Inc.",
"contractorId": 106,
"taxIdentificationNumber": "3748414103",
"country": "PL",
"contractorType": "COMPANY",
"contractorRegion": "POLAND",
"defaultCurrency": "PLN",
"city": "Norton Canes",
"street": "Dezsez View",
"houseNumber": "396",
"flatNumber": "154",
"postCode": "97-135",
"email": "went@able.com,fv@altera.co",
"phoneNumber": "420577850",
"areaNumber": ""
},
"seller": {
"taxIdentificationNumber": "1397887352",
"contractorName": "Express Scripts Inc."
},
"payments": {
"paymentMethod": "TRANSFER",
"dueDate": "2023-01-26T00:00:00.000Z",
"isSplitPayment": false,
"isPaid": false,
"paidAmount": 0,
"bankAccountNumber": "29 1111 1111 1111 1111 1111 1111"
},
"invoicePosition": [
{
"invoiceProductId": 57822,
"positionType": "SERVICE",
"productPosition": 0,
"productCategory": "Facebook",
"productCategoryId": 808,
"productName": "Facebook Ads",
"unit": "szt.",
"unitNetPrice": 480,
"unitGrossPrice": 590.4,
"quantity": 12,
"discount": 0,
"vat": "23%",
"priceNet": 5760,
"netPrice": "5760",
"vatAmt": 1324.8,
"priceGross": 7084.8,
"grossPrice": "7084.8",
"gtu": "-",
"deductions": true
}
],
"attachments": [
{
"id": 41660,
"fileName": "1_3_2022_1.pdf",
"fileSize": 26968
}
],
"costCenterPerItem": false,
"accounting": {
"vatProcedures": [],
"isSubjectToVat": true,
"activeVat": true
}
},
"defaults": {
"suggestedProducts": [
{
"productId": 780,
"productName": "Facebook Ads"
},
{
"productId": 781,
"productName": "Google Ads"
},
{
"productId": 779,
"productName": "Prowadzenie FP"
}
],
"suggestedContractor": [
{
"contractorId": 106,
"tinCountry": "PL",
"tin": "3748414103",
"name": "American Water Works Company, Inc.",
"contractorType": "COMPANY"
},
{
"contractorId": 104,
"tinCountry": "PL",
"tin": "4387990234",
"name": "Whirlpool Corporation",
"contractorType": "COMPANY"
},
{
"contractorId": 87,
"tinCountry": "PL",
"tin": "2231185845",
"name": "World Fuel Services Corporation",
"contractorType": "COMPANY"
}
],
"suggestedCategories": [
{
"categoryName": "Google"
},
{
"categoryName": "Facebook"
},
{
"categoryName": ""
}
],
"suggestedReasons": [
"Brak adnotacji \"mechanizm podzielonej płatności\"",
"Pomyłka w cenie",
"Pomyłka w dacie",
"Pomyłka w danych nabywcy",
"Pomyłka w ilości",
"Pomyłka w kwocie",
"Pomyłka w opisie",
"Pomyłka w stawce VAT",
"Rabat",
"Reklamacja",
"Zwrot towaru / płatności"
],
"units": [
"szt.",
"godz",
"dni",
"kg",
"mb"
],
"pkwiu": [],
"vatPcs": [
{
"name": "23%",
"value": 0.23
},
{
"name": "8%",
"value": 0.08
},
{
"name": "5%",
"value": 0.05
},
{
"name": "zw",
"nameEN": "exempt.",
"value": 0
},
{
"name": "np",
"nameEN": "reverse charge",
"value": 0
},
{
"name": "0%",
"value": 0
}
]
},
"relatedInvoices": []
}
Authorizations
OpenApi Key created within Altera.app for a certain company
Query Parameters
InvoiceId identificator of the exact invoice we wish to retrieve
Example:
36891
Comma delimited list of related invoices we wish to create a reference from
Example:
"124,551"
Invoice type for the new invoice we wish to create based on related invoices
Available options:
SALES
, CORRECTION
, INTERIM_FINAL
Example:
"CORRECTION"
Response
200
application/json
OK
The response is of type object
.
Was this page helpful?
Copy
curl --request GET \
--url https://api.altera.co/sales/invoice \
--header 'Authorization: <api-key>'
Copy
{
"invoice": {
"modelType": "INVOICE",
"readOnly": false,
"basicInformation": {
"invoiceId": 118584,
"invoiceType": "PRO_FORMA",
"invoiceFormat": "PRO %N/%M/%Y",
"invoiceNumber": "PRO 2/12/2022",
"year": 2022,
"month": 12,
"invoiceNumberInPeriod": 2,
"statusId": "SENT",
"isReceipt": false,
"isRelated": false,
"netPrice": 5760,
"grossPrice": 7084.8,
"currency": "PLN",
"exchangeRate": 1,
"vatPLN": 1324.8,
"issueDate": "2022-12-27T00:00:00.000Z",
"saleDate": "2022-12-27T00:00:00.000Z",
"uploadDate": "2022-12-27T08:52:22.000Z",
"relatedInvoicesIds": [],
"priceTypeId": "NET"
},
"contractor": {
"contractorName": "American Water Works Company, Inc.",
"contractorId": 106,
"taxIdentificationNumber": "3748414103",
"country": "PL",
"contractorType": "COMPANY",
"contractorRegion": "POLAND",
"defaultCurrency": "PLN",
"city": "Norton Canes",
"street": "Dezsez View",
"houseNumber": "396",
"flatNumber": "154",
"postCode": "97-135",
"email": "went@able.com,fv@altera.co",
"phoneNumber": "420577850",
"areaNumber": ""
},
"buyer": {
"contractorName": "American Water Works Company, Inc.",
"contractorId": 106,
"taxIdentificationNumber": "3748414103",
"country": "PL",
"contractorType": "COMPANY",
"contractorRegion": "POLAND",
"defaultCurrency": "PLN",
"city": "Norton Canes",
"street": "Dezsez View",
"houseNumber": "396",
"flatNumber": "154",
"postCode": "97-135",
"email": "went@able.com,fv@altera.co",
"phoneNumber": "420577850",
"areaNumber": ""
},
"seller": {
"taxIdentificationNumber": "1397887352",
"contractorName": "Express Scripts Inc."
},
"payments": {
"paymentMethod": "TRANSFER",
"dueDate": "2023-01-26T00:00:00.000Z",
"isSplitPayment": false,
"isPaid": false,
"paidAmount": 0,
"bankAccountNumber": "29 1111 1111 1111 1111 1111 1111"
},
"invoicePosition": [
{
"invoiceProductId": 57822,
"positionType": "SERVICE",
"productPosition": 0,
"productCategory": "Facebook",
"productCategoryId": 808,
"productName": "Facebook Ads",
"unit": "szt.",
"unitNetPrice": 480,
"unitGrossPrice": 590.4,
"quantity": 12,
"discount": 0,
"vat": "23%",
"priceNet": 5760,
"netPrice": "5760",
"vatAmt": 1324.8,
"priceGross": 7084.8,
"grossPrice": "7084.8",
"gtu": "-",
"deductions": true
}
],
"attachments": [
{
"id": 41660,
"fileName": "1_3_2022_1.pdf",
"fileSize": 26968
}
],
"costCenterPerItem": false,
"accounting": {
"vatProcedures": [],
"isSubjectToVat": true,
"activeVat": true
}
},
"defaults": {
"suggestedProducts": [
{
"productId": 780,
"productName": "Facebook Ads"
},
{
"productId": 781,
"productName": "Google Ads"
},
{
"productId": 779,
"productName": "Prowadzenie FP"
}
],
"suggestedContractor": [
{
"contractorId": 106,
"tinCountry": "PL",
"tin": "3748414103",
"name": "American Water Works Company, Inc.",
"contractorType": "COMPANY"
},
{
"contractorId": 104,
"tinCountry": "PL",
"tin": "4387990234",
"name": "Whirlpool Corporation",
"contractorType": "COMPANY"
},
{
"contractorId": 87,
"tinCountry": "PL",
"tin": "2231185845",
"name": "World Fuel Services Corporation",
"contractorType": "COMPANY"
}
],
"suggestedCategories": [
{
"categoryName": "Google"
},
{
"categoryName": "Facebook"
},
{
"categoryName": ""
}
],
"suggestedReasons": [
"Brak adnotacji \"mechanizm podzielonej płatności\"",
"Pomyłka w cenie",
"Pomyłka w dacie",
"Pomyłka w danych nabywcy",
"Pomyłka w ilości",
"Pomyłka w kwocie",
"Pomyłka w opisie",
"Pomyłka w stawce VAT",
"Rabat",
"Reklamacja",
"Zwrot towaru / płatności"
],
"units": [
"szt.",
"godz",
"dni",
"kg",
"mb"
],
"pkwiu": [],
"vatPcs": [
{
"name": "23%",
"value": 0.23
},
{
"name": "8%",
"value": 0.08
},
{
"name": "5%",
"value": 0.05
},
{
"name": "zw",
"nameEN": "exempt.",
"value": 0
},
{
"name": "np",
"nameEN": "reverse charge",
"value": 0
},
{
"name": "0%",
"value": 0
}
]
},
"relatedInvoices": []
}
Assistant
Responses are generated using AI and may contain mistakes.