Perform an API call in Restaurant365
Perform an API call in Restaurant365. Please refer to the API documentation for more details on configuration.
API doc: https://docs.restaurant365.com/docs/r365-api
Use [Restaurant365CustomerURL] in the request endpoint to automatically insert your customer instance base URL (e.g. https://[Restaurant365CustomerURL]/APIv1/APInvoices).
Application
- Restaurant365
Inputs (what you have)
| Name | Description | Data Type | Required? | Example |
|---|---|---|---|---|
| Connected Account | The Connected Account to use for the request | Connected Account | Yes | |
| Endpoint | The URL of the API endpoint to access | Text (Long) | Yes | https://[Restaurant365CustomerURL]/APIv1/APInvoices |
| Method | The HTTP method to be used for the request | Predefined Choice List | Yes | GET |
| Request headers | Additional headers to include in the request in JSON format | Text (Long) | No | {"Content-Type": "application/json"} |
| Request body | The data to be included in the request body | Text (Long) | No | {"name": "John", "age": 25} |
| File | A file to be included in the request. Note: If a file is added, leave request headers blank and add a 'filename' in your request body. | File | No | example.png |
| Output response as a file? | Select this as true when your API call returns a file as an output | True/False | No |
Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data Library section. These variables in the Data Library section are the outputs of previous Wrk Actions in the Wrkflow.
Outputs (what you get)
| Name | Data Type | Description | Required? | Example |
|---|---|---|---|---|
| Response status code | Integer | The HTTP status code returned in the response | Yes | 200 |
| Response headers | Text (Long) | Additional information provided in the response headers | No | Content-Type: application/json |
| Response body | Text (Long) | The main content of the response | No | {"message": "Success"} |
| Downloaded file | File | A file that is downloaded as part of the response | No | example.pdf |
Note: The "Fields to Capture" input feature can be used to create new outputs for the Wrk Action with the value of the corresponding key name in the first-level JSON output of the Wrk Action.
Outcomes
| Name | Description |
|---|---|
| Success | This status is selected in the event that the API call returns with a status between 200-399 |
| Unsuccessful | This status is selected in the event that the API call returns with a status of 400+ |
| Impossible to Complete | This status is selected in the event of the following scenario:Couldn't resolve hostnameThe external system is not accessible |
Requirements
- A Restaurant365 connected account with API username, password, and customer subdomain
- API access must be enabled for your Restaurant365 instance. See the R365 API Connector docs for access steps