SalesInventoryReport APISpecification Vnet
SalesInventoryReport APISpecification Vnet
Change History
Version Change Description Author Date
1.0 Initial Write Kothai Ramanathan 2023/07/21
1.1 Updated Sample requests, Error codes, Retries and endpoints Kothai Ramanathan 2023/08/14
1.2 Updated Sample Sales and Inventory Reports for vNet Kothai Ramanathan 2023/09/14
1.3 Updated Client ID and Scope in Section 5.7 Kothai Ramanathan 2023/09/15
1.4 Added partner type in headers Kothai Ramanathan 2023/09/19
1.5 Added Tenant id in the Whitelisting section Kothai Ramanathan 2023/09/25
Sales and Inventory Report Integration API
1. Overview
External Partners, who are either Resellers or Distributors, report their Sales and Inventory numbers to Microsoft.
This will include the sales and return quantities made, and the stock of the inventory at the Partner end. These
sales and inventory reports are processed by the Microsoft Sales Team, to enable Partner incentive and Microsoft
seller’s compensation payments.
Azure Integration Services (AIS) is the Integration Layer that will receive the reports from the Partners. It performs
the required validations, data mapping and conversion to Microsoft Sales file format before posting the data to
Microsoft Sales.
For this purpose, Sales and Inventory Report APIs are exposed by AIS. Partners can post their sales/inventory
numbers by calling these APIs.
2. API Endpoint
The following are the endpoints to which a sales report will be posted.
{
"items": [
{
"<name1>":"<value11>",
"<name2>":"<value12>",
…
"<namen>":"<value1n>"
},
{
"<name1>":"<value21>",
"<name2>":"<value22>",
…
"<namen>":"<value2n>"
},
…
]
}
3.3 vNet - Sample Sales Report Request
Headers
TransactionType SalesReport
PartnerName SYNCHXS
PartnerType Distributor
Channel
Frequency Daily
ReportStartDate 20230614
ReportEndDate 20230614
Content-Type application/json
Body
{
"items": [
{
"partnerOrgId": " 5219778",
"parnterName": " Synnex Distributions (China) Ltd",
"resendIndicator":"O",
"reportEndDate": "20230614",
"invoiceDate":" 20230614",
"invoiceNumber": "",
"salesQuantity": "4",
"returnQuantity": "0",
"shipToName":"360buy",
"shipToTaxId":" 110192562134916",
"shipToExternalId":"",
"shipToAddress": "北京市北京经济技术开发区科创十一街18号院C座2层201室 010-89126954",
"shipToAddress2": "",
"shipToCity":"北京",
"shipToToState":"",
"shipToPostalCode":"",
"shipToCountry":"",
Body
{
"items": [
{
"partnerOrgId": " 5219778",
"parnterName": " Synnex Distributions (China) Ltd",
"resendIndicator":"O",
"reportEndDate": " 20230614",
The processing of the report is asynchronous. 202 Response only means that the request is accepted. This guid
reference can be used for any tracking purposes.
5. For tenant type, leave the default value of “Azure Active Directory” and click Next.
6. Provide Organization Name, Domain Name and Location as appropriate, and click Next.
10. You should be able to see the Tenant AAD like the below.
5.2 Invite Users to Manage the Tenant
1. Click on Users under the Tenant.
2. In the Users page, the user who created the Tenant is listed by default.
3. Here click on New User -> Invite External User
4. Provide the required details as appropriate and click Review+Invite, Invite. Here the user could be the
user from the Partner Organization, who can manage the Tenant.
5. The person invited will get an email in their Inbox. Accept the Invitation.
9. The Global Administrator Users can now login to the Azure Portal to the Tenant created for the
Organization. They will be able to add further Users to the Azure Active Directory.
10. Manage the Users and their roles by adding / removing them accordingly. Assignments can be removed or
downgraded by using the following.
5.4 Create an Application
1. Click on App Registrations
2. Click on New registration.
3. Provide any appropriate name for the application and say Register.
9. Copy the value of the secret and store it in an appropriate storage as per your Organization’s guidelines.
This value will not be retrievable later. This is the Client Secret.
10. Add an Application ID. Provide an appropriate name and say Save.
11. Define the Scope of the API. Provide details as appropriate to your Organization.
12. Authorize Client Application, as shown in the below snapshot. The Client IDs to be provided are shown in
section “5.7 Client Id and Scope”.
13. Note the endpoint from which the bearer token needs to be generated.
5.5 Getting the Bearer Token
When calling the AIS API to send the report, in the header pass the Bearer Token. Below are the details for
getting the bearer token.
End point from where the token has to be got: As mentioned in step 5.4.13. Below are the parameters to be
sent in the body:
5.6 Whitelisting
Share the application id, tenant id and the IP address from which the API call will be made. These are required
for whitelisting them at Microsoft end.