API REFERENCE

Beta

Read a Session

Returns the current state of one session. It changes nothing: reading a session never stages data, never starts a workflow, and never affects a workflow already running.

There is exactly one question this answers: has anything been staged into this session yet. It tells you nothing about the progress of any workflow you have started — workflow state lives behind the workflow handle, on Read a Workflow.

Get the URL to submit against from your Pitchpoint Account Representative.

Sample

url="https://api.pointservices.com/riskinsight-services-ws/resources/v1/sessions/0000000000013500001"
curl -X GET "${url}" \
  -H "Authorization: Bearer your_access_token_here" \
  -H "Accept: application/json"

Header Properties

Property Value Required?
Authorization Bearer your token true
Content-Type application/json false, but recommended
Accept application/json false
X-PPS-UserAlias your value false
X-PPS-UserAgent your value false
X-PPS-CorrelationID your value false

This call sends no body, so Content-Type is not required. Sending it anyway costs nothing and is the safer habit: on the POST calls edge protection in deployed environments refuses a request that omits it, with a 403 carrying an HTML body rather than any response documented here.

Accept is not enforced — a request without it is answered normally with JSON — but send it anyway, so that a future change to content negotiation cannot alter what you receive.

X-PPS-CorrelationID is a support-tracing header and is not the same thing as the correlationId field in a request body. Only the body field is recorded against an order and searched by Find Workflows; setting the header globally in your HTTP client does not make your orders findable.

See the Common Headers guide for details on the optional X-PPS-* headers above.

Path Parameters

Property Description Type
sessionId (mandatory) The identifier returned when the session was started. Treat it as opaque: store and echo it, never parse it. string

This response never carries the staged data itself. It has no terms field, whether or not anything has been staged — loanStaged tells you that a snapshot exists, never what is in it. This call answers one question only.

Responses

Not every response carries the same body, so branch on the status code first, and then on what the body actually contains. Some responses carry the messages envelope described on this page; others carry a JSON problem document with an entirely different set of fields; others carry no JSON at all. A client that calls its JSON parser on every non-2xx body, or that reads messages[0].code without first checking that messages is present, will fail on the responses it is most likely to meet.

200

The session’s current state. messages is present but empty — a plain read produces no message.

Property Description Type
session (present) The session. Same shape as on Start a Session. object
messages (present) Always an array, never null. Empty on a successful read. array
Property Description Type
sessionId (present) Echoes the identifier you called with. string
loanStaged (present) false until the first successful stage, true from then on. It never returns to false — re-staging replaces the snapshot, and nothing empties a session that has held a loan. boolean
correlationId (present) Your value when the session was started with one, otherwise the value this service generated. string
links (present) self, sami and workflows, exactly as on the 201. object

Example:

{
  "session": {
    "sessionId": "0000000000013500001",
    "loanStaged": true,
    "correlationId": "alpha_numeric_string_to_help_identify_this_session",
    "links": {
      "self": {
        "href": "https://api.pointservices.com/riskinsight-services-ws/resources/v1/sessions/0000000000013500001"
      },
      "sami": {
        "href": "https://api.pointservices.com/riskinsight-services-ws/resources/v1/sessions/0000000000013500001/sami",
        "method": "POST"
      },
      "workflows": {
        "href": "https://api.pointservices.com/riskinsight-services-ws/resources/v1/sessions/0000000000013500001/workflows",
        "method": "POST"
      }
    }
  },
  "messages": []
}

401

No credential the platform could accept reached the service.

The body is a JSON problem document, not the messages envelope, and the response carries a WWW-Authenticate: Bearer realm="Helix" challenge. Read the machine-readable part from type; title and detail are human copy and are not contractual.

Property Description Type
type (present) An absolute URI identifying the problem. about:blank when no credential was sent at all. string
title (present) Short human-readable summary. string
status (present) Repeats the HTTP status code. number
detail (present) Human-readable explanation. Never machine-parsed. string
instance (present) An identifier for this one request. Quote it when contacting support. string

