Services API

create new entry

POST /api/rest/admin/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

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIyNiwiYXVkIjpbImFkbWluIl0sImV4cCI6MTc2NzM1ODU3Mn0.djCMmuH4JTZlPoRq_8RYk3SNg_UR4wYz-ants1Qzv2Q
Host: example.org
Cookie: 

Route

POST /api/rest/admin/services

Body

{"data":{"type":"services","attributes":{"name":"name","initial-price":1.23,"renew-price":3.24},"relationships":{"account":{"data":{"type":"accounts","id":"90"}},"service-type":{"data":{"type":"service-types","id":"16"}}}}}

Response

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/services/10
vary: Accept
etag: W/"24a4b1ed9ac713414d362311332de80a"
cache-control: max-age=0, private, must-revalidate
x-request-id: 20e9a164-0784-41f3-b0b1-497bc647a8f2
x-runtime: 0.022652
content-length: 1110

Status

201 Created

Body

{
  "data": {
    "id": "10",
    "type": "services",
    "links": {
      "self": "http://example.org/api/rest/admin/services/10"
    },
    "attributes": {
      "name": "name",
      "variables": null,
      "state": "Active",
      "initial-price": "1.23",
      "renew-price": "3.24",
      "created-at": "2026-01-02T12:46:12.104Z",
      "renew-at": null,
      "renew-period": "Disabled",
      "uuid": "8291b79d-e94c-4991-ae6f-b4eb7afd6ced"
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://example.org/api/rest/admin/services/10/relationships/account",
          "related": "http://example.org/api/rest/admin/services/10/account"
        },
        "data": {
          "type": "accounts",
          "id": "90"
        }
      },
      "service-type": {
        "links": {
          "self": "http://example.org/api/rest/admin/services/10/relationships/service-type",
          "related": "http://example.org/api/rest/admin/services/10/service-type"
        }
      },
      "transactions": {
        "links": {
          "self": "http://example.org/api/rest/admin/services/10/relationships/transactions",
          "related": "http://example.org/api/rest/admin/services/10/transactions"
        }
      },
      "package-counters": {
        "links": {
          "self": "http://example.org/api/rest/admin/services/10/relationships/package-counters",
          "related": "http://example.org/api/rest/admin/services/10/package-counters"
        }
      }
    }
  }
}