Web Service: PurchasingService

PLEASE NOTE: This web service has been superceded by the PurchasingServiceV3.

The web methods below have not been copied to the PurchasingServiceV3 and can only be run via this web service.

Port PurchasingService

Location:
http://<MRI_Evolution_Site_Path>/Services/Basic/PurchasingService.svc
Protocol:
SOAP
Transport protocol:
SOAP over HTTP
Operations:
  1. CreatePurchaseOrderDetail
  2. GetAllDeliveriesDetail
  3. GetAllPurchaseOrderHeadersDetail
  4. GetAllPurchasePaymentTypesDetail
  5. GetPurchasePaymentsForPurchaseOrderDetail

Port type IPurchasingService

1. CreatePurchaseOrder

Style: document

Operation type: Request-response. The endpoint receives a message, and sends a correlated message.

Input: IPurchasingService_CreatePurchaseOrder_InputMessage (soap:body, use = literal)

parameters type CreatePurchaseOrder

Parameter Name Required Type Description
sessionId Optional string sessionId parameter (nillable)
impersonateAccountId Optional long impersonateAccountId parameter (nillable)
purchaseOrderHeaderDto Optional PurchaseOrderHeaderDto purchaseOrderHeaderDto parameter (nillable)
DisplayText Optional string DisplayText parameter (nillable)
FilterQueryId Optional long FilterQueryId parameter
PrimaryKeyId Optional long PrimaryKeyId parameter
PrimaryTableCatalogId Optional long PrimaryTableCatalogId parameter
ValidateOnly Optional boolean ValidateOnly parameter
AmountReceived Optional double AmountReceived parameter (nillable)
AuthorisedBy Optional string AuthorisedBy parameter (nillable)
AuthorisedDate Optional TimeZoneDateTimeGenericDate AuthorisedDate parameter (nillable)
_utcValue Required dateTime _utcValue parameter
_x003C_SourceTimeZoneInfoId_x003E_k__BackingField Required string _x003C_SourceTimeZoneInfoId_x003E_k__BackingField parameter (nillable)
ContactName Optional string ContactName parameter (nillable)
ContractId Optional long ContractId parameter (nillable)
DeliveryDate Optional TimeZoneDateTimeGenericDate DeliveryDate parameter (nillable)
_utcValue Required dateTime _utcValue parameter
_x003C_SourceTimeZoneInfoId_x003E_k__BackingField Required string _x003C_SourceTimeZoneInfoId_x003E_k__BackingField parameter (nillable)
DeliveryId Optional long DeliveryId parameter (nillable)
Description Optional string Description parameter (nillable)
NetAmount Optional double NetAmount parameter (nillable)
OrderNumber Optional string OrderNumber parameter (nillable)
OriginId Optional long OriginId parameter (nillable)
OwnerID Optional long OwnerID parameter (nillable)
POH_AMT_PAID Optional double POH_AMT_PAID parameter (nillable)
POH_FKEY_SB_SEQ Optional int POH_FKEY_SB_SEQ parameter (nillable)
POH_NAME_ORIGIN Optional string POH_NAME_ORIGIN parameter (nillable)
POH_REFERENCE Optional string POH_REFERENCE parameter (nillable)
PurchaseOrderHeaderId Optional long PurchaseOrderHeaderId parameter (nillable)
PurchaseOrderStatusId Optional long PurchaseOrderStatusId parameter (nillable)
RequestNumber Optional long RequestNumber parameter (nillable)
RequestedBy Optional string RequestedBy parameter (nillable)
RequestedDate Optional TimeZoneDateTimeGenericDate RequestedDate parameter (nillable)
_utcValue Required dateTime _utcValue parameter
_x003C_SourceTimeZoneInfoId_x003E_k__BackingField Required string _x003C_SourceTimeZoneInfoId_x003E_k__BackingField parameter (nillable)
Status Optional PurchaseOrderState Cancelled, Dormant, Active, Completed, Unauthorised, History
SupplierId Optional long SupplierId parameter (nillable)
TaxAmount Optional double TaxAmount parameter (nillable)
TimeZoneInfoId Optional string TimeZoneInfoId parameter (nillable)
TotalAmount Optional double TotalAmount parameter (nillable)
purchaseOrderItemDtos Optional ArrayOfPurchaseOrderItemDto purchaseOrderItemDtos parameter (nillable)
PurchaseOrderItemDto Optional PurchaseOrderItemDto PurchaseOrderItemDto parameter (nillable)
DisplayText Optional string DisplayText parameter (nillable)
FilterQueryId Optional long FilterQueryId parameter
PrimaryKeyId Optional long PrimaryKeyId parameter
PrimaryTableCatalogId Optional long PrimaryTableCatalogId parameter
ValidateOnly Optional boolean ValidateOnly parameter
CostCentreId Optional long CostCentreId parameter (nillable)
CostCodeId Optional long CostCodeId parameter (nillable)
Description Optional string Description parameter (nillable)
DiscountAmount Optional double DiscountAmount parameter (nillable)
DiscountRate Optional double DiscountRate parameter (nillable)
FinanceCodeId Optional long FinanceCodeId parameter (nillable)
ItemForId Optional int ItemForId parameter (nillable)
NetCost Optional double NetCost parameter (nillable)
Notes Optional string Notes parameter (nillable)
POI_CHARGE_AMT Optional double POI_CHARGE_AMT parameter (nillable)
POI_FKEY_STK_CHG_SEQ Optional int POI_FKEY_STK_CHG_SEQ parameter (nillable)
POI_QTY_DESCRIP Optional string POI_QTY_DESCRIP parameter (nillable)
POI_TAX_RECLAIM Optional unsignedByte POI_TAX_RECLAIM parameter (nillable)
POI_TYPE Optional string POI_TYPE parameter (nillable)
POI_UNIT_PRICE Optional double POI_UNIT_PRICE parameter (nillable)
POI_VAT_CODE Optional string POI_VAT_CODE parameter (nillable)
PartCode Optional string PartCode parameter (nillable)
PurchaseOrderHeaderId Optional long PurchaseOrderHeaderId parameter (nillable)
PurchaseOrderItemId Optional long PurchaseOrderItemId parameter (nillable)
Quantity Optional double Quantity parameter (nillable)
QuantityOutstanding Optional double QuantityOutstanding parameter (nillable)
QuantityReceived Optional double QuantityReceived parameter (nillable)
StockId Optional long StockId parameter (nillable)
SupplierPartCode Optional string SupplierPartCode parameter (nillable)
TaskId Optional long TaskId parameter (nillable)
TaxAmount Optional double TaxAmount parameter (nillable)
TaxCodeId Optional long TaxCodeId parameter (nillable)
TaxPercent Optional double TaxPercent parameter (nillable)
TimeZoneInfoId Optional string TimeZoneInfoId parameter (nillable)
Unit Optional string Unit parameter (nillable)
UnitPrice Optional double UnitPrice parameter (nillable)

