Step-by-Step Integration
A sequential workflow for connecting each endpoint for getting started as a Customer and syncing portal data with your first Clients.
Step-by-Step Integration
Endpoint "Get Auth Token" - POST /v1/login
Step 1: Generate Authentication Token
Bearer token authorization is a method of API authentication that involves including a token, called the bearer token, in the HTTP request header to authenticate a client. The bearer token is usually issued by the service provider and sent in the "Authorization" header field using a specific format, such as "Bearer {Token}." If your token expires, utilize the Refresh Token endpoint.
Endpoint "Register Webhook for Portal Login Errors" - POST /v1/clientsPortalLoginChanges
Endpoint "Get client invoices" - GET /v1/getClientInvoices/{connection_uuid}
Step 2: Create Customer
A "Customer" is a company that pays PortalDuct for access to their platform and services. As a developer of a Customer (or a Platform with many Customers), you can utilize the UUID for that company from your platform to create them in PortalDuct Platform to create consistency between both systems (and reduce the UUIDs you need to manage).
A partner platform can create multiple Customers and then create Clients on behalf of those Customers.
Endpoint "Get client balance" - GET /v1/getClientBalance/{clientUUID}
Step 3: Create a Customer Client
A "Client" is the entity (another company in a B2B transaction) with which the Customer does business and needs to view their procurement data (purchase orders, invoices, and remittances).
As a developer of a Customer (or a Platform with many Customer), with many Clients, you can utilize the Client UUID for that company from your platform to create them in PortalDuct Platform.
Endpoint "Add a new customer" - POST /v1/addNewCustomer
Step 4: Trigged Embedded UI for Client Credentials
The PortalDuct "Client Credentials Collector" is the client-side component that your users will interact with to link their accounts to PortalDuct, which will allow you to access them via the PortalDuct APIs. To embed the component, follow the user experience guide.
Step 5: Get Client Portal Connectivity Status
Once a Client provides their credentials, the PortalDuct connectors will utilize that access to collect the procurement data. If the credentials are valid, the webhook will deliver a success. If the credentials are incorrect (due to a typo, expiration, etc.), the webhook will indicate that the "retry" user experience needs to be enabled. On the first connection, the status is pending until either a success or failure occurs.
Endpoint "Add a new customer client" - POST /v1/addNewCustomerClient
Updated 7 months ago