API Subscriptions Endpoint

Problem to solve

In building out the API, there should be a /subscriptions endpoint to search subscriptions.

Intended users

GitLab Internal Team Members

Proposal

Create a Subscriptions API endpoint that allows to pull read-only info from Zuora, much like you can via console right now, plus the ability to trigger a "sync".

GET /subscriptions
GET /subscriptions/:id
GET /subscriptions?name=:subscription_name
GET /subscriptions?plan=:plan_type
GET /subscriptions?start_date=:date
GET /subscriptions?end_date=:date
POST /subscriptions/:id/sync

Further details

This would help deprecate the use of Order.subscription.products by those who have console access.

The sync option would deprecate the use of the force attributes function Support currently uses, and the code behind it.

For POST /subscriptions/:id/sync

Attribute Type Required Description
id numeric yes The subscription ID to sync

Permissions and Security

This should be limited to admins.

Documentation

New docs required.

Availability & Testing

What does success look like, and how can we measure that?

  • Subscriptions searchable via API.
  • Subscription information can be synced from Zuora.
Edited Jan 05, 2021 by Cynthia "Arty" Ng
Assignee Loading
Time tracking Loading