Megaventory API v2017a

<back to all web services

DocumentTypeUpdate

Updates a document type.Uses your API Key and some Filters in an array format to apply the given action to an existing DocumentType.

Examples:



A.

Update the Document type with DocumentTypeAbbreviation = "PO". The result is returned as an mvDocumentTypes object.
The documentType with DocumentTypeAbbreviation = "PO" before the Update:

Response:

    {
        "mvDocumentType":
        {
            "DocumentTypeID": 4,
            "DocumentTypeAbbreviation": "PO",
            "DocumentTypeDescription": "Purchase Order",
            "DocumentTypeStockChange": "None",
            "InvoiceType": "None",
            "RestrictProductsBySupplier": false,
            "UpdateSupplierClientPriceWhenIssued": false,
            "IsReturn": false,
            "IsAdjustment": false,
            "IsTransfer": false,
            "IsSalesQuote": false,
            "IsSalesOrder": false,
            "IsPurchaseOrder": true,
            "IsFinishedGoodsReceipt": false,
            "IsWorkOrder": false,
            "IsHandlingInvoice": false,
            "DocumentTypeOptionsShowSKUImage": true,
            "DocumentTypeOptionsShowSupplierSKU": true,
            "DocumentTypeOptionsShowTax": true,
            "DocumentTypeOptionsShowDiscount": true,
            "DocumentTypeOptionsShowRemarks": false,
            "DocumentTypeOptionsShowExpectedDeliveryDate": false,
            "DocumentTypePrintOptionsUseCustomHeader": false,
            "DocumentTypePrintOptionsUseCustomFooter": false,
            "DocumentTypePrintOptionsShowClientInPickPackSlips": false,
            "DocumentTypePrintOptionsUseCustomHeaderPackingSlip": false,
            "DocumentTypePrintOptionsUseCustomFooterPackingSlip": false,
            "DocumentTypePrintOptionsUseCustomHeaderPickingSlip": false,
            "DocumentTypePrintOptionsUseCustomFooterPickingSlip": false,
            "DocumentTypePrintOptionsUseCustomFont": false,
            "DocumentTypePrintOptionsShowEAN": false,
            "DocumentTypePrintOptionsShowSKU": false,
            "DocumentTypePrintOptionsShowSubLocation": true,
            "DocumentTypePrintOptionsShowMovedQuantity": true,
            "DocumentTypePrintOptionsShowURL": true,
            "DocumentTypePrintOptionsShowSerialNumbers": false,
            "DocumentTypeOptionsShowDateTime": true,
            "DocumentTypePrintOptionsUseCustomSubject": false,
            "DocumentTypePrintOptionsShowPreTaxTotalsInRow": false,
            "DocumentTypePrintOptionsShowPostTaxTotalsInRow": false,
            "DocumentTypePrintOptionsShowPreDiscountTotalsInRow": false,
            "DocumentTypePrintOptionsShowPostDiscountTotalsInRow": false,
            "DocumentTypeAutoNumbering": true,
            "DocumentTypeAutoNumberingStartFrom": 1,
            "DocumentTypeAutoNumberingNextNumber": 50,
            "DocumentTypeAutoNumberingPrefix": "",
            "DocumentTypeAutoNumberingPostfix": ""
        }
    }

Then we call the documentTypeUpdate.
We update the DocumentTypeOptionsShowSKUImage to false and DocumentTypeOptionsShowSupplierSKU to false.

