API — Addresses
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/addresses
List Addresses
Exemplo resposta (200):
[{
"id": 0,
"user_id": 0,
"tenant_id": 0,
"type": "string",
"is_default": true,
"first_name": "string",
"last_name": "string",
"address_line_1": "string",
"address_line_2": null,
"city": "string",
"state": null,
"postcode": "string",
"country": "string",
"phone": null,
"nif": null
}]
POST /api/addresses
Create Address
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| type | string | Nao | Type |
| is_default | boolean | Nao | Is Default |
| first_name | string | Sim | First Name |
| last_name | string | Sim | Last Name |
| address_line_1 | string | Sim | Address Line 1 |
| address_line_2 | object | Nao | Address Line 2 |
| city | string | Sim | City |
| state | object | Nao | State |
| postcode | string | Sim | Postcode |
| country | string | Nao | Country |
| phone | object | Nao | Phone |
| nif | object | Nao | Nif |
Exemplo pedido:
{
"type": "string",
"is_default": true,
"first_name": "string",
"last_name": "string",
"address_line_1": "string",
"address_line_2": null,
"city": "string",
"state": null,
"postcode": "string",
"country": "string",
"phone": null,
"nif": null
}
Exemplo resposta (201):
{
"id": 0,
"user_id": 0,
"tenant_id": 0,
"type": "string",
"is_default": true,
"first_name": "string",
"last_name": "string",
"address_line_1": "string",
"address_line_2": null,
"city": "string",
"state": null,
"postcode": "string",
"country": "string",
"phone": null,
"nif": null
}
Erros possiveis: 422 Validation Error
PUT /api/addresses/{address_id}
Update Address
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| address_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| type | object | Nao | Type |
| is_default | object | Nao | Is Default |
| first_name | object | Nao | First Name |
| last_name | object | Nao | Last Name |
| address_line_1 | object | Nao | Address Line 1 |
| address_line_2 | object | Nao | Address Line 2 |
| city | object | Nao | City |
| state | object | Nao | State |
| postcode | object | Nao | Postcode |
| country | object | Nao | Country |
| phone | object | Nao | Phone |
| nif | object | Nao | Nif |
Exemplo pedido:
{
"type": null,
"is_default": null,
"first_name": null,
"last_name": null,
"address_line_1": null,
"address_line_2": null,
"city": null,
"state": null,
"postcode": null,
"country": null,
"phone": null,
"nif": null
}
Exemplo resposta (200):
{
"id": 0,
"user_id": 0,
"tenant_id": 0,
"type": "string",
"is_default": true,
"first_name": "string",
"last_name": "string",
"address_line_1": "string",
"address_line_2": null,
"city": "string",
"state": null,
"postcode": "string",
"country": "string",
"phone": null,
"nif": null
}
Erros possiveis: 422 Validation Error
DELETE /api/addresses/{address_id}
Delete Address
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| address_id | integer | Sim | — |
Resposta (204): Successful Response
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.