Solarware API Docs
Download YAML

List addresses

Provide exactly one of contacts_id or partners_id.

get /api/v1/addresses

Security

ApiKeyAuth

Parameters

Name In Type Details
contacts_id query integer optional Filter by contact id (alias `contact_id`)
partners_id query integer optional Filter by partner id (alias `partner_id`)

Responses

200 Address list

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": "Address",
                        "type": "object",
                        "description": "Address in responses.\n",
                        "required": [
                            "address_line_1",
                            "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
                            },
                            "address_line_1": {
                                "type": "string"
                            },
                            "address_line_2": {
                                "type": "string",
                                "nullable": true
                            },
                            "zip_code": {
                                "type": "string",
                                "nullable": true
                            },
                            "city": {
                                "type": "string",
                                "nullable": true
                            },
                            "district": {
                                "type": "string",
                                "nullable": true
                            },
                            "state": {
                                "type": "string",
                                "nullable": true
                            },
                            "is_primary": {
                                "type": "boolean"
                            },
                            "country": {
                                "oneOf": [
                                    {
                                        "title": "Country",
                                        "type": "object",
                                        "required": [
                                            "id",
                                            "name"
                                        ],
                                        "properties": {
                                            "id": {
                                                "type": "integer"
                                            },
                                            "name": {
                                                "type": "string"
                                            },
                                            "iso2": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "iso3": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "numeric_code": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "phone_code": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "capital": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "currency": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "currency_symbol": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "native": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "region": {
                                                "type": "string",
                                                "nullable": true
                                            },
                                            "subregion": {
                                                "type": "string",
                                                "nullable": true
                                            }
                                        }
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        }
    ]
}
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
        }
    }
}