Skip to main content

Partner Token Creation

This guide explains how to generate authentication tokens for the Parchment API using the /v1/token endpoint.

Credentials Setup

Before you can generate tokens, you need to obtain your partner credentials:
  1. Navigate to Settings > Organisation > Edit > Partner Integrations in your sandbox environment
  2. Copy the partner credentials: organization_id, organization_secret, and user_id
Demo tile
Integration generate new key
Credentials generated successfully

Token Request

To generate an access token, make a POST request to /v1/token with the required headers and request body.

Required Headers

HeaderDescription
x-partner-idPartner ID provided by Parchment
x-partner-secretPartner secret provided by Parchment
x-organization-idOrganization ID provided by Parchment
x-organization-secretOrganization secret provided by Parchment
x-user-idUser ID provided by Parchment

Request Body

{
  "grantType": "client_credentials",
  "scope": ["create:patient", "read:patient_prescription"]
}
FieldTypeRequiredDescription
grantTypestringYesMust be client_credentials
scopestring[]YesArray of permission scopes to request

Available Scopes

See Authentication Scopes for a complete list of available scopes.