Output: IPurchasingService_CreatePurchaseOrder_OutputMessage (soap:body, use = literal)

parameters type CreatePurchaseOrderResponse

Parameter Name Required Type Description
CreatePurchaseOrderResult Optional long CreatePurchaseOrderResult parameter
Code Examples
C# Example
// Create the service client
using (var client = new PurchasingServiceClient())
{
    // Create the request parameters
    string sessionId = "your_value_here";
    long impersonateAccountId = 123;
    var purchaseOrderHeaderDto = new PurchaseOrderHeaderDto
    {
        // Set DTO properties here
    };
    
    // Call the service method
    var response = client.CreatePurchaseOrder(sessionId, impersonateAccountId, purchaseOrderHeaderDto);
    
    // Process the response
    if (response != null)
    {
        // Handle successful response
        Console.WriteLine("Operation completed successfully");
    }
}
SOAP XML Example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:bas="http://basic.evolutionsvc.mriapi.com/">
   <soap:Header/>
   <soap:Body>
      <bas:CreatePurchaseOrder>
         <bas:sessionId>sample_value</bas:sessionId>
         <bas:impersonateAccountId>123</bas:impersonateAccountId>
         <bas:purchaseOrderHeaderDto>
            <!-- PurchaseOrderHeaderDto properties here -->
         </bas:purchaseOrderHeaderDto>
      </bas:CreatePurchaseOrder>
   </soap:Body>
