Receive Stock

Notify MRM of incoming stock.

Request Parameters

Each request to the web sevice requires a number of parameters, all of which are listed below. All requests require a key which will be sent to you by your account manager.

Name Type Default Description
ApiKey* String The key used to authenticate with the service.
XMLData* String XML data that contains the Goods Receive Notice.
Back to Top

Responses

The response from the web service is a table with the specification below. If an error occurs, the response will not follow this format. Instead the response will be passed back in a single JSON string object with the parameter name: Error

Name Type Default Description
<?xml version="1.0"?><ROOT><ADVICE_NO>00001234</ADVICE_NO><ERRORS/></ROOT></td> String This is the unique advice number assigned by the fulfilment system padded to eight characters with leading zeros.
Back to Top

Errors

Below are the errors which are specific to this web service. If an error occurs the JSON returned will have with a single property called "Error". All error responses will be contained within this property.

Error Message Cause Fix
<?xml version="1.0"?><ROOT><ERROR>Invalid Key format!</ERROR></ROOT> The ApiKey parameter is formatted incorrectly. Check your ApiKey is correctly formatted.
<ERROR>Error Calling Subroutine - Empty XMLData</ERROR> The XMLData parameter is empty. Pass the XMLData in the second parameter of the method.
<?xml version="1.0"?><ROOT><ERROR>Key not authorised!</ERROR></ROOT> The ApiKey setup has not been completed by MRM. Report the issue to us so we can advise on setup progress.
Back to Top

Available endpoints

Example requests

PreAdviceService.NewGRN("AA11-AA11-AA11-AA11", <?xml version="1.0" encoding="UTF-8"?><ROOT><GRN><CARRIER>Company Name</CARRIER><CARRIERNAME>Carrier Name</CARRIERNAME><CARRIERPHONE>1234 1234 1234 1234</CARRIERPHONE><CLIENTREF>001234</CLIENTREF><DELIVERDATE>01/01/2020</DELIVERDATE><FORMAT>I</FORMAT><PREFIX>AM</PREFIX><QTY>1</QTY><STOCK><CODE>RD1234</CODE><FORMAT>I</FORMAT><QTY>1</QTY></STOCK></GRN></ROOT>

Example response

<?xml version="1.0"?><ROOT><ADVICE_NO>00001234</ADVICE_NO><ERRORS/></ROOT>
Back to Top

Sample Code

private void SubmitPreadvice()
{
	uk.co.mrm.secure.PreAdvice PreAdviceService = new uk.co.mrm.secure.PreAdvice();
        txtResult.Text = PreAdviceService.NewGRN(txtApiKey.Text, txtXMLData.Text);
}
Back to Top