List an organization's sellable services
const url = 'https://apisandbox.puurk.com/checkout/services?oid=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://apisandbox.puurk.com/checkout/services?oid=example' \ --header 'Authorization: Bearer <token>'Returns the services and packages an organization sells online, with their prices, so a page can show prices and payment plan estimates. Callable with a service token or, from a browser, with a publishable client. A publishable client is an API client issued with POST /auth/clients whose scope is {resource: 'checkout', oid: <org>, actions: ['read', 'write'], public: true} and whose allowed_origins list is non-empty. Pass its id as client_id (or the X-Puurk-Client-Id header) instead of a bearer token. No secret is used, so the request must come from a browser Origin in allowed_origins and target the one organization the scope names.
Authorizations
Section titled “Authorizations”- service_token
- None
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Organization ID
Comma-separated service ids to return (1 to 100). Omit to list every sellable service.
Publishable client id, for browser calls with no bearer token. Omit when calling with a service token.
Responses
Section titled “Responses”Successful operation
object
object
Price per unit in cents
Down payment per unit in cents
Longest plan length in months this service allows, when the organization uses term caps
Package savings in cents versus buying its services separately
Services included in a package (null for a single service)
object
Example
{ "services": [ { "type": "service" } ]}Invalid input (missing oid, or more than 100 ids)
Unauthorized (no token, or an unknown client id)
Forbidden (origin not allowed, client inactive, or no checkout scope on the organization)
Internal server error