API ReferenceapicommercePATCH /v1/addresses/{id}

PATCH /v1/addresses/\{id\}

Service: commerce · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1
    },
    "line1": {
      "type": "string",
      "minLength": 1
    },
    "line2": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": "string",
      "minLength": 1
    },
    "state": {
      "type": "string",
      "minLength": 1
    },
    "postal_code": {
      "type": "string",
      "minLength": 1
    },
    "country": {
      "type": "string",
      "minLength": 1
    },
    "is_default": {
      "type": "boolean"
    }
  }
}

Responses

200 Address updated

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

404 Address not found

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

409 Default address conflict

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

Example

curl -X PATCH https://commerce.platform.loop.health/v1/addresses/{id} \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'