Skip to content

Get amendment by ID

GET/tenants/{tenantId}/account-amendments/{accountAmendmentId}

Partner API · Tenants

Get account amendment by ID.

Required permissionaccount_management:read OR license_management:read

Parameters

Name In Type Required Description
X-Partner-ID header string (uuid) Yes Partner ID.
tenantId path string (uuid) Yes Tenant ID.
accountAmendmentId path string (uuid) Yes Account amendment ID.
fields query array of string No The fields to return in a partial response.

Request samples

curl -X GET "https://api.central.sophos.com/partner/v1/tenants/<tenantId>/account-amendments/<accountAmendmentId>" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>"

import requests

response = requests.get(
    "https://api.central.sophos.com/partner/v1/tenants/<tenantId>/account-amendments/<accountAmendmentId>",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Partner-ID": "<partner-id>",
    },
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Partner-ID" = "<partner-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api.central.sophos.com/partner/v1/tenants/<tenantId>/account-amendments/<accountAmendmentId>" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("GET", "https://api.central.sophos.com/partner/v1/tenants/<tenantId>/account-amendments/<accountAmendmentId>", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Partner-ID", "<partner-id>")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api.central.sophos.com/partner/v1/tenants/<tenantId>/account-amendments/<accountAmendmentId>", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Partner-ID": "<partner-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Existing account amendment.

Response fields

idstring (uuid)required
Amendment ID.
statusstring (enum)required
Account amendment status.
Must be one of: pending, applied, failed, canceled.
typestringrequired
Amendment request type.
Must be one of: billingChange, resumeAccount, cancelAccount, suspendAccount, unlinkFromPartner.
effectiveAtstring (datetime)
Date and time (UTC) when the amendment is effective.
createdAtstring (datetime)required
Date and time (UTC) when the amendment request was created.
failedAtstring (datetime)
Date and time (UTC) when the amendment request failed.
appliedAtstring (datetime)
Date and time (UTC) when the amendment request was applied.
createdByobject
User or service principal that made the change.
Show child attributesHide child attributes
idstringrequired
Principal ID.
typestringrequired
Type of entity that made this change.
Must be one of: user, service.
namestring
Principal name.
accountTypestring
Account type for this principal.
Must be one of: partner, tenant, organization, distributor.
accountIdstring (uuid)
Account ID.
changesobjectrequired
Change object from an amendment request.
Show child attributesHide child attributes
billingTypeobject
Billing type change object.
Show child attributesHide child attributes
tostringrequired
Billing type that the tenant was changed to.
Must be one of: trial, ordered, usage.
fromstringrequired
Billing type that the tenant was changed from.
Must be one of: trial, ordered, usage, term.
productsobject
List of amended products.
Show child attributesHide child attributes
usageobject
Show child attributesHide child attributes
addedarray of string
Items must be unique. Each item must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
removedarray of string
Items must be unique. Each item must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
orderedobject
Show child attributesHide child attributes
addedarray of object
Default products for ordered billing type.
Show child attributesHide child attributes
codestringrequired
Sophos product code.
Must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
quantityintegerrequired
Quantity for the number of seats.
removedarray of object
Default products for ordered billing type.
Show child attributesHide child attributes
codestringrequired
Sophos product code.
Must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
quantityintegerrequired
Quantity for the number of seats.
modifiedarray of object
Show child attributesHide child attributes
codestring
Sophos product code.
Must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
fromQuantityinteger
toQuantityinteger
statusobject
Account status type change.
Show child attributesHide child attributes
tostringrequired
Status this account was changed to.
Must be one of: active, suspended, canceled.
fromstringrequired
Status this account was changed from.
Must be one of: active, suspended, canceled.
partnerobject
Partner change.
Show child attributesHide child attributes
fromstring (uuid)required
Tenant should be unlinked from this partner account.
tostring (uuid)
Tenant should be linked to this partner account.

Errors

Status Meaning
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "pending",
  "type": "billingChange",
  "effectiveAt": "2019-09-23T12:02:01.700Z",
  "createdAt": "2019-09-23T12:02:01.700Z",
  "failedAt": "2019-09-23T12:02:01.700Z",
  "appliedAt": "2019-09-23T12:02:01.700Z",
  "createdBy": {
    "id": "string",
    "type": "user",
    "name": "string",
    "accountType": "partner",
    "accountId": "00000000-0000-0000-0000-000000000000"
  },
  "changes": {
    "billingType": {
      "to": "trial",
      "from": "trial"
    },
    "products": {
      "usage": {
        "added": [
          "string"
        ],
        "removed": [
          "string"
        ]
      },
      "ordered": {
        "added": [
          {
            "code": "string",
            "quantity": 0
          }
        ],
        "removed": [
          {
            "code": "string",
            "quantity": 0
          }
        ],
        "modified": [
          {
            "code": "string",
            "fromQuantity": 0,
            "toQuantity": 0
          }
        ]
      }
    },
    "status": {
      "to": "active",
      "from": "active"
    },
    "partner": {
      "from": "00000000-0000-0000-0000-000000000000",
      "to": "00000000-0000-0000-0000-000000000000"
    }
  }
}

See the guide for a narrative walkthrough of this API.