light-mode-image
Learn
Claims source

API Reference

Configure a Claims source

POST/v1/claim-sources

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

The claim source payload

Response Body

application/json

application/json

curl -X POST "https://example.vii.au01.mattr.global/v1/claim-sources" \  -H "Content-Type: application/json" \  -d '{    "name": "Claims source accepting a x-api-key header",    "url": "https://example.com/api/data",    "authorization": {      "type": "api-key",      "value": "6hrFDATxrG9w14QY9wwnmVhLE0Wg6LIvwOwUaxz761m1J"    },    "requestParameters": {      "account_type": {        "mapFrom": "claims.accountType",        "defaultValue": "account.student"      },      "account_id": {        "mapFrom": "claims.accountId"      }    }  }'

{
  "name": "Claims source accepting a x-api-key header",
  "url": "https://example.com/api/data",
  "authorization": {
    "type": "api-key",
    "value": "****************************************61m1J"
  },
  "requestParameters": {
    "account_type": {
      "mapFrom": "claims.accountType",
      "defaultValue": "account.student"
    },
    "account_id": {
      "mapFrom": "claims.accountId"
    }
  }
}

{
  "code": "BadRequest",
  "message": "Validation Error",
  "details": [
    {
      "location": "body",
      "msg": "Invalid value",
      "param": "url"
    }
  ]
}

Retrieve all Claim sources

GET/v1/claim-sources

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?number

Range size of returned entries, default 100

Range1 <= value <= 1000
cursor?string

Starting point for the range of entries

Response Body

application/json

application/json

curl -X GET "https://example.vii.au01.mattr.global/v1/claim-sources"
{
  "nextCursor": "Y3JlYXRlZEF0PTIwMjAtMDgtMjVUMDY6NDY6MDkuNTEwWiZpZD1hNjZmZmVhNS04NDhlLTQzOWQtODBhNC1kZGE1NWY1M2UzNmM",
  "data": [
    {
      "id": "57fa09e2-82f3-4d3d-9eca-d0253e84a4e6",
      "name": "My claims from example.com",
      "url": "https://example.com",
      "requestMethod": "GET",
      "requestParameters": {
        "mapFrom": "claims.accountType"
      },
      "authorization": {
        "type": "api-key",
        "value": "****************************************61m1J"
      }
    }
  ]
}
{
  "code": "BadRequest",
  "message": "Validation Error",
  "details": [
    {
      "location": "query",
      "msg": "Invalid value",
      "param": "cursor",
      "value": "abc"
    }
  ]
}

Retrieve a Claim source

GET/v1/claim-sources/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Claims source ID

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.vii.au01.mattr.global/v1/claim-sources/41458e5a-9092-40b7-9a26-d4eb43c5792f"
{
  "id": "57fa09e2-82f3-4d3d-9eca-d0253e84a4e6",
  "name": "My claims from example.com",
  "url": "https://example.com",
  "requestMethod": "GET",
  "requestParameters": {
    "mapFrom": "claims.accountType"
  },
  "authorization": {
    "type": "api-key",
    "value": "****************************************61m1J"
  }
}
{
  "code": "BadRequest",
  "message": "Validation Error",
  "details": [
    {
      "location": "params",
      "msg": "Invalid value",
      "param": "claimSourceId",
      "value": "abc"
    }
  ]
}
{
  "code": "NotFound",
  "message": "Validation Error",
  "details": [
    {
      "location": "params",
      "msg": "Resource Not Found",
      "param": "claimSourceId",
      "value": "a368cfb4-9537-4439-acc6-ce3cf2287eb7"
    }
  ]
}

Update a Claim source

PUT/v1/claim-sources/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Claims source ID

Formatuuid

Request Body

application/json

The updated claims source payload

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.vii.au01.mattr.global/v1/claim-sources/41458e5a-9092-40b7-9a26-d4eb43c5792f" \  -H "Content-Type: application/json" \  -d '{    "name": "My claims from example.com",    "url": "https://example.com",    "requestParameters": {      "mapFrom": "claims.accountType"    },    "authorization": {      "type": "api-key"    }  }'
{
  "id": "57fa09e2-82f3-4d3d-9eca-d0253e84a4e6",
  "name": "My claims from example.com",
  "url": "https://example.com",
  "requestMethod": "GET",
  "requestParameters": {
    "mapFrom": "claims.accountType"
  },
  "authorization": {
    "type": "api-key",
    "value": "****************************************61m1J"
  }
}
{
  "code": "BadRequest",
  "message": "Validation Error",
  "details": [
    {
      "location": "body",
      "msg": "Invalid value",
      "param": "url"
    }
  ]
}
{
  "code": "NotFound",
  "message": "Validation Error",
  "details": [
    {
      "location": "params",
      "msg": "Resource Not Found",
      "param": "claimSourceId",
      "value": "a368cfb4-9537-4439-acc6-ce3cf2287eb7"
    }
  ]
}

Delete a Claim source

DELETE/v1/claim-sources/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Claims source ID

Formatuuid

Response Body

application/json

application/json

curl -X DELETE "https://example.vii.au01.mattr.global/v1/claim-sources/41458e5a-9092-40b7-9a26-d4eb43c5792f"
Empty
{
  "code": "BadRequest",
  "message": "Validation Error",
  "details": [
    {
      "location": "params",
      "msg": "Invalid value",
      "param": "claimSourceId",
      "value": "abc"
    }
  ]
}
{
  "code": "NotFound",
  "message": "Validation Error",
  "details": [
    {
      "location": "params",
      "msg": "Resource Not Found",
      "param": "claimSourceId",
      "value": "a368cfb4-9537-4439-acc6-ce3cf2287eb7"
    }
  ]
}

How would you rate this page?

Last updated on

On this page