Skip to Content

Get an account

Returns one account with its status and granted scopes.

GET
/v1/accounts/{accountId}

Returns one account with its status and granted scopes. A Shopify account missing requested scopes, including read_products and read_legal_policies, needs reconnecting.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

accountId*string
Match^intgacct_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

IntegrationAccount

application/json
  1. response
provider*IntegrationKey
Match^[a-z0-9][a-z0-9_-]{0,63}$
input*
id*IntegrationAccountId
Match^intgacct_[0-9a-hjkmnp-tv-z]{16,24}$
webhooks?array<>
status*AccountStatus
Value in"pending""connected""needsReconnect"
info*
grantedScopes*array<string>
connectedBy*|null
connectedAt*string|null
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.accounts.get({
  "accountId": "example"
});
Example Response
{
  "provider": "string",
  "input": {
    "property1": "string",
    "property2": "string"
  },
  "id": "string",
  "webhooks": [
    {
      "app": "string",
      "url": "string",
      "events": [
        "string"
      ],
      "signatureHeader": "string",
      "deliveryIdHeader": "string",
      "secretSetup": "string"
    }
  ],
  "status": "pending",
  "info": {
    "externalId": "string",
    "displayName": "string",
    "email": "string",
    "verifiedEmail": "string",
    "timeZone": "string"
  },
  "grantedScopes": [
    "string"
  ],
  "connectedBy": "string",
  "connectedAt": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

Related documentation