Reporting API - Viewing Vendor Invoice Row JSONs via API
Introduction
While it is Appxite platform functionality to generate the invoices based on the data received from the vendors and provide these via UI and API, we also expose the invoice JSONs we received for such vendors so that the invoice data is transparent to our partners.
The following two endpoints are made available publicly for any partners who use the Reporting APIs:
- GET /api/v1/reporting/invoices/vendor-raw/{requesterId}/summary
- GET /api/v1/reporting/invoices/vendor-raw/{requesterId}?vendorInvoiceNumber={vendorInvoiceNumber}
In this article:
- GET /api/v1/reporting/invoices/vendor-raw/{requesterId}/summary
- GET /api/v1/reporting/invoices/vendor-raw/{requesterId}?vendorInvoiceNumber={vendorInvoiceNumber}
- vendorInvoiceRowSchemaType Possible Values
GET /api/v1/reporting/invoices/vendor-raw/{requesterId}/summary
- requesterID = consumerId of the invoice (eg. distributor)
Based on consumerId of the invoice it returns all invoices received from vendor API in the last 12 months but no older that 2024-01-01.
Response:
{
"vendorFullName": "guid", // FullName from Organizations
"vendorId": "string", //AppXite's internal Id of Vendor
"vendorInvoiceNumber": "string",
"invoiceDateUtc": "datetime",
"contractTypeId": "guid", // contractTypeId from contracts which linked with Invoices for vendorInvoiceNumber
"contractTypeName": "string", // Name from ContractTypes
}
Sample response shown below:
In case no invoices were found which matches the criteria you would receive as follows:
response code: 400
response message: No invoices found! There aren't any invoices which would be in allowed range. With InvoiceDateUtc starting '2024-01-01' and in last 12 month period!
Once you identified the vendorInvoiceNumber, you can proceed to the next endpoint to get more details.
GET /api/v1/reporting/invoices/vendor-raw/{requesterId}?vendorInvoiceNumber={vendorInvoiceNumber}
- requesterID = consumerId of the invoice (eg. distributor)
- vendorInvoiceNumber = vendorInvoiceNumber from API call mentioned above
Based on consumerId it returns all InvoiceDataRaw lines which are linked with invoices which match vendorInvoiceNumber.
Response:
{
"vendorFullName": "guid", // FullName from Organizations
"vendorId": "string", //AppXite's internal Id of Vendor
"vendorInvoiceNumber": "string",
"invoiceDateUtc": "datetime",
"contractTypeId": "guid", // contractTypeId from contracts which linked with Invoices for vendorInvoiceNumber
"contractTypeName": "string", // Name from ContractTypes
"vendorRawItems": [{
"vendorInvoiceRowSchemaType": "enum", // Possible values to be set Microsoft_CSP_UsageBased, Microsoft_CSP_LicenseBased, Microsoft_AzurePlanOneTime, Google_Cloud, Google_Workspace, Adobe_DistributionServices, Vendor_Defined for more details please see comments bellow.
"vendorRawLines": [{
"vendorInvoiceRowId": "guid", //vendorInvoiceRowId from Reporting API v1 invoice-rows and invoice-rows/ Preview Response -> vendorInvoiceRowId ( should use expand= AllDetails in order to have this value in Respone)
"vendorInvoiceRow": "jsonObject" // Vendor Raw Invoice Line which Schema is based on vendorInvoiceRowSchemaType
}
]
}
]
}
Sample responses shown below:
In either case, the responses are as follows:
- vendorInvoiceNumber not found:
response code: 400
response message: Vendor invoice not found! - vendorInvoiceNumber isn't in allowed in filter range:
response code: 400
response message: Request not Allowed! Vendor invoice InvoiceDateUtc is more than 12 months in past from Now!
- vendorInvoiceNumber not belongs for requesterId:
response code: 400
response message: empty
vendorInvoiceRowSchemaType Possible Values
- Microsoft_CSP_UsageBased = 0 - if this schema type is set it means items under "vendorInvoiceRow" match Json Object Item described in https://learn.microsoft.com/en-us/dotnet/api/microsoft.store.partnercenter.models.invoices.usagebasedlineitem?view=partnercenter-dotnet-latest#properties
- Microsoft_CSP_LicenseBased = 1 - if this schema type is set it means items under "vendorInvoiceRow" match Json Object Item described in https://learn.microsoft.com/en-us/dotnet/api/microsoft.store.partnercenter.models.invoices.licensebasedlineitem?view=partnercenter-dotnet-latest#properties
- Microsoft_AzurePlanOneTime = 2 - if this schema type is set it means items under "vendorInvoiceRow" match Json Object Item described in https://learn.microsoft.com/en-us/dotnet/api/microsoft.store.partnercenter.models.invoices.onetimeinvoicelineitem?view=partnercenter-dotnet-latest#properties
- Google_Cloud - if this schema type is set it means items under "vendorInvoiceRow" match Json Object Item like example bellow:
{
"BillingAccountName": "AppXite Demo",
"BillingAccountId": "077CKC-KKEFS&-72128V",
"ProjectName": "ax-test-project",
"ProjectId": "ax-test-project",
"ProjectHierarchy": "[Project not associated with any folders or organizations]",
"ServiceDescription": "Cloud Logging",
"ServiceId": "5490-F7B7-8DF6",
"SkuDescription": "Log Storage cost",
"SkuId": "143F-A1B0-E0BE",
"CreditType": "",
"CostType": "Usage",
"UsageStartDate": "2024-01-31T00:00:00",
"UsageEndDate": "2024-02-29T00:00:00",
"UsageAmount": 1.211,
"UsageUnit": "gibibyte",
"UnRoundedCost": 0.0,
"Cost": 0.0
}
- Google_Workspace = 4 - if this schema type is set it means items under "vendorInvoiceRow" match Json Object Item like example bellow:
{
"DomainName": "testdomain.ax",
"Subscription": "Google Workspace Business Standard",
"Description": "Commitment",
"OrderName": "7777862272-02",
"StartDate": "2024-02-01T00:00:00+00:00",
"EndDate": "2024-02-29T00:00:00+00:00",
"Quantity": 1.0,
"PoNumber": "d924b41f-1991-4e3b-8e45-d02d685157e4",
"Amount": 7.0
}
- Adobe_DistributionServices = 5 - if this schema type is set it means items under "vendorInvoiceRow" match Json Object Item like example bellow:
{
"Sold_To_Company_ID": "77777777",
"Sold_To_Name": "AppXite",
"Sold_To_Address": "Matrozu iela 15",
"Sold_To_City": "Riga",
"Sold_To_State": null,
"Sold_To_Postal_Code": "00007",
"Sold_To_Country": "Latvia",
"Bill_To_Company_ID": "88888888",
"Bill_To_Name": "AppXite",
"Bill_To_Address": "Matrozu iela 15",
"Bill_To_City": "Riga",
"Bill_To_Postal_Code": "00007",
"Bill_To_Country": "Latvia",
"Reseller_ID": "999999999999",
"Reseller_Name": "Riga",
"Reseller_Country": "Latvia",
"Ship_To_Customer_ID": "55555555",
"Ship_To_Name": "AppXite",
"Ship_To_Address": "Matrozu iela 15",
"Ship_To_City": "Riga",
"Ship_To_State": null,
"Ship_To_Postal_Code": "00007",
"Ship_To_Country": "Latvia",
"Order_Number": "6756756765756",
"Invoice_Number": "5556756756765756",
"External_Reference": null,
"Order_Date": "28-Dec-2023",
"Billing_Cycle": "YEARLY",
"Comments": "No VAT liability in Seller's Country.",
"Line_Item": null,
"Subscription_ID": "54654654654df4534534534543cNA",
"SKU": "65305183CA02A12",
"Product_Description": "Illustrator ALL MLP License Subscription MUE",
"Charge_Start_Date": "2023-12-28T00:00:00",
"Charge_End_Date": "2024-12-27T00:00:00",
"Quantity": 2.0,
"Product_Price": 556.76,
"Charge_Type": "INVOICE",
"Order_Reason": "RENEWAL",
"Ext_Price": 278.38,
"Tax_YN": "N",
"Tax_Rate": "0%",
"Taxes_1": 0.0,
"Line_Total_Amount": 556.76,
"Currency": "EUR",
"Local_Currency": "EUR",
"Extended_Price_Local": 556.76,
"Taxes_Local_Currency": null,
"Invoice_Total_Local": 556.76,
"Exchange_Rate": 1.0,
"Exchange_Date": "2023-12-28T00:00:00",
"Extended_Price": 556.76,
"Taxes_2": 0.0,
"Invoice_Total_Amount": 1000.76,
"Sub_Total": 556.76,
"Tax_Total": 0.0,
"Grand_Total": 2000.76 "Market_Segment":"COM"
} -
Vendor_Defined = 7 - it means Vendor manages integration with AppXite and controls schema of Json Item which is provided in "vendorInvoiceRow". AppXite can't describe those Vendor schemas as Vendor controls integration and should be defined by Vendor.
Limitations
Conclusion
Related Content
Was this article helpful?
Articles in this section
- Reporting API - Overview
- Reporting API - requesting access
- Reporting API - Data Model
- Reporting API - How to map your Invoice Data
- Reporting API - Detailed Invoice Line Items
- Reporting API - How to identify Organizations in your Sales Channel
- Reporting API - Currencies within the Invoices
- Reporting API : Preview invoices in status 'New'
- Reporting API - Using updatedDate Filters
- Reporting API - Viewing Vendor Invoice Row JSONs via API
Add comment
Please sign in to leave a comment.