Solarware API-Dokumentation
YAML herunterladen

Telefone auflisten

Genau eines von contacts_id oder partners_id angeben.

get /api/v1/phones

Sicherheit

ApiKeyAuth

Parameter

Name In Typ Details
contacts_id query integer Optional
partners_id query integer Optional

Antworten

200 Telefonliste

application/json

{
    "allOf": [
        {
            "title": "API envelope",
            "type": "object",
            "properties": {
                "success": {
                    "type": "boolean"
                },
                "message": {
                    "type": "string",
                    "nullable": true
                },
                "errors": {
                    "nullable": true
                },
                "meta": {
                    "type": "object",
                    "nullable": true,
                    "additionalProperties": true
                }
            }
        },
        {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "title": "Phone",
                        "type": "object",
                        "description": "Phone in responses.",
                        "required": [
                            "number",
                            "is_primary"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer",
                                "nullable": true
                            },
                            "contacts_id": {
                                "type": "integer",
                                "nullable": true
                            },
                            "partners_id": {
                                "type": "integer",
                                "nullable": true
                            },
                            "label": {
                                "type": "string",
                                "nullable": true
                            },
                            "country_code": {
                                "type": "string",
                                "nullable": true
                            },
                            "number": {
                                "type": "string"
                            },
                            "extension": {
                                "type": "string",
                                "nullable": true
                            },
                            "e164_number": {
                                "type": "string",
                                "nullable": true
                            },
                            "is_primary": {
                                "type": "boolean"
                            }
                        }
                    }
                }
            }
        }
    ]
}
401 Missing or invalid API key

application/json

{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean",
            "example": false
        },
        "message": {
            "type": "string",
            "example": "Missing API key (X-Api-Key)"
        }
    }
}
404 Resource not found

application/json

{
    "title": "API envelope",
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string",
            "nullable": true
        },
        "errors": {
            "nullable": true
        },
        "meta": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
        }
    }
}
422 Validation failed

application/json

{
    "title": "API envelope",
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string",
            "nullable": true
        },
        "errors": {
            "nullable": true
        },
        "meta": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
        }
    }
}