Getting Started

Overview

This guide walks through the process of making your first successful call to the Origami API, from setting up an API user to retrieving live data. By the end, you will have authenticated, discovered available domains, and queried claim records.

Prerequisites

Before you begin, you need:

  • An Origami account with API access enabled
  • An API user created by your Origami administrator
  • Your account login name (provided by your administrator during account setup)
  • The client name associated with your API user

Step 1: Understanding API Users

Origami distinguishes between regular application users and API users. An API user is a user account specifically designated for programmatic access. Key differences:

Regular UserAPI User
Can log into web UIYesNo
Can authenticate via APIOnly if explicitly allowedYes
Has ApiOnly flagNoYes
Token lifespanN/AConfigurable (default 30 minutes)

Your Origami administrator creates the API user, assigns it to a role (which controls what domains and actions it can access), and provides you with the credentials.

Step 2: Determine Your Base URL

The API base URL follows the pattern:

https://{environment}.origamirisk.com/OrigamiApi/

Replace {environment} with your environment identifier (provided by your administrator). For example:

https://staging.origamirisk.com/OrigamiApi/

The environment portion of the URL varies by deployment (e.g., staging, production). Your administrator will confirm which environment URL to use.

Step 3: Authenticate and Get a Token

Before accessing any data, you must exchange your credentials for a token.

Request:

POST /OrigamiApi/Authentication/Authenticate
Content-Type: application/json

{
  "Account": "your-account-name",
  "User": "[email protected]",
  "Password": "your-password",
  "ClientName": "Your Client Name"
}

curl example:

curl --request POST \
  --url https://{environment}.origamirisk.com/OrigamiApi/Authentication/Authenticate \
  --header 'Content-Type: application/json' \
  --data '{
    "Account": "your-account-name",
    "User": "[email protected]",
    "Password": "your-password",
    "ClientName": "Your Client Name"
  }'

Response:

{
  "Token": "E22mghc...ArHGE=",
  "TokenExpiry": "2026-08-11T14:30:00.000Z"
}

Save the Token value. You will pass it on every subsequent request. The token expires at the time indicated by TokenExpiry (default 30 minutes); after that, you must re-authenticate.

Step 4: Passing the Token

Include the token on every API request using the Token header:

Token: E22mghc...ArHGE=

Alternative methods (if your HTTP client does not support custom headers):

MethodExample
Token headerToken: <token>
Bearer headerAuthorization: Bearer <token>
Query string?Token=<token>

The Token header is the recommended approach.

Step 5: Verify Your Identity

Before querying data, confirm your token is valid and see which account/client context you are operating in:

Request:

curl --request GET \
  --url https://{environment}.origamirisk.com/OrigamiApi/Authentication/Identity \
  --header 'Token: E22mghc...ArHGE='

This returns your account name, client, user, and role information. If this call succeeds, your token is working.

Step 6: Discover Available Domains

Call /api/Domains to see which entity types your API user can access:

Request:

curl --request GET \
  --url https://{environment}.origamirisk.com/OrigamiApi/api/Domains \
  --header 'Token: E22mghc...ArHGE='

Response (abbreviated):

[
  { "DomainName": "Claim", "DisplayName": "Claims", "DisplayNamePlural": "Claims" },
  { "DomainName": "Policy", "DisplayName": "Policy", "DisplayNamePlural": "Policies" },
  { "DomainName": "Employee", "DisplayName": "Employee", "DisplayNamePlural": "Employees" },
  ...
]

If a domain you expect to see is missing, your API user's role likely lacks View permission for it. Work with your administrator to update the role.

Step 7: Query Claims Opened in the Past 12 Months

Now let's retrieve real data. This query returns claims with a date of loss in the past 12 months, sorted by most recent first:

Request:

curl --request GET \
  --url 'https://{environment}.origamirisk.com/OrigamiApi/api/Claim/Query?columns=ClaimNumber,Claimant,Status,DateOfLoss,TotalIncurred&filter=DateOfLoss:gte:2025-08-11&sort=DateOfLoss DESC&startAt=0&take=50&includeTotalCount=true' \
  --header 'Token: E22mghc...ArHGE='

Breaking down the parameters:

ParameterValuePurpose
columnsClaimNumber,Claimant,Status,DateOfLoss,TotalIncurredFields to include in the response
filterDateOfLoss:gte:2025-08-11Only claims with loss date on or after this date
sortDateOfLoss DESCMost recent claims first
startAt0Start from the first matching record
take50Return up to 50 records per page
includeTotalCounttrueInclude total matching count in response

Response:

{
  "List": [
    {
      "ClaimNumber": "WC-2026-0142",
      "Claimant": "Jane Smith",
      "Status": "Open",
      "DateOfLoss": "2026-07-15",
      "TotalIncurred": 34500.00
    },
    {
      "ClaimNumber": "GL-2026-0089",
      "Claimant": "Bob Johnson",
      "Status": "Open",
      "DateOfLoss": "2026-06-22",
      "TotalIncurred": 12000.00
    }
  ],
  "Domain": "Claim",
  "Columns": "ClaimNumber,Claimant,Status,DateOfLoss,TotalIncurred",
  "Filter": "DateOfLoss:gte:2025-08-11",
  "Sort": "DateOfLoss DESC",
  "StartAt": 0,
  "Take": 50,
  "TotalCount": 87
}

If TotalCount exceeds 50, make another request with startAt=50 to get the next page.

Quick Reference

ActionEndpointMethod
Authenticate/Authentication/AuthenticatePOST
Check token validity/Authentication/IdentityGET
List accessible domains/api/DomainsGET
Query domain records/api/{domain}/QueryGET
Get single record/api/{domain}/{id}GET
Get field definitions/api/MetaData/Domains/{domain}/DataDictionaryGET

Troubleshooting

ErrorCauseFix
401 "No Token provided"Token header missing or emptyAdd the Token header to your request
401 "Token has expired"Token past its expiry timeRe-authenticate to get a fresh token
401 "User account not designated for API use"Attempting to authenticate with a non-API userUse an API user (one with the ApiOnly flag)
401 "Invalid login credentials"Wrong account, username, password, or client nameVerify all four credential fields
403 "Insufficient permissions"Token is valid but user lacks permission for the actionUpdate the API user's role to include the needed permission
503Account is in maintenance modeWait for maintenance to complete and retry

Next Steps

Once you can successfully query data, explore these topics:

  • Filter syntax: Build complex criteria to narrow results (see API Filter Syntax guide)
  • LINQFilter: Use C#-style expressions for advanced filtering (see API LINQFilter Syntax guide)
  • Pagination: Efficiently traverse large result sets (see Getting Started with Pagination guide)
  • Domain accessibility: Understand why certain domains appear or don't (see Understanding Domain Accessibility guide)
  • Creating and updating records: Use POST and PUT on /api/{domain} endpoints
  • Data dictionary: Call /api/MetaData/Domains/{domain}/DataDictionary to learn a domain's fields before querying

Did this page help you?