Contract

Get all contracts

get

Retrieve a paginated list of contracts, provisioned under the Master Reseller contract. Default limit is the first 50 items; use pagination query parameters for listing more items.

Authorizations
Query parameters
offsetinteger · int32Optional

The first element (from the complete list of the elements) to include in the response (used together with limit for pagination).

Default: 0
limitinteger · int32 · min: 1 · max: 5000Optional

The maximum number of elements to return (use together with offset for pagination).

Default: 50
filter.statusstringOptional

Filter the list by contract status [BILLABLE, CEASED, REJECTED].

Responses
200
Success
application/json
get
GET /reseller/v2/contracts HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*
{
  "items": [
    {
      "id": "15514",
      "href": "https://api.ionos.com/reseller/v2/contract/15514",
      "name": "text",
      "resellerReference": "text",
      "status": "text",
      "resourceLimits": {
        "ramServerMax": 1,
        "cpuServerMax": 1,
        "hddVolumeMaxSize": 1,
        "ssdVolumeMaxSize": 1,
        "ramContractMax": 1,
        "cpuContractMax": 1,
        "hddVolumeContractMaxSize": 1,
        "ssdVolumeContractMaxSize": 1,
        "ips": 1
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create new contract

post
Authorizations
Body
namestringRequired

name of the contract

resellerReferencestringOptional

reseller reference of the contract

Responses
201
Success
application/json
post
POST /reseller/v2/contracts HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 241

{
  "name": "text",
  "resellerReference": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}
{
  "id": "15514",
  "href": "https://api.ionos.com/reseller/v2/contract/15514",
  "name": "text",
  "resellerReference": "text",
  "status": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}

Update contract name

put
Authorizations
Path parameters
contractNumberinteger · int64Required
Body
stringOptional
Responses
200
Success
application/json
put
PUT /reseller/v2/contracts/{contractNumber}/name HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: text/plain
Accept: */*
Content-Length: 6

"text"
{
  "id": "15514",
  "href": "https://api.ionos.com/reseller/v2/contract/15514",
  "name": "text",
  "resellerReference": "text",
  "status": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}

Update resource limits for contract

put
Authorizations
Path parameters
contractNumberinteger · int64Required
Body
ramServerMaxinteger · int32Required

maximum ram per virtual machine

cpuServerMaxinteger · int32Required

maximum number of cpu per virtual machine

hddVolumeMaxSizeinteger · int32Required

maximum hdd volume size

ssdVolumeMaxSizeinteger · int32Required

maximum ssd volume size

ramContractMaxinteger · int32Required

maximum ram per contract

cpuContractMaxinteger · int32Required

maximum cpu per contract

hddVolumeContractMaxSizeinteger · int32Required

maximum hhd volume per contract

ssdVolumeContractMaxSizeinteger · int32Required

maximum ssd volume per contract

ipsinteger · int32Required

maximum ips per contract

Responses
200
Success
application/json
put
PUT /reseller/v2/contracts/{contractNumber}/resourcelimits HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "ramServerMax": 1,
  "cpuServerMax": 1,
  "hddVolumeMaxSize": 1,
  "ssdVolumeMaxSize": 1,
  "ramContractMax": 1,
  "cpuContractMax": 1,
  "hddVolumeContractMaxSize": 1,
  "ssdVolumeContractMaxSize": 1,
  "ips": 1
}
{
  "id": "15514",
  "href": "https://api.ionos.com/reseller/v2/contract/15514",
  "name": "text",
  "resellerReference": "text",
  "status": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}

Find contract by ID

get
Authorizations
Path parameters
contractNumberinteger · int64Required
Responses
200
Success
application/json
get
GET /reseller/v2/contracts/{contractNumber} HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*
{
  "id": "15514",
  "href": "https://api.ionos.com/reseller/v2/contract/15514",
  "name": "text",
  "resellerReference": "text",
  "status": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}

Update contract

put
Authorizations
Path parameters
contractNumberinteger · int64Required
Body
namestringRequired

name of the contract

resellerReferencestringOptional

reseller reference of the contract

Responses
200
Success
application/json
put
PUT /reseller/v2/contracts/{contractNumber} HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 241

{
  "name": "text",
  "resellerReference": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}
{
  "id": "15514",
  "href": "https://api.ionos.com/reseller/v2/contract/15514",
  "name": "text",
  "resellerReference": "text",
  "status": "text",
  "resourceLimits": {
    "ramServerMax": 1,
    "cpuServerMax": 1,
    "hddVolumeMaxSize": 1,
    "ssdVolumeMaxSize": 1,
    "ramContractMax": 1,
    "cpuContractMax": 1,
    "hddVolumeContractMaxSize": 1,
    "ssdVolumeContractMaxSize": 1,
    "ips": 1
  }
}

Was this helpful?