Services API

update values

PUT /api/rest/admin/billing/services/:id

Parameters

Name Description
data[type] Resource type (services)
data[id] Service type ID
data[attributes][name] Name
data[attributes][renew-price] Renew price
data[attributes][variables] Variables

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NTAsInN1YiI6NTN9.WwfMtk0BMejP1yfpiKruLJqgl6QsYh6JvnckXsvYuaM
Host: example.org
Cookie: 

Route

PUT /api/rest/admin/billing/services/8

Body

{"data":{"type":"services","id":8,"attributes":{"name":"name","renew-price":123.45,"variables":{"foo":"bar"}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"0396b991167e824bdf3c6bfd95713186"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: e4cd7461-2f9b-44b6-b967-2db52255388c
X-Runtime: 0.019542
Content-Length: 978

Status

200 OK

Body

{
  "data": {
    "id": "8",
    "type": "services",
    "links": {
      "self": "http://example.org/api/rest/admin/billing/services/8"
    },
    "attributes": {
      "name": "name",
      "variables": {
        "foo": "bar"
      },
      "state": "Active",
      "initial-price": "51.24",
      "renew-price": "123.45",
      "created-at": "2024-11-14T04:53:50.462Z",
      "renew-at": null,
      "renew-period": "Disabled",
      "uuid": "f123e504-9c99-4ca2-b816-7d2c5d4d2e13"
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://example.org/api/rest/admin/billing/services/8/relationships/account",
          "related": "http://example.org/api/rest/admin/billing/services/8/account"
        },
        "data": {
          "type": "accounts",
          "id": "52"
        }
      },
      "service-type": {
        "links": {
          "self": "http://example.org/api/rest/admin/billing/services/8/relationships/service-type",
          "related": "http://example.org/api/rest/admin/billing/services/8/service-type"
        }
      },
      "transactions": {
        "links": {
          "self": "http://example.org/api/rest/admin/billing/services/8/relationships/transactions",
          "related": "http://example.org/api/rest/admin/billing/services/8/transactions"
        }
      }
    }
  }
}