Examples:

{
  "type": "about:blank",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required. Present a bearer access token in the Authorization header.",
  "instance": "urn:pps:request:0000000000000000000000000000000000000000000000000000"
}

{
  "type": "https://pointservices.com/problems/invalid-token",
  "title": "The access token was not accepted",
  "status": 401,
  "detail": "The access token was rejected.",
  "instance": "urn:pps:request:0000000000000000000000000000000000000000000000000000"
}

The second form carries WWW-Authenticate: Bearer realm="Helix", error="invalid_token", and is what a token the service will not accept returns.

Treat a 401 and a 403 alike: both mean your credential did not work, and neither distinguishes reliably enough to build separate recovery paths on. Obtain a fresh access token and retry the request once. If it fails again, stop and surface the error rather than looping — repeated attempts with a credential the service has already refused will meet the rate throttle described below.

403

Your credential was understood but you are not permitted to read this session. Holding a sessionId is not permission to use it — every call is authorized independently, so do not treat the value as a secret or as proof of anything.

The body does not carry the messages envelope, so there is no code to branch on. Branch on the status alone, and treat the body as opaque: do not assume it is empty, and do not assume it is JSON.

A 403 is not always a permissions problem — try a fresh token first. A credential the service will not honour can be refused with either status, so a sudden wall of 403s on calls that worked a moment ago is more often an expired token than a change to your entitlements. Obtain a new access token and retry once. If it fails again, then treat it as entitlement and talk to your Account Representative.

A 403 is also produced at the edge, before this service is reached, when a request omits Content-Type or carries a value resembling SQL injection or cross-site scripting. Those refusals carry an HTML body and this service never sees them. A value that legitimately contains such text should be encoded — Base64, for instance — rather than sent raw.

404

No session exists with this identifier, or the path you called is not served.

A 404 arrives in two different body shapes, decided by whether the path is served at all.

A path this service serves, naming something that does not exist carries a JSON problem document with Content-Type: application/problem+json. Read the machine-readable part from type.

Property Description Type
type (present) An absolute URI identifying the problem, ending /problems/not-found here. string
title (present) Short human-readable summary. string
status (present) Repeats the HTTP status code. number
detail (present) Human-readable explanation naming what was not found. Never machine-parsed. string
instance (present) An identifier for this one request. Quote it when contacting support. string

Example:

{
  "type": "https://pointservices.com/problems/not-found",
  "title": "No such resource",
  "status": 404,
  "detail": "Session[0000000000013500001] not found",
  "instance": "urn:pps:request:0000000000000000000000000000000000000000000000000000"
}

An identifier this API has already issued to you is readable the moment you receive it, so a 404 on one is final rather than a race. Retrying will not make it appear.

A path that is not served at all — most often a URL missing the riskinsight-services-ws context root — is refused by infrastructure in front of the application, which never sees the request. That response carries no body this API defines, so branch on the status alone and do not attempt to parse what comes back. Its exact shape depends on the environment you are calling.

If a 404 has no body, check the context root before anything else.

429

Refused by a rate throttle at the edge, before this service is reached. The throttle counts requests per source address across every endpoint on both the session and workflow surfaces.

The refusal carries no body, no messages array and no Retry-After header, and this service never sees it, so it will not appear in any support trace.

Back off and resume. When following a workflow to completion, an interval that stays clear of the throttle is two seconds for the first two checks, then five, then ten seconds thereafter, with an overall deadline after which you stop and investigate.

500

An unhandled failure inside the service. The body does not carry the messages envelope, so branch on the status alone.

A 500 means the outcome is unknown, not that nothing happened. A failure raised after a write has already committed leaves that write in place. This call changes nothing, so it is always safe to read again. Retrying blind is how one order becomes two, and nothing on this surface removes a duplicate for you.


Copyright © Pitchpoint Solutions. All rights reserved.