</soap:Envelope>
PowerShell Example
# Create web service proxy
$serviceUrl = "http://your-evolution-site.com/Services/Basic/PurchasingService.svc?wsdl"
$proxy = New-WebServiceProxy -Uri $serviceUrl

# Set parameters
$sessionId = "your_value_here"
$impersonateAccountId = 123
$purchaseOrderHeaderDto = New-Object PurchaseOrderHeaderDto

# Call the service method
$result = $proxy.CreatePurchaseOrder($sessionId, $impersonateAccountId, $purchaseOrderHeaderDto)

# Process the result
if ($result) {
    Write-Host "Operation completed successfully"
    $result | Format-List
}

2. GetAllDeliveries

Style: document

Operation type: Request-response. The endpoint receives a message, and sends a correlated message.

Input: IPurchasingService_GetAllDeliveries_InputMessage (soap:body, use = literal)

parameters type GetAllDeliveries

Parameter Name Required Type Description
sessionId Optional string sessionId parameter (nillable)
impersonateAccountId Optional long impersonateAccountId parameter (nillable)

Output: IPurchasingService_GetAllDeliveries_OutputMessage (soap:body, use = literal)

parameters type GetAllDeliveriesResponse

Parameter Name Required Type Description
GetAllDeliveriesResult Optional ArrayOfDeliveryDto GetAllDeliveriesResult parameter (nillable)
DeliveryDto Optional DeliveryDto DeliveryDto parameter (nillable)
DisplayText Optional string DisplayText parameter (nillable)
FilterQueryId Optional long FilterQueryId parameter
PrimaryKeyId Optional long PrimaryKeyId parameter
PrimaryTableCatalogId Optional long PrimaryTableCatalogId parameter
ValidateOnly Optional boolean ValidateOnly parameter
Address Optional string Address parameter (nillable)
BuildingId Optional long BuildingId parameter (nillable)
CountryLibraryId Optional long CountryLibraryId parameter (nillable)
DeliveryId Optional long DeliveryId parameter (nillable)
Name Optional string Name parameter (nillable)
Postcode Optional string Postcode parameter (nillable)
TimeZoneInfoId Optional string TimeZoneInfoId parameter (nillable)
Code Examples
C# Example
// Create the service client
using (var client = new PurchasingServiceClient())
{
    // Create the request parameters
    string sessionId = "your_value_here";
    long impersonateAccountId = 123;
    
    // Call the service method
    var response = client.GetAllDeliveries(sessionId, impersonateAccountId);
    
    // Process the response
    if (response != null)
    {
        // Handle successful response
        Console.WriteLine("Operation completed successfully");
    }
}
SOAP XML Example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:bas="http://basic.evolutionsvc.mriapi.com/">
   <soap:Header/>
   <soap:Body>
      <bas:GetAllDeliveries>
         <bas:sessionId>sample_value</bas:sessionId>
         <bas:impersonateAccountId>123</bas:impersonateAccountId>
      </bas:GetAllDeliveries>
   </soap:Body>
</soap:Envelope>
PowerShell Example
# Create web service proxy
$serviceUrl = "http://your-evolution-site.com/Services/Basic/PurchasingService.svc?wsdl"
$proxy = New-WebServiceProxy -Uri $serviceUrl

# Set parameters
$sessionId = "your_value_here"
$impersonateAccountId = 123

# Call the service method
$result = $proxy.GetAllDeliveries($sessionId, $impersonateAccountId)

# Process the result
if ($result) {
    Write-Host "Operation completed successfully"
    $result | Format-List
}

3. GetAllPurchaseOrderHeaders

Style: document

