Fetch a Claim

`GET` request to `/claim/:id` to fetch a Claim that matches the provided `id`.

GET to /claim/:id

Retrieves a Claim that matches the provided id.

GET https://api.intuition.systems/claim/:id
   await fetch(`${apiUrl}/claim/${id}`, {
      method: 'GET',
      "headers": {
        "Content-Type": "application/json",
        "x-api-key": <API_KEY>
      },
    })

Security

This request requires a valid API Key to be included with each request.

Headers

  • Content-Type: application/json

  • x-api-key: <API_Key>

Path Parameters

ParameterDescription

id

string - Required The claim_id for the Identity you want to fetch. Example: bxxxxxxx-6xxx-4xxx-8xxx-3xxxxxxxxxxx

Response

If a Claim is found for the id you'll receive back a Claim object.

{
 
},

Here is an example Zod schema and TypeScript interface you can use for the Identity:

export const ClaimSchema = z.object({
  claim_id: z.string(),
  vault_id: z.string(),
  counter_vault_id: z.string(),
  created_at: z.string().transform((date) => {
    const d = new Date(Number.parseInt(date))
    return d.toISOString()
  }), // unix timestamp
  updated_at: z.string(), // unix timestamp (last claim position update)
  creator: EmbedUserUserAggregatesSchema.optional(),
  subject: IdentitySchema,
  predicate: IdentitySchema,
  object: IdentitySchema,
  status: z.enum(['pending', 'complete']),
  for_num_positions: z.number(),
  for_assets_sum: z.string(), // bigint
  for_conviction_sum: z.string(), // bigint
  for_conviction_price: z.string(), // bigint
  against_num_positions: z.number(),
  against_assets_sum: z.string(), // bigint
  against_conviction_sum: z.string(), // bigint
  against_conviction_price: z.string(), // bigint
})

Response Codes

CodeDescription

200

Claim object that matches the provided id

404

No Claim found for the provided id

Last updated