Skip to main content
POST
cURL

Notes

  • Tokens are valid for 6 hours from the time of issuance
  • Always use user_id of the user making the request
  • You can only request scopes that have been approved for your organization
  • The token must be included in the Authorization header as a Bearer token for all authenticated API requests

Headers

x-partner-id
string
required

Partner ID for authentication - provided by Parchment

Example:

"tacklit"

x-partner-secret
string
required

Partner secret for authentication - provided by Parchment

x-organization-id
string
required

Organization ID for authentication - provided by User from Parchment Portal

x-organization-secret
string
required

Organization secret for authentication - provided by User from Parchment Portal

x-user-id
string
required

Use the user_id of the user making the request to ensure actions are correctly attributed. Do not use the user_id of the user who originally set up the integration.

Body

application/json

Token request parameters

grantType
enum<string>
default:client_credentials
required

Type of grant for OAuth2 authentication

Available options:
client_credentials
Example:

"client_credentials"

scope
enum<string>[]
required

List of permission scopes being requested

Available options:
create:patient,
read:patient,
update:patient,
read:patient_prescription,
create:user,
read:user,
read:users,
read:custom_drug,
create:custom_drug,
update:custom_drug,
delete:custom_drug,
update:user,
delete:user
Example:

Response

Token generation successful

success
boolean
required

Indicates if the request was successful

Example:

true

statusCode
integer
required

HTTP status code

Example:

200

message
string
required

Human-readable success message

Example:

"Token generated successfully"

data
object
required

Authentication token data

timestamp
string<date-time>
required

ISO 8601 timestamp of the response

Example:

"2024-01-15T10:30:00.000Z"

requestId
string
required

Unique identifier for request tracing

Example:

"req_1705312200000_abc123"

code
string

Machine-readable operation code

Example:

"SUCCESS"

pagination
object

Pagination information for list operations