Operation type: Request-response. The endpoint receives a message, and sends a correlated message.

Input: IPurchasingService_GetAllPurchaseOrderHeaders_InputMessage (soap:body, use = literal)

parameters type GetAllPurchaseOrderHeaders

Parameter Name Required Type Description
sessionId Optional string sessionId parameter (nillable)
impersonateAccountId Optional long impersonateAccountId parameter (nillable)

Output: IPurchasingService_GetAllPurchaseOrderHeaders_OutputMessage (soap:body, use = literal)

parameters type GetAllPurchaseOrderHeadersResponse

Parameter Name Required Type Description
GetAllPurchaseOrderHeadersResult Optional ArrayOfPurchaseOrderHeaderDto GetAllPurchaseOrderHeadersResult parameter (nillable)
PurchaseOrderHeaderDto Optional PurchaseOrderHeaderDto PurchaseOrderHeaderDto parameter (nillable)
DisplayText Optional string DisplayText parameter (nillable)
FilterQueryId Optional long FilterQueryId parameter
PrimaryKeyId Optional long PrimaryKeyId parameter
PrimaryTableCatalogId Optional long PrimaryTableCatalogId parameter
ValidateOnly Optional boolean ValidateOnly parameter
AmountReceived Optional double AmountReceived parameter (nillable)
AuthorisedBy Optional string AuthorisedBy parameter (nillable)
AuthorisedDate Optional TimeZoneDateTimeGenericDate AuthorisedDate parameter (nillable)
_utcValue Required dateTime _utcValue parameter
_x003C_SourceTimeZoneInfoId_x003E_k__BackingField Required string _x003C_SourceTimeZoneInfoId_x003E_k__BackingField parameter (nillable)
ContactName Optional string ContactName parameter (nillable)
ContractId Optional long ContractId parameter (nillable)
DeliveryDate Optional TimeZoneDateTimeGenericDate DeliveryDate parameter (nillable)
_utcValue Required dateTime _utcValue parameter
_x003C_SourceTimeZoneInfoId_x003E_k__BackingField Required string _x003C_SourceTimeZoneInfoId_x003E_k__BackingField parameter (nillable)
DeliveryId Optional long DeliveryId parameter (nillable)
Description Optional string Description parameter (nillable)
NetAmount Optional double NetAmount parameter (nillable)
OrderNumber Optional string OrderNumber parameter (nillable)
OriginId Optional long OriginId parameter (nillable)
OwnerID Optional long OwnerID parameter (nillable)
POH_AMT_PAID Optional double POH_AMT_PAID parameter (nillable)
POH_FKEY_SB_SEQ Optional int POH_FKEY_SB_SEQ parameter (nillable)
POH_NAME_ORIGIN Optional string POH_NAME_ORIGIN parameter (nillable)
POH_REFERENCE Optional string POH_REFERENCE parameter (nillable)
PurchaseOrderHeaderId Optional long PurchaseOrderHeaderId parameter (nillable)
PurchaseOrderStatusId Optional long PurchaseOrderStatusId parameter (nillable)
RequestNumber Optional long RequestNumber parameter (nillable)
RequestedBy Optional string RequestedBy parameter (nillable)
RequestedDate Optional TimeZoneDateTimeGenericDate RequestedDate parameter (nillable)
_utcValue Required dateTime _utcValue parameter
_x003C_SourceTimeZoneInfoId_x003E_k__BackingField Required string _x003C_SourceTimeZoneInfoId_x003E_k__BackingField parameter (nillable)
Status Optional PurchaseOrderState Cancelled, Dormant, Active, Completed, Unauthorised, History
SupplierId Optional long SupplierId parameter (nillable)
TaxAmount Optional double TaxAmount parameter (nillable)
TimeZoneInfoId Optional string TimeZoneInfoId parameter (nillable)
TotalAmount Optional double TotalAmount parameter (nillable)
Code Examples
C# Example
// Create the service client
using (var client = new PurchasingServiceClient())
{
    // Create the request parameters
    string sessionId = "your_value_here";
    long impersonateAccountId = 123;
    
    // Call the service method
    var response = client.GetAllPurchaseOrderHeaders(sessionId, impersonateAccountId);
    
    // Process the response
    if (response != null)
    {
        // Handle successful response
        Console.WriteLine("Operation completed successfully");
    }
}
SOAP XML Example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:bas="http://basic.evolutionsvc.mriapi.com/">
   <soap:Header/>
   <soap:Body>
      <bas:GetAllPurchaseOrderHeaders>
         <bas:sessionId>sample_value</bas:sessionId>
         <bas:impersonateAccountId>123</bas:impersonateAccountId>
      </bas:GetAllPurchaseOrderHeaders>
   </soap:Body>
