UNPKG

onshape-clients

Version:

The meta package for creating the various Onshape clients

1,609 lines (1,532 loc) 1.22 MB
<!doctype html> <html> <head> <title>Onshape REST API</title> <style type="text/css"> body { font-family: Trebuchet MS, sans-serif; font-size: 15px; color: #444; margin-right: 24px; } h1 { font-size: 25px; } h2 { font-size: 20px; } h3 { font-size: 16px; font-weight: bold; } hr { height: 1px; border: 0; color: #ddd; background-color: #ddd; } .app-desc { clear: both; margin-left: 20px; } .param-name { width: 100%; } .license-info { margin-left: 20px; } .license-url { margin-left: 20px; } .model { margin: 0 0 0px 20px; } .method { margin-left: 20px; } .method-notes { margin: 10px 0 20px 0; font-size: 90%; color: #555; } pre { padding: 10px; margin-bottom: 2px; } .http-method { text-transform: uppercase; } pre.get { background-color: #0f6ab4; } pre.post { background-color: #10a54a; } pre.put { background-color: #c5862b; } pre.delete { background-color: #a41e22; } .huge { color: #fff; } pre.example { background-color: #f3f3f3; padding: 10px; border: 1px solid #ddd; } code { white-space: pre; } .nickname { font-weight: bold; } .method-path { font-size: 1.5em; background-color: #0f6ab4; } .up { float:right; } .parameter { width: 500px; } .param { width: 500px; padding: 10px 0 0 20px; font-weight: bold; } .param-desc { width: 700px; padding: 0 0 0 20px; color: #777; } .param-type { font-style: italic; } .param-enum-header { width: 700px; padding: 0 0 0 60px; color: #777; font-weight: bold; } .param-enum { width: 700px; padding: 0 0 0 80px; color: #777; font-style: italic; } .field-label { padding: 0; margin: 0; clear: both; } .field-items { padding: 0 0 15px 0; margin-bottom: 15px; } .return-type { clear: both; padding-bottom: 10px; } .param-header { font-weight: bold; } .method-tags { text-align: right; } .method-tag { background: none repeat scroll 0% 0% #24A600; border-radius: 3px; padding: 2px 10px; margin: 2px; color: #FFF; display: inline-block; text-decoration: none; } </style> </head> <body> <h1>Onshape REST API</h1> <div class="app-desc">The Onshape REST API consumed by all clients.</div> <div class="app-desc">More information: <a href="https://openapi-generator.tech">https://openapi-generator.tech</a></div> <div class="app-desc">Contact Info: <a href="api-support@onshape.zendesk.com">api-support@onshape.zendesk.com</a></div> <div class="app-desc">Version: 1.93</div> <div class="app-desc">BasePath:</div> <div class="license-info">Apache 2.0</div> <div class="license-url">http://www.apache.org/licenses/LICENSE-2.0.html</div> <h2>Access</h2> <ol> <li>APIKey KeyParamName:ApiKey KeyInQuery:false KeyInHeader:true</li> <li>OAuth AuthorizationUrl:https://oauth.onshape.com/oauth/authorizeTokenUrl:https://oauth.onshape.com/oauth/token</li> </ol> <h2><a name="__Methods">Methods</a></h2> [ Jump to <a href="#__Models">Models</a> ] <h3>Table of Contents </h3> <div class="method-summary"></div> <h4><a href="#Accounts">Accounts</a></h4> <ul> <li><a href="#cancelPurchaseNew"><code><span class="http-method">delete</span> /api/accounts/{aid}/purchases/{pid}</code></a></li> <li><a href="#consumePurchase"><code><span class="http-method">post</span> /api/accounts/purchases/{pid}/consume</code></a></li> <li><a href="#getPlanPurchases"><code><span class="http-method">get</span> /api/accounts/plans/{planId}/purchases</code></a></li> <li><a href="#getPurchases"><code><span class="http-method">get</span> /api/accounts/purchases</code></a></li> </ul> <h4><a href="#AppElements">AppElements</a></h4> <ul> <li><a href="#commitTransaction"><code><span class="http-method">post</span> /api/appelements/d/{did}/w/{wid}/e/{eid}/transactions/{tid}</code></a></li> <li><a href="#create7"><code><span class="http-method">post</span> /api/appelements/d/{did}/w/{wid}</code></a></li> <li><a href="#createReference1"><code><span class="http-method">post</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references</code></a></li> <li><a href="#deleteContent1"><code><span class="http-method">delete</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/subelements/{sid}</code></a></li> <li><a href="#deleteReference1"><code><span class="http-method">delete</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}</code></a></li> <li><a href="#getHistory"><code><span class="http-method">get</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/history</code></a></li> <li><a href="#getSubElementContent"><code><span class="http-method">get</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content</code></a></li> <li><a href="#getSubelementIds"><code><span class="http-method">get</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/ids</code></a></li> <li><a href="#resolveReference1"><code><span class="http-method">get</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}</code></a></li> <li><a href="#startTransaction"><code><span class="http-method">post</span> /api/appelements/d/{did}/w/{wid}/e/{eid}/transactions</code></a></li> <li><a href="#update5"><code><span class="http-method">post</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content</code></a></li> <li><a href="#updateReference1"><code><span class="http-method">post</span> /api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}</code></a></li> </ul> <h4><a href="#Default">Default</a></h4> <ul> <li><a href="#addFeature1"><code><span class="http-method">post</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features</code></a></li> <li><a href="#createPartStudio"><code><span class="http-method">post</span> /api/partstudios/d/{did}/w/{wid}</code></a></li> <li><a href="#exportPS1"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/parasolid</code></a></li> <li><a href="#exportStl1"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/stl</code></a></li> <li><a href="#getBodyDetails2"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/bodydetails</code></a></li> <li><a href="#getBoundingBoxes2"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/boundingboxes</code></a></li> <li><a href="#getEdges2"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatededges</code></a></li> <li><a href="#getFaces2"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatedfaces</code></a></li> <li><a href="#getFeatures"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features</code></a></li> <li><a href="#getMassProperties"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/massproperties</code></a></li> <li><a href="#getNamedViews2"><code><span class="http-method">get</span> /api/partstudios/d/{did}/e/{eid}/namedViews</code></a></li> <li><a href="#getOpenApi"><code><span class="http-method">get</span> /api/openapi</code></a></li> <li><a href="#getShadedViews1"><code><span class="http-method">get</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/shadedviews</code></a></li> <li><a href="#getTranslatorFormats4"><code><span class="http-method">get</span> /api/partstudios/d/{did}/w/{wid}/e/{eid}/translationformats</code></a></li> <li><a href="#translateFormat5"><code><span class="http-method">post</span> /api/partstudios/d/{did}/{wv}/{wvid}/e/{eid}/translations</code></a></li> <li><a href="#translateIds1"><code><span class="http-method">post</span> /api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/idtranslations</code></a></li> </ul> <h4><a href="#Documents">Documents</a></h4> <ul> <li><a href="#getDocuments"><code><span class="http-method">get</span> /api/documents</code></a></li> </ul> <h4><a href="#Endpoints">Endpoints</a></h4> <ul> <li><a href="#getEndpoints"><code><span class="http-method">get</span> /api/endpoints</code></a></li> </ul> <h4><a href="#Parts">Parts</a></h4> <ul> <li><a href="#getPartsWMV"><code><span class="http-method">get</span> /api/parts/d/{did}/{wvm}/{wvmid}</code></a></li> <li><a href="#updatePartsWMV"><code><span class="http-method">post</span> /api/parts/d/{did}/{wvm}/{wvmid}</code></a></li> </ul> <h1><a name="Accounts">Accounts</a></h1> <div class="method"><a name="cancelPurchaseNew"/> <div class="method-path"> <a class="up" href="#__Methods">Up</a> <pre class="delete"><code class="huge"><span class="http-method">delete</span> /api/accounts/{aid}/purchases/{pid}</code></pre></div> <div class="method-summary">Cancel Recurring Subscription (<span class="nickname">cancelPurchaseNew</span>)</div> <div class="method-notes"></div> <h3 class="field-label">Path parameters</h3> <div class="field-items"> <div class="param">aid (required)</div> <div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; default: null </div><div class="param">pid (required)</div> <div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; default: null </div> </div> <!-- field-items --> <h3 class="field-label">Query parameters</h3> <div class="field-items"> <div class="param">cancelImmediately (optional)</div> <div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; default: false </div> </div> <!-- field-items --> <!--Todo: process Response Object and its headers, schema, examples --> <h3 class="field-label">Produces</h3> This API call produces the following media types according to the <span class="header">Accept</span> request header; the media type will be conveyed by the <span class="header">Content-Type</span> response header. <ul> <li><code>application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1</code></li> <li><code>application/json;charset=UTF-8; qs=0.9</code></li> </ul> <h3 class="field-label">Responses</h3> <h4 class="field-label">default</h4> default response <a href="#"></a> </div> <!-- method --> <hr/> <div class="method"><a name="consumePurchase"/> <div class="method-path"> <a class="up" href="#__Methods">Up</a> <pre class="post"><code class="huge"><span class="http-method">post</span> /api/accounts/purchases/{pid}/consume</code></pre></div> <div class="method-summary">Mark Purchase Consumed For User (<span class="nickname">consumePurchase</span>)</div> <div class="method-notes"></div> <h3 class="field-label">Path parameters</h3> <div class="field-items"> <div class="param">pid (required)</div> <div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; default: null </div> </div> <!-- field-items --> <h3 class="field-label">Consumes</h3> This API call consumes the following media types via the <span class="header">Content-Type</span> request header: <ul> <li><code>application/json;charset=UTF-8</code></li> </ul> <h3 class="field-label">Request body</h3> <div class="field-items"> <div class="param">BTPurchaseUserParams <a href="#BTPurchaseUserParams">BTPurchaseUserParams</a> (optional)</div> <div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; </div> </div> <!-- field-items --> <h3 class="field-label">Return type</h3> <div class="return-type"> <a href="#BTPurchaseInfo">BTPurchaseInfo</a> </div> <!--Todo: process Response Object and its headers, schema, examples --> <h3 class="field-label">Example data</h3> <div class="example-data-content-type">Content-Type: application/json;charset=UTF-8; qs=0.9</div> <pre class="example"><code>{ "purchaseDate" : "2000-01-23T04:56:07.000+00:00", "durationMonths" : 4, "subscriptionBeginAt" : "2000-01-23T04:56:07.000+00:00", "planName" : "planName", "seats" : 2, "paymentType" : 8, "duration" : 1, "amountCents" : 6, "actualAmountPaidCents" : 3, "couponPercentOff" : 1, "subscriptionFields" : { "currentPeriodStart" : 2, "trialEnd" : 9, "metadata" : { "key" : "metadata" }, "quantity" : 9, "created" : 5, "currentPeriodEnd" : 5, "trialStart" : 6, "start" : 6, "applicationFeePercent" : 6.02745618307040320615897144307382404804229736328125, "discount" : { "coupon" : { "metadata" : { "key" : "metadata" }, "durationInMonths" : 2, "livemode" : true, "maxRedemptions" : 4, "created" : 3, "percentOff" : 7, "redeemBy" : 1, "timesRedeemed" : 1, "duration" : "duration", "valid" : true, "currency" : "currency", "id" : "id", "amountOff" : 9, "object" : "object" }, "start" : 6, "end" : 1, "id" : "id", "subscription" : "subscription", "object" : "object", "customer" : "customer" }, "customerObject" : { "nextRecurringCharge" : { "date" : "date", "amount" : 0 }, "trialEnd" : 4, "businessVatId" : "businessVatId", "metadata" : { "key" : "metadata" }, "subscriptions" : { "data" : [ null, null ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 5, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "cards" : { "data" : [ { "country" : "country", "last4" : "last4", "metadata" : { "key" : "metadata" }, "availablePayoutMethods" : [ "availablePayoutMethods", "availablePayoutMethods" ], "threeDSecure" : { "authenticated" : true, "amount" : 7, "redirectURL" : "redirectURL", "livemode" : true, "created" : 0, "currency" : "currency", "id" : "id", "object" : "object", "status" : "status" }, "description" : "description", "dynamicLast4" : "dynamicLast4", "type" : "type", "issuer" : "issuer", "iin" : "iin", "expYear" : 3, "fingerprint" : "fingerprint", "addressLine1" : "addressLine1", "addressLine2" : "addressLine2", "currency" : "currency", "id" : "id", "cvcCheck" : "cvcCheck", "brand" : "brand", "addressCity" : "addressCity", "addressLine1Check" : "addressLine1Check", "defaultForCurrency" : true, "addressCountry" : "addressCountry", "funding" : "funding", "addressZip" : "addressZip", "addressZipCheck" : "addressZipCheck", "addressState" : "addressState", "instanceURL" : "instanceURL", "expMonth" : 3, "tokenizationMethod" : "tokenizationMethod", "name" : "name", "recipient" : "recipient", "account" : "account", "object" : "object", "customer" : "customer", "status" : "status" }, { "country" : "country", "last4" : "last4", "metadata" : { "key" : "metadata" }, "availablePayoutMethods" : [ "availablePayoutMethods", "availablePayoutMethods" ], "threeDSecure" : { "authenticated" : true, "amount" : 7, "redirectURL" : "redirectURL", "livemode" : true, "created" : 0, "currency" : "currency", "id" : "id", "object" : "object", "status" : "status" }, "description" : "description", "dynamicLast4" : "dynamicLast4", "type" : "type", "issuer" : "issuer", "iin" : "iin", "expYear" : 3, "fingerprint" : "fingerprint", "addressLine1" : "addressLine1", "addressLine2" : "addressLine2", "currency" : "currency", "id" : "id", "cvcCheck" : "cvcCheck", "brand" : "brand", "addressCity" : "addressCity", "addressLine1Check" : "addressLine1Check", "defaultForCurrency" : true, "addressCountry" : "addressCountry", "funding" : "funding", "addressZip" : "addressZip", "addressZipCheck" : "addressZipCheck", "addressState" : "addressState", "instanceURL" : "instanceURL", "expMonth" : 3, "tokenizationMethod" : "tokenizationMethod", "name" : "name", "recipient" : "recipient", "account" : "account", "object" : "object", "customer" : "customer", "status" : "status" } ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 7, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "livemode" : true, "sources" : { "data" : [ { "metadata" : { "key" : "metadata" }, "id" : "id", "account" : "account", "object" : "object", "customer" : "customer", "instanceURL" : "instanceURL" }, { "metadata" : { "key" : "metadata" }, "id" : "id", "account" : "account", "object" : "object", "customer" : "customer", "instanceURL" : "instanceURL" } ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 1, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "created" : 6, "description" : "description", "discount" : { "coupon" : { "metadata" : { "key" : "metadata" }, "durationInMonths" : 2, "livemode" : true, "maxRedemptions" : 4, "created" : 3, "percentOff" : 7, "redeemBy" : 1, "timesRedeemed" : 1, "duration" : "duration", "valid" : true, "currency" : "currency", "id" : "id", "amountOff" : 9, "object" : "object" }, "start" : 6, "end" : 1, "id" : "id", "subscription" : "subscription", "object" : "object", "customer" : "customer" }, "deleted" : true, "shipping" : { "address" : { "country" : "country", "city" : "city", "postalCode" : "postalCode", "state" : "state", "line2" : "line2", "line1" : "line1" }, "phone" : "phone", "name" : "name" }, "delinquent" : true, "defaultSourceObject" : { "metadata" : { "key" : "metadata" }, "id" : "id", "account" : "account", "object" : "object", "customer" : "customer", "instanceURL" : "instanceURL" }, "defaultSource" : "defaultSource", "currency" : "currency", "id" : "id", "accountBalance" : 3, "defaultCard" : "defaultCard", "email" : "email", "object" : "object" }, "billing" : "billing", "daysUntilDue" : 7, "subscriptionItems" : { "data" : [ { "quantity" : 7, "created" : 8, "id" : "id", "plan" : { "amount" : 1, "metadata" : { "key" : "metadata" }, "livemode" : true, "trialPeriodDays" : 9, "created" : 4, "statementDescriptor" : "statementDescriptor", "statementDescription" : "statementDescription", "intervalCount" : 5, "name" : "name", "currency" : "currency", "interval" : "interval", "id" : "id", "object" : "object" }, "object" : "object" }, { "quantity" : 7, "created" : 8, "id" : "id", "plan" : { "amount" : 1, "metadata" : { "key" : "metadata" }, "livemode" : true, "trialPeriodDays" : 9, "created" : 4, "statementDescriptor" : "statementDescriptor", "statementDescription" : "statementDescription", "intervalCount" : 5, "name" : "name", "currency" : "currency", "interval" : "interval", "id" : "id", "object" : "object" }, "object" : "object" } ], "hasMore" : true, "count" : 3, "requestParams" : { "key" : "{}" }, "totalCount" : 3, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "canceledAt" : 1, "endedAt" : 7, "cancelAtPeriodEnd" : true, "taxPercent" : 8.7620420127490010742121739895083010196685791015625, "id" : "id", "plan" : { "amount" : 1, "metadata" : { "key" : "metadata" }, "livemode" : true, "trialPeriodDays" : 9, "created" : 4, "statementDescriptor" : "statementDescriptor", "statementDescription" : "statementDescription", "intervalCount" : 5, "name" : "name", "currency" : "currency", "interval" : "interval", "id" : "id", "object" : "object" }, "object" : "object", "customer" : "customer", "status" : "status" }, "currency" : "currency", "planId" : "planId", "state" : 0, "id" : "id", "href" : "http://example.com/aeiou", "proratedTotal" : 0, "plan" : { "clientId" : "clientId", "planType" : 0, "hidden" : true, "trialPeriodDays" : 8, "deprecated" : true, "description" : "description", "onshapePlan" : true, "amountCents" : 3, "discountInfo" : { "couponValidMonths" : 4, "percentOff" : 0, "ownerId" : "ownerId", "expiresAt" : "2000-01-23T04:56:07.000+00:00", "createdAt" : "2000-01-23T04:56:07.000+00:00", "trialEndDate" : "trialEndDate", "createdBy" : { "lastName" : "lastName", "globalPermissions" : { "approveReleases" : true, "accessReports" : true, "manageGuestUsers" : true, "createReleases" : true, "shareForAnonymousAccess" : true, "createProject" : true, "adminEnterprise" : true, "manageRbac" : true, "deletePermanently" : true, "manageUsers" : true }, "image" : "image", "isGuest" : true, "isLight" : true, "source" : 7, "firstName" : "firstName", "lastLoginTime" : "2000-01-23T04:56:07.000+00:00", "name" : "name", "company" : { "image" : "image", "noPublicDocuments" : true, "description" : "description", "admin" : true, "type" : 0, "ownerId" : "ownerId", "domainPrefix" : "domainPrefix", "name" : "name", "state" : 9, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "enterpriseBaseUrl" : "enterpriseBaseUrl" }, "state" : 9, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "email" : "email" }, "couponType" : 5, "name" : "name", "planId" : "planId", "usedAt" : "2000-01-23T04:56:07.000+00:00", "amountOff" : 7, "id" : "id", "href" : "http://example.com/aeiou", "accountBalance" : 6, "viewRef" : "http://example.com/aeiou" }, "companyPlan" : true, "name" : "name", "interval" : "interval", "id" : "id", "href" : "http://example.com/aeiou", "applicationId" : "applicationId", "viewRef" : "http://example.com/aeiou", "group" : "group", "consumableQuantity" : 4 }, "proratedCharges" : [ { "date" : "2000-01-23T04:56:07.000+00:00", "amount" : 4, "description" : "description" }, { "date" : "2000-01-23T04:56:07.000+00:00", "amount" : 4, "description" : "description" } ], "group" : "group", "trialEnd" : "2000-01-23T04:56:07.000+00:00", "clientId" : "clientId", "planType" : 4, "couponAmountOff" : 6, "subscriptionEndAt" : "2000-01-23T04:56:07.000+00:00", "resellerName" : "resellerName", "subscribers" : [ { "firstName" : "firstName", "lastName" : "lastName", "image" : "image", "name" : "name", "state" : 7, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "email" : "email" }, { "firstName" : "firstName", "lastName" : "lastName", "image" : "image", "name" : "name", "state" : 7, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "email" : "email" } ], "nextCharge" : { "total" : 5, "amount" : 3, "currentPeriodEnd" : "2000-01-23T04:56:07.000+00:00", "interval" : "interval" }, "accountId" : "accountId", "application" : { "clientId" : "clientId", "name" : "name", "description" : "description", "id" : "id", "state" : 1, "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou" }, "pendingCancelation" : true, "canceledAt" : "2000-01-23T04:56:07.000+00:00", "name" : "name", "lightSeats" : 4, "lastModified" : "2000-01-23T04:56:07.000+00:00", "subscriptionId" : "subscriptionId", "viewRef" : "http://example.com/aeiou", "card" : { "last4" : "last4", "expMonth" : 8, "expYear" : 9, "billingAddress" : { "zip" : "zip", "country" : "country", "address" : "address", "city" : "city", "countryCode" : "countryCode", "stateCode" : "stateCode", "id" : "id", "state" : "state" }, "type" : "type" } }</code></pre> <h3 class="field-label">Produces</h3> This API call produces the following media types according to the <span class="header">Accept</span> request header; the media type will be conveyed by the <span class="header">Content-Type</span> response header. <ul> <li><code>application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1</code></li> <li><code>application/json;charset=UTF-8; qs=0.9</code></li> </ul> <h3 class="field-label">Responses</h3> <h4 class="field-label">default</h4> default response <a href="#BTPurchaseInfo">BTPurchaseInfo</a> </div> <!-- method --> <hr/> <div class="method"><a name="getPlanPurchases"/> <div class="method-path"> <a class="up" href="#__Methods">Up</a> <pre class="get"><code class="huge"><span class="http-method">get</span> /api/accounts/plans/{planId}/purchases</code></pre></div> <div class="method-summary">Get Plan Purchases (<span class="nickname">getPlanPurchases</span>)</div> <div class="method-notes"></div> <h3 class="field-label">Path parameters</h3> <div class="field-items"> <div class="param">planId (required)</div> <div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; default: null </div> </div> <!-- field-items --> <h3 class="field-label">Query parameters</h3> <div class="field-items"> <div class="param">offset (optional)</div> <div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; default: 0 format: int32</div><div class="param">limit (optional)</div> <div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; default: 20 format: int32</div> </div> <!-- field-items --> <h3 class="field-label">Return type</h3> <div class="return-type"> <a href="#BTListResponseBTPurchaseInfo">BTListResponseBTPurchaseInfo</a> </div> <!--Todo: process Response Object and its headers, schema, examples --> <h3 class="field-label">Example data</h3> <div class="example-data-content-type">Content-Type: application/json;charset=UTF-8; qs=0.9</div> <pre class="example"><code>{ "next" : "http://example.com/aeiou", "previous" : "http://example.com/aeiou", "href" : "http://example.com/aeiou", "items" : [ { "purchaseDate" : "2000-01-23T04:56:07.000+00:00", "durationMonths" : 4, "subscriptionBeginAt" : "2000-01-23T04:56:07.000+00:00", "planName" : "planName", "seats" : 2, "paymentType" : 8, "duration" : 1, "amountCents" : 6, "actualAmountPaidCents" : 3, "couponPercentOff" : 1, "subscriptionFields" : { "currentPeriodStart" : 2, "trialEnd" : 9, "metadata" : { "key" : "metadata" }, "quantity" : 9, "created" : 5, "currentPeriodEnd" : 5, "trialStart" : 6, "start" : 6, "applicationFeePercent" : 6.02745618307040320615897144307382404804229736328125, "discount" : { "coupon" : { "metadata" : { "key" : "metadata" }, "durationInMonths" : 2, "livemode" : true, "maxRedemptions" : 4, "created" : 3, "percentOff" : 7, "redeemBy" : 1, "timesRedeemed" : 1, "duration" : "duration", "valid" : true, "currency" : "currency", "id" : "id", "amountOff" : 9, "object" : "object" }, "start" : 6, "end" : 1, "id" : "id", "subscription" : "subscription", "object" : "object", "customer" : "customer" }, "customerObject" : { "nextRecurringCharge" : { "date" : "date", "amount" : 0 }, "trialEnd" : 4, "businessVatId" : "businessVatId", "metadata" : { "key" : "metadata" }, "subscriptions" : { "data" : [ null, null ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 5, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "cards" : { "data" : [ { "country" : "country", "last4" : "last4", "metadata" : { "key" : "metadata" }, "availablePayoutMethods" : [ "availablePayoutMethods", "availablePayoutMethods" ], "threeDSecure" : { "authenticated" : true, "amount" : 7, "redirectURL" : "redirectURL", "livemode" : true, "created" : 0, "currency" : "currency", "id" : "id", "object" : "object", "status" : "status" }, "description" : "description", "dynamicLast4" : "dynamicLast4", "type" : "type", "issuer" : "issuer", "iin" : "iin", "expYear" : 3, "fingerprint" : "fingerprint", "addressLine1" : "addressLine1", "addressLine2" : "addressLine2", "currency" : "currency", "id" : "id", "cvcCheck" : "cvcCheck", "brand" : "brand", "addressCity" : "addressCity", "addressLine1Check" : "addressLine1Check", "defaultForCurrency" : true, "addressCountry" : "addressCountry", "funding" : "funding", "addressZip" : "addressZip", "addressZipCheck" : "addressZipCheck", "addressState" : "addressState", "instanceURL" : "instanceURL", "expMonth" : 3, "tokenizationMethod" : "tokenizationMethod", "name" : "name", "recipient" : "recipient", "account" : "account", "object" : "object", "customer" : "customer", "status" : "status" }, { "country" : "country", "last4" : "last4", "metadata" : { "key" : "metadata" }, "availablePayoutMethods" : [ "availablePayoutMethods", "availablePayoutMethods" ], "threeDSecure" : { "authenticated" : true, "amount" : 7, "redirectURL" : "redirectURL", "livemode" : true, "created" : 0, "currency" : "currency", "id" : "id", "object" : "object", "status" : "status" }, "description" : "description", "dynamicLast4" : "dynamicLast4", "type" : "type", "issuer" : "issuer", "iin" : "iin", "expYear" : 3, "fingerprint" : "fingerprint", "addressLine1" : "addressLine1", "addressLine2" : "addressLine2", "currency" : "currency", "id" : "id", "cvcCheck" : "cvcCheck", "brand" : "brand", "addressCity" : "addressCity", "addressLine1Check" : "addressLine1Check", "defaultForCurrency" : true, "addressCountry" : "addressCountry", "funding" : "funding", "addressZip" : "addressZip", "addressZipCheck" : "addressZipCheck", "addressState" : "addressState", "instanceURL" : "instanceURL", "expMonth" : 3, "tokenizationMethod" : "tokenizationMethod", "name" : "name", "recipient" : "recipient", "account" : "account", "object" : "object", "customer" : "customer", "status" : "status" } ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 7, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "livemode" : true, "sources" : { "data" : [ { "metadata" : { "key" : "metadata" }, "id" : "id", "account" : "account", "object" : "object", "customer" : "customer", "instanceURL" : "instanceURL" }, { "metadata" : { "key" : "metadata" }, "id" : "id", "account" : "account", "object" : "object", "customer" : "customer", "instanceURL" : "instanceURL" } ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 1, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "created" : 6, "description" : "description", "discount" : { "coupon" : { "metadata" : { "key" : "metadata" }, "durationInMonths" : 2, "livemode" : true, "maxRedemptions" : 4, "created" : 3, "percentOff" : 7, "redeemBy" : 1, "timesRedeemed" : 1, "duration" : "duration", "valid" : true, "currency" : "currency", "id" : "id", "amountOff" : 9, "object" : "object" }, "start" : 6, "end" : 1, "id" : "id", "subscription" : "subscription", "object" : "object", "customer" : "customer" }, "deleted" : true, "shipping" : { "address" : { "country" : "country", "city" : "city", "postalCode" : "postalCode", "state" : "state", "line2" : "line2", "line1" : "line1" }, "phone" : "phone", "name" : "name" }, "delinquent" : true, "defaultSourceObject" : { "metadata" : { "key" : "metadata" }, "id" : "id", "account" : "account", "object" : "object", "customer" : "customer", "instanceURL" : "instanceURL" }, "defaultSource" : "defaultSource", "currency" : "currency", "id" : "id", "accountBalance" : 3, "defaultCard" : "defaultCard", "email" : "email", "object" : "object" }, "billing" : "billing", "daysUntilDue" : 7, "subscriptionItems" : { "data" : [ { "quantity" : 7, "created" : 8, "id" : "id", "plan" : { "amount" : 1, "metadata" : { "key" : "metadata" }, "livemode" : true, "trialPeriodDays" : 9, "created" : 4, "statementDescriptor" : "statementDescriptor", "statementDescription" : "statementDescription", "intervalCount" : 5, "name" : "name", "currency" : "currency", "interval" : "interval", "id" : "id", "object" : "object" }, "object" : "object" }, { "quantity" : 7, "created" : 8, "id" : "id", "plan" : { "amount" : 1, "metadata" : { "key" : "metadata" }, "livemode" : true, "trialPeriodDays" : 9, "created" : 4, "statementDescriptor" : "statementDescriptor", "statementDescription" : "statementDescription", "intervalCount" : 5, "name" : "name", "currency" : "currency", "interval" : "interval", "id" : "id", "object" : "object" }, "object" : "object" } ], "hasMore" : true, "count" : 3, "requestParams" : { "key" : "{}" }, "totalCount" : 3, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "canceledAt" : 1, "endedAt" : 7, "cancelAtPeriodEnd" : true, "taxPercent" : 8.7620420127490010742121739895083010196685791015625, "id" : "id", "plan" : { "amount" : 1, "metadata" : { "key" : "metadata" }, "livemode" : true, "trialPeriodDays" : 9, "created" : 4, "statementDescriptor" : "statementDescriptor", "statementDescription" : "statementDescription", "intervalCount" : 5, "name" : "name", "currency" : "currency", "interval" : "interval", "id" : "id", "object" : "object" }, "object" : "object", "customer" : "customer", "status" : "status" }, "currency" : "currency", "planId" : "planId", "state" : 0, "id" : "id", "href" : "http://example.com/aeiou", "proratedTotal" : 0, "plan" : { "clientId" : "clientId", "planType" : 0, "hidden" : true, "trialPeriodDays" : 8, "deprecated" : true, "description" : "description", "onshapePlan" : true, "amountCents" : 3, "discountInfo" : { "couponValidMonths" : 4, "percentOff" : 0, "ownerId" : "ownerId", "expiresAt" : "2000-01-23T04:56:07.000+00:00", "createdAt" : "2000-01-23T04:56:07.000+00:00", "trialEndDate" : "trialEndDate", "createdBy" : { "lastName" : "lastName", "globalPermissions" : { "approveReleases" : true, "accessReports" : true, "manageGuestUsers" : true, "createReleases" : true, "shareForAnonymousAccess" : true, "createProject" : true, "adminEnterprise" : true, "manageRbac" : true, "deletePermanently" : true, "manageUsers" : true }, "image" : "image", "isGuest" : true, "isLight" : true, "source" : 7, "firstName" : "firstName", "lastLoginTime" : "2000-01-23T04:56:07.000+00:00", "name" : "name", "company" : { "image" : "image", "noPublicDocuments" : true, "description" : "description", "admin" : true, "type" : 0, "ownerId" : "ownerId", "domainPrefix" : "domainPrefix", "name" : "name", "state" : 9, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "enterpriseBaseUrl" : "enterpriseBaseUrl" }, "state" : 9, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "email" : "email" }, "couponType" : 5, "name" : "name", "planId" : "planId", "usedAt" : "2000-01-23T04:56:07.000+00:00", "amountOff" : 7, "id" : "id", "href" : "http://example.com/aeiou", "accountBalance" : 6, "viewRef" : "http://example.com/aeiou" }, "companyPlan" : true, "name" : "name", "interval" : "interval", "id" : "id", "href" : "http://example.com/aeiou", "applicationId" : "applicationId", "viewRef" : "http://example.com/aeiou", "group" : "group", "consumableQuantity" : 4 }, "proratedCharges" : [ { "date" : "2000-01-23T04:56:07.000+00:00", "amount" : 4, "description" : "description" }, { "date" : "2000-01-23T04:56:07.000+00:00", "amount" : 4, "description" : "description" } ], "group" : "group", "trialEnd" : "2000-01-23T04:56:07.000+00:00", "clientId" : "clientId", "planType" : 4, "couponAmountOff" : 6, "subscriptionEndAt" : "2000-01-23T04:56:07.000+00:00", "resellerName" : "resellerName", "subscribers" : [ { "firstName" : "firstName", "lastName" : "lastName", "image" : "image", "name" : "name", "state" : 7, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "email" : "email" }, { "firstName" : "firstName", "lastName" : "lastName", "image" : "image", "name" : "name", "state" : 7, "id" : "id", "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou", "email" : "email" } ], "nextCharge" : { "total" : 5, "amount" : 3, "currentPeriodEnd" : "2000-01-23T04:56:07.000+00:00", "interval" : "interval" }, "accountId" : "accountId", "application" : { "clientId" : "clientId", "name" : "name", "description" : "description", "id" : "id", "state" : 1, "href" : "http://example.com/aeiou", "viewRef" : "http://example.com/aeiou" }, "pendingCancelation" : true, "canceledAt" : "2000-01-23T04:56:07.000+00:00", "name" : "name", "lightSeats" : 4, "lastModified" : "2000-01-23T04:56:07.000+00:00", "subscriptionId" : "subscriptionId", "viewRef" : "http://example.com/aeiou", "card" : { "last4" : "last4", "expMonth" : 8, "expYear" : 9, "billingAddress" : { "zip" : "zip", "country" : "country", "address" : "address", "city" : "city", "countryCode" : "countryCode", "stateCode" : "stateCode", "id" : "id", "state" : "state" }, "type" : "type" } }, { "purchaseDate" : "2000-01-23T04:56:07.000+00:00", "durationMonths" : 4, "subscriptionBeginAt" : "2000-01-23T04:56:07.000+00:00", "planName" : "planName", "seats" : 2, "paymentType" : 8, "duration" : 1, "amountCents" : 6, "actualAmountPaidCents" : 3, "couponPercentOff" : 1, "subscriptionFields" : { "currentPeriodStart" : 2, "trialEnd" : 9, "metadata" : { "key" : "metadata" }, "quantity" : 9, "created" : 5, "currentPeriodEnd" : 5, "trialStart" : 6, "start" : 6, "applicationFeePercent" : 6.02745618307040320615897144307382404804229736328125, "discount" : { "coupon" : { "metadata" : { "key" : "metadata" }, "durationInMonths" : 2, "livemode" : true, "maxRedemptions" : 4, "created" : 3, "percentOff" : 7, "redeemBy" : 1, "timesRedeemed" : 1, "duration" : "duration", "valid" : true, "currency" : "currency", "id" : "id", "amountOff" : 9, "object" : "object" }, "start" : 6, "end" : 1, "id" : "id", "subscription" : "subscription", "object" : "object", "customer" : "customer" }, "customerObject" : { "nextRecurringCharge" : { "date" : "date", "amount" : 0 }, "trialEnd" : 4, "businessVatId" : "businessVatId", "metadata" : { "key" : "metadata" }, "subscriptions" : { "data" : [ null, null ], "hasMore" : true, "count" : 6, "requestParams" : { "key" : "{}" }, "totalCount" : 5, "requestOptions" : { "apiKey" : "apiKey", "stripeAccount" : "stripeAccount", "idempotencyKey" : "idempotencyKey", "readTimeout" : 6, "connectTimeout" : 2, "stripeVersion" : "stripeVersion" }, "url" : "url" }, "cards" : { "data" : [ { "country" : "country", "last4" : "last4", "metadata" : { "key" : "metadata" }, "availablePayoutMethods" : [ "availablePayoutMethods", "availablePayoutMethods" ], "threeDSecure" : { "authenticated" : true, "amount" : 7, "redirectURL" : "redirectURL", "livemode" : true, "created" : 0, "currency" : "currency", "id" : "id", "object" : "object", "status" : "status" }, "description" : "description", "dynamicLast4" : "dynamicLast4", "type" : "type", "issuer" : "issuer", "iin" : "iin", "expYear" : 3, "fingerprint" : "fingerprint", "addressLine1" : "addressLine1", "addressLine2" : "addressLine2", "currency" : "currency", "id" : "id", "cvcCheck" : "cvcCheck", "brand" : "brand", "addressCity" : "addressCity", "addressLine1Check" : "addressLine1Check", "defaultForCurrency" : true, "addressCountry" : "addressCountry", "funding" : "funding", "addressZip" : "addressZip", "addressZipCheck" : "addressZipCheck", "addressState" : "addressState", "instanceURL" : "instanceURL", "expMonth" : 3, "tokenizationMethod" : "tokenizationMethod", "name" : "name", "recipient" : "recipient", "account" : "account", "object" : "object", "customer" : "customer", "status" : "status" }, { "country" : "country", "last4" : "last4", "metadata" : { "key" : "metadata" }, "availablePayoutMethods" : [ "availablePayoutMethods", "availablePayoutMethods" ],