Connect to API.1
To get an early preview of API.1, please speak to us.
Authentication
You can authenticate with the Zwapgrid Authorization Server using its Client ID and Client Secret, and by calling the
https://auth.zwapgrid.com/oauth/token endpoint.
- Zwapgrid Authorization Server validates the Client ID and Client Secret.
- Zwapgrid Authorization Server responds with an Access Token.
- You can then use the access token to call API.1 endpoints.
example:
POST https://auth.zwapgrid.com/oauth/token
{
"client_id": "***clientid***",
"client_secret": "***clientsecret***",
"audience": "***audience***",
"grant_type": "client_credentials"
}
Returns:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"scope": "invoice:get",
"expires_in": 2592000,
"token_type": "Bearer"
}
This can then be used to call API.1 endpoints.
example:
curl --location --request GET 'https://apione.zwapgrid.com/accounting/api/v1/consent/1db31ad3-e9cf-4d4e-934c-961051193df1/invoices/1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
The API.1 endpoint will respond with the requested data.
Updated about 2 months ago