Expand description
§SAP Concur API Client for Rust
A typed, async client for SAP Concur REST APIs. This crate targets the latest generally available v4 / v4.1 endpoints and avoids deprecated v3 APIs where a v4 successor exists.
§Supported APIs
- Authentication / OAuth2 (
oauth2/v0/token) - Identity v4.1 (
profile/identity/v4.1) - Expense Reports v4
- Expenses (entries) v4
- Expense Workflow v4
- Lists v4 and List Items v4
- Receipts v4
- Travel Request v4, Request Workflow v4, Expected Expenses v4, Allocations v4
- Cards v4 and Card Transactions v4
- Purchase Request v4
- Invoice Pay v4
- Event Subscription Service (ESS) v4
§Example
use concur_api::{ClientConfig, ConcurClient};
use concur_api::auth::{OAuth2TokenManager, Grant};
let config = ClientConfig::default();
let client = ConcurClient::new(config)?;
let manager = OAuth2TokenManager::new(
"https://us.api.concursolutions.com/oauth2/v0/token",
"client-id",
"client-secret",
Grant::ClientCredentials { scope: Some("expense.report.read".to_string()) },
);
let client = client.with_token_manager(manager);
let reports = concur_api::api::expense::ReportsApi::new(&client);Re-exports§
pub use client::ClientConfig;pub use client::ConcurClient;pub use error::ConcurError;pub use error::Result;