Skip to content

Default products

GET/provisioning/default-products

Partner API · Provisioning

List of products to turn on by default when the provisioning request for a tenant doesn't specify them.

Required permissionaccount_management:read OR license_management:read

Parameters

Name In Type Required Description
X-Partner-ID header string (uuid) Yes Partner ID.

Request samples

curl -X GET "https://api.central.sophos.com/partner/v1/provisioning/default-products" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>"

import requests

response = requests.get(
    "https://api.central.sophos.com/partner/v1/provisioning/default-products",
    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/provisioning/default-products" -Headers $headers

package main

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

func main() {
    req, err := http.NewRequest("GET", "https://api.central.sophos.com/partner/v1/provisioning/default-products", 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/provisioning/default-products", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Partner-ID": "<partner-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Default products list.

Response fields

usagearray of object
List of usage products.
Items must be unique.
Default products for usage 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}$.
orderedarray of object
List of ordered products.
Items must be unique.
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.

Errors

Status Meaning
500 Unexpected error.

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

Response examples

200

{
  "usage": [
    {
      "code": "string"
    }
  ],
  "ordered": [
    {
      "code": "string",
      "quantity": 0
    }
  ]
}

See the guide for a narrative walkthrough of this API.