API ReferenceapiidentityPOST /v1/users/me/addresses

POST /v1/users/me/addresses

Service: identity · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "line1": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "line2": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "city": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "region": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "postal_code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    },
    "country": {
      "type": "string",
      "minLength": 2,
      "maxLength": 2
    },
    "is_default": {
      "type": "boolean"
    }
  },
  "required": [
    "label",
    "line1",
    "city",
    "region",
    "postal_code",
    "country"
  ]
}

Responses

201 Created

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "line1": {
      "type": "string"
    },
    "line2": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "postal_code": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "is_default": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "user_id",
    "label",
    "line1",
    "line2",
    "city",
    "region",
    "postal_code",
    "country",
    "is_default",
    "created_at",
    "updated_at"
  ]
}

400 Validation

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://identity.platform.loop.health/v1/users/me/addresses \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'