</soap:Envelope>
PowerShell Example
# Create web service proxy
$serviceUrl = "http://your-evolution-site.com/Services/Basic/PurchasingService.svc?wsdl"
$proxy = New-WebServiceProxy -Uri $serviceUrl

# Set parameters
$sessionId = "your_value_here"
$impersonateAccountId = 123

# Call the service method
$result = $proxy.GetAllPurchaseOrderHeaders($sessionId, $impersonateAccountId)

# Process the result
if ($result) {
    Write-Host "Operation completed successfully"
    $result | Format-List
}

4. GetAllPurchasePaymentTypes

Style: document

Operation type: Request-response. The endpoint receives a message, and sends a correlated message.

Input: IPurchasingService_GetAllPurchasePaymentTypes_InputMessage (soap:body, use = literal)

parameters type GetAllPurchasePaymentTypes

Parameter Name Required Type Description
sessionId Optional string sessionId parameter (nillable)
impersonateAccountId Optional long impersonateAccountId parameter (nillable)

Output: IPurchasingService_GetAllPurchasePaymentTypes_OutputMessage (soap:body, use = literal)

parameters type GetAllPurchasePaymentTypesResponse

Parameter Name Required Type Description
GetAllPurchasePaymentTypesResult Optional ArrayOfPurchasePaymentTypeDto GetAllPurchasePaymentTypesResult parameter (nillable)
PurchasePaymentTypeDto Optional PurchasePaymentTypeDto PurchasePaymentTypeDto parameter (nillable)
DisplayText Optional string DisplayText parameter (nillable)
FilterQueryId Optional long FilterQueryId parameter
PrimaryKeyId Optional long PrimaryKeyId parameter
PrimaryTableCatalogId Optional long PrimaryTableCatalogId parameter
ValidateOnly Optional boolean ValidateOnly parameter
Code Optional string Code parameter (nillable)
Description Optional string Description parameter (nillable)
PurchasePaymentTypeId Optional long PurchasePaymentTypeId parameter (nillable)
Code Examples
C# Example
// Create the service client
using (var client = new PurchasingServiceClient())
{
    // Create the request parameters
    string sessionId = "your_value_here";
    long impersonateAccountId = 123;
    
    // Call the service method
    var response = client.GetAllPurchasePaymentTypes(sessionId, impersonateAccountId);
    
    // Process the response
    if (response != null)
    {
        // Handle successful response
        Console.WriteLine("Operation completed successfully");
    }
}
SOAP XML Example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:bas="http://basic.evolutionsvc.mriapi.com/">
   <soap:Header/>
   <soap:Body>
      <bas:GetAllPurchasePaymentTypes>
         <bas:sessionId>sample_value</bas:sessionId>
         <bas:impersonateAccountId>123</bas:impersonateAccountId>
      </bas:GetAllPurchasePaymentTypes>
   </soap:Body>
</soap:Envelope>
PowerShell Example
# Create web service proxy
$serviceUrl = "http://your-evolution-site.com/Services/Basic/PurchasingService.svc?wsdl"
$proxy = New-WebServiceProxy -Uri $serviceUrl

# Set parameters
$sessionId = "your_value_here"
$impersonateAccountId = 123

# Call the service method
$result = $proxy.GetAllPurchasePaymentTypes($sessionId, $impersonateAccountId)

