CorebanqCorebanq Developer Docs
Addressesv1

Create new address

Handler: CreateAddress. Returns the full address object (models.Address), including id, address_hash, active, created_by, modified_by, metadata.

POST
/v1/addresses

Authorization

bearerAuth
AuthorizationBearer <token>

JWT bearer token (auth.WrapWithMiddlewares)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body for POST /v1/addresses (models.CreateAddressInput). Note: customer_id is required in addition to rec_id; metadata is NOT accepted here.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/addresses" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "rec_id": "0ba687c4-349e-490d-969f-fd374e232d42",    "rec_type": "string",    "type": "registration",    "street": "string",    "postal_code": "string",    "city": "string",    "country": "str"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "rec_id": "0ba687c4-349e-490d-969f-fd374e232d42",
  "rec_type": "string",
  "type": "registration",
  "street": "string",
  "number": "string",
  "additional": "string",
  "postal_code": "string",
  "city": "string",
  "state": "string",
  "country": "string",
  "is_primary": true,
  "address_hash": "string",
  "active": true,
  "metadata": {},
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  "modified_at": "2019-08-24T14:15:22Z",
  "modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f"
}
{
  "status": 400,
  "message": "Invalid input"
}
{
  "status": 403,
  "message": "Forbidden"
}