POST api/V3/InvoiceDetails/UploadPrimarySaleInvoices
Upload primary sales invoices (Max 2000 records can be uploaded in one request)
Request Information
URI Parameters
None.
Body Parameters
Invoice details to be uploaded
Collection of V3.PrimaryOrderInvoiceName | Description | Type | Additional information |
---|---|---|---|
InvoiceNumber |
Invoice Number |
string |
Required String length: inclusive between 1 and 30 |
DistributorErpId |
Erp Code Of The distributor from where this invoice was generated |
string |
Required String length: inclusive between 1 and 30 |
InvoiceDate |
Date of Invoice |
date |
Required |
SkuDetails |
Product Details |
Collection of V3.PrimaryOrderInvoiceDetails |
None. |
AttributeText |
Additional Information given by company |
string |
None. |
EmployeeErpID |
ErpID for the user who took the order |
string |
None. |
FactoryErpId |
Factory ERPID for the order |
string |
None. |
AttributeText2 |
Addition Information |
string |
None. |
Request Formats
application/json, text/json
Sample:
[ { "InvoiceNumber": "sample string 1", "DistributorErpId": "sample string 2", "InvoiceDate": "2025-04-04T05:34:35.2656051+00:00", "SkuDetails": [ { "ProductERPId": "sample string 1", "BatchNumber": "sample string 2", "Quantity": 3.1, "BilledPTD": 4.1, "Unit": "sample string 5", "NetAmount": 1.1, "LineNumber": 1, "TaxAmount": 1.1 }, { "ProductERPId": "sample string 1", "BatchNumber": "sample string 2", "Quantity": 3.1, "BilledPTD": 4.1, "Unit": "sample string 5", "NetAmount": 1.1, "LineNumber": 1, "TaxAmount": 1.1 } ], "AttributeText": "sample string 4", "EmployeeErpID": "sample string 5", "FactoryErpId": "sample string 6", "AttributeText2": "sample string 7" }, { "InvoiceNumber": "sample string 1", "DistributorErpId": "sample string 2", "InvoiceDate": "2025-04-04T05:34:35.2656051+00:00", "SkuDetails": [ { "ProductERPId": "sample string 1", "BatchNumber": "sample string 2", "Quantity": 3.1, "BilledPTD": 4.1, "Unit": "sample string 5", "NetAmount": 1.1, "LineNumber": 1, "TaxAmount": 1.1 }, { "ProductERPId": "sample string 1", "BatchNumber": "sample string 2", "Quantity": 3.1, "BilledPTD": 4.1, "Unit": "sample string 5", "NetAmount": 1.1, "LineNumber": 1, "TaxAmount": 1.1 } ], "AttributeText": "sample string 4", "EmployeeErpID": "sample string 5", "FactoryErpId": "sample string 6", "AttributeText2": "sample string 7" } ]
application/xml, text/xml
Sample:
<ArrayOfPrimaryOrderInvoice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.Models.V3"> <PrimaryOrderInvoice> <AttributeText>sample string 4</AttributeText> <AttributeText2>sample string 7</AttributeText2> <DistributorErpId>sample string 2</DistributorErpId> <EmployeeErpID>sample string 5</EmployeeErpID> <FactoryErpId>sample string 6</FactoryErpId> <InvoiceDate>2025-04-04T05:34:35.2656051+00:00</InvoiceDate> <InvoiceNumber>sample string 1</InvoiceNumber> <SkuDetails> <PrimaryOrderInvoiceDetails> <BatchNumber>sample string 2</BatchNumber> <BilledPTD>4.1</BilledPTD> <LineNumber>1</LineNumber> <NetAmount>1.1</NetAmount> <ProductERPId>sample string 1</ProductERPId> <Quantity>3.1</Quantity> <TaxAmount>1.1</TaxAmount> <Unit>sample string 5</Unit> </PrimaryOrderInvoiceDetails> <PrimaryOrderInvoiceDetails> <BatchNumber>sample string 2</BatchNumber> <BilledPTD>4.1</BilledPTD> <LineNumber>1</LineNumber> <NetAmount>1.1</NetAmount> <ProductERPId>sample string 1</ProductERPId> <Quantity>3.1</Quantity> <TaxAmount>1.1</TaxAmount> <Unit>sample string 5</Unit> </PrimaryOrderInvoiceDetails> </SkuDetails> </PrimaryOrderInvoice> <PrimaryOrderInvoice> <AttributeText>sample string 4</AttributeText> <AttributeText2>sample string 7</AttributeText2> <DistributorErpId>sample string 2</DistributorErpId> <EmployeeErpID>sample string 5</EmployeeErpID> <FactoryErpId>sample string 6</FactoryErpId> <InvoiceDate>2025-04-04T05:34:35.2656051+00:00</InvoiceDate> <InvoiceNumber>sample string 1</InvoiceNumber> <SkuDetails> <PrimaryOrderInvoiceDetails> <BatchNumber>sample string 2</BatchNumber> <BilledPTD>4.1</BilledPTD> <LineNumber>1</LineNumber> <NetAmount>1.1</NetAmount> <ProductERPId>sample string 1</ProductERPId> <Quantity>3.1</Quantity> <TaxAmount>1.1</TaxAmount> <Unit>sample string 5</Unit> </PrimaryOrderInvoiceDetails> <PrimaryOrderInvoiceDetails> <BatchNumber>sample string 2</BatchNumber> <BilledPTD>4.1</BilledPTD> <LineNumber>1</LineNumber> <NetAmount>1.1</NetAmount> <ProductERPId>sample string 1</ProductERPId> <Quantity>3.1</Quantity> <TaxAmount>1.1</TaxAmount> <Unit>sample string 5</Unit> </PrimaryOrderInvoiceDetails> </SkuDetails> </PrimaryOrderInvoice> </ArrayOfPrimaryOrderInvoice>
Response Information
Resource Description
ApiResponseName | Description | Type | Additional information |
---|---|---|---|
Message |
Message Indicating the Overall Response Summary of the Requested API |
string |
None. |
ResponseList |
List of Errors |
Collection of ApiResponseMessage |
None. |
Response |
Enum Indicating the Response status |
ResponseStatus |
None. |
ResponseStatusCount |
Summary containing Number of SuccessFull And Failed Tasks |
ResponseStatusCount |
None. |
Response Formats
application/json, text/json
Sample:
{ "Message": "sample string 1", "ResponseList": [ { "ERPId": "sample string 1", "Message": "sample string 2", "ResponseStatus": "Failure", "GUID": "sample string 3" }, { "ERPId": "sample string 1", "Message": "sample string 2", "ResponseStatus": "Failure", "GUID": "sample string 3" } ], "Response": "Failure", "ResponseStatusCount": { "Updated": 1, "Failed": 2, "Ignored": 3, "Name": "sample string 1", "Total": 6, "StatusMessage": "sample string 1: Total-6, Updated-1, Failed-2, Ignored-3", "ResponseStatus": "PartialSuccess" } }
application/xml, text/xml
Sample:
<ApiResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.Models.Common"> <Message>sample string 1</Message> <Response>Failure</Response> <ResponseList> <ApiResponseMessage> <ERPId>sample string 1</ERPId> <GUID>sample string 3</GUID> <Message>sample string 2</Message> <ResponseStatus>Failure</ResponseStatus> </ApiResponseMessage> <ApiResponseMessage> <ERPId>sample string 1</ERPId> <GUID>sample string 3</GUID> <Message>sample string 2</Message> <ResponseStatus>Failure</ResponseStatus> </ApiResponseMessage> </ResponseList> <ResponseStatusCount> <Failed>2</Failed> <Ignored>3</Ignored> <Name>sample string 1</Name> <Updated>1</Updated> </ResponseStatusCount> </ApiResponse>