Value:

  {
   "mvDocumentType":
      {
         "DocumentTypeID": 4,
          "DocumentTypeAbbreviation": "PO",
          "DocumentTypeDescription": "Purchase Order",
          "DocumentTypeStockChange": "None",
          "InvoiceType": "None",
          "RestrictProductsBySupplier": false,
          "UpdateSupplierClientPriceWhenIssued": false,
          "IsReturn": false,
          "IsAdjustment": false,
          "IsTransfer": false,
          "IsSalesQuote": false,
          "IsSalesOrder": false,
          "IsPurchaseOrder": true,
          "IsFinishedGoodsReceipt": false,
          "IsWorkOrder": false,
          "IsHandlingInvoice": false,
          "DocumentTypeOptionsShowSKUImage": false,
          "DocumentTypeOptionsShowSupplierSKU": false,
          "DocumentTypeOptionsShowTax": true,
          "DocumentTypeOptionsShowDiscount": true,
          "DocumentTypeOptionsShowRemarks": false,
          "DocumentTypeOptionsShowExpectedDeliveryDate": false,
          "DocumentTypePrintOptionsUseCustomHeader": false,
          "DocumentTypePrintOptionsUseCustomFooter": false,
          "DocumentTypePrintOptionsShowClientInPickPackSlips": false,
          "DocumentTypePrintOptionsUseCustomHeaderPackingSlip": false,
          "DocumentTypePrintOptionsUseCustomFooterPackingSlip": false,
          "DocumentTypePrintOptionsUseCustomHeaderPickingSlip": false,
          "DocumentTypePrintOptionsUseCustomFooterPickingSlip": false,
          "DocumentTypePrintOptionsUseCustomFont": false,
          "DocumentTypePrintOptionsShowEAN": false,
          "DocumentTypePrintOptionsShowSKU": false,
          "DocumentTypePrintOptionsShowSubLocation": true,
          "DocumentTypePrintOptionsShowMovedQuantity": true,
          "DocumentTypePrintOptionsShowURL": true,
          "DocumentTypePrintOptionsShowSerialNumbers": false,
          "DocumentTypeOptionsShowDateTime": true,
          "DocumentTypePrintOptionsUseCustomSubject": false,
          "DocumentTypePrintOptionsShowPreTaxTotalsInRow": false,
          "DocumentTypePrintOptionsShowPostTaxTotalsInRow": false,
          "DocumentTypePrintOptionsShowPreDiscountTotalsInRow": false,
          "DocumentTypePrintOptionsShowPostDiscountTotalsInRow": false,
          "DocumentTypeAutoNumbering": true,
          "DocumentTypeAutoNumberingStartFrom": 1,
          "DocumentTypeAutoNumberingNextNumber": 50,
          "DocumentTypeAutoNumberingPrefix": "",
          "DocumentTypeAutoNumberingPostfix": ""
      },
   "mvRecordAction":"Update"
}

Response:

{
   "mvDocumentType":
      {
         "DocumentTypeID": 4,
          "DocumentTypeAbbreviation": "PO",
          "DocumentTypeDescription": "Purchase Order",
          "DocumentTypeStockChange": "None",
          "InvoiceType": "None",
          "RestrictProductsBySupplier": false,
          "UpdateSupplierClientPriceWhenIssued": false,
          "IsReturn": false,
          "IsAdjustment": false,
          "IsTransfer": false,
          "IsSalesQuote": false,
          "IsSalesOrder": false,
          "IsPurchaseOrder": true,
          "IsFinishedGoodsReceipt": false,
          "IsWorkOrder": false,
          "IsHandlingInvoice": false,
          "DocumentTypeOptionsShowSKUImage": false,
          "DocumentTypeOptionsShowSupplierSKU": false,
          "DocumentTypeOptionsShowTax": true,
          "DocumentTypeOptionsShowDiscount": true,
          "DocumentTypeOptionsShowRemarks": false,
          "DocumentTypeOptionsShowExpectedDeliveryDate": false,
          "DocumentTypePrintOptionsUseCustomHeader": false,
          "DocumentTypePrintOptionsUseCustomFooter": false,
          "DocumentTypePrintOptionsShowClientInPickPackSlips": false,
          "DocumentTypePrintOptionsUseCustomHeaderPackingSlip": false,
          "DocumentTypePrintOptionsUseCustomFooterPackingSlip": false,
          "DocumentTypePrintOptionsUseCustomHeaderPickingSlip": false,
          "DocumentTypePrintOptionsUseCustomFooterPickingSlip": false,
          "DocumentTypePrintOptionsUseCustomFont": false,
          "DocumentTypePrintOptionsShowEAN": false,
          "DocumentTypePrintOptionsShowSKU": false,
          "DocumentTypePrintOptionsShowSubLocation": true,
          "DocumentTypePrintOptionsShowMovedQuantity": true,
          "DocumentTypePrintOptionsShowURL": true,
          "DocumentTypePrintOptionsShowSerialNumbers": false,
          "DocumentTypeOptionsShowDateTime": true,
          "DocumentTypePrintOptionsUseCustomSubject": false,
          "DocumentTypePrintOptionsShowPreTaxTotalsInRow": false,
          "DocumentTypePrintOptionsShowPostTaxTotalsInRow": false,
          "DocumentTypePrintOptionsShowPreDiscountTotalsInRow": false,
          "DocumentTypePrintOptionsShowPostDiscountTotalsInRow": false,
          "DocumentTypeAutoNumbering": true,
          "DocumentTypeAutoNumberingStartFrom": 1,
          "DocumentTypeAutoNumberingNextNumber": 50,
          "DocumentTypeAutoNumberingPrefix": "",
          "DocumentTypeAutoNumberingPostfix": ""
      },
   "ResponseStatus": {
      "ErrorCode": "0"
   }
}

