create new entry
POST /api/rest/admin/billing/services
Parameters
Name |
Description |
data[type]
|
Resource type (services)
|
data[attributes][name]
|
Name
|
data[attributes][initial-price]
|
Initial price
|
data[attributes][renew-price]
|
Renew price
|
data[attributes][renew-at]
|
Renew at
|
data[attributes][renew-period]
|
Renew period
|
data[attributes][variables]
|
Variables
|
data[relationships][account]
|
Account
|
data[relationships][service-type]
|
Service type
|
Request
Headers
Route
POST /api/rest/admin/billing/services
Body
{"data":{"type":"services","attributes":{"name":"name","initial-price":1.23,"renew-price":3.24},"relationships":{"account":{"data":{"type":"accounts","id":"51"}},"service-type":{"data":{"type":"service-types","id":"13"}}}}}
Response
Headers
Status
201 Created
Body
{
"data": {
"id": "7",
"type": "services",
"links": {
"self": "http://example.org/api/rest/admin/billing/services/7"
},
"attributes": {
"name": "name",
"variables": null,
"state": "Active",
"initial-price": "1.23",
"renew-price": "3.24",
"created-at": "2024-11-14T09:55:50.387Z",
"renew-at": null,
"renew-period": "Disabled",
"uuid": "10d70e12-713f-49e4-94bb-b2a64aeeb165"
},
"relationships": {
"account": {
"links": {
"self": "http://example.org/api/rest/admin/billing/services/7/relationships/account",
"related": "http://example.org/api/rest/admin/billing/services/7/account"
},
"data": {
"type": "accounts",
"id": "51"
}
},
"service-type": {
"links": {
"self": "http://example.org/api/rest/admin/billing/services/7/relationships/service-type",
"related": "http://example.org/api/rest/admin/billing/services/7/service-type"
}
},
"transactions": {
"links": {
"self": "http://example.org/api/rest/admin/billing/services/7/relationships/transactions",
"related": "http://example.org/api/rest/admin/billing/services/7/transactions"
}
}
}
}
}