On this page

    1. Home
    2. API
    3. API Reference
    4. Device
    5. Device Adopt Status

    Device Adopt Status

    This endpoint allows the device that generated an adoption code to check if another network has attempted to adopt it. It provides information on whether the adoption is pending and the name of the network requesting ownership.


    POST /device/adopt-status

    Check the current state of a device adoption request.

    Request

    POST /device/adopt-status

    Headers:

    {
      "Host": "api.bringyour.com",
      "Content-Type": "application/json"
    }

    Body:

    {
      "adopt_code": "string"
    }
    FieldTypeDescription
    adopt_codestringRequired. The unique adoption code generated by the device.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "pending": true,
      "associated_network_name": "string",
      "error": {
        "message": "string"
      }
    }

    Fields

    FieldTypeDescription
    pendingbooleantrue if a network has entered the adoption code and is waiting for confirmation.
    associated_network_namestringThe name of the network that is attempting to adopt the device.
    errorobjectPresent if the status check fails.
    error.messagestringA descriptive message explaining the failure.

    Example

    HTTP Request

    POST /device/adopt-status HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
     
    {
      "adopt_code": "ADOPT-9876-5432"
    }

    Successful HTTP Response

    {
      "pending": true,
      "associated_network_name": "MainOpsNetwork",
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents