Modify Providers Info

This route is restricted to Admin and Super Admin access only.

Update Provider Details

This endpoint allows an administrator to modify key operational parameters for a specific provider, such as their maximum instance limit and the retention period for their listed instances.

📘

To implement these changes to your provider account, please contact us at [email protected]

Endpoint

PATCH /api/v1/admin/providers/{pro_id}

Authentication

TypeRequiredLocationDescription
Admin KeytrueHeaderThe key must be sent as x-api-key: ADMIN_KEY.

This is a protected administrative endpoint. You must provide the master ADMIN_KEY to successfully authenticate the request.


URL Parameters

ParameterTypeRequiredDescription
pro_idstringtrueThe unique ID of the provider account to update.

Request Body

The request body must be a JSON object. You can include one or both of the optional fields. At least one field must be provided.

FieldTypeRequiredDescription
instance_limitintegerfalseThe new maximum number of instances this provider is allowed to list. Must be a positive integer.
retention_monthintegerfalseThe new number of months an instance can exist before being eligible for auto-deletion. Must be a positive integer.

Example Requests

Updating Both Fields

This request updates both the instance limit and the retention period. Replace SOME_PROVIDER_ID and YOUR_ADMIN_KEY.

curl -X PATCH 'https://offers.dataoorts.com/api/v1/admin/providers/SOME_PROVIDER_ID' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_ADMIN_KEY' \
-d '{
    "instance_limit": 25,
    "retention_month": 8
}'

Updating a Single Field

This request updates only the retention period, leaving the instance limit unchanged.

curl -X PATCH 'https://offers.dataoorts.com/api/v1/admin/providers/SOME_PROVIDER_ID' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_ADMIN_KEY' \
-d '{
    "retention_month": 10
}'

Responses

✅ Success Response (200 OK)

Returned when the provider's details are successfully updated.

Body

{
  "status": "Success",
  "message": "Success: Provider 'PRO_2369560522365823' details have been updated."
}

Note: If the new values are the same as the existing ones, the message will indicate that no change was made, but the request is still considered successful.


❌ Error Response (400 Bad Request)

Returned for various validation errors in the request body.

Body (Example: Invalid Input Type)

{
  "error": "Bad Request",
  "details": "Invalid input: instance_limit must be a positive integer."
}

Body (Example: No Fields Provided)

{
  "error": "Bad Request",
  "details": "No updates provided. Please specify an instance_limit or retention_month."
}

❌ Error Response (401 Unauthorized)

Returned if the x-api-key header is missing or the provided key is invalid.

Body

{
  "error": "Unauthorized Access"
}
❗️

Note: More than three failed authentication attempts will result in a permanent IP block.


❌ Error Response (404 Not Found)

Returned if no provider account exists with the pro_id provided in the URL

Body

{
  "error": "Not Found",
  "details": "Update failed: No provider found with ID 'PRO_96558742365851235'."
}

❌ Error Response (500 Internal Server Error)

Returned for database errors or other unexpected issues on the server.

Body

{
  "error": "An internal server error occurred",
  "details": "Specific error message from the server."
}