get-address-detail
Method: GET
Path: /customers/{user_id}/addresses/{address_id}
Tags: Customers
Summary
Retrieve particular address
Description
Retrieve address
Storefront SDK Usage
SDK Method: sdk.customer.getAddress()
Example:
typescript
const { data, error } = await sdk.customer.getAddress({
user_id: "user_456",
address_id: "addr_789"
});
if (error) {
console.error("Failed to get address:", error);
return;
}
console.log("Address details:", data.address);TypeScript Definition
typescript
"get-address-detail": {
parameters: {
query?: never;
header?: never;
path: {
/** @description address id */
address_id: string;
/** @description user id */
user_id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message?: string;
success?: boolean;
content?: {
address?: components["schemas"]["CustomerAddress"] & {
is_default_billing?: boolean;
is_default_shipping?: boolean;
};
};
};
};
};
401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CustomerAddress"] | CustomerAddress |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["NotFound"] | NotFound |
Parameters
- address_id (path): address id
- user_id (path): user id
Responses
200
OK
401
Not authorized for given operation on the Resource
404
Requested resource not found
OpenAPI Definition
json
{
"tags": [
"Customers"
],
"operationId": "get-address-detail",
"summary": "Retrieve particular address",
"description": "Retrieve address",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/get-address-detail",
"description": "API reference for the get-address-detail operation"
},
"parameters": [
{
"name": "address_id",
"in": "path",
"description": "address id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "user_id",
"in": "path",
"description": "user id",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"address": {
"allOf": [
{
"$ref": "#/components/schemas/CustomerAddress"
},
{
"type": "object",
"properties": {
"is_default_billing": {
"type": "boolean"
},
"is_default_shipping": {
"type": "boolean"
}
}
}
]
}
},
"type": "object"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "customers",
"x-speakeasy-ignore": false,
"x-speakeasy-name-override": "getAddressDetail"
}Auto-generated from OpenAPI spec and TypeScript definitions