Published using Google Docs
MITS 4.0 Accounts Payable

PostAccountsPayable4_0


This method is to be used to post invoice records in ResMan for a given property.

Request


Data is added by performing a HTTP Post to https://api.myresman.com/MITS/PostAccountsPayable4_0  supplying the listed parameters below.  

Parameters


Name

Description

Example

Required

IntegrationPartnerID

The ID assigned to your company by ResMan

1000

Yes

ApiKey

The API key assigned to your company by ResMan

a5w7d9g2m04…

Yes

AccountID

The AccountID associated with the property

400

Yes

PropertyID

The PropertyID associated with the property

07413576-f764-44c6-be35-df4139deec01

Yes

Xml

The MITS Accounts Payable 4.0 compliant xml

9/18/2019 update: includes optional elements in addition to MITS. See XML example below.

See below

Yes

The following demonstrates one way of submitting a request to the PostAccountsPayable4_0 method using C#.

 

NameValueCollection postData = new NameValueCollection();

 

// Integration Partner values

postData["IntegrationPartnerID"] = "1000";

postData["ApiKey"] = "6aw7y9m3m04849lqld6em9sudl5fg01u";                                      

 

// Account and property specific data

postData["AccountID"] = "400";

postData["PropertyID"] = "07413576-f764-44c6-be35-df4139deec01";

 

// Method specific parameters

postData["Xml"] = “<AccountsPayable>...</AccountsPayable>”;

 

string url = "https://api.myresman.com/MITS/PostAccountsPayable4_0";

 

WebClient client = new WebClient();                

byte[] response = client.UploadValues(url, "POST", postData);

string strResponse = System.Text.Encoding.Default.GetString(response);

Posting Xml Parameter


Below is example XML following the MITS Accounts Payable 4.0 standard  to create a new invoice record.  Please note the following requirements:

Vendor Node

Invoice Node

InvoiceDetails Node

Location Node

Example XML - PostAccountsPayable4_0.xml

<AccountsPayable>

         <AccountsPayableRequest>

                 <Vendor>

                         <ActionType>InvoicePayment</ActionType>

                         <IdRef>abc</IdRef>

                         <Invoice>

                                <CreditMemo>false</CreditMemo>

                                 <DueDate>2014-01-30</DueDate>

                                 <IdRef>501</IdRef>

                                 <ImageUrl>http://www.image.com/invoice501.pdf</ImageUrl>

                                 <InvoiceNumber>501</InvoiceNumber>

                                 <InvoiceDate>2014-01-28</InvoiceDate>

                                 <AccountingDate>2014-01-28</AccountingDate>

                                 <InvoiceDetails>

                                         <InvoiceDetail>

                                                 <Amount>10.00</Amount>

                                                 <AccountIdentifier>7200</AccountIdentifier>

                                                 <LineNumber>1</LineNumber>

                                                 <Notes>Charge for painting services</Notes>

                                                 <ProductQty>1</ProductQty>

                                                 <UnitPrice>10.00</UnitPrice>

                                                <Location>12</Location>

                                         </InvoiceDetail>

                                         <InvoiceDetail>

                                                 ...

                                         </InvoiceDetail>

                                 </InvoiceDetails>

                                 <Memo>

                                         <Text>Invoice from ABC Painting</Text>

                                 </Memo>

                                 <Notes>Please submit payment immediately</Notes>

                                 <OrderDate>2014-01-27</OrderDate>

                                 <TotalAmount>10.00</TotalAmount>

                                 <Payment>

                                         <AmountPaid>10.00</AmountPaid>

                                         <CheckNumber>1234</CheckNumber>

                                         <CheckDate>2014-01-27</CheckDate>

                                         <Description>Payment for paint job</Description>

                                 </Payment>

                         </Invoice>

                 </Vendor>

                 <Vendor>

                         ...

                 </Vendor>

         </AccountsPayableRequest>

</AccountsPayable>

Response


When submitting a request to the PostAccountsPayable4_0, you will receive a response following the pattern below. The response will include information about the method that was called as well as a status indicating whether or not the request was successful.  If there was an error in the request, the ErrorDescription node will identify any problems with the request.

<ResMan>

          <MethodName>PostAccountsPayable4_0</MethodName>

          <Status>Success</Status>

          <AccountID>400</AccountID>

          <PropertyID>07413576-f764-44c6-be35-df4139deec01</PropertyID>

          <ErrorDescription />

</ResMan>

Possible Errors


If any errors occur while parsing the XML sent to the API, they will be returned in the ErrorDescription node, which contains a list of error messages logged while parsing the XML.

The following errors will be logged and returned:

Below is an example response if an Invoice node is missing a Memo node:

<ResMan>

  <MethodName>PostAccountsPayable4_0</MethodName>

  <Status>Error</Status>

  <AccountID>400</AccountID>

  <PropertyID>07413576-f764-44c6-be35-df4139deec01</PropertyID>

  <ErrorDescription>An Invoice node is missing a Memo node</ErrorDescription>

</ResMan>

Unused Nodes


There is some data supported in the MITS specification that is not currently supported by ResMan. The following elements will not be used if sent:

GetAccountsPayable4_0