To override the Content-type in your clients HTTP Accept Header, append the .soap12 suffix or ?format=soap12

HTTP + SOAP12

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /soap12 HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<DocumentTypeUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <APIKEY>String</APIKEY>
  <mvDocumentType xmlns:d2p1="https://api.megaventory.com/types">
    <d2p1:DocumentTypeID>0</d2p1:DocumentTypeID>
    <d2p1:DocumentTypeCompanyID>0</d2p1:DocumentTypeCompanyID>
    <d2p1:DocumentTypeAbbreviation>String</d2p1:DocumentTypeAbbreviation>
    <d2p1:DocumentTypeDescription>String</d2p1:DocumentTypeDescription>
    <d2p1:DocumentTypeStockChange>None</d2p1:DocumentTypeStockChange>
    <d2p1:InvoiceType>None</d2p1:InvoiceType>
    <d2p1:RestrictProductsBySupplier>false</d2p1:RestrictProductsBySupplier>
    <d2p1:UpdateSupplierClientPriceWhenIssued>false</d2p1:UpdateSupplierClientPriceWhenIssued>
    <d2p1:IsReturn>false</d2p1:IsReturn>
    <d2p1:IsAdjustment>false</d2p1:IsAdjustment>
    <d2p1:IsTransfer>false</d2p1:IsTransfer>
    <d2p1:IsSalesQuote>false</d2p1:IsSalesQuote>
    <d2p1:IsSalesOrder>false</d2p1:IsSalesOrder>
    <d2p1:IsPurchaseOrder>false</d2p1:IsPurchaseOrder>
    <d2p1:IsFinishedGoodsReceipt>false</d2p1:IsFinishedGoodsReceipt>
    <d2p1:IsWorkOrder>false</d2p1:IsWorkOrder>
    <d2p1:IsHandlingInvoice>false</d2p1:IsHandlingInvoice>
    <d2p1:RelatedDocumentTypeID>0</d2p1:RelatedDocumentTypeID>
    <d2p1:DocumentTypeOptionsShowSKUImage>false</d2p1:DocumentTypeOptionsShowSKUImage>
    <d2p1:DocumentTypeOptionsShowSupplierSKU>false</d2p1:DocumentTypeOptionsShowSupplierSKU>
    <d2p1:DocumentTypeOptionsShowTax>false</d2p1:DocumentTypeOptionsShowTax>
    <d2p1:DocumentTypeOptionsShowDiscount>false</d2p1:DocumentTypeOptionsShowDiscount>
    <d2p1:DocumentTypeOptionsShowRemarks>false</d2p1:DocumentTypeOptionsShowRemarks>
    <d2p1:DocumentTypeOptionsShowWeight>false</d2p1:DocumentTypeOptionsShowWeight>
    <d2p1:DocumentTypeOptionsShowExpectedDeliveryDate>false</d2p1:DocumentTypeOptionsShowExpectedDeliveryDate>
    <d2p1:DocumentTypePrintOptionsUseCustomHeader>false</d2p1:DocumentTypePrintOptionsUseCustomHeader>
    <d2p1:DocumentTypePrintOptionsUseCustomFooter>false</d2p1:DocumentTypePrintOptionsUseCustomFooter>
    <d2p1:DocumentTypePrintOptionsShowClientInPickPackSlips>false</d2p1:DocumentTypePrintOptionsShowClientInPickPackSlips>
    <d2p1:DocumentTypePrintOptionsUseCustomHeaderPackingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomHeaderPackingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFooterPackingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomFooterPackingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomHeaderPickingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomHeaderPickingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFooterPickingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomFooterPickingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomHeaderDeliverySlip>false</d2p1:DocumentTypePrintOptionsUseCustomHeaderDeliverySlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFooterDeliverySlip>false</d2p1:DocumentTypePrintOptionsUseCustomFooterDeliverySlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFont>false</d2p1:DocumentTypePrintOptionsUseCustomFont>
    <d2p1:DocumentTypePrintOptionsShowEAN>false</d2p1:DocumentTypePrintOptionsShowEAN>
    <d2p1:DocumentTypePrintOptionsShowSKU>false</d2p1:DocumentTypePrintOptionsShowSKU>
    <d2p1:DocumentTypePrintOptionsShowSubLocation>false</d2p1:DocumentTypePrintOptionsShowSubLocation>
    <d2p1:DocumentTypePrintOptionsShowMovedQuantity>false</d2p1:DocumentTypePrintOptionsShowMovedQuantity>
    <d2p1:DocumentTypePrintOptionsShowURL>false</d2p1:DocumentTypePrintOptionsShowURL>
    <d2p1:DocumentTypePrintOptionsShowSerialNumbers>false</d2p1:DocumentTypePrintOptionsShowSerialNumbers>
    <d2p1:DocumentTypeOptionsShowDateTime>false</d2p1:DocumentTypeOptionsShowDateTime>
    <d2p1:DocumentTypePrintOptionsUseCustomSubject>false</d2p1:DocumentTypePrintOptionsUseCustomSubject>
    <d2p1:DocumentTypePrintOptionsShowPreTaxTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPreTaxTotalsInRow>
    <d2p1:DocumentTypePrintOptionsShowPostTaxTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPostTaxTotalsInRow>
    <d2p1:DocumentTypePrintOptionsShowPreDiscountTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPreDiscountTotalsInRow>
    <d2p1:DocumentTypePrintOptionsShowPostDiscountTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPostDiscountTotalsInRow>
    <d2p1:DocumentTypeAutoNumbering>false</d2p1:DocumentTypeAutoNumbering>
    <d2p1:DocumentTypeAutoNumberingStartFrom>0</d2p1:DocumentTypeAutoNumberingStartFrom>
    <d2p1:DocumentTypeAutoNumberingNextNumber>0</d2p1:DocumentTypeAutoNumberingNextNumber>
    <d2p1:DocumentTypeAutoNumberingPrefix>String</d2p1:DocumentTypeAutoNumberingPrefix>
    <d2p1:DocumentTypeAutoNumberingPostfix>String</d2p1:DocumentTypeAutoNumberingPostfix>
  </mvDocumentType>
  <mvRecordAction>Insert</mvRecordAction>
  <mvInsertUpdateDeleteSourceApplication>String</mvInsertUpdateDeleteSourceApplication>
