01.software Docs

getCustomerMembership

Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.

All HTTP operations
GET
/api/memberships/me

Authorization

publishableKeycustomerBearerAuth
headerX-Publishable-Key<token>

Tenant publishable key for authentication (sent via X-Publishable-Key header)

headerAuthorizationBearer <JWT>

Customer JWT for same-tenant authenticated customer actions

Response Body

Successful operation

application/json
  1. response
id*string
Length1 <= length
plan*string
Length1 <= length
price*string
Length1 <= length
status*string
Value in"incomplete""trialing""active""past_due""cancelled""expired"
currentPeriodEnd*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
nextBillingAt*|
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
cancelAtPeriodEnd*boolean
amount*integer
Range0 <= value <= 9007199254740991
currency*string
Length3 <= length <= 3
billingInterval*string
Value in"month""year"
intervalCount*integer
Range0 < value <= 9007199254740991
card?|null

Examples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.

Example Request
curl -X GET 'https://api.01.software/api/memberships/me'
Example Response
{  "id": "string",  "plan": "string",  "price": "string",  "status": "incomplete",  "currentPeriodEnd": "2019-08-24T14:15:22Z",  "nextBillingAt": "2019-08-24T14:15:22Z",  "cancelAtPeriodEnd": true,  "amount": 0,  "currency": "str",  "billingInterval": "month",  "intervalCount": 1,  "card": {    "last4": "string",    "brand": "string"  }}