R365 API Connector
  • 07 Jun 2024
  • 3 Minutes to read
  • Dark
    Light
  • PDF

R365 API Connector

  • Dark
    Light
  • PDF

Article summary

Restaurant365 offers an API (Application Programming Interface) service. Through the R365 API, Third Party Services, such as Vendors, can connect to R365 to retrieve data as well as create and push data in to Customer databases.

In order to access the R365 API Connector, please review the steps required for your Organization:

  •  R365 Customer Instructions: Request R365 API Access for your Vendor

    1.  Contact R365 Support to request API Access for your Vendor

      Include a member of your Vendor's Technical Support Team on the request

    2.  R365 Support will confirm your request and your permission for Vendor Access and then provide the API login credentials to your Vendor

  • Third Party Vendor Instructions: Obtain R365 API login credentials (if not already obtained by the Customer)

    1.  If the Customer did not perform the above steps for you, contact R365 Support and request an API Login for your Vendor Group

    2.  If you already have an API Key, request access to the Customer Instance (https://domain.restaurant365.com)

    3.  R365 Support will confirm your request with the Customer and then provide you with your API login credentials (or a confirmation of the added access for the Customer)


Authenticate and Request API Calls

Authentication

The authentication request generates the bearer token that will be passed with every subsequent request. The CURL commands below define an example request for Authentication:

[YOUR-UNIQUE-CUSTOMER-URL] represents the subdomain of your unique R365 database. This is the value that appears before '.restaurant365.com' when you are logged in to Restaurant365.

  • i.e., thedean.restaurant365.com

Request:

curl --request POST \
 --url 'https://[YOUR-UNIQUE-CUSTOMER-URL].restaurant365.com/APIv1/Authenticate/JWT format=json' \
 --header 'Content-Type: application/json' \
 --data '
{
 "UserName":"yourUserName",
 "Password":"YourPassword"
}'

Example Response:

{
 "SessionId": "YourSessionId",
 "UserName": "YourUserName",
 "BearerToken": "YourBearerTokenReturned",
 "ResponseStatus": {}
}

Methods

AP Invoices

Request:

curl --request POST \
 --url 'https://[YOUR-UNIQUE-CUSTOMER-URL].restaurant365.com/APIv1/APInvoices \
 --header 'Authorization: InsertYourBearerTokenKeyHere' \
 --header 'Content-Type: application/json' \
 --data
{
 "BatchId": "String",
 "userId": "String",
 "apInvoices":
 [
 {
 "Vendor_Name": "OBTAIN VENDOR NUMBER FROM CUSTOMER", //Required
 "Retailer_Store_Number": "String", //Required
 "Invoice_Date": "MM/DD/YYYY", //Required
 "Invoice_Due_Date": "MM/DD/YYYY", //Optional
 "Invoice_Number": "#######", //Optional
 "Invoice_Amount": #.##, //Optional
 "Image_URL": "String", //Optional
 "Product_Number": "OBTAIN VENDOR ITEM NUMBER FROM CUSTOMER", //Optional
 "Quantity": #, //Optional
 "Invoice_Line_Item_Cost": #.##, //Optional
 "Extended_Price": #.##, //Optional
 "Product_Description": "AAAAAAAAAA", //Optional
 "Unit_Of_Measure": "AAAAAAA (MUST MATCH UOFM IN R365)", //Optional
 "Split_Case": true/false (SPLIT UOFM SET ON VENDOR ITEM IN R365) //Optional
 }
]
}

Response:

{
 "errors": [
 {
 "reason": "String",
 "solution": "String"
 }
 ],
 "success": [ { "Count": 0 } ],
 "failures": [
 {
 "record": "String",
 "reason": "String",
 "solution": "String"
 }
 ]
}

AP Invoices by GL Account

Request:

curl --request POST \
 --url 'https://[YOUR-UNIQUE-CUSTOMER-URL].restaurant365.com/APIv1/APInvoicesGL \
 --header 'Authorization: InsertYourBearerTokenKeyHere' \
 --header 'Content-Type: application/json' \
 --data
{
 "BatchId": "1",
 "userId": "QA_TESTING",
 "apInvoices":
 [
 {
 "Type": "AP Invoice", //OR AP Credit Memo, Required
 "Comment": "", //Optional
 "Vendor": "Abbey", //Required
 "Date": "06/30/2023", //Required
 "GL_Date": "06/30/2023", //Required
 "Due_Date": "06/30/2023", //If blank, will default to Date value,Optional
 "Location": "20", //Required
 "Number": "TESTAPIG523", //Required
 "Amount": 15.12, //Required
 "Payment_Terms": "", //Optional
 "Detail_Account": "100", //GL Account Name or Number, Required
 "Detail_Amount": 15.12, //Required
 "Detail_Comment": "AAAAAAAAAA", //Line item comment, Optional
 "Detail_Location": "20", //Required
 "Image_URL": "https://www.example.com/images/img.jpg", //Optional
 "IsPaid": "false", //Optional
 "Paid_Account": "500" //GL Account number associated with the invoice, Optional
 }
 ]
}

Response:

{
 "errors": [
 {
 "reason": "String",
 "solution": "String"
 }
 ],
 "success": [ { "Count": 0 } ],
 "failures": [
 {
 "record": "String",
 "reason": "String",
 "solution": "String"
 }
 ]
}

Journal Entries

Request:

curl --request POST \
 --url 'https://[YOUR-UNIQUE-CUSTOMER-URL].restaurant365.com/APIv1/JournalEntries \
 --header 'Authorization: InsertYourBearerTokenKeyHere' \
 --header 'Content-Type: application/json' \
 --data
{
 "BatchId": "String",
 "userId": "String",
 "journalEntries":
 [
 {
 "JENumber": "String", //Optional (R365 will assign an autogenerated number if not included)
 "Date": "String", //Required
 "JEComment": "Testing API", //Optional
 "JELocation": "100", //Required
 "Account": "1000", //Required
 "Debit": 0, //Required Debits and Credits must be balanced
 "Credit": 100, //Required Debits and Credits must be balanced
 "DetailLocation": "100", //Required
 "PayrollJournalEntry": true, //Required only for Payroll JE's. DO NOT include if JE is not for payroll
 "PayrollStartDate": "9/16/2020", //Required only for Payroll JE's. DO NOT include if JE is not for payroll
 "PayrollEndDate": "9/29/2020" //Required only for Payroll JE's. DO NOT include if JE is not for payroll
 }
 ]
}

Response:

{
 "errors": [
 {
 "reason": "String",
 "solution": "String"
 }
 ],
 "success": [ { "Count": 0 } ],
 "failures": [
 {
 "record": "String",
 "reason": "String",
 "solution": "String"
 }
 ]
}

Was this article helpful?