</DocumentTypeUpdate>

    </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<DocumentTypeUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <mvDocumentType xmlns:d2p1="https://api.megaventory.com/types">
    <d2p1:DocumentTypeID>0</d2p1:DocumentTypeID>
    <d2p1:DocumentTypeCompanyID>0</d2p1:DocumentTypeCompanyID>
    <d2p1:DocumentTypeAbbreviation>String</d2p1:DocumentTypeAbbreviation>
    <d2p1:DocumentTypeDescription>String</d2p1:DocumentTypeDescription>
    <d2p1:DocumentTypeStockChange>None</d2p1:DocumentTypeStockChange>
    <d2p1:InvoiceType>None</d2p1:InvoiceType>
    <d2p1:RestrictProductsBySupplier>false</d2p1:RestrictProductsBySupplier>
    <d2p1:UpdateSupplierClientPriceWhenIssued>false</d2p1:UpdateSupplierClientPriceWhenIssued>
    <d2p1:IsReturn>false</d2p1:IsReturn>
    <d2p1:IsAdjustment>false</d2p1:IsAdjustment>
    <d2p1:IsTransfer>false</d2p1:IsTransfer>
    <d2p1:IsSalesQuote>false</d2p1:IsSalesQuote>
    <d2p1:IsSalesOrder>false</d2p1:IsSalesOrder>
    <d2p1:IsPurchaseOrder>false</d2p1:IsPurchaseOrder>
    <d2p1:IsFinishedGoodsReceipt>false</d2p1:IsFinishedGoodsReceipt>
    <d2p1:IsWorkOrder>false</d2p1:IsWorkOrder>
    <d2p1:IsHandlingInvoice>false</d2p1:IsHandlingInvoice>
    <d2p1:RelatedDocumentTypeID>0</d2p1:RelatedDocumentTypeID>
    <d2p1:DocumentTypeOptionsShowSKUImage>false</d2p1:DocumentTypeOptionsShowSKUImage>
    <d2p1:DocumentTypeOptionsShowSupplierSKU>false</d2p1:DocumentTypeOptionsShowSupplierSKU>
    <d2p1:DocumentTypeOptionsShowTax>false</d2p1:DocumentTypeOptionsShowTax>
    <d2p1:DocumentTypeOptionsShowDiscount>false</d2p1:DocumentTypeOptionsShowDiscount>
    <d2p1:DocumentTypeOptionsShowRemarks>false</d2p1:DocumentTypeOptionsShowRemarks>
    <d2p1:DocumentTypeOptionsShowWeight>false</d2p1:DocumentTypeOptionsShowWeight>
    <d2p1:DocumentTypeOptionsShowExpectedDeliveryDate>false</d2p1:DocumentTypeOptionsShowExpectedDeliveryDate>
    <d2p1:DocumentTypePrintOptionsUseCustomHeader>false</d2p1:DocumentTypePrintOptionsUseCustomHeader>
    <d2p1:DocumentTypePrintOptionsUseCustomFooter>false</d2p1:DocumentTypePrintOptionsUseCustomFooter>
    <d2p1:DocumentTypePrintOptionsShowClientInPickPackSlips>false</d2p1:DocumentTypePrintOptionsShowClientInPickPackSlips>
    <d2p1:DocumentTypePrintOptionsUseCustomHeaderPackingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomHeaderPackingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFooterPackingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomFooterPackingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomHeaderPickingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomHeaderPickingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFooterPickingSlip>false</d2p1:DocumentTypePrintOptionsUseCustomFooterPickingSlip>
    <d2p1:DocumentTypePrintOptionsUseCustomHeaderDeliverySlip>false</d2p1:DocumentTypePrintOptionsUseCustomHeaderDeliverySlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFooterDeliverySlip>false</d2p1:DocumentTypePrintOptionsUseCustomFooterDeliverySlip>
    <d2p1:DocumentTypePrintOptionsUseCustomFont>false</d2p1:DocumentTypePrintOptionsUseCustomFont>
    <d2p1:DocumentTypePrintOptionsShowEAN>false</d2p1:DocumentTypePrintOptionsShowEAN>
    <d2p1:DocumentTypePrintOptionsShowSKU>false</d2p1:DocumentTypePrintOptionsShowSKU>
    <d2p1:DocumentTypePrintOptionsShowSubLocation>false</d2p1:DocumentTypePrintOptionsShowSubLocation>
    <d2p1:DocumentTypePrintOptionsShowMovedQuantity>false</d2p1:DocumentTypePrintOptionsShowMovedQuantity>
    <d2p1:DocumentTypePrintOptionsShowURL>false</d2p1:DocumentTypePrintOptionsShowURL>
    <d2p1:DocumentTypePrintOptionsShowSerialNumbers>false</d2p1:DocumentTypePrintOptionsShowSerialNumbers>
    <d2p1:DocumentTypeOptionsShowDateTime>false</d2p1:DocumentTypeOptionsShowDateTime>
    <d2p1:DocumentTypePrintOptionsUseCustomSubject>false</d2p1:DocumentTypePrintOptionsUseCustomSubject>
    <d2p1:DocumentTypePrintOptionsShowPreTaxTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPreTaxTotalsInRow>
    <d2p1:DocumentTypePrintOptionsShowPostTaxTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPostTaxTotalsInRow>
    <d2p1:DocumentTypePrintOptionsShowPreDiscountTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPreDiscountTotalsInRow>
    <d2p1:DocumentTypePrintOptionsShowPostDiscountTotalsInRow>false</d2p1:DocumentTypePrintOptionsShowPostDiscountTotalsInRow>
    <d2p1:DocumentTypeAutoNumbering>false</d2p1:DocumentTypeAutoNumbering>
    <d2p1:DocumentTypeAutoNumberingStartFrom>0</d2p1:DocumentTypeAutoNumberingStartFrom>
    <d2p1:DocumentTypeAutoNumberingNextNumber>0</d2p1:DocumentTypeAutoNumberingNextNumber>
    <d2p1:DocumentTypeAutoNumberingPrefix>String</d2p1:DocumentTypeAutoNumberingPrefix>
    <d2p1:DocumentTypeAutoNumberingPostfix>String</d2p1:DocumentTypeAutoNumberingPostfix>
  </mvDocumentType>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
      </d2p1:ResponseError>
    </d2p1:Errors>
  </ResponseStatus>
  <InternalErrorCode>String</InternalErrorCode>
</DocumentTypeUpdateResponse>

    </soap12:Body>
</soap12:Envelope>