Skip to content

Default products

PATCH/provisioning/default-products

Partner API · Provisioning

Update the list of default products.

Required permissionaccount_management:write OR license_management:write

Parameters

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

Request body

Content type: application/json

Request body 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.

Request samples

curl -X PATCH "https://api.central.sophos.com/partner/v1/provisioning/default-products" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>" -H "Content-Type: application/json" -d "{
  \"usage\": [
    {
      \"code\": \"CIXA-MSP\"
    },
    {
      \"code\": \"CEMA-MSP\"
    }
  ],
  \"ordered\": [
    {
      \"code\": \"CIXA-MSP\",
      \"quantity\": 10
    },
    {
      \"code\": \"CEMA-MSP\",
      \"quantity\": 10
    }
  ]
}"

import requests

response = requests.patch(
    "https://api.central.sophos.com/partner/v1/provisioning/default-products",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Partner-ID": "<partner-id>",
        "Content-Type": "application/json",
    },
    json={   'usage': [{'code': 'CIXA-MSP'}, {'code': 'CEMA-MSP'}],
    'ordered': [   {'code': 'CIXA-MSP', 'quantity': 10},
                   {'code': 'CEMA-MSP', 'quantity': 10}]},
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Partner-ID" = "<partner-id>"
    "Content-Type" = "application/json"
}
$body = '{
  "usage": [
    {
      "code": "CIXA-MSP"
    },
    {
      "code": "CEMA-MSP"
    }
  ],
  "ordered": [
    {
      "code": "CIXA-MSP",
      "quantity": 10
    },
    {
      "code": "CEMA-MSP",
      "quantity": 10
    }
  ]
}'
Invoke-RestMethod -Method PATCH -Uri "https://api.central.sophos.com/partner/v1/provisioning/default-products" -Headers $headers -Body $body -ContentType "application/json"

package main

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

func main() {
    req, err := http.NewRequest("PATCH", "https://api.central.sophos.com/partner/v1/provisioning/default-products", strings.NewReader(`{
  "usage": [
    {
      "code": "CIXA-MSP"
    },
    {
      "code": "CEMA-MSP"
    }
  ],
  "ordered": [
    {
      "code": "CIXA-MSP",
      "quantity": 10
    },
    {
      "code": "CEMA-MSP",
      "quantity": 10
    }
  ]
}`))
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Partner-ID", "<partner-id>")
    req.Header.Set("Content-Type", "application/json")

    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: "PATCH",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Partner-ID": "<partner-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "usage": [
    {
      "code": "CIXA-MSP"
    },
    {
      "code": "CEMA-MSP"
    }
  ],
  "ordered": [
    {
      "code": "CIXA-MSP",
      "quantity": 10
    },
    {
      "code": "CEMA-MSP",
      "quantity": 10
    }
  ]
}),
});
const data = await response.json();
console.log(data);

Responses

200 — Updated list of default products.

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.