This method is to be used to get invoice records in ResMan for a given property. This endpoint only returns invoices that the specified integration partner entered via the API.

Request


Data is added by performing a HTTP Post to https://api.myresman.com/MITS/GetAccountsPayable4_0  supplying the listed parameters below.  

Parameters


Name

Description

Example

Required

IntegrationPartnerID

The ID assigned to your company by ResMan

1000

Yes

ApiKey

The API key assigned to your company by ResMan

a5w7d9g2m04…

Yes

AccountID

The AccountID associated with the property

400

Yes

PropertyID

The PropertyID associated with the property

07413576-f764-44c6-be35-df4139deec01

Yes

StartDate

Start of the desired date range

2016-01-01

Yes

EndDate

End of the desired date range

2016-01-31

Yes

The following demonstrates one way of submitting a request to the PostAccountsPayable4_0 method using C#.

 

NameValueCollection postData = new NameValueCollection();

 

// Integration Partner values

postData["IntegrationPartnerID"] = "1000";

postData["ApiKey"] = "6aw7y9m3m04849lqld6em9sudl5fg01u";                                      

 

// Account and property specific data

postData["AccountID"] = "400";

postData["PropertyID"] = "07413576-f764-44c6-be35-df4139deec01";

 

// Method specific parameters

postData["StartDate"] = “2016-01-01”;

postData["EndDate"] = “2016-01-01”;

 

string url = "https://api.myresman.com/MITS/GetAccountsPayable4_0";

 

WebClient client = new WebClient();                

byte[] response = client.UploadValues(url, "POST", postData);

string strResponse = System.Text.Encoding.Default.GetString(response);

Response


When submitting a request to the GetAccountsPayable4_0, you will receive a response following the pattern below. The response will include information about the method that was called as well as a status indicating whether or not the request was successful.  If there was an error in the request, the ErrorDescription node will identify any problems with the request.

<ResMan>

        <MethodName>GetAccountsPayable4_0</MethodName>

        <Status>Success</Status>

        <AccountID>1</AccountID>

        <PropertyID>11111111-1111-1111-1111-111111111111</PropertyID>

        <Response>

            <AccountsPayable xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                <AccountsPayableRequest>

                    <Vendor>

                        <AllowDiscountDaysAfterInvoice>false</AllowDiscountDaysAfterInvoice>

                        <ConsolidatePayments>false</ConsolidatePayments>

                        <DiscountDays>0</DiscountDays>

                        <DiscountPercent>0</DiscountPercent>

                        <HoldPayments>false</HoldPayments>

                        <InActive>false</InActive>

                        <InActiveDate>0001-01-01T00:00:00</InActiveDate>

                        <Invoice>

                            <Adjustment>false</Adjustment>

                            <CreditMemo>false</CreditMemo>

                            <ConsolidateCheck>false</ConsolidateCheck>

                            <DueDate>2017-03-20T00:00:00</DueDate>

                            <DiscountDate>0001-01-01T00:00:00</DiscountDate>

                            <DiscountPercent>0</DiscountPercent>

                            <DiscountAmount>0</DiscountAmount>

                            <ExemptFrom1099>false</ExemptFrom1099>

                            <FreightAmount>0</FreightAmount>

                            <IdRef>1</IdRef>

                            <InvoiceDate>2017-03-20T00:00:00</InvoiceDate>

                            <InvoiceDetails>

                                <InvoiceDetail>

                                    <Amount>10.0000</Amount>

                                    <AccountIdentifier>6760</AccountIdentifier>

                                    <ConstructionRetention>false</ConstructionRetention>

                                    <ConstructionRetentionAmount>0</ConstructionRetentionAmount>

                                    <Notes>Painting</Notes>

                                    <TaxAmount>0</TaxAmount>

                                </InvoiceDetail>

                            </InvoiceDetails>

                            <Memo>

                                <EventDate>0001-01-01T00:00:00</EventDate>

                                <Text>Painting</Text>

                            </Memo>

                            <Payment>

                                <AmountPaid xsi:nil="true" />

                                <CheckDate xsi:nil="true" />

                                <ResolvedDate xsi:nil="true" />

                            </Payment>

                            <RemittanceSlipRequired>false</RemittanceSlipRequired>

                            <SubTotal>0</SubTotal>

                            <TaxAmount>0</TaxAmount>

                            <TotalAmount xsi:nil="true" />

                            <TotalAmountPaid>10.0000</TotalAmountPaid>

                            <Unpaid>false</Unpaid>

                        </Invoice>

                        <NoSignatureRequired>false</NoSignatureRequired>

                        <NoSignatureAmount>0</NoSignatureAmount>

                        <PurchaseOrderRequired>false</PurchaseOrderRequired>

                        <Receive1099>false</Receive1099>

                        <RetentionPercent>0</RetentionPercent>

                        <SalesTaxPercent>0</SalesTaxPercent>

                        <SubContractor>false</SubContractor>

                    </Vendor>

                </AccountsPayableRequest>

            </AccountsPayable>

        </Response>

</ResMan>

Unused Nodes


There is some data supported in the MITS specification that is not currently supported by ResMan. The following elements are not used when returned: