A server-side guide to availability, customer key checks, upgrades and renewals.
Base URL: https://orphilia.com/api/v3/re. Send an issued reseller credential in the X-API-Key header. Ask our team to arrange access; credentials are shown once and can be revoked or replaced.
The credential must be active, scoped for the requested operation and bound to your reseller group. Its format alone does not grant access. Customer keys must belong to that same group. Original provider keys are never required.
Store the credential in your server’s secret environment. Keep API credentials, customer keys, passwords and Spotify sessions out of frontend bundles, URLs, analytics and logs. Orphilia browser cookies and partner login tokens do not authorize this API.
curl --fail-with-body 'https://orphilia.com/api/v3/re/stocks?save_to_db=false' \
-H "X-API-Key: $ORPHILIA_RESELLER_API_KEY"Stock lists save a snapshot by default. Use save_to_db=false for reads that should not record one. Availability can change before an activation is submitted.
Paths below are relative to the base URL. Data and action routes require the reseller credential; the two GET instruction routes are informational.
/stocks/stocks/country/{countryCode}/stocks/stats/keyInfo/keyInfo?orphkey=…/upgrade/renew/upgrade/renewcurl --fail-with-body 'https://orphilia.com/api/v3/re/keyInfo' \
-H "X-API-Key: $ORPHILIA_RESELLER_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"orphkey":"YOUR_CUSTOMER_KEY"}'For upgrade and renewal, send orphkey and either sp_dc (the sp_doc alias is supported) or both login and password. Session codes accept 50–300 characters from letters, digits, underscore, equals and hyphen. Passwords accept 6–256 characters. Omit unused fields instead of sending empty strings.
Upgrade also requires a two-letter country from current availability. Customer aliases accept 4–4096 characters without whitespace. Login accepts up to 254 characters. An optional renewal email change uses newEmail or newemail (up to 254 characters), and requires a password.
// Server-side JavaScript. Do not put these secrets in browser code.
const response = await fetch('https://orphilia.com/api/v3/re/upgrade', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORPHILIA_RESELLER_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
orphkey: customerKey, // An alias from your assigned reseller group
sp_dc: spotifySession, // Customer-provided, 50–300 characters
country: 'US' // Choose from current availability
}),
signal: AbortSignal.timeout(25000)
});
const result = await response.json();
// Inspect response.ok AND result.status. A timeout is an uncertain outcome.
// Reconcile keyInfo or contact support before resubmitting.{
"orphkey": "YOUR_CUSTOMER_KEY",
"sp_dc": "YOUR_CUSTOMER_PROVIDED_SPOTIFY_SESSION"
}The displayed session value is a placeholder. Supply the customer’s complete session privately on your server.
Compatibility responses are returned directly, without an extra native data wrapper. Stock returns success, timestamp and a data array of country, country_code and slots. Country reads return one data object; stats return a statistics object. Key info returns fields including orphkey, status, boolean used and nullable username/date details. Reseller responses include safe credential metadata.
Upgrade and renewal return status and message. HTTP 200 alone does not confirm completion. Treat queued, pending, unknown, interrupted and timeout outcomes as uncertain; check keyInfo or ask support before submitting again. There is no client idempotency key for these mutations.
Errors include success: false, status: "error", message and a support reference. Handle 400 invalid input, 401 missing, invalid or revoked credentials or disabled groups, 403 missing scopes or a blocked browser origin, 404 missing or out-of-group keys, 409 busy keys, 422 rejected requests, 429 rate limits and 502/503 unavailable integrations.
Each credential is limited to 60 stock reads or 20 service requests per minute; a shared 120-request IP limit also applies. On 429, respect Retry-After. Use bounded backoff for reads. Never automatically replay an uncertain activation or renewal.