Create an add-on purchase for the namespace
Deprecated
POST
/api/v4/namespaces/{id}/subscription_add_on_purchase/{add_on_name}
Deprecated in GitLab 17.7
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
quantity
required
The quantity of the purchase
integer
started_on
required
The date when purchase takes effect
string format: date
expires_on
required
The date when purchase expires on
string format: date
purchase_xid
required
The purchase identifier (example: the subscription name)
string
trial
Whether the add-on is a trial
boolean
Examplegenerated
{ "quantity": 1, "started_on": "2026-04-15", "expires_on": "2026-04-15", "purchase_xid": "example", "trial": true}Responses
Section titled “Responses”Created
Media typeapplication/json
object
namespace_id
integer format: int64
namespace_name
string
add_on
string
quantity
integer
started_on
string format: date
expires_on
string format: date
purchase_xid
string
trial
boolean
Example
{ "namespace_id": 123, "namespace_name": "GitLab", "add_on": "Code Suggestions", "quantity": 10, "started_on": "2023-05-30", "expires_on": "2023-05-30", "purchase_xid": "A-S00000001", "trial": false}Bad request
Unauthorized
Not found