To use the Vend connector, add the <vend.init>
element in your configuration before carrying out any other Vend operations.
The Vend API allows authorisation using the OAuth 2.0 standard. For more information, see https://developers.vendhq.com/documentation/oauth.html#oauth.
Code Block |
---|
|
<vend.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<accessToken>{$ctx:accessToken}</accessToken>
</vend.init> |
Properties
apiUrl:
The base endpoint URL of the Vend API.accessToken:
OAuth Token to read and manipulate data of the Vend account.
Info |
---|
|
Code Block |
---|
language | xml |
---|
title | getAccessTokenFromAuthorizationCode |
---|
| <vend.getAccessTokenFromAuthorizationCode>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<authorizationCode>{$ctx:authorizationCode}</authorizationCode>
<redirectUrl>{$ctx:redirectUrl}</redirectUrl>
</vend.getAccessTokenFromAuthorizationCode> |
PropertiesapiUrl: The base end point URL of the Vend API.authorizationCode: Authorization code to be used to obtain the access token.redirectUrl: Redirect URL to be used in the OAuth 2.0 authorization flow.
Following is a sample REST/JSON request that can be handled by the getAccessTokenFromAuthorizationCode operation. Code Block |
---|
language | xml |
---|
title | Sample Request for getAccessTokenFromAuthorizationCode |
---|
| {
"apiUrl": "https://hormondri.vendhq.com",
"authorizationCode": "https://hormondri.vendhq.com",
"redirectUrl": "http://www.krishantha.net"
} |
https://developers.vendhq.com/documentation/oauth.html#oauth Code Block |
---|
language | xml |
---|
title | getAccessTokenFromRefreshToken |
---|
| <vend.getAccessTokenFromRefreshToken>
<apiUrl>{$ctx:apiUrl}</apiUrl>
</vend.getAccessTokenFromRefreshToken> |
PropertiesapiUrl: The base end point URL of the Vend API.
Following is a sample REST/JSON request that can be handled by the getAccessTokenFromRefreshToken operation. Code Block |
---|
language | xml |
---|
title | Sample Request for getAccessTokenFromRefreshToken |
---|
| {
"apiUrl": "https://hormondri.vendhq.com"
} |
https://developers.vendhq.com/documentation/oauth.html#oauth |
...
Now that you have connected to Vend, use the information in the following topics to perform various operations with the connector.
...