Appearance
Profiles
Responses can expose one or more profiles using the HTTP Link header. A profile tells your client what shape the response body has — whether it's a collection of items, a form with inputs, or a single resource, as well as what can be expected in terms of contents (e.g. some profiles specify that when encountered, links with certain relations will be available).
How profiles are sent
Profiles are delivered as standard HTTP Link headers with rel="profile":
http
HTTP/1.1 200 OK
Content-Type: application/json
Link: <tag:flywire.com,2016:agents:api:profile:hypermedia>;rel="profile"
Link: <tag:flywire.com,2016:agents:api:profile:root>;rel="profile"
{ "links": [ ... ] }The profile URI follows the pattern tag:flywire.com,2016:agents:api:profile:{name}.
TIP
Profiles use tag URIs — they're identifiers, not fetchable URLs. You compare them as strings, you don't dereference them.
Combining profiles
A single response often carries multiple profiles. Each one adds a structural guarantee:
http
Link: <tag:flywire.com,2016:agents:api:profile:hypermedia>;rel="profile"
Link: <tag:flywire.com,2016:agents:api:profile:item>;rel="profile"
Link: <tag:flywire.com,2016:agents:api:profile:intermediated-payments>;rel="profile"This tells you three things at once:
- hypermedia — the body has a
linksarray - item — the body is an element in a collection and that links will be provided to help you navigate the collection
- intermediated-payments — the items are intermediated payment resources
Why profiles matter
Profiles let you write a generic client that adapts its behavior based on the response type:
WARNING
Don't rely on URL patterns to determine what kind of response you're getting. Always check the profiles in the Link headers — they're the contract.
Reference
The full list of profiles defined by the API lives in the Reference section:
- Common Profiles — structural profiles (
hypermedia,root,item,form) - Payments Profiles — domain profiles emitted by the Payments API
- Insurance Profiles — domain profiles emitted by the Insurance API