This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

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.

init
<vend.init>
	<apiUrl>{$ctx:apiUrl}</apiUrl>
	<accessToken>{$ctx:accessToken}</accessToken>
</vend.init>
Properties
  • apiUrlThe base endpoint URL of the Vend API.
  • accessToken: OAuth Token to read and manipulate data of the Vend account.

Note

Add the following resources to the ESB registry.

  • /_system/governance/connectors/Vend/apiUrl
  • /_system/governance/connectors/Vend/accessToken
  • /_system/governance/connectors/Vend/clientId
  • /_system/governance/connectors/Vend/clientSecret
  • /_system/governance/connectors/Vend/redirectUrl
  • /_system/governance/connectors/Vend/refreshToken

Note

getAccessTokenFromAuthorizationCode
<vend.getAccessTokenFromAuthorizationCode>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
    <authorizationCode>{$ctx:authorizationCode}</authorizationCode>
	<redirectUrl>{$ctx:redirectUrl}</redirectUrl>
</vend.getAccessTokenFromAuthorizationCode>
Properties
  • apiUrl: 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.

When the getAccessTokenFromAuthorizationCode operation is executed, the new values will be updated to the accessToken and refreshToken registries.

Following is a sample REST/JSON request that can be handled by the getAccessTokenFromAuthorizationCode operation.

Sample Request for getAccessTokenFromAuthorizationCode
{
    "apiUrl": "https://hormondri.vendhq.com",
    "authorizationCode": "https://hormondri.vendhq.com",
    "redirectUrl": "http://www.krishantha.net"
}
Related Vend documentation

https://developers.vendhq.com/documentation/oauth.html#oauth

getAccessTokenFromRefreshToken
<vend.getAccessTokenFromRefreshToken>
	<apiUrl>{$ctx:apiUrl}</apiUrl>
</vend.getAccessTokenFromRefreshToken>
Properties
  • apiUrl: The base end point URL of the Vend API.

When the getAccessTokenFromRefreshToken operation is executed, the new value will be updated to the accessToken registry.

Following is a sample REST/JSON request that can be handled by the getAccessTokenFromRefreshToken operation.

Sample Request for getAccessTokenFromRefreshToken
{
    "apiUrl": "https://hormondri.vendhq.com"
}
Related Vend documentation

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. 

  • No labels