Patch Reseller Account

Patch Reseller Account #

Updates a specific set of properties of an Account. This uses the JSON Patch format for any changes.

PATCH /v1.0/accounts/{ACCOUNT_TENANT_ID}

Example #

This example will disable a reseller account's access to the system.'

Request #

PATCH https://api.na.myreports.cloud/api/v1.0/accounts/{ACCOUNT_TENANT_ID}/ HTTP/1.1
Content-Type: application/json
accept-charges: true
Authorization: Bearer {TOKEN}
Connection: keep-alive
[{
		"op": "replace",
		"path": "/enabled",
		"value": false
	}
]

Response #

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xx
Request-Context: appId=cid-v1:d24f4c80-0a0a-432e-85aa-a6f91f13a038
{
	"status": "success",
	"timestamp": "2019-11-29T15:16:54.2586208Z"
}

Errors #

Unauthorized #

When the token is not provided, invalid or expired

HTTP/1.1 401 Unauthorized

Bad Request (1) #

When the provided tenant id is not in the correct format

HTTP/1.1 400 Bad Request
Date: Thu, 06 Feb 2020 12:45:27 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 149
{
	"error": 400,
	"message": "The value '<tenant id>' is not valid.",
	"status": "error",
	"timestamp": "2020-02-06T12:45:27.5903465Z"
}

Bad Request (2) #

When attempting to patch an invalid property.

HTTP/1.1 400 Bad Request
Date: Thu, 06 Feb 2020 12:45:27 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 149
{
	"error": 400,
	"message": "The target location specified by path segment '<invalid property>' was not found.",
	"status": "error",
	"timestamp": "2020-02-06T12:45:27.5903465Z"
}

Not Found #

When there are no Accounts that have a matching tenant id

HTTP/1.1 404 Not Found
Date: Thu, 06 Feb 2020 12:46:58 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 95
{
	"error": 404,
	"message": "Not Found",
	"status": "error",
	"timestamp": "2020-02-06T12:46:58.7669535Z"
}