How do I make a passthrough request?
Updated 2 weeks ago
Send a POST to https://api.bindbee.dev/api/v1/passthrough with your API key and the customer's connector token, and describe the provider request you want us to make in the body.
Before you start
Your Bindbee API key.
The
connector_tokenof the customer whose system you're calling.The provider's API documentation for the endpoint you need.
Headers
Header | Value |
|---|---|
|
|
|
|
|
|
Body
Field | Required | Description |
|---|---|---|
| Yes | The HTTP method to use on the provider's API |
| Yes | The provider's path, resolved against their base URL |
| Yes | Headers for the provider. Send |
| No | Query string parameters |
| No | The request body for the provider |
| No |
|
| No |
|
| No | Seconds to wait for the provider |
Example: read a record
curl --request POST \
--url https://api.bindbee.dev/api/v1/passthrough \
--header 'Authorization: Bearer <BINDBEE_API_KEY>' \
--header 'X-Connector-Token: <CONNECTOR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"method": "GET",
"path": "/employees/<REMOTE_ID>",
"headers": {},
"params": { "fields": "customBadgeNumber,customParkingSpot" }
}'Example: call a SOAP endpoint
For XML-based APIs such as Workday's web services, send the XML as a string in data:
{
"method": "POST",
"path": "Learning/v46.1",
"headers": {
"Content-Type": "application/xml",
"Accept": "application/json"
},
"data": "<soapenv:Body xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bsvc=\"urn:com.workday/bsvc\">...</soapenv:Body>",
"response_format": "JSON"
}Check the result
A 200 means we reached the provider. Many providers return 200 with an error in the body, so read the response to confirm the call did what you expected.
If you're not sure which provider endpoint or operation to call, tell us what you want to do. We can share a working example request for that provider.