# Process the result
if ($result) {
    Write-Host "Operation completed successfully"
    $result | Format-List
}

5. GetPurchasePaymentsForPurchaseOrder

Style: document

Operation type: Request-response. The endpoint receives a message, and sends a correlated message.

Input: IPurchasingService_GetPurchasePaymentsForPurchaseOrder_InputMessage (soap:body, use = literal)

parameters type GetPurchasePaymentsForPurchaseOrder

Parameter Name Required Type Description
sessionId Optional string sessionId parameter (nillable)
impersonateAccountId Optional long impersonateAccountId parameter (nillable)
purchaseOrderHeaderId Optional long purchaseOrderHeaderId parameter

Output: IPurchasingService_GetPurchasePaymentsForPurchaseOrder_OutputMessage (soap:body, use = literal)

parameters type GetPurchasePaymentsForPurchaseOrderResponse

Parameter Name Required Type Description
GetPurchasePaymentsForPurchaseOrderResult Optional ArrayOfPurchasePaymentDto GetPurchasePaymentsForPurchaseOrderResult parameter (nillable)
PurchasePaymentDto Optional PurchasePaymentDto PurchasePaymentDto parameter (nillable)
DisplayText Optional string DisplayText parameter (nillable)
FilterQueryId Optional long FilterQueryId parameter
PrimaryKeyId Optional long PrimaryKeyId parameter
PrimaryTableCatalogId Optional long PrimaryTableCatalogId parameter
ValidateOnly Optional boolean ValidateOnly parameter
Amount Optional double Amount parameter (nillable)
Comments Optional string Comments parameter (nillable)
DateDue Optional dateTime DateDue parameter (nillable)
DateReceived Optional dateTime DateReceived parameter (nillable)
InvoiceNumber Optional string InvoiceNumber parameter (nillable)
MethodOfPayment Optional string MethodOfPayment parameter (nillable)
PurchaseOrderHeaderId Optional long PurchaseOrderHeaderId parameter (nillable)
PurchasePaymentId Optional long PurchasePaymentId parameter (nillable)
Status Optional PaymentStatus UnPaid, Hold, Paid
TaxPointDate Optional dateTime TaxPointDate parameter (nillable)
VoucherNumber Optional string VoucherNumber parameter (nillable)
Code Examples
C# Example
// Create the service client
using (var client = new PurchasingServiceClient())
{
    // Create the request parameters
    string sessionId = "your_value_here";
    long impersonateAccountId = 123;
    long purchaseOrderHeaderId = 123;
    
    // Call the service method
    var response = client.GetPurchasePaymentsForPurchaseOrder(sessionId, impersonateAccountId, purchaseOrderHeaderId);
    
    // Process the response
    if (response != null)
    {
        // Handle successful response
        Console.WriteLine("Operation completed successfully");
    }
}
SOAP XML Example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:bas="http://basic.evolutionsvc.mriapi.com/">
   <soap:Header/>
   <soap:Body>
      <bas:GetPurchasePaymentsForPurchaseOrder>
         <bas:sessionId>sample_value</bas:sessionId>
         <bas:impersonateAccountId>123</bas:impersonateAccountId>
         <bas:purchaseOrderHeaderId>123</bas:purchaseOrderHeaderId>
      </bas:GetPurchasePaymentsForPurchaseOrder>
   </soap:Body>
</soap:Envelope>
PowerShell Example
# Create web service proxy
$serviceUrl = "http://your-evolution-site.com/Services/Basic/PurchasingService.svc?wsdl"
$proxy = New-WebServiceProxy -Uri $serviceUrl

# Set parameters
$sessionId = "your_value_here"
$impersonateAccountId = 123
$purchaseOrderHeaderId = 123

# Call the service method
$result = $proxy.GetPurchasePaymentsForPurchaseOrder($sessionId, $impersonateAccountId, $purchaseOrderHeaderId)

# Process the result
if ($result) {
    Write-Host "Operation completed successfully"
    $result | Format-List
}