Zum Hauptinhalt springen

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:

CampoTipoObrigatorioDescricao
typestringNaoType
is_defaultbooleanNaoIs Default
first_namestringSimFirst Name
last_namestringSimLast Name
address_line_1stringSimAddress Line 1
address_line_2objectNaoAddress Line 2
citystringSimCity
stateobjectNaoState
postcodestringSimPostcode
countrystringNaoCountry
phoneobjectNaoPhone
nifobjectNaoNif

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:

NomeTipoObrigatorioDescricao
address_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
typeobjectNaoType
is_defaultobjectNaoIs Default
first_nameobjectNaoFirst Name
last_nameobjectNaoLast Name
address_line_1objectNaoAddress Line 1
address_line_2objectNaoAddress Line 2
cityobjectNaoCity
stateobjectNaoState
postcodeobjectNaoPostcode
countryobjectNaoCountry
phoneobjectNaoPhone
nifobjectNaoNif

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:

NomeTipoObrigatorioDescricao
address_idintegerSim

Resposta (204): Successful Response

Erros possiveis: 422 Validation Error


Documentacao gerada automaticamente.